Internationalisation

Differences between revisions 5 and 40 (spanning 35 versions)
Revision 5 as of 2009-06-17 10:31:01
Size: 9930
Editor: p54A12C5F
Comment: Added some info on the import queue and other details
Revision 40 as of 2010-08-11 17:36:50
Size: 2298
Editor: eth3
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
= Translations in Ubuntu (from a developer perspective) = = Ubuntu Internationalization Guide =
Line 6: Line 6:
This page tries to outline
 * how Ubuntu deals with translations (and i18n in general) from a developer's perspective
 * which tools are interesting for developers to make sure that translations and i18n work fine
This document tries to outline:
 * How Ubuntu deals with translations (and i18n in general) from a developer's perspective
 * Which tools are interesting for developers to make sure that translations and i18n work fine

== Getting Started ==
 * '''Primer''': This [[/InternationalizationPrimer|internationalization primer]] is a great place to get started.
Line 12: Line 15:
Be sure to read TranslationLifecycle in the [[TranslatingUbuntu|translations wiki pages]] for a general overview of how translations work in Ubuntu. ''General information on the tools and processes related to the internationalization of Ubuntu''
Line 14: Line 17:
<<Anchor(LanguagePacks)>>
== Language Packs ==
=== General ===
Packages in `main` and `restricted` don't contain translations (*.mo) files themselves, they are stripped during the build on the Launchpad buildds and put into `language-pack-*` packages instead. This is done in an attempt to bundle the translations you're interested in and cut down the occupied space.
 * [[TranslationLifecycle|Overview of the translations lifecycle]]
 * [[/Glossary|Glossary of i18n-related terms]]
Line 19: Line 20:
Note: once a package is promoted to `main`, it only needs to be rebuilt the first time after promotion so that [[https://launchpad.net/ubuntu/+source/pkgbinarymangler|pkgbinarymangler]] can strip the translations. After this, import to Launchpad Translations and export in language packs "will just happen". == Packaging ==
Line 21: Line 22:
Comparing the contents of a package built by Launchpad Soyuz and a locally built one:
{{{
daniel@bert:~$ debdiff --nocontrol gcalctool_5.27.2-0ubuntu1_amd64.deb /var/cache/pbuilder/result/gcalctool_5.27.2-0ubuntu1_amd64.deb
[The following lists of changes regard files as different if they have
different names, permissions or owners.]
''Information on packaging internationalized packages for Ubuntu''
Line 27: Line 24:
Files in second .deb but not in first
-------------------------------------
-rw-r--r-- root/root /usr/share/locale/af/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/am/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ar/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/as/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ast/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/az/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/be/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/be@latin/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/bg/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/bn/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/bn_IN/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/bs/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ca/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ca@valencia/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/cs/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/cy/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/da/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/de/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/dz/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/el/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/en_CA/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/en_GB/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/en_US/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/es/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/et/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/eu/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/fa/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/fi/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/fr/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ga/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/gl/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/gu/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/he/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/hi/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/hr/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/hu/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/id/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/it/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ja/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ka/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/kn/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ko/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ku/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/lt/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/lv/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/mai/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/mg/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/mk/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ml/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/mn/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/mr/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ms/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/nb/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ne/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/nl/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/nn/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/oc/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/or/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/pa/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/pl/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/pt/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/pt_BR/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ro/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ru/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/rw/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/si/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sk/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sl/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sq/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sr/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sr@latin/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/sv/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/ta/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/te/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/th/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/tk/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/tr/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/uk/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/vi/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/xh/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/zh_CN/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/zh_HK/LC_MESSAGES/gcalctool.mo
-rw-r--r-- root/root /usr/share/locale/zh_TW/LC_MESSAGES/gcalctool.mo
daniel@bert:~$
}}}
 * [[/Packaging|Internationalization of packages]]
Line 115: Line 26:
== Coding ==
Line 116: Line 28:
=== Translations Templates ===
For `pkgstriptranslations` (in the `pkgbinarymangler` package) to do the job right, please make sure that your package in `main` or `restricted` builds a .pot during the build. It does not necessarily need to be shipped in the source or in the binary package. Generating it during the build is good enough. This can be achieved by running the following in `debian/rules`:
{{{
cd po; intltool-update -p}}}
''If there's more than one `./po/` directory (or it has a different name), please make sure to adjust the call above.''
''Information on writing or modifying internationalized applications for Ubuntu''
Line 122: Line 30:
== The import queue ==  * [[/Coding|Internationalization of source code]]
Line 124: Line 32:
All translation templates (.pot files) and translations (.po) end up in the Launchpad Translations import queue before being imported into Launchpad. == Translation process ==
Line 126: Line 34:
Some of the import queues: ''General overview of the Ubuntu translation process, from the translators' point of view''
Line 128: Line 36:
 * [[https://translations.launchpad.net/ubuntu/hardy/+imports?field.filter_extension=pot&field.filter_status=NEEDS_REVIEW|Hardy]]
 * [[https://translations.launchpad.net/ubuntu/intrepid/+imports?field.filter_extension=pot&field.filter_status=NEEDS_REVIEW|Intrepid]]
 * [[https://translations.launchpad.net/ubuntu/jaunty/+imports?field.filter_extension=pot&field.filter_status=NEEDS_REVIEW|Jaunty]]
 * [[https://translations.launchpad.net/ubuntu/karmic/+imports?field.filter_extension=pot&field.filter_status=NEEDS_REVIEW|Karmic]]
 * [[/TranslationProcess|Overview of the Ubuntu translation process]]
Line 133: Line 38:
Templates generally get approved automatically, but sometimes there is some manual work involved in approving them. The [[https://launchpad.net/~ubuntu-translation-coordinator|Ubuntu Translations Coordinators Team]] manages the import queue. We've got a [[ubuntu-translation-coordinator@lists.launchpad.net|mailing list]] where issues can be discussed and we welcome the help of any community members experienced with translations. == Launchpad ==
Line 135: Line 40:
== General Advice ==
If you want to make sure that your packages translations are set up correctly, try running:
{{{
cd po; intltool-update -m}}}
and be sure to either fix the issues or report them upstream.
''Information related to Launchpad and internationalization, including best practices on how to handle translations of hosted projects''
 * [[https://help.launchpad.net/Translations/YourProject/BestPractices|Best practices on how to set up a project for translation in Launchpad]]
 * [[/Launchpad|Internationalization considerations and general information on Launchpad]]
 * [[http://blog.launchpad.net/translations/automatic-template-generation | Automatic generation of translation templates from branch]]
Line 141: Line 45:
Sometimes empty `.po` files caused packages to build from source. == Recipes ==
Line 143: Line 47:
== Kubuntu-specific notes == ''Recipes on how to perform common tasks related to internationalization''
Line 145: Line 49:
== Additional notes on packages not using the Gettext format ==

=== Mozilla ===

=== OpenOffice.org ===
 * [[/RecipeVerifyingTranslationUploads|Verifying translation uploads]]
 * [[/RecipeIntltoolCheck|Checking out translations in intltool-based packages]]
 * [[/RecipeAddingLPI|Adding Launchpad integration for bugs, help and translations to an application's help menu]]
Line 153: Line 55:
CategoryTranslations

Ubuntu Internationalization Guide

This document tries to outline:

  • How Ubuntu deals with translations (and i18n in general) from a developer's perspective
  • Which tools are interesting for developers to make sure that translations and i18n work fine

Getting Started

General information

General information on the tools and processes related to the internationalization of Ubuntu

Packaging

Information on packaging internationalized packages for Ubuntu

Coding

Information on writing or modifying internationalized applications for Ubuntu

Translation process

General overview of the Ubuntu translation process, from the translators' point of view

Launchpad

Information related to Launchpad and internationalization, including best practices on how to handle translations of hosted projects

Recipes

Recipes on how to perform common tasks related to internationalization


CategoryUbuntuDevelopment CategoryTranslations

UbuntuDevelopment/Internationalisation (last edited 2010-08-18 14:21:17 by 140)