Translations
Ubuntu Touch Core Apps Project: |
Translations of core apps are provided by a huge community of volunteer contributors, the Ubuntu Translators. They will translate your application in Launchpad, the online collaboration tool used to manage and build Ubuntu.
If you are a translator and you'd like to contribute, you can translate all core apps here >.
Alternatively, if you are a developer who wants to expose your application to Ubuntu Translators, you'll need to follow two basic steps:
- Internationalize your app
- Set up the translation settings in Launchpad
Internationalizing your app
This section is still very much work in progress
Ensure your translatable messages are wrapped in i18n.tr() calls
- Create a build system rule to generate a po/appname.pot POT file
- Extract translatable messages
- Commit your po/appname.pot file
Add the X-Ubuntu-Gettext-Domain=appname line to the .desktop file, replacing appname
- Set up packaging for translations
Configuring translations in Launchpad
Global settings
First of all, you'll be setting up the global translations settings for your project. These will apply to all translatable series that belong to the project, and are generally just set once.
Go to your project's home page in Launchpad. E.g. Calendar app home
Click on the "Configure translations" link on the right-hand side. E.g. Calendar app translations settings
- On the "Configure translations" screen choose these settings:
Type of service for translations application: Launchpad
Translation focus: this will generally be your trunk branch
Translation group: Ubuntu Translators
Translation permissions policy: Restricted
Press the Change button to confirm your changes
The translation focus specifies the translations that will be exposed in Launchpad when using the http://translations.launchpad.net/project shortcut URL. It's generally best left to your trunk branch, so that translators always translate the latest code, but you can change it to a particular series if you wish to give it more visibility. The translation group is set to Ubuntu Translators, a set of volunteer translation teams (one per language) that have really good experience in reviewing and providing good quality translations for Ubuntu. You can read more about Translation permissions policy on the settings page help itself, but for now, it's sufficient to know that the translations are restricted to members of the Ubuntu Translators group, rather than being open to everyone, which ensures their quality. Translation suggestions are open to everyone, but Ubuntu Translators will review and accept them only if they're up to their translation standards.
Series-specific settings
You might have concurrent series (read branches) on your project (e.g. 'trunk', 'stable', etc.). Launchpad enables you expose translations for each series separately to translators, while avoiding duplication of work thanks to the message sharing feature. That is, you can have different translatable messages for each series, but those which are the same will be automatically be translated identically by Launchpad.
You'll need to at least configure one series for translations, which will generally be 'trunk'. Here's how you do it:
Go to your project's home page in Launchpad. E.g. Calendar app home
Click on the series you want to configure (generally 'trunk') on the "Series and milestones" section. E.g. Calendar app trunk
Click on the "Translations" tab at the top of the page. E.g. Calendar app trunk series
Click on the Set up branch synchronization link in the Automatic synchronization section. E.g. Calendar app translation settings
On Import translations from branch:
- Set the imports branch to trunk
Choose Import template files
On Export translations to branch
- Set the exports branch to trunk
Translations import/export settings in Launchpad |
With this setup, you get the following:
Automatic imports: every time you update and commit a new version of your translation template (the po/appname.pot) file, the new translations will be exposed to translators in Launchpad
Automatic exports: every time there are new translations done in Launchpad, they will be committed daily to your branch in the po/ folder
Touch/CoreApps/Translations (last edited 2014-06-12 15:47:52 by anthonywong)