JSON to CSV and vice-versa for ember-i18n
npm install -g ember-i18n-csv
Export your ember-i18n localization files to a CSV file for translators:
ember-i18n-csv to-csv --locales-path=path_to_locales_folder --csv-path=i18n.csv [--missing-only]
and import back in when you get them back:
ember-i18n-csv to-js --csv-path=i18n.csv --locales-path=path_to_locales_folder [--jshint-ignore] [--merge]
--missing-only
means the generated CSV will only contain keys where there is a missing translation in one of the locales
--jshint-ignore
will put ignore comments in your js files, useful if you lint for single quotes
--merge
means that any keys present in the CSV will overwrite the ones present in the destination locale files but if the key is not present then the existing key will be kept in place.
It's not as simple as opening, editing, and saving in Excel.
- Import
- blank workbook
- import data from text
- delimited
- 65001
- comma
- shift click select all columns
- change from general to text (general tries to guess types ie. will convert "true" to "TRUE")
- Edit
- nothing special
- Export
- save as
- CSV (Command delimited)
- the resulting file will not be utf8. convert to utf8 (notepad++ for me)