Import translation templates from your project’s Bazaar branches

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.

8 Responses to “Import translation templates from your project’s Bazaar branches”

  1. Michael Rooney Says:

    I am very thankful that this is not an April Fool’s joke because this is so excellent. This takes launchpad a decent step further towards making translation management slick and simple for project owners. I will set this up right now, thanks!

  2. Henning Eggers Says:

    I am glad you like it. I totally agree with you that this was an important step forward.

    Unfortunately I have to tell you that there were some last-minute difficulties to the effect that the underlying process to import the templates is not set-up yet. We plan to have this running within the next couple of hours, so please bear with us.

  3. Henning Eggers Says:

    OK, bring on your branches! The cronscript that does the uploads from the branches to the import queue is in place and confirmed to be working properly. Please be patient with the process, though. Once you push your branch it has to trickle through the pipeline of three cronscripts 1) branch scanner 2) translation uploader 3) translation importer (the usual). If your naming and directory structure is sane, no manual approval should be necessary between steps 2 and 3. The uploader script is running at a conservative interval of 10 minutes.

    I don’t know of any bugs at the moment. I’ll be investigating a corner issue that should not affect you if you have the above mentioned sane layout.


  4. Kyle Nitzsche Says:

    Great feature!

    Minor point: this means the pot file is no longer generated as needed (which is/was good practice) but now should be carried along with the source.

    (Whereas in most cases up to now, the pot file is/was simply generated when needed and was not included in source or in patches. At least this is/was good practice, as I understand it.)

  5. Danilo Says:

    @Kyle, it is good practice to have it regenerated automatically. However, there are too many ways to do that, and we’ll support only two (in the near future: modern GNU gettext and intltool layouts). Static POT files (which is what many projects use anyway, which don’t use GNU gettext or intltool) are a good starting point.

  6. Marco Rodrigues Says:

    Good work! Now.. it remains one thing. Auto import translations done in LP interface into the trunk. That would be awesome.

  7. Danilo Says:

    @Marco: that’s planned for May release 🙂

  8. Launchpad Blog Says:

    […] 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 […]

Leave a Reply