Changes between Version 1 and Version 2 of TranslationSystem


Ignore:
Timestamp:
Oct 15, 2013, 10:20:55 AM (11 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TranslationSystem

    v1 v2  
    1 = BOINC Translation System =
     1= Translating BOINC =
    22
    3 The BOINC translation system is broken into three phases.
     3The translation of BOINC involves several steps:
    44
    5 == Template Construction ==
     5 * Generate "templates" (.pot files) containing translatable strings from the BOINC source code.
     6 * Import these templates into Pootle.
     7 * Volunteers translate the strings in Pootle.
     8 * Export the translations (*.po files) from Pootle to the BOINC Git repo
     9 * Deploy the new translations.
    610
    7 This phase is primarily a manual operation.  If the automated framework consumes an invalid or empty template file all existing translations will be thrown away.
     11BOINC is divided into the following components, each with its own template file:
    812
    9 To manually update a template run the 'build_po' scripts in the given area of interest:
    10  * boinc/doc           (BOINC-Web.pot)
    11  * html/user           (BOINC-Project-Generic.pot)
    12  * boinc/client        (BOINC-Client.pot)
    13  * boinc/clientgui     (BOINC-Manager.pot)
    14  * boinc/mac_installer (BOINC-Setup.pot)
     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 ||
    1520
    16 To update the Android localization template execute:
    17 {{{
    18 cd boinc/android
    19 a2po export -v
    20 }}}
     21All template files are stored in '''locale/templates/''' in the BOINC repo.
     22The translations for language X are stored in '''locale/X/'''.
    2123
    22 After verifying that the updated templates have the correct string to translate and a PO header go ahead and commit the changes.
     24== Software releases ==
    2325
    24 All templates are stored in /boinc/locale/templates.
     26Translation activity takes place in trunk.
     27When a release branch (client or server) is created,
     28its translations are the contents of '''locale/''' at that point.
     29If translations change after that,
     30or new translatable strings are added to the branch,
     31we'll need to back-port changes to the .po files.
     32
     33== Template generation ==
     34
     35If a faulty template file is committed to the BOINC repo and picked up by Pootle,
     36all existing translations will be lost.
     37Therefore manual validation is used.
     38The process is as follows:
     39
     40 * Once a day, a script '''build_pos''' is run as a cron job.
     41    This script generates a template for each component,
     42    leaving the .pot file in the component directory.
     43    It then compares the .pot file with the one in '''locale/templates'''.
     44    If they differ (not counting comments) it sends an email to Rom and David.
     45 * On receiving this email, Rom and/or David examines the new template file.
     46    If it's valid, they move it to '''locale/templates''' and commit it.
    2547
    2648== Translation ==
    2749
    28 Twice daily a cron job kicks off the process of committing all changes and updating existing languages using the new templates.
     50Twice daily a cron job pulls modified templates from the BOINC repo and adds them to the Pootle database.
     51DETAILS?
    2952
    3053Pootle takes care of the bulk of this with the following commands (pootle/update.sh):
     
    3861== Post Translation Updates ==
    3962
    40 After all the latest updates have been committed the compiled PO files need to be updated.  The end of the pootle/update.sh file executes boinc/locale/updatetrans.sh which handles compiling the PO files into MO files.
     63After all the latest updates have been committed the compiled PO files need to be updated.
     64The end of the pootle/update.sh file executes boinc/locale/updatetrans.sh which handles compiling the PO files into MO files.
     65IS THIS AUTOMATED?
    4166
    4267Converting the Android PO file back into the native Android localization system XML files involves executing:
     
    4469a2po export -v
    4570}}}
     71
     72== Deployment ==
     73
     74=== The BOINC web site ===
     75
     76The BOINC web code expects translation files to be in ../languages/translations/.
     77On the BOINC web server, this directory contains symbolic links from X.po
     78to '''../../locale/X/BOINC-Web.po'''.
     79
     80'When we add a new language, we need to add a new symbolic link.'
     81
     82Deploying new translations requires running the script
     83'''doc/update_translations.php''',
     84which converts the .po files to a PHP translation array.
     85This is done from cron.
     86
     87=== Project web sites ===
     88
     89