[Marble-devel] Problems with translation loading

Alexander Potashev aspotashev at gmail.com
Thu Jun 2 09:34:13 UTC 2016


2016-06-02 8:25 GMT+03:00 Yuri Chornoivan <yurchor at ukr.net>:
> Hi,
>
> Testing of Marble form Applications 16.04 shows several problems with
> translation not shown in widgets and main window.
>
> Findings by Alexander Potashev:
>
> 1. Strings like "Global Search" in
> scr/lib/marble/SearchInputWidget.cpp:76,99 load through tr(), are extracted
> into marble_qt.pot but never shown translated.
>
> 2. Options dialog strings, like those from MarbleViewSettingsWidget.ui, are
> extracted to marble.po, but loaded through qt_wrap_ui (instead of
> ki18n_wrap_ui) in src/lib/marble/CMakeLists.txt, so strings like "Units",
> "Distance:", "Angle:" are shown untranslated.
>
> 3. KDE packaging scripts convert marble_qt.po into marble_qt.qm, not
> marble_qt.mo, so the translations are never shown without some manual
> intrusion (might be Kubuntu packaging problem). For some reason, packagers
> include MOs for marble_xml_mimetypes.po and marble.appdata.po (should it be
> org.marble.appdata.po?).
>
> Can somebody look at these problems and fix them if possible?

Hi Yuri, Albert,

CCed kde-i18n-doc in a hope that more people there are familiar with
Qt translation system.

Two remarks:

 1. I think marble_qt.qm is correct because tr() utilizes Qt
translation system. However, I didn't find any usages of QTranslator
in Marble (besides in the marble-qt application), so not sure how
translations could work before.

Then I tried to insert these lines into
src/apps/marble-kde/kdemain.cpp just after "QApplication app( argc,
argv );", but that didn't help:

    QTranslator translator;
    translator.load("/usr/share/locale/ru/LC_MESSAGES/marble_qt.qm");
    app.installTranslator(&translator);

2. marble.appdata.po can be excluded from packages in
release-tools[Applications/16.04]/pack_l10n.sh which is maintained by
Albert.

-- 
Alexander Potashev


More information about the Marble-devel mailing list