Changes between Version 7 and Version 8 of TranslationSystem


Ignore:
Timestamp:
Nov 29, 2016, 1:12:14 AM (7 years ago)
Author:
Christian Beer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TranslationSystem

    v7 v8  
    44
    55 * Generate "templates" (.pot files) containing translatable strings from the BOINC source code.
    6  * Commit updated template(s).
     6 * Commit updated template(s) and upload to Transifex.
    77 * Volunteers translate the strings on Transifex.
    8  * Updated translations are automatically committed to the BOINC Git repo on GitHub.
     8 * Updated translations are downloaded to the BOINC Git repo on !GitHub.
    99 * Deploy the new translations.
    1010
    1111BOINC is divided into the following components, each with its own template file:
    1212
    13  ||= Component =||= directory =||= Template file =||= Command =||
    14  || BOINC web site || doc/ || BOINC-Web.pot || build_po.php ||
    15  || Project web site || html/user/ || BOINC-Project-Generic.pot || html/ops/build_po_boinc.php ||
    16  || Client || client/ || BOINC-Client.pot || build_po ||
    17  || Manager || clientgui/ || BOINC-Manager.pot || build_po ||
    18  || Mac installer || mac_installer/ || BOINC-Setup.pot || build_po ||
    19  || Android GUI || android/ || BOINC-Android.pot || a2po export -v ||
     13 ||= Component =||= directory =||= Template file =||= Language files =||
     14 || BOINC web site || doc/ || locale/templates/BOINC-Web.pot || locale/<lang>/BOINC-Web.po ||
     15 || Project web site || html/user/ || locale/templates/BOINC-Project-Generic.pot || html/languages/translations/<lang>.po ||
     16 || Client || client/ || locale/templates/BOINC-Client.pot || locale/<lang>/BOINC-Client.po ||
     17 || Manager || clientgui/ || locale/templates/BOINC-Manager.pot || locale/<lang>/BOINC-Manager.po ||
     18 || Mac installer || mac_installer/ || locale/templates/BOINC-Setup.pot || locale/<lang>/BOINC-Setup.po ||
     19 || Android GUI || android/ || android/BOINC/res/values/strings.xml || android/BOINC/res/values-<lang>/strings.xml ||
    2020
    21 All template files are stored in '''locale/templates/''' in the BOINC repo.
    22 The translations for language X are stored in '''locale/X/'''.
     21In order to update templates or translations one needs to have write permissions in the BOINC github repository and be a maintainer on the BOINC Transifex project. The tools '''xgettext, tx and pocompile''' (Debian packages: gettext, transifex-client, translate-toolkit) need to be installed to do the updates.
     22Android uses different language codes for regional languages so there is an additional mapping configured in '''.tx/config'''.
    2323
    2424== Software releases ==
     
    3333== Template generation ==
    3434
    35 If a faulty template file is committed to the BOINC repo and picked up by Pootle,
    36 all existing translations will be lost.
    37 Therefore manual validation is used.
     35New templates are needed if translatable strings change in source code. The script '''locale/update_templates.sh''' generates the templates (except Drupal and Android), commits them to the repository and pushes them to Transifex. You can check the template generation by using the '''-t''' testmode switch. Transifex has a Translation Memory so pushing a faulty template does not remove existing translations. Just push a fixed template and translations will be recovered.
    3836
    39 The process is as follows:
     37Templates for Android and Drupal need to be committed and pushed to Transifex (use '''tx push -s''') separately.
    4038
    41  * Templates are updated as needed, Rom and/or David generate a new template file.
    42     If it's valid, they move it to '''locale/templates''' and commit it.
     39Projects can create templates for their project specific website using '''html/ops/build_po.php''' and send it to Transifex for translation too.
    4340
    4441== Translation ==
    4542
    46 Translation is handled via the Transifex web portal.  Using the TransifexGithub bridge software,
    47 templates and completed translations are kept in sync between Transifex and Github.
     43New translations need to be downloaded from Transifex and committed into the BOINC Github repository using '''locale/update_translations.sh'''. Translations are only downloaded if they are 100% complete and already present in the repository. New translations need to be downloaded using '''tx pull -a'''.
     44
     45This workflow currently does not delete outdated translation files from the git repository!
    4846
    4947== Deployment ==
     
    6462=== Project web sites ===
    6563
     64There is currently no detailed workflow how to deploy project specific translations. But one needs to adapt '''.tx/config''' and '''locale/update_translations.sh''' accordingly to download project-specific translations to '''html/languages/project_specific_translations/''' and compile them together using '''html/ops/update_translations.php'''.
    6665
     66The Drupal website contains an admin function to directly download translations from Transifex (for Drupal generic and project-specific parts).