Marble/UiTranslation

From KDE Community Wiki
Revision as of 04:09, 23 November 2016 by Frinring (talk | contribs) (Created page with "== How to help with localization of the UI == The so-called catalogs with the translation strings are handled centrally by the KDE l10n team, also the catalogs for the Marble...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to help with localization of the UI

The so-called catalogs with the translation strings are handled centrally by the KDE l10n team, also the catalogs for the Marble software. To help with translation you would get in contact with the team for the locale you would like to help with. See https://l10n.kde.org/ for more information.

The general workflow for larger set of translations would be like this (by example of German, replace "de" with your locale id, but also check with your locale team):

Preparation

Initially check out the marble_qt.po catalog from the KDE svn repository (will also get unrelated other po files, just ignore them), here for the latest stable version of Marble:

 svn co svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kf5/de/messages/kdeedu

or if owner of SVN commit rights

 svn co svn+ssh://[email protected]/home/kde/branches/stable/l10n-kf5/de/messages/kdeedu

For the unstable version (matching master branch of Marble code) use:

 svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/de/messages/kdeedu

or if owner of SVN commit rights

 svn co svn+ssh://[email protected]/home/kde/trunk/l10n-kf5/de/messages/kdeedu

Install Lokalize as your tool to edit the translation catalog file.

Workflow

  • If bigger work planned, announce it on the locale team mailinglist to avoid clashes
  • Update to latest state, by entering the folder with the catalogs
  cd kdeedu
  svn up marble_qt.po
  • Open the file "marble_qt.po" in Lokalize and make your translations, save
  • Create a patch
 svn diff > /tmp/marble_qt.po.diff
  • Upload it to svn.reviewboard.kde.org:
  https://svn.reviewboard.kde.org
  New Review Request
  select repository "kde"
  click "Select"
  choose /tmp/marble_qt.po.diff
  enter base dir for diff:
    "branches/stable/l10n-kf5/de/messages/kdeedu" (if stable) or
    "trunk/l10n-kf5/de/messages/kdeedu" (if unstable)
  select reviewer group "kde-i18n-de" and some marble developers as person
  if no own rights for committing to KDE SVN, make a comment in the description field
  • If "Ship it" received and rights for comitting to KDE SVN, commit patch. Commit message can be a simple "Translation update", unless something extraordinary done.
  • After patch has been committed, close review request manually (commit keyword not working/available)

Internationalization

For the libraries, plugins and the apps marble-qt, marble-maps & behaim globe the Qt translation system is used in the code. More information how to use this in the code here: http://doc.qt.io/qt-5/i18n-source-translation.html

It also means that users of the library need to explicitely find and load the files with translation catalogs.

The Plasma plugins and other make use of ki18n/gettext facilities and have additional separate catalogs.

Building with translations included

There are two different cases here with different handling:

  • Builds of bundled apps, where files with translations are part of the created app bundle
  • Builds of shared libraries, data & plugins (e.g. for Linux packaging), where files with translations are installed in central places and shared among users of libmarblewidget

Builds of Bundled Products

Currently (at time of Marble 0.26) all bundled apps (marble-qt, marble-maps, behaim) use only the central catalog marble_qt.

For builds of bundled apps the tools in the data/lang/ directory are used. See data/lang/README for how to use the tools during the build.

Builds of Non-bundled Products

Currently (at time of Marble 0.26) the translation catalogs are distributed also at release time in a separate tarball (which covers all software part of "KDE Applications") and thus the binary versions are build & installed separately from the Marble build. It would be possible to integrate them into the build similar to how it is done for bundled products, but that is a TODO.