Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2008-01-29 15:44:36
Size: 5598
Editor: p57AAAE17
Comment: create page
Revision 3 as of 2008-01-29 15:48:18
Size: 5632
Editor: p57AAAE17
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Translations
Line 2: Line 3:
= Translation lifecycle in Ubuntu = = Overview =
Line 17: Line 18:
== Extraction from source packages == = Extraction from source packages =
Line 50: Line 51:
== Import to Launchpad translations == = Import to Launchpad translations =
Line 63: Line 64:
== Export from Launchpad translations == = Export from Launchpad translations =
Line 82: Line 83:
== Translation packages for Ubuntu == = Translation packages for Ubuntu =
Line 121: Line 122:
CategoryDocumentation CategoryDocumentation CategoryUbuntuDevelopment


Unlike other distributions we do not ship upstream translations from source packages directly in binary application packages in main and restricted, since this does not allow us any flexibility in editing them on a central place (Launchpad), update them independently from the applications, and update them post release.

That is why we separate packages and their translations in Ubuntu and maintain/package them independently.

We currently do not apply this treatment to packages in universe and multiverse. We plan to change this in the future, but there are no concrete dates yet.

Extraction from source packages

While a source package is built, the autobuilders extract several translation related files from the built tree:

  • The PO templates (*.pot) which contain all translatable strings for each translation domain used by the package. Since it is important that this is up to date (and includes all string changes introduced in distro specific packages), the template should be generated dynamically during package build. For most packages this happens with intltool-update -p.

  • All existing PO translation files (*.po) which contain the upstream translations for a particular language in gettext format. This applies to the vast majority of free software.

  • Other translation related files for specific projects: *.ts (translation format used by KDE), and *.sdf for

The extracted files are put into a tarball, which is added to the binary .changes file (section raw-translations).

If the package is in main, this process also removes all *.mo files (binary gettext translation files) from the final .debs, since these are shipped separately in language packs (see below).

All this is done by the [ pkgbinarymangler package]. The Ubuntu autobuilder chroots have this package installed and enabled in /etc/pkgbinarymangler/striptranslations.conf by setting enable: true. By doing this locally, one can replicate the setup and build translation tarballs/stripped .debs locally.

Import to Launchpad translations

On upload of the binary packages, the translation tarball gets picked up and imported to [ Launchpad translations]. This database contains both the imported translations, and the ones entered in the web UI (overriding the ones provided by upstream).

Now translation teams can download PO templates, edit them locally, and upload them again, or enter translations directly in the web UI. Please see TranslatingUbuntu for details about and help for this process.

Export from Launchpad translations

Launchpad translations now sorts all available translations by Ubuntu distribution release, locale, and translation domain, and exports them in tarballs again. For example, all available tarballs for Ubuntu 8.04 ("Hardy Heron") are linked on

There are two kinds of tarballs:

  • Full language packs contain the complete set of all translations for all languages of a particular Ubuntu release. Thus they are quite big (usually in the order of 500 MB compressed). They are generated only on request, since it is quite expensive to build them.
  • Delta language packs only contain PO files which have changed or have been added since the last full export. They are much smaller, and generated automatically once or twice a week.

Translation packages for Ubuntu

The tarballs from Launchpad get processed and turned into packages by a set of scripts called [ langpack-o-matic], which runs in the Canonical data center (on rookery) and is maintained by the [ ubuntu-langpack team].

langpack-o-matic builds one set of language packs for each language XX, which are split as follows:

  • Translations are sorted into categories: GNOME for everything that just applies to GTK and GNOME (thus, suitable for Ubuntu), KDE for everything related to Qt and KDE (suitable for Kubuntu), and a default pack for everything that either applies to both (e. g. the Xine library) or no particular desktop environment (such as compilers, coreutils, etc.) and thus should be installed for every derivative.
  • Corresponding to the full and delta exports from above, there is a base pack with the complete set of translations, and a much smaller update pack with just files which changed since the latest release of base. This split exists for each category.

Finally, the PO files are wrapped by some automatically generated standard packaging, so that they turn into real Ubuntu source packages, binary packages, etc. Thus, for each language code XX, the following set of packages (both source and binary) is produced:

  • Category

    base pack

    update pack










In addition to language packs, langpack-o-matic also creates a set of language-support-XX metapackages for each language which depend on language specific packages which are not gettext translation related, such as dictionaries, thesauri, help files, fonts, etc.

CategoryDocumentation CategoryUbuntuDevelopment

Translations/TranslationLifecycle (last edited 2013-12-12 23:58:26 by fitojb)