Import translations from Bazaar branches

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?

6 Responses to “Import translations from Bazaar branches”

  1. Flimm Says:

    I’m lovin’ it, and I can’t wait for the ability to export translations into the branch automatically!

  2. Launchpad Blog Says:

    [...] recently introduced continuous imports from Bazaar branches or you can upload a tarball through the web [...]

  3. Stani Says:

    Hi as a an upstream developer I like to import the translations of my native language (eg Dutch), as I keep these up to date not in launchpad. So it would be cool to have a feature to select a specific language instead of importing translations of all languages.

  4. raulih Says:

    “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…”

    Why is the latter required? I need to keep them in separate directories (or PHP seems to require). So far not a single translation has been automatically approved and imported. (Templates work ok.)

  5. Henning Says:

    @raulih
    To automatically approve translations Launchpad needs to (1) associate it with the right template and (2) determine the language of the translation. To achieve (2) is only possible if the file is named after the language code, e.g. fr.po for French. To achieve (1) it checks if the po file is in the same directory as a candidate template and if so associates it with that template.

    If you have problems with translations not being approved please gives us the details in a request on answers. https://answers.launchpad.net/rosetta/+addquestion

  6. Henning Eggers Says:

    @Stani
    Sorry for taking so long to reply, I somehow overlooked you question.

    Thank you for that idea, let me see if I understood correctly. I looked at Phatch and saw that you import the template from bzr and have many translations going on in Launchpad. If I understand you correctly, you want to import the Dutch pofile from bzr, like the template, but let the other languages remain being translated through Launchpad, right?

    The bzr import only uploads those files that have changed. So if your tree only contained nl.po, you could safely activate the bzr po import without it interfering with the other languages. Even if you took all current pofiles, put them in the tree and activated the imports it would not be a problem since the import will not contain any changed strings, leaving the strings in rosetta unchanged. They will become “imported”, though, turning “blue” and “purple” into “green” on the overview page.

    So no need for a new feature, you can just use what is there.

Leave a Reply