UbuntuTranslationsCoordinators > Actions > Launchpad templates administration

Template administration

This page is intended as a reference on the actions related to translation template administration the UTC team can perform.

Warning /!\ If you are unsure of an action, simply ping someone from the team on #ubuntu-translators or on #launchpad. You can always test things at https://translations.staging.launchpad.net

Disabling templates

Basically disabling a template can be achieved by using the template admin form in the UI and unticking the following checkboxes:

  • Template is active

  • Include translations for this template in language packs?


This is generally what we do when disabling templates demoted to Universe. Templates are no longer exposed and translations are not exported in language packs, but the templates remain in the distribution space, so they can be easily reenabled if necessary (e.g. new promotion to main)

(i) Translations are never deleted from the database

Moving templates out of the way

Sometimes you might want to completely move out of the way templates, so that they do not appear in any Ubuntu listings. A case might be when a template has been renamed after a conflict or when there has been an error in importing a template. Here's how you can do this:

  1. Go to the admin form and disable the template as per the above procedure as usual:
    • https://translations.launchpad.net/ubuntu/$UBUNTU_RELEASE/+source/$SRC_PKG/+pots/$POTEMPLATE/+admin
  2. Unset the series (i.e. set Series: to (none)

  3. Unset the source package (i.e. set Source Package Name: to blank)

  4. Set Series: (Optional) to old-lp-translations/deleted-templates

(i) There is currently a bug in which if you don't get all the values right the page will OOPS. If it does, just try the process again

Renaming templates

This can be easily done on a single template basis using the template admin form in the UI:


Some additional notes:

  • (i) Changing the name only will be transparent to the maintainers, and will not affect how templates are imported in the queue. That is, if you change the name it will be only for display purposes, and templates will still be automatically imported to the right template without the need of any additional steps

  • Warning /!\ As message-sharing is currently not rename-aware, you'll have to also manually rename the template for all distro series open for translation.

  • (i) If you need to rename a large number of templates and you think it is unfeasible to do it manually, you might want to ask the Launchpad Translations developers to run a database query for that instead. Ping danilos/danilo, jtv, henninge or Ursinha either in #ubuntu-translators or in #launchpad. Consider buying them a beer or some slivovitza after they've done that.

Demotion to Universe and translations

When a package is demoted from main to universe, it should no longer be translatable in Launchpad, as neither the template will be updated, nor the translations exported in language packs.

Launchpad cannot detect this, so the template will need to be manually disabled

Not all translation teams work upstream or forward their contributions, so we want to make sure the translations from Launchpad are available even after the template has been disabled. Here's the procedure we've come up with to make translations available:

  1. Request a translations export from the template page in the UI, or going to:
    • https://translations.launchpad.net/ubuntu/$UBUNTU_RELEASE/+source/$SRC_PKG/+pots/$POTEMPLATE/+export
  2. Once you've received the e-mail with the link to the export, save the html page showing the template statistics. This will help you and translation teams seeing whether there are translations that need forwarding to upstream
  3. Upload the exported translations to a public location (e.g. your people.ubuntu.com space), and put the saved html page in the same folder where you've put the translations
  4. Add a link to the template in that public location to https://wiki.ubuntu.com/Translations/Upstream/Universe

  5. Announce this demotion to the translators mailing list, asking the teams

Announcement e-mail

You can use this boilerplate as a basis for the announcement e-mail if you'd like to:

Hi translators,

The package $PACKAGE has been demoted from the main to the universe repository.

This means that it will no longer be possible to translate it in Launchpad and you'll have to continue translation directly upstream at $UPSTREAM_PROJECT.

Some teams have been doing translation in Launchpad and not yet forwarded their changes upstream, so we've exported all translations to allow sending them back. You'll find the translations at $EXPORT_LOCATION, where from the statistics page you'll see if there are any translations to be forwarded

Please feel free to ask if you've got any questions

You'll find more information at:
• https://wiki.ubuntu.com/Translations/Upstream/Universe
• https://wiki.ubuntu.com/Translations/Upstream#UbuntuTranslator
• https://wiki.ubuntu.com/Translations/TranslationLifecycle


Manual template upload

Altough templates should be automatically imported whenever a new package is uploaded to the archive, there are times when a manual upload is necessary. This allows, for example, updating the template in Launchpad (and the exported translations, if necessary) without having to reupload a package.

Through the UI

  • If you are updating a single template, you can upload it directly
  • If you are uploading translations, pack all templates and translations in a tarball, with the same path structure as the corresponding source package (generally po/template.pot and all translations in the same folder)

  • Use the template's +upload form in the UI to upload the tarball with the template and translations or the single template

With the Launchpad Translations tools

The Launchpad Translations Tools can be used to upload translations and templates from the command line. Here's how to use them:

Getting the code and login

  1. Detailed documentation

  2. bzr branch lp:~jtv/lp-translations-tools/trunk

  3. cd trunk/bin

  4. ./lp-translations-tools-login -u lpusername@email.com -s https://staging.launchpad.net/ (we choose the staging server)


Just a quick example on how to load a tarball containing translations and a template for gwibber. You can consult the documentation for more detailed info.

  1. Detailed documentation

  2. ./lp-translations-tools-upload -d -v -p ubuntu/lucid -S gwibber -t gwibber gwibber_translations.tar.gz

Warning /!\ Remember to use the staging server when trying things out, and only do uploads in edge or production once you've tried with staging first.

Opening translations

At the start of a release, we can open translations by going to https://translations.launchpad.net/ubuntu/<releasename>/+admin and ticking the Hide translations for this release checkbox. This will make translations visible to anyone.

Prior to that, we'll have unticked the Defer translation imports checkbox, which will activate the imports queue for this series and start importing translations from packages.

Setting the translation focus

Whenever translations are open for a given release, the translation focus needs to be changed, so that the https://translations.launchpad.net/ubuntu/+configure-translations URL points to the translations for the latest development release.

We can choose to change the focus after string freeze or before.

Uploading Firefox translations

For stable releases we also upload Firefox translations, for which here's the procedure:

  • (./) Stable release update monitoring - Subscribe to the Ubuntu Firefox branch to get notified of new stable release uploads (TODO: add link to the branch)

  • (./) Getting the code

  • In the upstream VCS, each language is its own branch. The list of language codes is here: http://hg.mozilla.org/l10n-central/ To check out all of them, do something like this:

    for l in af ar as be bg bn-BD bn-IN ca cs cy da de el en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gl gu-IN he hi-IN hr hu hy-AM id is it ja ka kk kn ko ku lt lv mk ml mn mr ms nb-NO ne-NP nl nn-NO nr nso oc or pa-IN pl pt-BR pt-PT rm ro ru rw si sk sl sq sr ss st sv-SE ta ta-LK te th tn tr ts uk ve vi xh zh-CN zh-TW zu; do hg clone http://hg.mozilla.org/l10n-central/$l; done
    To keep them up-to-date do something like this:
    for l in `ls`; do cd ${l}; hg pull; hg update; cd ..; done

  • You can get the stable release translations like this:
    • wget -r -H -l1 -np -A.xpi -nd -N -erobots=off http://releases.mozilla.org/pub/mozilla.org/firefox/releases/4.0b9/linux-i686/xpi/
  • (./) Uploading upstream translations - TODO


UbuntuTranslationsCoordinators/Actions/LpTemplateAdministration (last edited 2015-10-20 07:16:45 by dpm)