https://github.com/michiel/ember-cli-generate-translations
ember-cli task to generate POT file from YAML and YAML files from PO files
https://github.com/michiel/ember-cli-generate-translations
ember-cli ember-intl emberjs intl po-files pot yaml
Last synced: 2 months ago
JSON representation
ember-cli task to generate POT file from YAML and YAML files from PO files
- Host: GitHub
- URL: https://github.com/michiel/ember-cli-generate-translations
- Owner: michiel
- License: mit
- Created: 2016-12-02T12:54:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-27T14:30:42.000Z (over 9 years ago)
- Last Synced: 2025-03-01T18:38:47.930Z (over 1 year ago)
- Topics: ember-cli, ember-intl, emberjs, intl, po-files, pot, yaml
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-generate-translations
[](https://emberobserver.com/addons/ember-cli-generate-translations)
[](https://travis-ci.org/michiel/ember-cli-generate-translations)
This ember-addon generates a POT file for translation from the master YAML file
and imports the translated PO files into YAML language files.
It currently works with ember-intl and expects there to be a configuration for that at _config/ember-intl.js_
## Tasks
It adds three tasks
### _generate-i18n-dirs_
ember generate-i18n-dirs
This task generates the _i18n-data/_ directory and its _po_ and _pot_ subdirectories.
### _generate-i18n-pot_
ember generate-i18n-pot
This task takes the master YAML file and converts it to a POT file in _i18n-data/pot/app.pot_.
### _generate-i18n-yaml_
ember generate-i18n-dirs
This task takes the PO files in _i18n-data/po/_ and converts each of the into the corresponding YAML file. So _i18n-data/po/nl-nl.po_ is transformed to _translations/nl-nl.yaml_.
### Filesystem layout
In the translations directory, here en-us.yaml is the master file and is specified in _config/ember-intl.js_ as _baseLocale : 'en-us'_.
translations/
├── en-us.yaml
├── nl-nl.yaml
├── en-gb.yaml
└── es-es.yaml
i18n-data/
├── po
│ ├── nl-nl.po
│ ├── en-gb.po
│ └── es-es.po
└── pot
└── app.pot
## Installation
ember install ember-cli-generate-translations