Changes between Initial Version and Version 1 of Ticket #2625


Ignore:
Timestamp:
06/03/2015 03:55:45 PM (5 years ago)
Author:
trev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2625

    • Property Cc trev added
    • Property Summary changed from [cms] Add a way to export English locale files ready for Crowdin import to [cms] Add a way to upload master translation to Crowdin
  • Ticket #2625 – Description

    initial v1  
    11=== Background === 
    2 Now that we specify the English translations in-line #2133 we need a way to generate English versions of all the locale files. Without them we can not upload translations to Crowdin and therefore have the translations maintained. 
     2Crowdin requires a master translation, English in our case. As the English strings are specified inline there are currently no files that could be uploaded to Crowdin directly. 
    33 
    44=== What to change === 
    5 Add a Python script `cms.bin.export_defaultlocale_files` that takes the arguments of a source repository path and an export target directory path. 
     5Add a Python script `cms.bin.translate` that takes the source repository path and Crowind API key as parameters. 
    66 
    7 For each page the script should combine inline strings with any strings specified for the default locale, outputing the result as a JSON file in the export directory. 
     7For each page the script should combine inline strings and comments with any strings specified for the default locale, generate a JSON file and upload it to Crowdin using either [https://crowdin.com/page/api/add-file Add File] or [https://crowdin.com/page/api/update-file Update File] API. 
    88 
    9  - The JSON files generated should of course be in the same format as all the other locale files. 
    10  - The default locale is specified by the `settings.ini` file in the repository path, inside the `general` section. (There's likely already code written to check the defaultlocale.) 
    11  - Consider dynamicly generated pages, such as subscription list and interface pages. Ensure that any dynamically generated, translatable strings are included in the exported JSON files. 
     9* We already have comparable functionality in [https://hg.adblockplus.org/buildtools/file/bdd544d595f2/localeTools.py#l330 buildtools]. 
     10* The JSON files generated should of course be in the same format as all the other locale files. 
     11* The default locale is specified by the `settings.ini` file in the repository path, inside the `general` section. (There's likely already code written to check the defaultlocale.) 
     12* Crowdin project name should be added to `settings.ini` file. 
     13* Consider dynamicly generated pages, such as subscription list and interface pages. Ensure that any dynamically generated, translatable strings are included in the generated JSON files.