Socket
Socket
Sign inDemoInstall

broccoli-ember-i18n-precompile

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-ember-i18n-precompile

Ember i18n precompiler plugin for Broccoli


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-ember-i18n-precompile

The broccoli-ember-i18n-precompile plugin precompiles .json files with translations.

This is an opinionated plugin, it assumes a top level folder with the language name, with individual folders and JSON files beneath them. It assumes you will load the translations at initialization time.

Your translations folder will look something like this:

app
|- translations
|  |- en
|  |  navigation.json
|  |  |- users
|  |  |  |- index.json
|  |- de
|  |  navigation.json
|  |  |- users
|  |  |  |- index.json

You should end up with js files, with an object:

{
  "navigation": {
    ...
  },
  "users": {
    "index": {
      ...
    }
  }
}

Installation

npm install --save-dev broccoli-ember-i18n-precompile

Usage

var emberI18nPrecompile = require('broccoli-ember-i18n-precompile');

var outputTree = emberI18nPrecompile(inputTree, options)
  • inputTree: Trees that act as the source

  • options: A hash of options.

Example

var appTranslations = emberI18nPrecompile("app/translations", {outputFolder: 'assets/translations'});

Keywords

FAQs

Package last updated on 30 Sep 2014

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