Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

l10n-translator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

l10n-translator - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

Makefile

2

index.js

@@ -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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc