Bug 422999 - Lens Blur filter is broken in any language other than English
Summary: Lens Blur filter is broken in any language other than English
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: 4.3.0-beta2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 03:21 UTC by Tyson Tan
Modified: 2020-06-15 09:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed 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 2020-06-15 03:21:33 UTC
Lens Blur filter does not work, when Krita's language is set to anything other than English. I've tested German, Japanese and Chinese with 4.3.0 beta 2 appimage.

I also observed this weird behavior:
In English, Lens Blur filter defaults to Pentagon (5)
In other languages, it defaults to Triangle.

According to Bug 376262, I suppose these English words are used as actual variables? So when you fixed Bug 406948, the filter ceased to work in other languages...

I can leave them untranslated for now as a workaround, since the default value works just fine. I wonder if there is a way to make this work for translated strings. Thanks!
Comment 1 Halla Rempt 2020-06-15 09:05:47 UTC
Git commit b73fdfa14b9d7fd747eed60c484fd66d5964c5c2 by Boudewijn Rempt.
Committed on 15/06/2020 at 09:05.
Pushed by rempt into branch 'master'.

Lens blur: Map between translated and untranslated strings in filter config

The filter stores the shape/sides parameter as a string taken directly
from the ui, instead of an enum or an index. This patch maps the
translated string back to the English string so we store the config
in English, and show the value translated.

M  +1    -0    plugins/filters/blur/kis_lens_blur_filter.cpp
M  +9    -2    plugins/filters/blur/kis_wdg_lens_blur.cpp
M  +1    -0    plugins/filters/blur/kis_wdg_lens_blur.h

https://invent.kde.org/graphics/krita/commit/b73fdfa14b9d7fd747eed60c484fd66d5964c5c2
Comment 2 Halla Rempt 2020-06-15 09:09:24 UTC
Git commit 68aeea22b1f66867245c3a26480c5d347c4ded84 by Boudewijn Rempt.
Committed on 15/06/2020 at 09:06.
Pushed by rempt into branch 'krita/4.3'.

Lens blur: Map between translated and untranslated strings in filter config

The filter stores the shape/sides parameter as a string taken directly
from the ui, instead of an enum or an index. This patch maps the
translated string back to the English string so we store the config
in English, and show the value translated.
(cherry picked from commit 6ba7618cadeed70f7367711e840fda7edc1801a3)

M  +1    -0    plugins/filters/blur/kis_lens_blur_filter.cpp
M  +9    -2    plugins/filters/blur/kis_wdg_lens_blur.cpp
M  +1    -0    plugins/filters/blur/kis_wdg_lens_blur.h

https://invent.kde.org/graphics/krita/commit/68aeea22b1f66867245c3a26480c5d347c4ded84
Comment 3 Tyson Tan 2020-06-15 09:31:21 UTC
Thank you, Boud! :D