Localization in Kubuntu
Kubuntu l10n is mostly upstream's l10n from the kde-l10n-* packages. Additionally Kubuntu's own software as well as Kubuntu specific string chnages are translated on Launchpad.
Upstream l10n is primarily delivered through the kde-l10n-* tarballs. Packaging for those tarballs is not maintained individually but instead generated from a generic packaging branch. More information how to operate the system is available at Kubuntu/Packaging/L10nOperatorGuide.
Furthermore software that is not part of the KDE SC needs to ship localization on their own. This either happens in the form of separate tarballs (kile-l10n) or as part of the source (e.g. a po/ directory inside the tarball). Sometimes there may also be a multi-tarball setup like kde-l10n-* in which case its generic packaging system should be reused or the tarballs should be bundled into one big tar.
All Kubuntu specific translations happen on Launchpad. Please note that due to https://launchpad.net/bugs/1048556 you need to poke someone (pitti?) to manual map domains (pot files) to packages or the export won't work.
Kubuntu software needs to follow upstream's l10n requirements and policies (i.e. use i18n() and friends as well as contain a Messages.sh instructing how to extract strings).
To get strings extracted and uploaded to Launchpad a package must use Debhelper (>=7) and enable it by defining
in its control file. If the package does not use the KDE debhelper sequence (--with kde) it manually needs to enable the kubuntu-l10n sequence in debian/rules:
%: dh [email protected] --with kubuntu-l10n
Kubuntu Patched Strings
Strings that are added or changed by Kubuntu patches do not need any special handling in their packages. Instead they are extracted and aggregated by the kubuntu-patched-l10n package (lp:kubuntu-patched-l10n). This package iterates through all packages of interest to Kubuntu and extracts any string deltas into kubuntu-patched-l10n. The package needs to be *manually* refreshed and uploaded at key points in the development cycle of Kubuntu (e.g. string freeze) to get new strings imported. More information is available in the README file of the bzr branch.
Kubuntu Template Loading
Whenever a desktop file contains the key
a patch inside kde4libs will ensure that the mo file defined by the value of the key is loaded when the desktop file is handled via kdelibs. For example X-Ubuntu-Gettext-Domain=desktop_foo will try to load desktop_foo.mo. All desktop files inside software that opted into l10n (see above) automatically get this key as part of the build process.
For message translations the kubuntu-packed-l10n template is imported inside kde4libs for all applications.