Bug 54165 - Unable to localize key names
Summary: Unable to localize key names
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.0.0 target:4.1.0
Keywords:
: 63770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-28 18:54 UTC by jmontane
Modified: 2013-11-16 12:58 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots of several programs (1.24 MB, application/x-7z-compressed)
2013-01-02 08:30 UTC, jmontane
Details
Allow localized shortcut names on Windows (6.58 KB, patch)
2013-01-05 16:32 UTC, Jesus Corrius
Details
Estonian translations (894 bytes, patch)
2013-01-14 12:03 UTC, Mihkel Tõnnov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmontane 2012-08-28 18:54:50 UTC
Key names are taken from OS keyboard. So, it can be localized to LibreOffice GUI language.

Currently we have all key names localized at help and also in other big projects, like Mozilla Firefox, but in LibreOffice is not possible.

I'm talking about "Shift", "Alt", "Control", "Print Screen" "Enter",... key names
Comment 1 jmontane 2012-08-28 18:56:04 UTC
I meant:
Key names are taken from OS keyboard. So, it can *not* be localized to LibreOffice
GUI language.

Sorry
Comment 2 Jean-Baptiste Faure 2012-09-01 08:21:17 UTC
On which version of LibreOffice do you encounter this behavior?
Please attach a screen-copy.
On my French version of LO 3.6.1 I see Ctrl for Control key in the File menu. In a previous version (I can't remember which one) it was Control. It has been fixed now.

Best regards. JBF
Comment 3 jmontane 2012-09-01 10:31:48 UTC
With a Catalan Windows XP  (Spanish+ Catalan Language pack) and LibO 3.6 keys are showed in Spanish.

As far as I know, LibO takes the key nams from OS keyboard. So, when the Lib UI language and keyboard language don't match, there is a weird effect. 

There are languages without an own keybaord, because keyboard layouts are usually country issue, not language issue.

I think the best approach is to localize key names at LibO side, just like other big projects do it (Mozilla Firefox for instance). So, it will be allowed to localize key names to LibO UI language.
Comment 4 Jean-Baptiste Faure 2012-09-01 11:11:12 UTC
Hmmm, I think this is a problem with your Operating System. On Linux (Ubuntu 11.10 with gnome-shell) I can choose between 2 Catalan keyboard layouts.
I think it is not the job of LibreOffice to fix OS defects. So I propose to close this bug report as NotOurBug.

@Sophie: as you are a localization expert, do you agree?

Best regards. JBF
Comment 5 jmontane 2012-09-02 20:48:39 UTC
It's not an OS bug.
It's not a LibO bug.

IMHO, it's a bad LibO i18n approach.

Currently, LibO uses:

1.- a language criteria is used at LibO UI and Help
2.- a locale criteria is used at dates, currencies, numerical formats, and similar fields.
3.- a keyboard layout criteria to key names when are showed at LibO UI.
4.- a language criteria to key names when ares showed at LibO help.


For instance, there is Esperanto UI and help, but no Esperanto keyboard layout. It's really weird.

IMHO 3 mus't be changed to

3.- a language criteria to key names when are showed at LibO UI.

It's an issue about LibO i18n, not l10n.
Comment 6 jmontane 2013-01-02 08:30:26 UTC
Created attachment 72375 [details]
Screenshots of several programs

Screenshots showing shortcut names, using Catalan UI in all programs but with and Spanish keyboard.
Comment 7 jmontane 2013-01-02 08:31:12 UTC
I've done some searching,

Adobe Reader, Chrome, Firefox, MS Office, Thunderbird and Windows Live localize key name according language UI of program.

7-zip, IE Explorer, PDFCreator, SumatraPDF and WinRAR shows key name in English, *not* as provided by keyboard layout

LibreOffice, OpenOffice and Keyboard (embedded program of Windows) shows key names as provides by keyboard layout.

More on, according to bug 50415, in Linux LibO the key names are showed by language UI, why doing diffent in Windows LibO?
Comment 8 Jesus Corrius 2013-01-05 16:32:49 UTC
Created attachment 72546 [details]
Allow localized shortcut names on Windows

This patch makes possible to translate shortcut names on Windows too.
Comment 9 Jesus Corrius 2013-01-05 16:51:18 UTC
Change status to NEW. 

The problem is with keyboard aliases in Windows. If you don't use the same combination of language / keyboard layout (in some cases because your keyboard layout doesn't exist or it's just an alias on Windows) the name of the keys inside LibreOffice will not match your IDE language.

@jmontane Windows is not Linux and works in a different way, so it's not always easy to do the same thing.
Comment 10 Not Assigned 2013-01-08 12:09:01 UTC
Jesus committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=28f5f06d7099f0d634ac3e7f48c993e7c1116c1d

fdo#54165: Allow localized shortcut names on Windows



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.
Comment 11 Jesus Corrius 2013-01-08 12:16:29 UTC
This commit fixes the problem.

Will be fixed in LibreOffice 4.0.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=28f5f06d7099f0d634ac3e7f48c993e7c1116c1d

Thanks for the bug report!
Comment 12 Not Assigned 2013-01-08 13:06:00 UTC
Jesus committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=54e71086799b5f40f6a36bb453ab218fa1f44eb9&h=libreoffice-4-0

fdo#54165: Allow localized shortcut names on Windows


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.
Comment 13 Mihkel Tõnnov 2013-01-14 12:03:39 UTC
Created attachment 73002 [details]
Estonian translations

Added patch with Estonian translations. There are Estonian layout(s), but they don't provide localized key names for Space, arrows, Backspace, etc. for whatever reason, which means LibO still shows these keys in English with Estonian UI.
Comment 14 Mihkel Tõnnov 2013-01-14 12:05:26 UTC
(Forgot to add: could someone who can commit the patch?)
Comment 15 Urmas 2013-01-14 12:56:11 UTC
Are you going to add the LOCALISED STRINGS for PARTICULAR languages in the C SOURCE CODE ITSELF? What the hell is this?
Comment 16 Jesus Corrius 2013-01-14 13:18:26 UTC
(In reply to comment #14)
> (Forgot to add: could someone who can commit the patch?)

Hi Mihkel,

I will take care of it. Thanks for the patch :)
Comment 17 Mihkel Tõnnov 2013-01-14 13:22:47 UTC
(In reply to comment #15)
> Are you going to add the LOCALISED STRINGS for PARTICULAR languages in the C
> SOURCE CODE ITSELF? What the hell is this?

That's not my invention, see e.g. commits by Jesus Corrius above, or the equivalent file for getting the key names localized on Linux: http://cgit.freedesktop.org/libreoffice/core/tree/vcl/unx/generic/app/keysymnames.cxx
Comment 18 Jesus Corrius 2013-01-15 09:45:10 UTC
@Umas: Yeah, it's bad and we know it, but it has been in place for a while and we are going to change it for 4.0. 4.1 can be a target. In any case, there's no need to be harsh on the comments. We are all good and intelligent people here.
Comment 19 Not Assigned 2013-01-16 11:10:38 UTC
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=0dfc5f001321589fd75b042d3084cfeae86ed736&h=libreoffice-4-0

fdo#54165: Add key replacement names for Estonian (Patch by: Mihkel Tõnnov)


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.
Comment 20 Not Assigned 2013-01-16 11:10:55 UTC
Jesus Corrius committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=42c0fa1b60fa0780ed4ac57679f118cab8f1f143

fdo#54165: Add key replacement names for Estonian (Patch by: Mihkel Tõnnov)



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.
Comment 21 Not Assigned 2013-01-22 16:50:05 UTC
Aurimas Fišeras committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9b89297b34051e115d9c5587ae5b80641c1c6b4

Add Lithuanian translations of keyboard shortcuts (related to fdo#54165)



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.
Comment 22 Rainer Bielefeld Retired 2013-04-22 05:17:32 UTC
*** Bug 63770 has been marked as a duplicate of this bug. ***