From e75cf18fc05e0ce11035db9287b5b5ebfb828f6b Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 27 Jan 2016 17:55:24 +0100 Subject: [PATCH] Updated maintainer instructions for updated translation flow --- maintain/translations.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/maintain/translations.md b/maintain/translations.md index 89e56ec..c7eabe0 100644 --- a/maintain/translations.md +++ b/maintain/translations.md @@ -4,9 +4,9 @@ Pagekit supports i18n for its interface. Translations are managed on [Transifex](https://www.transifex.com/pagekit/pagekit-cms). -Several tools are available to extract translatable strings from the Pagekit source files (step B) and to pull available translations from Transifex into the Pagekit source (step D). +Several tools are available to extract translatable strings from the Pagekit source files (step B) and to pull available translations from Transifex into the Pagekit source (step D and E). -Translatable strings are located in `*.pot` files, i.e. `app/system/languages/messages.pot`. Translations are located in `*.php` files, i.e. `app/system/languages/de_DE/messages.php`. While both kind of files are located in the repository, pull requests are to be rejected. All contributions should happen via Transifex (and the pot files are generated automatically - see step B). +Translatable strings are located in `*.pot` files, i.e. `app/system/languages/messages.pot`. Translations are located in `*.php` files, i.e. `app/system/languages/de_DE/messages.php`. While `*.pot` files are located in the repository, pull requests are to be rejected. All contributions should happen via Transifex (and the pot files are generated automatically - see step B). ## A. Configuration @@ -37,7 +37,16 @@ You need: *When?* Before every release. -*What happens here?* For any languages with existing translations on the Transifex project, the translations are downloaded, converted to a PHP array and saved to the right folders in Pagekit. +*What happens here?* For any languages with existing translations on the Transifex project, the translations are downloaded, converted to a PHP array and saved to a separate `languages` repository. -1. `php pagekit translation:fetch pagekit/blog --username= --password=` -2. Commit & push the new files +1. Clone `https://github.com/pagekit/languages` and follow the setup instructions in the README +2. Run `php update.php` in the cloned repository. All current translations are fetched +3. Commit & push the new files + +## E. Fetch translation strings from translation repository and merge into Pagekit installation + +*When?* When you need translation files during development. Not needed before build, because build task does this automatically. + +*What happens here?* Language files are fetched from the languages repository and sorted into the right languages folder (of system, extension-blog and theme-one). + +`php pagekit translation:fetch`