Bug 448027 - Configure Toolbar action buttons with "&" in their names become untranslated after added to Current action list
Summary: Configure Toolbar action buttons with "&" in their names become untranslated ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Translation (other bugs)
Version First Reported In: 5.0.0
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-06 16:03 UTC by Tyson Tan
Modified: 2022-05-29 12:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2022-01-06 16:03:57 UTC
In main menu > Configure >  Configure Toolbar
The actions with an "&" in their names, like "F&ull Screen", "&Show Canvas Only" become untranslated when added from Available action list to Current action list.

&Show Canvas Only
#: krita/kritamenu.action:616

F&ull Screen Mode
#: krita/kritamenu.action:628

My guess is that the "&" (&) is causing the issue, because every action in that file with an & seem to be broken in the same way. If that's the case, I recommend checking other .action files as well.
Comment 1 Alvin Wong 2022-01-06 16:53:34 UTC
Git commit 713e98803eaec18a2292d99649c4ce1a72251860 by Alvin Wong.
Committed on 06/01/2022 at 16:52.
Pushed by alvinwong into branch 'master'.

Fix action text being untranslated in Configure Toolbar

In the "Current actions" list we should use QAction::text() like the
"Available list", instead of QAction::iconText(), because the `iconText`
defined in .action files are not being extracted for i18n and therefore
can be untranslated when different from `text`.

Maybe we should review how and where `iconText` is actually being used,
and either remove it or make sure they are translated?

M  +1    -1    libs/widgetutils/xmlgui/kedittoolbar.cpp

https://invent.kde.org/graphics/krita/commit/713e98803eaec18a2292d99649c4ce1a72251860
Comment 2 Alvin Wong 2022-01-06 16:54:23 UTC
Git commit 6da0b2fe3ef13d8649e30ad70ece0b4a93cc44bf by Alvin Wong.
Committed on 06/01/2022 at 16:54.
Pushed by alvinwong into branch 'krita/5.0'.

Fix action text being untranslated in Configure Toolbar

In the "Current actions" list we should use QAction::text() like the
"Available list", instead of QAction::iconText(), because the `iconText`
defined in .action files are not being extracted for i18n and therefore
can be untranslated when different from `text`.

Maybe we should review how and where `iconText` is actually being used,
and either remove it or make sure they are translated?
(cherry picked from commit 713e98803eaec18a2292d99649c4ce1a72251860)

M  +1    -1    libs/widgetutils/xmlgui/kedittoolbar.cpp

https://invent.kde.org/graphics/krita/commit/6da0b2fe3ef13d8649e30ad70ece0b4a93cc44bf
Comment 3 Tyson Tan 2022-01-07 01:05:00 UTC
Thank you, Alvin! :D
Comment 4 Alvin Wong 2022-05-26 09:48:27 UTC
Git commit bb4c285dc396c89e0d640c01d1feb8badb412bbd by Alvin Wong.
Committed on 26/05/2022 at 09:48.
Pushed by alvinwong into branch 'master'.

Revert "Fix action text being untranslated in Configure Toolbar"

Now that iconText can be properly translated, we probably can revert to
it so that the text shown in the right-hand list actually matches that
when shown on the toolbar.

This text may revert to English until the translations have been
updated.

This reverts commit 713e98803eaec18a2292d99649c4ce1a72251860.
Related: bug 454167

M  +1    -1    libs/widgetutils/xmlgui/kedittoolbar.cpp

https://invent.kde.org/graphics/krita/commit/bb4c285dc396c89e0d640c01d1feb8badb412bbd
Comment 5 Tyson Tan 2022-05-29 12:54:44 UTC
Thank you Alvin, the strings in toolbar are now properly translated, we only need to rebuild the translation once.

Our local community wanted me to tell you that they really appreciate your effort fixing all these translation related problems.

BTW, I don't know if I should say it here, but Krita's HSV Adjustment filter has the Value/Lightness/Intensity/Luminosity strings untranslatable in 5.1 branch. It has been reported as https://bugs.kde.org/show_bug.cgi?id=454210 , but no one is looking into it. Can you help with that too? Thanks!