Bug 333135

Summary: i18n: word puzzle in KisShortcutConfiguration::buttonsToText, KisShortcutConfiguration::keysToText
Product: [Applications] krita Reporter: Alexander Potashev <aspotashev>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla, lueck
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexander Potashev 2014-04-06 20:54:16 UTC
Look for "append()" calls in KisShortcutConfiguration::buttonsToText and KisShortcutConfiguration::keysToText in krita/ui/input/kis_shortcut_configuration.cpp. These messages may be hardly translatable to some languages.

See http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles

Reproducible: Always
Comment 1 Halla Rempt 2014-04-07 08:07:11 UTC
I don't think this is fixable... I just checked the source and what happens here isn't that we're creating sentences, we're creating lists of things like mouse buttons.
Comment 2 Alexander Potashev 2014-04-07 17:36:43 UTC
Boudewijn,

It's fixable in the following ways:
1. Make the separator (currently " + ") translatable.
2. Wrap the list and the string "Button"/"Buttons" (which stands for mouse buttons in buttonsToText()) in a single i18n() call, like i18nc("explain me", "%1 %2", listText, buttonsSuffix).

By doing so translators get a way to change "Left + Back Buttons" to "Buttons: Left, Back" or whatever is needed.
Comment 3 Alexander Potashev 2014-04-07 17:43:00 UTC
Added Burkhard to CC.
Comment 4 Halla Rempt 2014-04-08 08:11:55 UTC
Okay, I think I see. I would really appreciate a patch :-). But otherwise, I'll try and fix it this weekend.
Comment 5 Alexander Potashev 2014-04-15 08:32:33 UTC
Git commit 03b280b0a43e59c88d012483f021cff70e2b1381 by Alexander Potashev.
Committed on 14/04/2014 at 18:21.
Pushed by aspotashev into branch 'master'.

i18n: fix word puzzle in showing shortcut keys to the user

M  +10   -7    krita/ui/input/kis_shortcut_configuration.cpp

http://commits.kde.org/calligra/03b280b0a43e59c88d012483f021cff70e2b1381
Comment 6 Alexander Potashev 2014-04-15 08:32:34 UTC
Git commit 92e99e34c20f88fd65290a6048c26fb621b984fb by Alexander Potashev.
Committed on 14/04/2014 at 21:58.
Pushed by aspotashev into branch 'master'.

i18n: fix word puzzle mixing keys and mouse buttons of shortcut

M  +18   -14   krita/ui/input/kis_shortcut_configuration.cpp

http://commits.kde.org/calligra/92e99e34c20f88fd65290a6048c26fb621b984fb
Comment 7 Halla Rempt 2014-04-29 09:40:59 UTC
Git commit 8e2712d416fb4733e4b02bd7d1c8349b2290788e by Boudewijn Rempt, on behalf of Alexander Potashev.
Committed on 14/04/2014 at 21:58.
Pushed by rempt into branch 'calligra/2.8'.

i18n: fix word puzzle mixing keys and mouse buttons of shortcut

M  +18   -14   krita/ui/input/kis_shortcut_configuration.cpp

http://commits.kde.org/calligra/8e2712d416fb4733e4b02bd7d1c8349b2290788e
Comment 8 Halla Rempt 2014-04-29 09:41:40 UTC
Git commit 31c118ce72a4323d4976592eeaae09ee4f2f6e24 by Boudewijn Rempt, on behalf of Alexander Potashev.
Committed on 14/04/2014 at 18:21.
Pushed by rempt into branch 'calligra/2.8'.

i18n: fix word puzzle in showing shortcut keys to the user

M  +10   -7    krita/ui/input/kis_shortcut_configuration.cpp

http://commits.kde.org/calligra/31c118ce72a4323d4976592eeaae09ee4f2f6e24