Bug 317338

Summary: a way to define translations for a kwin script
Product: [Plasma] kwin Reporter: Michail Vourlakos <mvourlakos>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: nate
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Michail Vourlakos 2013-03-25 16:22:30 UTC
A KWin Script can not support different translations yet I think.

Reproducible: Always
Comment 1 Martin Flöser 2013-03-25 18:53:54 UTC
yeah, I know. I need to look into how plasma does it.

For QML scripts it should work as one can just use the i18n injected into all declarative scripts.
Comment 2 Nicolas Fella 2023-01-04 21:10:56 UTC
Git commit 54e384e68eb69efa36714917b4f26bcb600f4a6a by Nicolas Fella.
Committed on 04/01/2023 at 20:35.
Pushed by nicolasfella into branch 'master'.

Enable scripted effects to load config translations from the kpackage

By default translations are loaded from /usr/share/locale. This works fine for builtin effects
since we install our translations there.

However, it doesn't work for third-party scripted effects. They only provide a kpackage and can't
install anything to /usr/share/.

This patch allows them to ship translations in contents/locale/$language/LC_MESSAGES/$domain.mo,
where $domain is the X-KWin-Config-TranslationDomain metadata value

This matches what Plasma does for applets since https://phabricator.kde.org/D5209

M  +5    -0    src/scripting/genericscriptedconfig.cpp

https://invent.kde.org/plasma/kwin/commit/54e384e68eb69efa36714917b4f26bcb600f4a6a