qt_<locale>.qm missing on Windows, translated shortcuts not working

Bug #908540 reported by jus
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Sean M. Pappalardo
1.10
Fix Released
High
Sean M. Pappalardo

Bug Description

Microsoft Windows 7 Home Premium x64
Version 6.1.7601 Service Pack 1 Build 7601
Dell System XPS L502X 8,00GB
Intel(R) Core(TM) i7-2670QM

Tested Mixxx 1.10 final x64 & i368
German translation activated

STRG is missing from the shortcuts, so many of them are broken. E.g. "L" does not start 2nd deck , it is activating streaming instead (should have been "Strg+L"). Have not tested with original englich translation activated, maybe it does make a difference.

Tags: i18n

Related branches

Revision history for this message
jus (jus) wrote :
Revision history for this message
jus (jus) wrote :

Hmm, looks like the language setting does make a difference indeed.
Bug confirmed with Mixxx 1.10 final on WIndows XP SP3 if language is set to German.
C:\Program Files\Mixxx>mixxx.exe --locale de

other languages seems unaffected, e.g.
C:\Program Files\Mixxx>mixxx.exe --locale ru
C:\Program Files\Mixxx>mixxx.exe --locale pl
C:\Program Files\Mixxx>mixxx.exe --locale en_GB

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have tried to solve it like this:
m_pOptionsShoutcast->setShortcut(QKeySequence(tr("Ctrl+L")));
(Now waiting for Hudson ...)

I have noticed that some shortcuts have a translated modifier key "Strg" and some not "Ctrl".

I have decided to use always the native names in *.kbd.conf so what's the rule for translation?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

We have to install the qt_<locale>.qm files on Windows to solve the problem.

Note:
All short-cuts in the German text resources should be translate to their native names like "Strg" and "Umschalt"

Revision history for this message
jus (jus) wrote : Re: Shortcuts do not work if they have been translated and the respective translation is loaded

Ahh, now i understand. Apparently we allow translations for our shortcuts and "CTRL" is translated to "STRG" in our german translation (what is correct in itself).
Would be interesting to know if Linux is affected by this bug too.
Mac OS seems to be unaffected - we do not have "CTRL" there , using "Cmd" instead per QT default.

BTW.
Shortcuts in the german translations were already translated except for one element, fixed that.
If a translation is incomplete/not correct , anyone can submit translations directly to Mixxx in Launchpad as Mixxx is translated with open permissions.

summary: - STRG is missing from shortcuts, many are now unusable with Windows
+ Shortcuts do not work if they have been translated and the respective
+ translation is loaded
summary: - Shortcuts do not work if they have been translated and the respective
- translation is loaded
+ qt_<locale>.qm missing on Windows, translated shortcuts not working
Revision history for this message
Daniel Schürmann (daschuer) wrote :

There are two sources for translations: mixxx_<locale>.qm and qt_<locale>.qm. On Linux, the qt_<locale>.qm files are installed with the Qt packages. On windows, we provide the Qt dlls without the qt_<locale>.qm and that the issue.

When mixxx tries to install a short-cut for an action, e.g tr("Ctrl-L") it is translated to "Strg+L" for German locale. QT parses the text to know on which short-cut it should react. If there is no qt_de.qm loaded in this case, it does not recognise "Strg" as modifier "Ctrl" and simply ignores that part of the String. The resulting shortcut is "L" without the modifier as reported.

Who is the windows guy, likes to fixing the installer?

BTW:
In the *.kbd.conf we will use the untranslated "PortableText" Format, because the keyboard layout has nothing to do with the
text locale.

How does translation of the modifier keys work for Mac OS? Are the Short-cuts shown as "⌘+L"?

Changed in mixxx:
milestone: 1.10.1 → none
Revision history for this message
jus (jus) wrote :

<quote>How does translation of the modifier keys work for Mac OS? Are the Short-cuts shown as "⌘+L"? </quote> Yes, "Ctrl" (aka "Strg") translate to "Cmd" (aka "⌘") . See picture.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Cool ;-) Thank you.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

I can reproduce the problem on US English Windows XP x64 (running Mixxx with --locale de) but simply dropping qt_de.qm in translations or in the main Mixxx program folder has no effect. How did you get it to work?

Changed in mixxx:
status: Confirmed → New
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Unfortunately I have no Windows development environment, so my findings are based on debugging on Ubuntu.

Please look at mixxx.cpp line 144 ff.

   if( qtTranslator->load("qt_" + locale,
           QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
       a->installTranslator(qtTranslator);
   }

Where does QLibraryInfo::TranslationsPath points to in WIN?
Maybe the best solution is to load qt_<locale>.qm form "translationsFolder" using a compiler switch.

Revision history for this message
Sören (soekkle) wrote :

Under Windows I Test some liens form the Quotation from mixxx.cpp line on Windows. The path "QLibraryInfo::location(QLibraryInfo::TranslationsPath)" shows to the Traslation of the used QT Version.
So the qt_<locale>.qm must be at the same directory as on the compield Version.
An other way could be to set this path to <mixxx_dir>/translation on a Windows PC

RJ Skerry-Ryan (rryan)
tags: added: i18n
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I think for Windows and Mac OS X we have to provide these qt files ourselves since we are always providing our own version of Qt with Mixxx. For Linux, we should stick with what QDesktopServices gives us.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

But yes, the packaging scripts need updating to include the appropriate qt_ QM files in the same folder the other translations go to (the 'translations' folder)

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Actually, I believe no special casing is necessary. We can just create a new QTranslator that searches for qt_*.qm files in the translationsFolder. If none are found then it will have no effect since Qt will just fall back to trying to the QTranslator that uses QDesktopServices.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Added an extra QTranslator as described in #14 to lp:mixxx/1.10

Changed in mixxx:
assignee: nobody → Sean M. Pappalardo (pegasus-renegadetech)
status: New → Confirmed
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

OK, guys. Sorry for the delay on this.
Please check out the Windows builds in http://builds.mixxx.org/builds/release-1.10.x/ and let me know if the problem still exists.

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

1.10 r3056 for the record.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It works for me on WinXP!

Revision history for this message
jus (jus) wrote :

Works on Windows 7 too.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Awesome, thanks guys.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

In trunk at least as of r3011.

Changed in mixxx:
status: In Progress → Fix Committed
milestone: none → 1.10.1
milestone: 1.10.1 → 1.11.0
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6207

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.