Some button labels are not translated

• Aug 21, 2014 - 08:36
Type
Wording/Translation
Severity
S4 - Minor
Status
closed
Project
Tags

There are some button labes that are not translated/translatable.

Example: Menu->Edit->Preferences, at the bottom the buttons OK, Apply, Cancel

Seems to apply for all QDialogButtonBox's. Strangly when looking at the ui file in QtCreator, These are translated there (in German: OK, Abbrechen, Anwenden, strangely a different order than in the 'live' Dialog)

self-built 53a33ec, Qt 5.3.1, Windows 7


Comments

My suspicion is that the qt_'locale'.ts files in the MuseScore repository are out of sync with the Qt Version (5.3.1) used to build MuseScore
However, using the qt_'local'.gm files from Qt 5.3.1 instead of the onces the build generated doesn't solve the problem. Do we just need updated .ts files and let the build to the lupdate/lrelease on them?

Well, I'm not sure about adding then to Transifex or not, these files are not completly translated, as per that index page.

And even worse: looking at the content of the files they don't even contain any translation, but instead seem to refer to a set of other files: qt_base, qtscript, qtquick1, qtmultimedia and qtxmlpatterns

Indeed, you're right Jojo. I will contact the Qt guys. It's time they improve their localisation efforts and use an online translation service. Tbc.

I investigated further with the help of lasconic and here is what we came up with.

First of, the translations of Qt 5.3 can also be found on gitorious:
https://qt.gitorious.org/qt/qttranslations/source/9c5b1f0a16ca9e9838840…
Unfortunately the state of the translations is not really great. On top of that, some locales have all the translations in one big qt.ts file, while other locales have split it out in several files. The file containing strings which MuseScore uses is mostly qtbase_locale.ts. For instance the qtbase_fr.ts is not in, but there is one for qtbase_ja.ts.

While seeking further we found a project started by someone from Japan over at Transifex: https://www.transifex.com/projects/p/qtbase/ Not sure how official this effort is, but clearly it doesn't have support for a lot of languages.

Conclusion

So previously we simply compiled qt_xx.ts ourselves. That does not seem possible anymore, unless we rename qtbase_xx.ts files to qt_xx.ts as a hack. Or should we simply get the compiled versions of qt_locale.qm and use those instead of compiling ourselves.

Or should be not bother at all anymore and simply take those few strings which are served by Qt and include them in our Transifex project. How many strings are we talking about anyways.

I think it is just a handfull, Abort, Cancel, OK, Apply, Quit, maybe a few more

I've tried it, with the 6 files for German, with those the problem would be fixed

Not sure how/whether this all also relates to your recent change to the qt_js.ts to fix right and left though?

Quess we need more then just those few, if we want to replace qt_locale.ts, looking at the qtbase_locale.ts file and searching the sources I think we need everything for QColorDialog, QComboBox, QPlatformTheme (this is I think where 'Apply' gets translated) and probably a whole lot more.

Just found a pretty easy fix: in all qt_*.ts files replace QDialogButtonBox with QPlatformTheme and rebuild, now the buttons I'm complaining about are translated automagically.
Tested on Windows 7
If this works on other platforms too, this would be as cheap a fix as it could get.
While at it, we could apply that Japanese fix too. i.e. translate "Left" and "Right" with ← and → (rather then "Links" and "Rechts" in German) and to the equivalent to "Up" and "Down", looks much nicer and matches the labels on the keys. Maybe some of the other keys too.

Good hacking. I'm ok with going for this solution as we need to do this just once until we decide to upgrade Qt further.