Jump to content

Marble/UiTranslation

From KDE Community Wiki
Revision as of 17:54, 23 November 2016 by Frinring (talk | contribs) (add links to catalog statistics)
(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)

Testing your translations

If you are a developer or build Marble from the sources, see section Building with translations included how to integrate translation files with the build and how to download the respective po files from the KDE servers. Next, replace the downloaded po file with a symlink to the po file in the folder where you work on the translations. Now the build will use your translation catalog. Do not forget to call the possible extra build target after any changes to the translations ("make bundle_translations") before reinstalling.

Example for bundled apps and German locale (replace "de" with your locale):

 cd $marble_src_dir/data/lang/po/de
 rm marble_qt.po
 ln -s $path/to/de/messages/kdeedu/marble_qt.po
 cd $marble_build_dir
 make bundle_translations
 make install

If you are not a developer or do not build Marble from the sources... TODO

Syncing translations between "stable" and "trunk"

First translate the "stable" catalog to make sure all strings there are translated, so the enduser has a good experience, as this is the catalog they use. Collect any issues with bad context or inconsistent terms that need improvement in the source code and report to the developers. Such issues would then be fixed in the development version, or if urgent, also in the stable version.

Once the translations have been committed to "stable", they will also be synced to the "trunk" catalog. This is usually done by someone of the locale team, ask for the approach by your locale team (e.g. for the German team blueck does this on a daily routine without needing a personal notification, state Nov. 2016).

So when the new translations have been synced to "trunk", time to work on any untranslated strings there. Remember though that development branch means strings can change again all the time until the message freeze sets in, so be prepared for lost work. If unsure, get in contact with the developers.

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.

Translation statistics