Bug 426992

Summary: Krita 4.4 Layers docker is missing translation for Properties
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: TranslationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: amy, dimula73, halla, raghu
Priority: NOR Keywords: release_blocker
Version: 4.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tyson Tan 2020-09-26 14:31:57 UTC
Krita 4.4 beta 1 sees significant improvement in the localized version thanks to it now correctly packages the right po/mo files. But for some reason, I've discovered 3 curiously missing translations:

1. Menu > File > New…
2. Menu > Image > Properties…
3. Layer Docker > Right-click > Properties

These strings have long been translated both in Stable and Trunk. They are not even considered as duplicates between Stable/Trunk because I pushed them separately as different commits to Stable/Trunk. Although not recorded, I've noticed more missing translations when I was reviewing the Python related translation. 

I think a few (although just an insignificant number) translated strings from the Stable branch was curiously dropped.

I have no idea what caused the missing translations. Since the ones listed here are important, it'd be nice if we can fix this before the final version.

(Original forum post: https://krita-artists.org/t/krita-4-4-beta-1-is-mssing-some-translations-in-a-weird-way/12212/3)
Comment 1 Raghavendra kamath 2020-09-28 13:31:45 UTC
I can confirm this in Hindi too. Although not everything in Hindi in translated, but I have translated these strings and they are not there in the appimage
Comment 2 amyspark 2020-09-29 00:58:41 UTC
Ok, I've spent a good half of today debugging this.

The problem with this bug is threefold:

- usage of fuzzy strings (that, to begin with, are skipped by `msgfmt`)
- the specified context in action texts is ignored by KXmlGui when retrieving the translation; the context **must be** either `"action"` or nothing
- however, KXmlGui **does not ignore contexts when loading the translation files**.

Due to the latter two issues, if there is a defined context in the action text, the specified translation will never be found.

I'm not sure if this is a problem with KXmlGui or with us, I'll ask boud tomorrow.
Comment 3 Halla Rempt 2020-09-30 08:01:50 UTC
Git commit a48ec499fd471799e46bfa6f43ff0d544d558139 by Boudewijn Rempt, on behalf of L. E. Segovia.
Committed on 30/09/2020 at 07:53.
Pushed by rempt into branch 'krita/4.4.0'.

Fix translation lookup in KisActionRegistry

In b55fdf3303efa79c9c315916ab44a91b794b2ebd, unknowingly for
translators, a default "action" message context was introduced for
.action files. However, this context was hardcoded, meaning that
translations would break if the text used a more specific disambiguation
context.

This is only part of the fix for bug 426992. To fix it completely, the
i18n team must start marking strings as verified -- translations marked
with 'fuzzy' are skipped by gettext.
CCMAIL: kimageshop@kde.org

M  +31   -10   libs/widgetutils/kis_action_registry.cpp

https://invent.kde.org/graphics/krita/commit/a48ec499fd471799e46bfa6f43ff0d544d558139
Comment 4 Halla Rempt 2020-09-30 08:02:42 UTC
Git commit fb6d6c616073b10a3af1f40cab616805daac108a by Boudewijn Rempt, on behalf of L. E. Segovia.
Committed on 30/09/2020 at 08:02.
Pushed by rempt into branch 'krita/4.3'.

Fix translation lookup in KisActionRegistry

In b55fdf3303efa79c9c315916ab44a91b794b2ebd, unknowingly for
translators, a default "action" message context was introduced for
.action files. However, this context was hardcoded, meaning that
translations would break if the text used a more specific disambiguation
context.

This is only part of the fix for bug 426992. To fix it completely, the
i18n team must start marking strings as verified -- translations marked
with 'fuzzy' are skipped by gettext.
CCMAIL: kimageshop@kde.org
(cherry picked from commit a48ec499fd471799e46bfa6f43ff0d544d558139)

M  +31   -10   libs/widgetutils/kis_action_registry.cpp

https://invent.kde.org/graphics/krita/commit/fb6d6c616073b10a3af1f40cab616805daac108a
Comment 5 Halla Rempt 2020-09-30 08:02:54 UTC
Git commit e45e4e82ebd8b26b18e1c09dcdd4f99a398779d4 by Boudewijn Rempt, on behalf of L. E. Segovia.
Committed on 30/09/2020 at 08:02.
Pushed by rempt into branch 'master'.

Fix translation lookup in KisActionRegistry

In b55fdf3303efa79c9c315916ab44a91b794b2ebd, unknowingly for
translators, a default "action" message context was introduced for
.action files. However, this context was hardcoded, meaning that
translations would break if the text used a more specific disambiguation
context.

This is only part of the fix for bug 426992. To fix it completely, the
i18n team must start marking strings as verified -- translations marked
with 'fuzzy' are skipped by gettext.
CCMAIL: kimageshop@kde.org
(cherry picked from commit a48ec499fd471799e46bfa6f43ff0d544d558139)

M  +31   -10   libs/widgetutils/kis_action_registry.cpp

https://invent.kde.org/graphics/krita/commit/e45e4e82ebd8b26b18e1c09dcdd4f99a398779d4
Comment 6 Tyson Tan 2020-10-13 14:24:57 UTC
Hi Boud, thank yo for the fix, I've checked the translation in 4.4.0 final. The "&Properties" in Layer Docker > Right-click > Properties is still English only, others are now properly display. Can you look into it when you have time? Thanks!
Comment 7 amyspark 2020-10-20 15:19:47 UTC
4.4.0 final's translation files were sampled at a point where Tyson's strings were still marked as fuzzy.

Closing as RESOLVED FIXED because it's on each i18n team to fix the relevant translations.
Comment 8 Tyson Tan 2020-10-20 15:57:44 UTC
Sorry but I don't think that's the case. I make sure every string is immediately marked as verified after submitting a translation. This practice has been going on for two years now. The two "Properties" strings were disambiguated by me at the same time, and they were re-translated and verified at the same time. The updated CN translation was built again long before Krita beta 1 was built.

In fact this issue is being processed here: https://invent.kde.org/graphics/krita/-/merge_requests/542

Please allow me to re-mark it as unfixed for the time being.
Comment 9 amyspark 2020-10-20 17:18:44 UTC
Removing myself as assignee, as far as I can see it is a translation infra bug.

The previous closure was decided based on the state of 4.4.0's translation files, which show this string as fuzzy.
Comment 10 Halla Rempt 2021-01-04 15:20:32 UTC
That merge request has been merged, so can we close this bug again?
Comment 11 Tyson Tan 2021-01-04 15:26:19 UTC
(In reply to Halla Rempt from comment #10)
> That merge request has been merged, so can we close this bug again?

Yes, I will close it now. In Krita 4.4.2-beta 2 this issue has been resolved. Thank you so much for fixing it, it has bugged us for soooo long! XD