Created attachment 62153 [details] Screenthot showing the problem The strings describing menu shortcuts are not longer localized in LO-3.5.4 on Linux. Steps to reproduce: 1. run libreoffice in German locales, for example: LANG=de_DE.UTF-8 libreoffice3.6 2. Open the menu "Datei" (File) 3. See the shortcut for "Speichern unter" (Save as) Result: "Control+Shift+S" Expected result: "Ctrl+Maiusc+S" It is a regression in 3.5.4. It worked well in LO-.3.5.3. It is most likely caused by http://cgit.freedesktop.org/libreoffice/core/commit/vcl?h=libreoffice-3-5-4&id=8d9e2d9a211f710e91ac7c607fea25895282d245
Bjorn, Arnold, could we revert the commit or somehow fix it?
Created attachment 62178 [details] Screenshot for the Italian UI
I have no instant idea for a fix. Well, since the commit en passant fixed this crasher (thanks to Caolan for noting): https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/818761 I wonder which is more valuable: localized shortcuts or a crasher. IMHO keeping the crasher out, which might cause data-loss, even if it is rare, should have priority. Of course, for 3.6 we need a sane fix anyway.
Petr, with LANG=de_DE.UTF-8 libreoffice3.6 you can't reproduce this bug. Try this with libreoffice 3.5.3 and it will fail too. The translation of those keys was dependent on the keyboard layout, not the locale setting. As Bjoern mentioned in his commit: lp#818761: removing the problematic call to GetKeyboardName() as getKeysymReplacementName only provides the name of the key named as given by the l10n of the _keyboard_ (not the locale) e.g. a german keyboard would name "Ctrl" instead as "Strg". Assuming this change to be safe as getKeysymReplacementName falls back to English names anyway. The replacement table was called with ::vcl_sal::getKeysymReplacementName. On master I deleted the table: http://cgit.freedesktop.org/libreoffice/core/commit/?id=2233aa52da14ec85331aee1163b885fe9a9fb507 The problem itself lies at SalDisplay::GetKeyboardName: // try X keyboard extension if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) ) { const char* pAtom = NULL; if( pXkbDesc->names->groups[0] ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] ); m_aKeyboardName = pAtom; XFree( (void*)pAtom ); } --> The keyboard name was extracted from the current keyboard layout. So you have to change your keyboard layout to get a translation of keys with libo 3.5.3.
Created attachment 62294 [details] Output of SalDisplay::GetKeyboardName Use: gcc -L /usr/lib/X11/ -lX11 -o keysym keysym.c
Created attachment 62341 [details] Screenshots with German UI and German keyboard on Linux. It shows the differences between 3.5.3 and 3.5.4. I am sorry, I am probably dumb. Please look at the attached screenshot and see the differences between LibreOffice-3.5.3 and 3.5.4 on Linux. I have started the application the following way: export LANG=de_DE.UTF-8 setxkbmap de libreoffice3.6 I guess that 3.5.4 is wrong. I do not have a real German keyboard around but I guess that the physical key has the label "Strg" and not "Ctrl". So, German users might have troubles to find the "Ctrl" key by their fingers. Or did I miss something? How should I do the right test?
possibly related: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1007320
IMHO, we still should not ask the keyboard, but just use the UI language for the shortcuts. Someone using a US layout with a german UI should not be troubled to map Ctrl to Strg (as with doing such things, he is basically asking for it).
Petr: Right, you have to use setxkbmap to reproduce it, I could have described this easier. Sorry.
what-does-gnome-do ?
Created attachment 62378 [details] Gedit screenshot in German UI It seems that GNOME applications localize the shortcuts together with the UI. They ignore the selected keyboard. See the screenshot of gedit. It is taken with LANG=de_DE.UTF-8. It does not depend on the keyboard. gedit shows "Strg" with both "de" and "us" keyboards.
Thomas, please read my comment #6. I have used setxkbmap and it did not help. LO shows "Ctrl" instead of "Strg" even with "de" keyboard. Thomas, are you able to see "Strg" with LO-3.5.4 on Linux? If yes, what exeact steps are you using?
Petr: Hrm. I have to use setxkbmap with 3.5.3 to change the locale of the keybindings. With 3.5.4 setxkbmap doesn't have any effect. 3.5.3: setxkbmap de LANG=de_DE.UTF-8 libreoffice -> works 3.5.4: setxkbmap de LANG=de_DE.UTF-8 libreoffice -> doesn't work But setxkbmap is mandatory to change it with 3.5.3 and earlier. With 3.5.4 there is no possibility to change it at all. This is all I wanted to say.
IMHO, people using German UI usually also use German keyboard. So, they are used to having the shortcuts translated. They might be confused by the new behavior. Is there any chance to fix it, so it shows translated shortcuts in translated UI again? I do not mind if you put back the keyboard detection or if you avoid dependency on the keyboard. Side note: I am not sure how serious this bug is. Developers and old computer users do not mind because they are used to these translation problems. Though, normal and modern users might get annoyed if it is translated in many other application these days. We want to be modern, ... Note that it is pretty visible. It is in the main menus...
As to bug importance: At least on Debian/Ubuntu it pales compared to: https://bugs.freedesktop.org/show_bug.cgi?id=47798 which is also an l10n issue (which might be Debian/Ubuntu only though).
IMHO we could fix this by using ::vcl_sal::getKeysymReplacementName() again and make it depend on the LANG setting, not by keyboard detection. This would be the most consistent solution in the first place.
(In reply to comment #16) > IMHO we could fix this by using ::vcl_sal::getKeysymReplacementName() again and > make it depend on the LANG setting, not by keyboard detection. This would be > the most consistent solution in the first place. Sounds good to me. It will behave the same way like GNOME applications. Could you please cook up a patch for this?
Created attachment 62521 [details] Proposed patch
Created attachment 62522 [details] Proposed patch
Created attachment 62523 [details] Proposed patch * remove some unused solaris definitions * use OUString instead of String
Thomas Arnhold committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=76dcd76509ec0b2078a95f282e09696a8e91cbb0 fdo#50415 and fdo#34638 Fix Shortcut names are not localized on Linux
1) Why "target:3.7.0" and not 3.6.0 and 3.5.5? 2) Reading the patch, I noticed translations for only some of the languages LibO supports. Does that mean that all others use the English fallbacks, even if some of the key names should always be translated (e.g. "Space", "Left", "Right", etc.)?
Mikhel: 1) Because -3-6 was branched today 2) because this fixed the regression, but does not more that earlier versions did. For the issues you note: Patches welcome!
Also: For backporting the fix to -3-5 (which would make the friendly bot add "target:3.5.5" right now) the patch needs at least a signoff. Yours on the developer mailing list is welcome.
Mikhel: This is just the behavior like it was before 3.5.4. This is not optimal, but at least it's translated. Feel free to add more translations, if you need them :) Björn: I'll adjust the patch for 3.5 and 3.6 and post it on the dev list.
Thomas Arnhold committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=309a5aad968f7c12d8317c91d44c3e1122c7fe78&g=libreoffice-3-5 fdo#50415 and fdo#34638 Fix Shortcut names are not localized on Linux It will be available in LibreOffice 3.5.5.
Thomas Arnhold committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5548b62a3c22cc3338d09e22f1c663a91981deef&g=libreoffice-3-6 fdo#50415 and fdo#34638 Fix Shortcut names are not localized on Linux It will be available in LibreOffice 3.6.
Created attachment 63695 [details] Estonian translations Added patch (works for 3.6 and master) to add Estonian translations.
Created attachment 63696 [details] Fix for a typo in Norwegian translations Found a typo in Norwegian translation while working on the Estonian one. (Patch works for 3.6 and master.) It would be nice if someone with necessary power could commit these two patches to 3.6 and master.
quickly reopening so the patches do not get lost.
Mihkel Tõnnov committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cedec66271037acbd643a00cc2af492c62b09682 Estonian translation for keyboard shortcuts (fdo#50415)
Mihkel Tõnnov committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3af10435bf2ba53d77eadab61692918eb536258f typo in Norwegian translations of keyboard shortcuts (fdo#50415)
Mihkel Tõnnov committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=be7d91f5bf174de25df167791e9204ee9f9e365b&g=libreoffice-3-6 Estonian translation for keyboard shortcuts (fdo#50415) It will be available in LibreOffice 3.6.
Mihkel Tõnnov committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8a6a068326dbebe3e29a3f22794ef84a09266453&g=libreoffice-3-6 typo in Norwegian translations of keyboard shortcuts (fdo#50415) It will be available in LibreOffice 3.6.
Both patches looked fine => pushed into master and 3-6 branch => let's close the bug again. Thanks a lot for the patches. Just a small hint. It would be easier if you provided the patches with commit messages. You just commit locally and generate the patches using "git format-patch" :-)
I'll try to remember that :) Thanks for committing them!
We need exact and correct target information for automated lists in Wiki and LibO Web Site.
Jesus Corrius committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5dcb323352b175bfdcd994c4941433df98ffd4dd fdo#50415: Add Catalan translations of keyboard shortcuts The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jesus Corrius committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4f4aff77ad99083baf4150be358ec72c5918a07&h=libreoffice-4-0 fdo#50415: Add Catalan translations of keyboard shortcuts It will be available in LibreOffice 4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aurimas Fišeras committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=67eaa6c9f1cb599c158df008ccb75afb60bb8bef Add Lithuanian translations of keyboard shortcuts (related to fdo#50415) The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Added regression keyword from description.