Bug 317338 - a way to define translations for a kwin script
Summary: a way to define translations for a kwin script
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-25 16:22 UTC by Michail Vourlakos
Modified: 2023-01-07 04:52 UTC (History)
1 user (show)

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 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