l10n-translator
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -49,2 +49,2 @@ // deps | ||
return term; | ||
}; | ||
}; |
{ | ||
"name": "l10n-translator", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Simple module for storing and retrieving l10n catalogs", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha -R spec -t 5000 test/main.js" | ||
"test": "make test" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -15,2 +15,12 @@ # Translator | ||
If you're interested, you can also: | ||
npm test | ||
or | ||
make test | ||
To verify things are still wired up correctly. | ||
## Usage | ||
@@ -28,6 +38,19 @@ | ||
### Catalog Files | ||
You can specify the default/fallback locale by: | ||
Catalog files should be placed in the folder you provide when creating a new Translator. They should end in `.js`, be named simple things like `en_us` or `en_fr`, and be formatted something like this: | ||
var catalog = new Translator('relative/project/path','en_fr'); | ||
or by changing it: | ||
catalog.setLocale('en_fr'); | ||
or at will: | ||
catalog.lookup('PROPERTY_NAME', req.user.locale) | ||
#### Catalog Files | ||
Catalog locale files should be placed in the folder you provide when creating a new Translator. They should end in `.js`, be named simple things like `en_us` or `en_fr`, and be formatted something like this: | ||
##### "locale/en_us.js" | ||
```js | ||
@@ -43,14 +66,2 @@ // l10n `en_us` | ||
You can specify the default/fallback locale by: | ||
var catalog = new Translator('relative/project/path','en_fr'); | ||
or by changing it: | ||
catalog.setLocale('en_fr'); | ||
or at will: | ||
catalog.lookup('PROPERTY_NAME', req.user.locale) | ||
## Behavior | ||
@@ -74,2 +85,6 @@ | ||
`1.0.1` | ||
- Updated README | ||
- Added `Makefile` for tests | ||
`1.0.0` | ||
@@ -76,0 +91,0 @@ - **Breaking API changes**: New feature allows catalog directory (relative to `process.cwd()`) to be provided) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11602
10
197
97