| 1 | This document outlines how to manage a new project at [https://i18n.haiku-os.org/pootle/projects/3rd_party/ the pootle site]. Esp. how to manage the "3rd party apps" project there. |
| 2 | |
| 3 | |
| 4 | == How to add a pootle project: == |
| 5 | |
| 6 | 1. For each language, create the folder/subfolder hierarchy of the apps together with their respective catkeys and zip it up.[[BR]] |
| 7 | The zip for English would look like this, e.g: |
| 8 | |
| 9 | {{{ |
| 10 | unzip -l English.zip |
| 11 | Archive: English.zip |
| 12 | Length Date Time Name |
| 13 | --------- ---------- ----- ---- |
| 14 | 0 04-06-2017 09:03 App-1/ |
| 15 | 11545 03-30-2017 17:33 App-1/en.catkeys |
| 16 | 0 04-06-2017 09:04 App-2/ |
| 17 | 5974 03-30-2017 17:34 App-2/en.catkeys |
| 18 | --------- ------- |
| 19 | 17519 4 files |
| 20 | }}} |
| 21 | |
| 22 | 1.5. '''!Important! ''' Only for English: prepare the en.catkeys with a script to remove the translated string, i.e. the last column in the catkeys. |
| 23 | |
| 24 | Script 'pootle-en.catkeys.sh': |
| 25 | |
| 26 | {{{ |
| 27 | for i in `find . -name en.catkeys`; do |
| 28 | sed -i -e '2,$s/[^\t]*$//g' "$i"; done |
| 29 | }}} |
| 30 | |
| 31 | 2. Enter the English language. |
| 32 | 3. Upload the English zip. |
| 33 | 4. Go to "''Administrate''" of the project and "''Update against templates''" all languages. |
| 34 | 5. Enter all those languages at the pootle site and upload the zip with that language's catkeys, if available. |
| 35 | |
| 36 | |
| 37 | == How to update catkeys: == |
| 38 | |
| 39 | Just like when adding the project. Of course only update the original en.catkeys ('''after running them through the script! ''').[[BR]] |
| 40 | When uploading the zip, choose "''Overwrite the current file if exists''".[[BR]] |
| 41 | Then go to "''Administrate''" of the project and "''Update against templates''" all languages. |
| 42 | |
| 43 | |
| 44 | == How to add another app to the project: == |
| 45 | |
| 46 | Like when adding the project, make sure the zip contains the whole file hierarchy with the already existing project folders. '''Those folders have to be empty! '''[[BR]] |
| 47 | The zip adding a "New-App" for English would look like this, two empty folders for the existing apps, one folder with the en.catkeys for the new app: |
| 48 | |
| 49 | {{{ |
| 50 | unzip -l New-App.zip |
| 51 | Archive: New-App.zip |
| 52 | Length Date Time Name |
| 53 | --------- ---------- ----- ---- |
| 54 | 0 04-06-2017 09:05 App-1/ |
| 55 | 0 04-06-2017 09:05 App-2/ |
| 56 | 0 04-06-2017 09:05 New-App/ |
| 57 | 5974 03-30-2017 17:34 New-App/en.catkeys |
| 58 | --------- ------- |
| 59 | 5974 4 files |
| 60 | }}} |
| 61 | |
| 62 | When uploading, choose "''Merge''" option. |
| 63 | |
| 64 | |
| 65 | == How to export an app's catkeys: == |
| 66 | |
| 67 | Just enter the app and "''Download''" a zip with all languages. |