diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-07-16 12:05:45 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-07-16 12:05:45 +0100 |
commit | d64abd585d540dd8c36a28c60d0c3e4f522d4c54 (patch) | |
tree | a203a7f9fd29988177f1cac0d9d2462bc3ea33d6 | |
parent | a5f1306c468f104a5f131faf5c63b3c9dfa38887 (diff) | |
parent | ba675b072994990baf16fec04489832750e82d2e (diff) |
Merge branch 'gh-pages-updating-translations' into gh-pages
-rw-r--r-- | docs/developers/i18n.md | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/developers/i18n.md b/docs/developers/i18n.md index deabc99a1..24c0c31e0 100644 --- a/docs/developers/i18n.md +++ b/docs/developers/i18n.md @@ -7,7 +7,7 @@ title: Internationalisation (for devs) <p class="lead"> This page describes some technical aspects of internationalising the - Alaveteli code. It's mostly aimed at devs who are working on the + Alaveteli code. It's mostly aimed at devs who are working on the codebase — if you just want to translate Alaveteli into your own language, see <a href="{{ site.baseurl }}docs/customising/translation">translating Alaveteli</a> @@ -29,11 +29,27 @@ work and turns it into the files that Alaveteli needs (using gettext). For example, to deploy English and Spanish translations at once: - * Ensure their `.po` files are at ```locale/en/app.po``` and ```locale/es/app.po``` + * Ensure their `.po` files are at ```locale/en/app.po``` and ```locale/es/app.po``` (for example, by downloading them from Transifex) * Set <code><a href="{{ site.baseurl }}docs/customising/config/#available_locales">AVAILABLE_LOCALES</a></code> to <code>en es</code> +### What to do if you don't have complete translations for an older release of Alaveteli + +Before a new release of Alaveteli is made, the translation files are +pulled from Transifex and added to Alaveteli's ``locale/`` directory in +github. These represent the most complete translations for the previous +release. Then the files in Transifex are updated with any new strings +that need to be translated for the upcoming release. At this point old +strings that are no longer used in the new release are also removed. The +latest [release tag](https://github.com/mysociety/alaveteli/releases) +for a release in github should contain the most complete translations +for that release from Transifex. + +If you're using an older release of Alaveteli and you want to add to or +change the translations, you can edit the .po files directly using a +local program such as [PoEdit](http://poedit.net/). + ### How to add new strings to the translations You need to do this if you've added any new strings to the code that need @@ -63,7 +79,7 @@ For more details about the translations, see the page about This is complicated by the fact that there are two competing ways to define a locale+territory combination. The POSIX (and gettext and Transifex) way is like `en_GB`; the Rails way is like `en-US`. Because we are using gettext and -Transifex for translations, we must deal with both. +Transifex for translations, we must deal with both. * for the Rails version of the currently selected locale, use `I18n.locale` * for the POSIX version of the locale, use `FastGettext.locale` @@ -85,7 +101,7 @@ Some hints for adding the strings into the Alaveteli code: * We allow some inline HTML where it helps with meaningful context, for example: ``` -_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add it</a>.', +_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add it</a>.', :browse_url => @browse_url, :add_url => @add_url) ``` |