Download it now!
Bug 130979 - LO7: Tooltips in cui/messages.po contain variable %MOD1 instead of string
Summary: LO7: Tooltips in cui/messages.po contain variable %MOD1 instead of string
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 125615
Blocks: Tip-Of-The-Day
  Show dependency treegraph
 
Reported: 2020-02-27 08:22 UTC by Martin Srebotnjak
Modified: 2020-02-28 03:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Srebotnjak 2020-02-27 08:22:36 UTC
Description:
Obviously to circumvent different strings for macOS and other OS (as modifier keys are different) someone introduced %MOD1 to insert a proper key.
But this solution is useful only for English and other languages that do not uses cases - for other languages this is not a proper solution.
So please revert strings back to Ctrl or create separate strings for macOS. These strings cannot be localized properly.

Actual Results:
Tooltips cannot be properly localized in some languages.

Expected Results:
Tooltips should allow for proper localization.


Reproducible: Always


User Profile Reset: No



Additional Info:
UI designers should think about the l10n process.
Comment 1 Martin Srebotnjak 2020-02-27 08:32:24 UTC
Another reason this solution is not l10n friendly:
In English the key are written with capital letters (Ctrl, Cmd).
In Slovenian, for example, it has its own naming (krmilka for Ctrl), and it is written with small capital letter. So when this modifier lands at the start of the sentence, the sentence will start with small letter, although as being the first word in a sentence it should start with a capital letter.

Here is an example how cases make your solution unuseful (from Slovenian; string uikxZ):
Hold down %MOD1 and turn the mouse wheel to change the zoom factor.
- Translation would be: -
Držite pritisnjeno %MOD1 in zavrtite kolesce miške, da spremenite faktor povečave.
- if %MOD1 would become "krmilka", localized sentence would read: -
Držite pritisnjeno krmilka in zavrtite kolesce miške, da spremenite faktor povečave.
- But that is wrong, as the key "krmilka" should be in the 4th case and should read "krmilko", so this is the desired result which this kind of code cannot generate: -
Držite pritisnjeno krmilko in zavrtite kolesce miške, da spremenite faktor povečave.

I wonder what other issues might arise with other languages...
Comment 2 Martin Srebotnjak 2020-02-27 09:00:43 UTC
Also, the tooltips in cui still remain Windows/Linux-centic, as the Options dialog path for macOS is different, but shows as for Windows/Linux, so maybe also the keys should remain Windows/Linux-centric or switchinline code should be used for both.
Comment 3 Heiko Tietze 2020-02-27 10:50:12 UTC
Done in bug 125615; you can localize the terms used for %MOD1/%MOD2

#define STR_CMD                         NC_("STR_CMD", "⌘ Cmd") //use narrow no-break space U+202F here
#define STR_CTRL                        NC_("STR_CTRL", "Ctrl")
#define STR_Alt                         NC_("STR_CMD", "Alt")
#define STR_Option                      NC_("STR_CTRL", "⌥ Opt") //use narrow no-break space U+202F here

It's defined in cui/inc/tipoftheday.hrc

Does this work for you?
Comment 4 Martin Srebotnjak 2020-02-27 22:10:34 UTC
No, Heiko, please read my example in second post.

Languages (not English) have cases, as does German. Only that in German only in Genitiv usually words get a "s" ending (or similar).

In Slovenian and many other languages of the World cases mean different ending in several cases. And the keyboard shortcut is not always in Nominativ.

So your solution would work, only if it could create proper case according to the grammar of every l10n language, which of course it cannot do.

So this solution is not OK.