LanguagePackRoadmap

Differences between revisions 9 and 35 (spanning 26 versions)
Revision 9 as of 2005-04-23 10:02:01
Size: 1157
Editor: intern146
Comment: convert to SpecTemplate
Revision 35 as of 2005-06-13 13:50:47
Size: 6519
Editor: dialin-212-144-002-036
Comment: non-KDE/Gnome langpacks are called "-main", not "-other"
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
##(see the SpecSpec for an explanation)

= UbuntuDownUnder/BOFs/UbuntuDevelopment/I18nL10n =
= Language Pack Roadmap =
Line 8: Line 6:
  * Priority: NeedsPriority[[BR]]
  * People: MartinPittLead, SebastienBacherSecond[[BR]]
  * Priority: HighPriority[[BR]]
  * People: MartinPittLead, CarlosPerelloMarinSecond[[BR]]
Line 11: Line 9:
  * Interested: [[BR]]
  * Status: BrainDump, BreezyGoal, UduBof, DistroSpecification[[BR]]
  * Interested: JonathanRiddell, DafyddHarries, SebastienBacher[[BR]]
  * Status: MattZimmermanQueue, ChristianReisQueue, EditedSpecification, DistroSpecification[[BR]]
Line 17: Line 15:
  * UduSessions: 1, 4, 8, etc [[BR]]   * UduSessions: 3(0)[[BR]]
Line 21: Line 19:
We want to extend the current scope of language packs and Rosetta integration to work with more than just application gettext translations.
Line 22: Line 22:

Currently the language packs contain only translations for desktop applications that use gettext. However, there are many more translatable items in Ubuntu. Our goal is to extract all translatable contents from application packages, import them into Rosetta, and ship them into language packs so that they can be updated after a release.
Line 25: Line 27:
 * Extract and handle KDE translations for Kubuntu.
 * Extract and handle translations of Open``Office.org and Mozilla applications, which do not use gettext, but their own system.
 * Some translatable files do not use gettext at runtime, but rather contain all translations in a single file, like `.desktop` and `.server` files.
 * Some applications have special file formats involving translations (e. g. `gok`).
Line 26: Line 33:

=== Supporting KDE ===

 * Split language packs and support packages into -main, -kde, -gnome.
 * language-support-kde-''lang'' should depend on `kde-i18n-`''lang''.
 * Official KDE tarballs don't have the .POT files included and seems like there is no easy way to rebuild them so, after talking with KUbuntu people they will package the translation tarball from CVS instead of the released one so we get also the .pot files. After that it's a matter of adding the KDE special layout as a "needs to be implemented" to the [https://wiki.launchpad.canonical.com/LaunchpadPackagePoAttach LaunchpadPackagePoAttach] spec like we have Python and PHP layouts. This means that all KDE translations will appear as belonging to kde-i18n source package name.

=== Proposal for .desktop and .server files ===

 * `pkgstriptranslations` will store `.desktop` and `.server` files in translation tarballs.
 * Rosetta will export a file that maps `.desktop/.server` file names to translation domains.
 * langpack-o-matic uses intltool/homebrew script to add new translations to those files.
 * We create a new package `desktop-translations` which ships files in parallel directory hierarchies `/usr/share/applications-langpack/` and `/usr/lib/bonobo/servers-langpack/`; those files are preferred over the files in the original directory. It only requires very few changes to lookup files into these additional directories. We just have to make sure that the desktop backend that is responsible for that ignores files whose application is not installed.
 * `desktop-translations` can be updated after the release to provide new desktop files.

This solution does not really fit into the original idea of language packs, but is a solution we can implement very quickly and independently from other distributions and upstream. But eventually desktop/server files should just use `gettext()` to translate entries since application's `*.mo` files already ship the translations. Therefore we want to propose the extension of the [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDesktop standard] to support an additional field `TranslationDomain`, so that Gnome, KDE, and other implementations can find the matching `.mo` file at runtime to get additional translations from it. Note that most upstream packages already use gettext to translate `.desktop` files at build time.
Line 29: Line 52:
No data needs to be preserved when adding to language packs.
Line 31: Line 56:
Potentially many affected packages:
 * Some packages do not include/produce a POT file (amongst them, most KDE packages).
 * Ubuntu-specific strings are usually not contained in POT files.
 * We have to fix those packages to produce an up to date POT file at build time.
 * We have to find a heuristics to detect packages which need to be fixed:
  * We can't compare PO and POT files because it is possible and valid for PO files to be out of date.
  * List generation: set of packages whose tarball does not contain a POT file + set of packages whose diff.gz touches translations (this probably catches too much, though).

Open``Office.org/Firefox:
 * Package [http://translate.sourceforge.net/ translation tools] which converts between gettext, OpenOffice, and Mozilla style translation formats.
 * Change the packaging of `openoffice.org` and `mozilla-firefox-locale-all` to generate POT and PO files at build time, so that those are shipped in the translation tarball and can be imported into Rosetta. There should also be an easy function to pull updated translations from Rosetta (at package development time) so that the next build will contain updated translations.
 * OpenOffice.org has its own bof about this: OpenOfficeLocalisation
 * This approach will not allow us to update translations of stable releases, though. They need their own solution and it will be done based on a technical evaluation of current tools. Seems like Firefox translations could be able to be integrated into language packs without too much pain. OpenOffice.org is another history.
 * Firefox needs to support per-language startup pages.

`mozilla-firefox-locale-all`:
 * The locale packages need to ship translated default startup pages.

langpack-o-matic:
 * In the future, documentation translation will be done with gettext in Rosetta. Thus langpack-o-matic needs to be extended to support disassembling, translating, and reassembling
 * Needs to generate `gnome-doc-`''lang'' packages and make them dependencies of `language-support-`''lang''.

`pkgstriptranslations`
 * Extract gnome documentation into the translation tarballs.
Line 32: Line 82:

We need an easy way to configure language support, see LanguageSelector.
Line 37: Line 89:
 * How to deal with non-langpack translations more effectively (firefox, openoffice)
 * Adding translations of desktop files into language packs. (Idea: same as for the mo files, put new desktop files to /usr/share/applications-langpacks and use this path before /usr/share/applications).
 * Rosetta integration
 * Kubuntu support
=== UDU Pre-Work ===
Line 42: Line 91:
=== UDU Pre-Work === === Things to think about in the future ===

 * `gok` also ships translatable stuff in XML files (special case)

Language Pack Roadmap

Status

Introduction

We want to extend the current scope of language packs and Rosetta integration to work with more than just application gettext translations.

Rationale

Currently the language packs contain only translations for desktop applications that use gettext. However, there are many more translatable items in Ubuntu. Our goal is to extract all translatable contents from application packages, import them into Rosetta, and ship them into language packs so that they can be updated after a release.

Scope and Use Cases

  • Extract and handle KDE translations for Kubuntu.
  • Extract and handle translations of OpenOffice.org and Mozilla applications, which do not use gettext, but their own system.

  • Some translatable files do not use gettext at runtime, but rather contain all translations in a single file, like .desktop and .server files.

  • Some applications have special file formats involving translations (e. g. gok).

Implementation Plan

Supporting KDE

  • Split language packs and support packages into -main, -kde, -gnome.
  • language-support-kde-lang should depend on kde-i18n-lang.

  • Official KDE tarballs don't have the .POT files included and seems like there is no easy way to rebuild them so, after talking with KUbuntu people they will package the translation tarball from CVS instead of the released one so we get also the .pot files. After that it's a matter of adding the KDE special layout as a "needs to be implemented" to the [https://wiki.launchpad.canonical.com/LaunchpadPackagePoAttach LaunchpadPackagePoAttach] spec like we have Python and PHP layouts. This means that all KDE translations will appear as belonging to kde-i18n source package name.

Proposal for .desktop and .server files

  • pkgstriptranslations will store .desktop and .server files in translation tarballs.

  • Rosetta will export a file that maps .desktop/.server file names to translation domains.

  • langpack-o-matic uses intltool/homebrew script to add new translations to those files.
  • We create a new package desktop-translations which ships files in parallel directory hierarchies /usr/share/applications-langpack/ and /usr/lib/bonobo/servers-langpack/; those files are preferred over the files in the original directory. It only requires very few changes to lookup files into these additional directories. We just have to make sure that the desktop backend that is responsible for that ignores files whose application is not installed.

  • desktop-translations can be updated after the release to provide new desktop files.

This solution does not really fit into the original idea of language packs, but is a solution we can implement very quickly and independently from other distributions and upstream. But eventually desktop/server files should just use gettext() to translate entries since application's *.mo files already ship the translations. Therefore we want to propose the extension of the [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDesktop standard] to support an additional field TranslationDomain, so that Gnome, KDE, and other implementations can find the matching .mo file at runtime to get additional translations from it. Note that most upstream packages already use gettext to translate .desktop files at build time.

Data Preservation and Migration

No data needs to be preserved when adding to language packs.

Packages Affected

Potentially many affected packages:

  • Some packages do not include/produce a POT file (amongst them, most KDE packages).
  • Ubuntu-specific strings are usually not contained in POT files.
  • We have to fix those packages to produce an up to date POT file at build time.
  • We have to find a heuristics to detect packages which need to be fixed:
    • We can't compare PO and POT files because it is possible and valid for PO files to be out of date.
    • List generation: set of packages whose tarball does not contain a POT file + set of packages whose diff.gz touches translations (this probably catches too much, though).

OpenOffice.org/Firefox:

  • Package [http://translate.sourceforge.net/ translation tools] which converts between gettext, OpenOffice, and Mozilla style translation formats.

  • Change the packaging of openoffice.org and mozilla-firefox-locale-all to generate POT and PO files at build time, so that those are shipped in the translation tarball and can be imported into Rosetta. There should also be an easy function to pull updated translations from Rosetta (at package development time) so that the next build will contain updated translations.

  • OpenOffice.org has its own bof about this: OpenOfficeLocalisation

  • This approach will not allow us to update translations of stable releases, though. They need their own solution and it will be done based on a technical evaluation of current tools. Seems like Firefox translations could be able to be integrated into language packs without too much pain. OpenOffice.org is another history.

  • Firefox needs to support per-language startup pages.

mozilla-firefox-locale-all:

  • The locale packages need to ship translated default startup pages.

langpack-o-matic:

  • In the future, documentation translation will be done with gettext in Rosetta. Thus langpack-o-matic needs to be extended to support disassembling, translating, and reassembling
  • Needs to generate gnome-doc-lang packages and make them dependencies of language-support-lang.

pkgstriptranslations

  • Extract gnome documentation into the translation tarballs.

User Interface Requirements

We need an easy way to configure language support, see LanguageSelector.

Outstanding Issues

UDU BOF Agenda

UDU Pre-Work

Things to think about in the future

  • gok also ships translatable stuff in XML files (special case)

UbuntuDownUnder/BOFs/LanguagePackRoadmap (last edited 2008-08-06 16:22:22 by localhost)