Skip to content

Import ember-i18n translations from a single consolidate csv file

License

Notifications You must be signed in to change notification settings

jpoiri/ember-i18n-import

Repository files navigation

ember-i18n-import

This package imports ember-i18n translations into an ember project from a csv file. It is meant to be used along with ember-i18n-export package as way to import back translations back into your project once they are translated.

Installing

npm install ember-i18n-import

Usage

Run the following command from the root of your ember project:

ember-i18n-import --inputFile translations.csv <options>

Options

inputFile

The csv file containing the translations.

ember-i18n-import --inputFile translations.csv

outputDir

By default the translation files are generated in the app/locales directory, you can override this by using the outputDir option:

ember-i18n-import --inputFile translations.csv --outputDir app/translations

outputFile

By default the translation file generated for each locale is translations.js , you can override this by using the outputFile option:

ember-i18n-import --inputFile translations.csv --outputFile trans.js

translationKeyColumnName

By default the translation key is taken from the SYSTEM_KEY column in the csv file, you can override this by using the translationKeyColumnName:

ember-i18n-import --inputFile translations.csv --translationKeyColumnName TRANSLATION_KEY

localeColumnNames

By default each locale values is taken from the matching capitalize locale column in the csv file, you can override this by using the localeColumnNames option:

ember-i18n-import --inputFile translations.csv --localeColumnNames {\"en\":\"English\",\"fr\":\"French\"}

excludedLocales

By default all locales are imported, you can override this by passing comma delimited string of locales to exclude.

ember-i18n-import --inputFile translations.csv --excludedLocales en,fr

About

Import ember-i18n translations from a single consolidate csv file

Resources

License

Stars

Watchers

Forks

Packages

No packages published