Bug report #11668
Qt: not all languages show (qt) translated button captions
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | 2.6.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | up/downstream |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19919 |
Description
After an email from matteo on the community list about untranslated button captions:
http://lists.osgeo.org/pipermail/qgis-community-team/2014-November/003902.html
it appeared to me that indeed in dutch we have the same 'problem', and starting QGIS always shows me:
src/core/qgsmessagelog.cpp: 45: (logMessage) [10ms] 2014-11-17T16:03:32 Qt[1] loading of qt translation failed [/usr/share/qt4/translations/qt_nl]
Did some googling, and it appears that qt itself is not fully translated (on Debian, see: /usr/share/qt4/translations), german and japan for example have a qm file there, but dutch and italian do not.
From;
http://stackoverflow.com/questions/2351055/translate-standardbutton-in-qdialogbuttonbox
I had a look, and QGIS tries to load both our own translations, AND the native qt translations:
https://github.com/qgis/QGIS/blob/master/src/app/main.cpp#L794:L820
So the crux in this is that we (as languages which have 'untranslated buttons') either have to provide the right translations to Qt/Digia/Nokia:
ftp://ftp.qt-project.org/qt/l10n/index.html
and:
http://qt-project.org/wiki/Qt-Localization
Or we provide our 'own' caption for every button (or button bar) that we provide in a way like:
buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Ok"));
in that way those strings will show up in the translation files of QGIS itself.
The last option has as drawback that everywhere where you use some 'standard buttons or button bar' you have to provide the captions yourself.
The first option has as drawback that providing the translations to Qt does not mean that those will end up in your distro or qt release within a short period.
FYI: the template for Qt4: ftp://ftp.qt-project.org/qt/l10n/qt-stable/qt_untranslated.ts
and for Qt5: ftp://ftp.qt-project.org/qt/l10n/qt5-stable/qt_untranslated.ts
maybe best is to invest some time into translation of Qt5 already :-)
Related issues
History
#1 Updated by Paolo Cavallini about 10 years ago
IMHO better working upstream. We have untranslated buttons since years, no need to hurry.
#2 Updated by Jürgen Fischer over 9 years ago
- Resolution set to up/downstream
- Status changed from Open to Closed