Changes between Version 1 and Version 2 of TranslationSystem
- Timestamp:
- Oct 15, 2013, 10:20:55 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TranslationSystem
v1 v2 1 = BOINC Translation System=1 = Translating BOINC = 2 2 3 The BOINC translation system is broken into three phases.3 The translation of BOINC involves several steps: 4 4 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. 6 10 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. 11 BOINC is divided into the following components, each with its own template file: 8 12 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 || 15 20 16 To update the Android localization template execute: 17 {{{ 18 cd boinc/android 19 a2po export -v 20 }}} 21 All template files are stored in '''locale/templates/''' in the BOINC repo. 22 The translations for language X are stored in '''locale/X/'''. 21 23 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 == 23 25 24 All templates are stored in /boinc/locale/templates. 26 Translation activity takes place in trunk. 27 When a release branch (client or server) is created, 28 its translations are the contents of '''locale/''' at that point. 29 If translations change after that, 30 or new translatable strings are added to the branch, 31 we'll need to back-port changes to the .po files. 32 33 == Template generation == 34 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. 38 The 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. 25 47 26 48 == Translation == 27 49 28 Twice daily a cron job kicks off the process of committing all changes and updating existing languages using the new templates. 50 Twice daily a cron job pulls modified templates from the BOINC repo and adds them to the Pootle database. 51 DETAILS? 29 52 30 53 Pootle takes care of the bulk of this with the following commands (pootle/update.sh): … … 38 61 == Post Translation Updates == 39 62 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. 63 After all the latest updates have been committed the compiled PO files need to be updated. 64 The end of the pootle/update.sh file executes boinc/locale/updatetrans.sh which handles compiling the PO files into MO files. 65 IS THIS AUTOMATED? 41 66 42 67 Converting the Android PO file back into the native Android localization system XML files involves executing: … … 44 69 a2po export -v 45 70 }}} 71 72 == Deployment == 73 74 === The BOINC web site === 75 76 The BOINC web code expects translation files to be in ../languages/translations/. 77 On the BOINC web server, this directory contains symbolic links from X.po 78 to '''../../locale/X/BOINC-Web.po'''. 79 80 'When we add a new language, we need to add a new symbolic link.' 81 82 Deploying new translations requires running the script 83 '''doc/update_translations.php''', 84 which converts the .po files to a PHP translation array. 85 This is done from cron. 86 87 === Project web sites === 88 89