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

broccoli-i18n-compiler

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-i18n-compiler

i18n compiler plugin for Broccoli

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-i18n-compiler

The broccoli-i18n-compile plugin compiles .json files into Ember.I18n translations files

This plugin assumes the language files are a flat json with the name of the file ie en.json or pt-BR.json

You should end up with js files: i18n-en.js and i18n-pt-BR.js

Example Output
if(typeof Translations === 'undefined') { var Translations = {} };
Translations.locale = 'da';
Translations.translations = Translations.translations || {};
Translations.translations = _.extend(Translations.translations, {
  "totally": "Kerl",
  "good": "Wir sind"

  ... removed for brevity

});

Installation

Add code to package.json file in the dev dependancies.

npm install broccoli-i18n-compiler

Usage

var i18nCompiler = require('broccoli-i18n-compiler');

var languages = i18nCompiler('i18n', {
  outputFolder: 'application/public/js'
});
  • inputTree: Trees that act as the source

  • options: A hash of options. Options avaliable: outputFolder

Example

var appTranslations = emberI18nPrecompile("i18n", {outputFolder: 'js'});

Testing

npm test

How do I contribute?

Fork this repository and submit a pull request.

Keywords

FAQs

Package last updated on 26 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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