Bug 902694

Summary: [CCJK] [Indic][fix available] Impossible short-cuts keys for 'OK' and 'Cancel' buttons in LibreOffice for various CJK/Indic languages
Product: Red Hat Enterprise Linux 6 Reporter: Lijun Li <lijli>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: eng-l10n-bugs, lijli, qe-i18n-bugs, tpelka
Target Milestone: rcKeywords: Desktop, i18n, Translation
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libreoffice-3.4.5.2-18.el6 Doc Type: Bug Fix
Doc Text:
Cause: Naive attempt to add auto-mnemonics to buttons Consequence: non-existing keys suggested as shortcuts Fix: Manually choose mnemonics for OK/Cancel in affected languages Result: Short cuts suggested are achievable from the keyboard
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 05:04:23 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 960054    
Attachments:
Description Flags
Missing hotkeys for 'OK' and 'Cancel' button of LibreOffice
none
gedit correct hotkeys
none
Fixed none

Description Lijun Li 2013-01-22 04:40:53 EST
Description of problem:
[CCJK] Missing hotkeys for 'OK' and 'Cancel' button of LibreOffice.

Version-Release number of selected component (if applicable):
libreoffice-core-3.4.5.2-16.1.el6_3.x86_64
libreoffice-impress-3.4.5.2-16.1.el6_3.x86_64
libreoffice-draw-3.4.5.2-16.1.el6_3.x86_64
libreoffice-writer-3.4.5.2-16.1.el6_3.x86_64
libreoffice-calc-3.4.5.2-16.1.el6_3.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install latest rhel6.4 client build.
2. Open libreoffice.
3. Click File->Print Settings.
  
Actual results:
[CCJK] Missing hotkeys for 'OK' and 'Cancel' button of LibreOffice 

Expected results:
Should add hotkeys to them.

Additional info:
Comment 1 Lijun Li 2013-01-22 04:41:52 EST
Created attachment 684965 [details]
Missing hotkeys for 'OK' and 'Cancel' button of LibreOffice
Comment 3 Caolan McNamara 2013-01-23 12:12:32 EST
This is a translation thing, the translations for the language need to include the desired hotkeys, i.e. translations/source/zh-CN/vcl/source/src.po
#: btntext.src#SV_BUTTONTEXT_OK.string.text
msgid "OK"
msgstr "确定"

a) Presumably this is with *every* OK/Cancel button right ?
b) I'm *guessing* this is zh-CN, right ?
c) What strings does e.g. gtk use here ?, I mean what do we want them to say ?

Did we ever have hotkeys for OK/Cancel in OpenOffice.org for zh-CN, as far as I can see the translations have never included any hotkeys there. So it seems to have been like that for a very long time ?
Comment 4 Lijun Li 2013-01-24 01:51:55 EST
(In reply to comment #3)
> This is a translation thing, the translations for the language need to
> include the desired hotkeys, i.e. translations/source/zh-CN/vcl/source/src.po
> #: btntext.src#SV_BUTTONTEXT_OK.string.text
> msgid "OK"
> msgstr "确定"
> 
> a) Presumably this is with *every* OK/Cancel button right ?
Yes for libreoffice
> b) I'm *guessing* this is zh-CN, right ?
Yes, also reproduced on zh_TW, ja_JP, ko_KR and Indic locales.
> c) What strings does e.g. gtk use here ?, I mean what do we want them to say
>
If we want add the hotkeys to the button, please just add it like this 'xxx(O)', 'xxx(C)';
> 
> Did we ever have hotkeys for OK/Cancel in OpenOffice.org for zh-CN, as far
> as I can see the translations have never included any hotkeys there. So it
> seems to have been like that for a very long time ?
If we don't want add the hotkeys for OK/Cacel buttons(also including other buttons), please just remove the underline '_' from the localized button text as it make no senses for leaving the underline there.

attaching the screen-shot from gedit to compare.

Thanks,
Robert
Comment 5 Lijun Li 2013-01-24 01:57:59 EST
Created attachment 686503 [details]
gedit correct hotkeys
Comment 6 Caolan McNamara 2013-01-24 12:53:41 EST
"please just remove the underline '_'" ah!, now I see the root of the problem. http://cgit.freedesktop.org/libreoffice/core/commit/?id=58f16ff09672f3e37156d0fc5e79e310b2c49c08 adds automnemonics to any un-mnemoniced OK/Cancel strings which is why it becomes a recent problem.
Comment 7 Caolan McNamara 2013-01-25 08:52:41 EST
So the problem is we're suggesting impossible short-cuts because we're adding mnemonics to the translation in a simplistic way. We have um-mnemonic-ed original strings because OK/Cancel are expected to be um-mnemonic-ed on windows. Under GNOME we try and mnemonic those, leading to the problem. http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html

upstream I'll simply add additional strings one set to be mnemonic-ed and one set to be left un-mnemonic-ed and translators can pick their preferre mnemonic.

For RHEL-6, if I get the acks, I will simply work around it by patching our translations to have additional (~O) (~C) shortcut strings
Comment 13 Lijun Li 2013-10-29 03:33:35 EDT
Verified it's fixed on libreoffice-4.0.4.2-9.el6 with latest rhel6.5 build.

Please see the attached screenshot.

Moving to VERIFIED.
Comment 14 Lijun Li 2013-10-29 03:35:54 EDT
Created attachment 816992 [details]
Fixed
Comment 15 errata-xmlrpc 2013-11-21 05:04:23 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1594.html