# sails-stringfile

> translated/localized stringfiles containing messages from Sails core and dependencies

Latest version **0.3.3** (published 2019-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install sails-stringfile
pnpm add sails-stringfile
yarn add sails-stringfile
bun add sails-stringfile
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2019-04-30 |
| First published | 2014-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mike McNeil |
| Maintainers | balderdashy, mikermcneil, rachaelshaw |
| Keywords | sails, waterline, international, web, internationalization, cli, locales, web-framework, i18n |

## Links

- npm: https://www.npmjs.com/package/sails-stringfile
- Repository: https://github.com/balderdashy/sails-stringfile
- Issues: https://github.com/balderdashy/sails-stringfile/issues
- npm.io page: https://npm.io/package/sails-stringfile

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) *
- [@sailshq/lodash](https://npm.io/package/@sailshq/lodash.md) ^3.10.2

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2019-04-30
- 0.3.2 — 2014-02-07
- 0.3.1 — 2014-02-05
- 0.3.0 — 2014-01-31
- 0.2.0 — 2014-01-31
- 0.1.0 — 2014-01-31
- 0.0.1 — 2014-01-17

## README

sails-stringfile
===================

Localized stringfile containing messages used in Sails command-line interface and runtime.

This project is an early-stage work in progress to make all strings used in Sails humanLanguageAgnostic.  That includes console messages, comments in generated code files, and even errors.  This is a big project, but just one small part of the effort towards making Sails more accessible to non-native English readers/speakers.


## How This Module Works

+ Environment variables are used to determine a user's locale.  (defaults to English)


## Usage


```javascript
// From Sails core, an adapter, a generator, a hook, or some other dependency:
var STRINGFILE = require('sails-stringfile');

// Internally, this module runs node's native `util.format()` method,
// so you can also template strings:
var localizedMessage = STRINGFILE.get('cli.new.success', ['myApp', {some:'stuff'}, 'more stuff'])

// Then, appropriate msg is brought in auf deutsch, espanol, traditional chinese, english, etc.
console.log(localizedMessage);
```


## Languages

Current language support _targets_ are:

+ English
+ French
+ Spanish
+ Traditional Chinese
+ German

> (please send a PR if you have a request and we'll add it to this list!)




## How Can I Help?

+ The existing strings need to be pulled out of log messages and errors in:
  + sails core
  + anchor core
  + waterline core
  + sails-generate-*
  + sails-hook-*
  + sails-adapter-* (adapters)

> See the complete list of modules here: https://github.com/balderdashy/sails/blob/master/MODULES.md

+ Code comments and other support files (like README) in newly generated sails modules (or a new project) should be pulled out into the generator scope and brought in using the same mechanism.  This is only relevant for generators:
  + sails-generate-new
  + sails-generate-frontend
  + sails-generate-backend
  + sails-generate-views
  + sails-generate-gruntfile
  + sails-generate-controller
  + sails-generate-model
  + sails-generate-generator

+ A stringfile needs to be created in the `locales` in this repository for each language we want to support, mapping the string keys to a reasonable log message in the target language (the English stringfile is a good reference to see how a particular type of message should be worded, etc.).





## License

MIT c. Mike McNeil 2014

---
_Source: https://npm.io/package/sails-stringfile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
