Author Archive

Import translations from Bazaar branches

Wednesday, April 29th, 2009

No, this is not a deja-vu. The last release brought you imports of translation templates from Bazaar branches, now you can import your actual translations too.

Enabling import of translations (usually called PO files) seems to be the logical next step since the import of translation templates (usually called POT files) is already in place.

There are a few scenarios in which this would be useful, but I think the most common is likely to be the initial import of translations when you start using Launchpad Translations for a project that already has translations. For this purpose I added the “Request Bazaar import” option right next to “Settings” on the menu bar of your project’s release series. Here you can request a single import of all translation files (templates and translations) that are in the branch. Just click on the button and wait for your files to show up in the import queue. You need to have an official branch linked to this release series in order to see this button.

If you have reasons for letting Launchpad continuously import both translation templates and actual translations from your branch you can set this up on the “Settings” page. Choose “” to initiate an initial full import of all files and subsequent imports of changed files into Launchpad Translations.

The approval of translation files after they are uploaded works just as if they were uploaded through the upload form. To be sure that they are automatically and quickly approved and imported place them in the same directory as the template file they refer to and name them after the approriate language code, e.g. es.po for Spanish translations.

I hope you can make good use of the feature. Next up will probably be exporting translations back into your branch. Doesn’t that sound cool?

Import translation templates from your project’s Bazaar branches

Wednesday, April 1st, 2009

Now grows together what belongs together. Introducing a cool new feature: importing translation templates from Bazaar branches.

You can (and should) host your source code on using Bazaar branches. You also have a great translation tool in that can help you to publish your project in many different languages. But so far, these two great applications lived seperate lives. This is beginning to change now!

How do you start translating your project into foreign languages? You start by generating a template file from your source code and uploading this to Launchpad. The translation template contains the English strings that translators are meant to translate into their language. What if the source code is hosted on Launchpad? Until now, you still had to upload that template manually to Launchpad Translations and wait for it to be imported.

Here is how it works now: generate the template file in your source tree using gettext tools, as you would have done before. But instead of uploading it, simply commit it to your Bazaar branch and push that branch to Launchpad. Now it just takes a one-time configuration step and your template file or files will be automatically imported into Translations. What’s more, this happens every time you push a new version of that file without you having to do anything.

To get started with importing translation templates from a branch, navigate to the “Overview” page of the release series of you project that you want to import translations into (usually “trunk”). Click on “Link to branch” to link this series to a Bazaar branch. If this has already been done, use this step to verify that this is really where your template file can be found. Next, go to the “Translations” page of that release series. You’ll probably see the message “No translatable templates available” but you are about to change that by clicking on “Settings” in the menu bar. Here you change the import mode to “Import translation files”. Once you click on “Save settings” an initial import of your translation templates will be triggered and you should soon find it in the import queue and shortly after that the template is available for translation work. Now, whenever you update the template file in your branch you just have to wait some 15 minutes or so and the change will appear in your translation template on Launchpad.

Read all the gory details on the help page and watch out for how in the future Bazaar branches and translations will grow even closer together.

Exporting translations back upstream

Wednesday, January 28th, 2009

Providing translation work back upstream is now greatly simplified!

There is a lot of translation work going on in Launchpad, for Ubuntu as well as for other projects. There is also a lot of translation work going on for the projects, that is not done in Launchpad. This is especially true for many of the Ubuntu packages that have their own translation effort “upstream”.

For various reasons, translations imported from upstream projects may be altered in Launchpad. One possible scenario is that an error is detected in the upstream translation with no time to fix that upstream and import again, because the next Ubuntu release is imminent. The Ubuntu translator will then fix it in Launchpad and Ubuntu will have the corrected version. But now it is a matter of good community citizenship to provide that change back upstream.

So far, the only option here was to either communicate the changes manually or to download the whole translation file and provide that to the upstream project. Unfortunately this may not be easy to merge into the upstream translations which may have progressed in the meantime. This step is now simplified by a new feature that only exports those translation strings from Launchpad that were changed from what was originally imported from upstream. This export also includes translations of strings that were not translated at all before.

You can find information about the feature on the help page.

I really hope that this feature will find good use and that the upstream translations can profit much more from the translation work done in Launchpad. It is as easy as clicking on “export” and then forwarding the exported file to upstream.

Watch for more enhancements on the import/export front in the next releases.