Bug 123992 - [l10n] Use separate strings for menu items and icon tooltips
Summary: [l10n] Use separate strings for menu items and icon tooltips
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
6.2.1.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Toolbars-Tooltips
  Show dependency treegraph
 
Reported: 2019-03-11 08:20 UTC by Ming Hua
Modified: 2023-03-05 08:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the tooltip described in the original report (2.38 KB, image/png)
2019-04-17 00:03 UTC, Ming Hua
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2019-03-11 08:20:16 UTC
For non-Latin based languages, such as Chinese, the mnemonic letters (keyboard accelerators) are usually put in paratheses after the translated string.

Example: For opening a file, the "~Open" string is translated to "打开 (~O)" (or "OpenInChinese (~O)" for those having problem displaying Chinese).

This works well for the menu items, as the "O" letter is rendered with an underline, and Chinese users are used to such notation for mnemonic letters.  However, the same string seems to be also used for the pop-up tooltip of the "Open" icon on the toolbar, just without the underline.  So when a Chinese user mouse-over the icon, he/she sees "打开 (O)" and wouldn't know what the "(O)" part means.

For Latin based language with in-line mnemonic letters this approach works fine, however for non-Latin based language this is cumbersome and confusing.

Obviously make these two separate strings for translation would work, but that adds a lot of strings for all the languages, many of which unnecessarily.  Hope someone will have a better solution.
Comment 1 Xisco Faulí 2019-04-16 08:41:21 UTC
@Sophi, what is your opinion here ?
Comment 2 sophie 2019-04-16 09:28:50 UTC
I need to investigate, but there seems to be a confusion between mnemonics (underlined letter rendered with a ~ in translation) and the shortcut key which is the one between parenthesis in the tooltip i.e. in en_US version: Open (Ctrl+O). They are not the same strings, tooltips are part of the help files while menu strings are part of the UI files and shortcut keys are not localized. So I will discuss it with the Chinese translation team.
Comment 3 Ming Hua 2019-04-17 00:03:33 UTC
Created attachment 150806 [details]
Screenshot of the tooltip described in the original report

Hmm, it seems my original report was not clear enough.  Attached is a screenshot of the problem I was describing - mnemonic letter in the tooltip.  The "打开" part is the Chinese translation of "Open", the "(O)" is what I was complaining about, and the final "(Ctrl+O)" is the keyboard shortcut that I have no problem with.

There was no confusion between the mnemonics and the shortcuts.

Thanks for looking into this report.
Comment 4 Ming Hua 2019-05-04 06:46:29 UTC
Is there any progress on this bug?  Can I at least get a confirmation that my problem is well understood?  This "unconfirmed" status is rather unassuring. :-(

@Sophie, did you discuss with the zh_CN translation team?  Or should I try to contact them myself?
Comment 5 Ming Hua 2019-05-17 14:30:00 UTC
So I tried the keyID feature in 6.3.0 alpha1, and both the "File -> Open..." menu item and the open icon tooltip has the keyID EKctU.  I assume this confirms that they are using the same translation.
Comment 6 sophie 2019-05-21 12:38:05 UTC
So DaeHyun confirmed:
------------------------- 
Here's the strings in the source tree: https://cgit.freedesktop.org/libreoffice/core/tree/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu#n5332
I'm specifically using "Find & Rep~lace..." as a query keyword here but I suspect the other offending strings are also in this file.
The underline formatting is ignored in the non-localized toolbar icon tooltip unfortunately this won't work for non-English locales as the accelerator key is denoted separately.
--------------------------
Set as confirmed.
Comment 7 QA Administrators 2021-05-21 04:28:23 UTC Comment hidden (obsolete)
Comment 8 Ming Hua 2023-03-05 08:27:42 UTC
No longer reproducible in 7.4.5:

Version: 7.4.5.1 (x64) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL

I vaguely remember reading about some developer working on this, probably Caolan.  Don't want to dig into git logs to find out the exact commit fixing this bug, though, so to WORKSFORME for now.