Bug 410307 - Names of predefined image sizes, palettes and gradients are not translatable (or shown as translated in the UI)
Summary: Names of predefined image sizes, palettes and gradients are not translatable ...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Translation (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-28 07:01 UTC by Karl Ove Hufthammer
Modified: 2022-09-14 08:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2019-07-28 07:01:50 UTC
SUMMARY
It’s not possible to translate the names of the predefined image sizes, e.g. ‘Texture 1024x1024’ and ‘US Legal (300 ppi)’. The names are simply not extracted to the .pot files at all.


STEPS TO REPRODUCE
1. Go to ‘New → Custom Document → Dimensions’.
2. Under the ‘Dimensions’ tab, the ‘Predefined’ drop-down lists the prededfined images sizes.
3. Also look at the POT file http://websvn.kde.org/*checkout*/trunk/l10n-kf5/templates/messages/extragear-graphics/krita.pot

OBSERVED RESULT
The strings listed in the drop-down is missing from the POT file.


EXPECTED RESULT
The strings listed in the drop-down should be present in the POT file.
And if translated, the translation should be used in the UI.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20190723
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.13.0
Kernel Version: 5.2.1-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2500 CPU @ 3.30GHz
Memory: 15,6 GiB


ADDITIONAL INFORMATION
There are a few *similar* strings in the POT file (e.g. ‘US Ledger’), but they are from a different part of the UI.
Comment 1 wolthera 2019-07-28 11:03:32 UTC
Hm... this one is going to be tricky, the problem is that this data comes from the 'predefined' config files themselves.

https://invent.kde.org/kde/krita/tree/master/krita/data/predefined_image_sizes

I'll assign boud to this because he's neck deep into resource rewrite stuff, but no idea how we're going to handle this...
Comment 2 wolthera 2019-07-28 12:12:26 UTC
*** Bug 410034 has been marked as a duplicate of this bug. ***
Comment 3 Karl Ove Hufthammer 2019-07-28 13:23:58 UTC
OK, since you’re collecting all similar bugs into one bug report, here’s a similar issue. The translation of palette names (e.g. ‘Swatch colored grey’) from the ‘Palette’ docker also doesn’t work. The palette names are translatable (i.e., they appear in the POT file), but the translation isn’t used in the UI.

To summarise the three issues:

* Gradient names: translatable, translation not used
* Palette names: translatable, translation not used
* Image size names: not translatable
Comment 4 Karl Ove Hufthammer 2019-07-28 13:41:16 UTC
Regarding the palette names, the translations aren’t being used *except* for the ‘Gradient’ palette. But there, the wrong translation is used. The translation should be taken from the ‘msgstr’ of:

msgctxt "./krita/data/palettes/gradient.gpl"
msgid "Gradient"

(i.e. the string ‘Gradient’ with a message context corresponding to its filename)

Instead, it is taken from the ‘msgstr’ of:

msgid "Gradient"

(i.e. the string ‘Gradient’ *without* a message context,
which is used in several places in the Krita UI).

So it looks like Krita tries to translate the palette names,
but fetches the non-msgctxt translations instead of the (correct)
msgctxt translation.

(BTW, having a msgctxt does make sense here, since one might want a
different translation for the palette names than when the same string
is used in the rest of the UI.)