Load config i18n domain from applet root path
This now matches AppletQuickItem BUG: 343932 Change-Id: Ia019ea45d61ec7ae6a8ae6ea83ea757804649b1a Reviewed-by: David Edmundson
This commit is contained in:
parent
b3f607ec1a
commit
edc767740e
@ -88,7 +88,12 @@ void ConfigViewPrivate::init()
|
|||||||
|
|
||||||
KDeclarative::KDeclarative kdeclarative;
|
KDeclarative::KDeclarative kdeclarative;
|
||||||
kdeclarative.setDeclarativeEngine(q->engine());
|
kdeclarative.setDeclarativeEngine(q->engine());
|
||||||
|
const QString rootPath = applet.data()->pluginInfo().property("X-Plasma-RootPath").toString();
|
||||||
|
if (!rootPath.isEmpty()) {
|
||||||
|
kdeclarative.setTranslationDomain("plasma_applet_" + rootPath);
|
||||||
|
} else {
|
||||||
kdeclarative.setTranslationDomain("plasma_applet_" + applet.data()->pluginInfo().pluginName());
|
kdeclarative.setTranslationDomain("plasma_applet_" + applet.data()->pluginInfo().pluginName());
|
||||||
|
}
|
||||||
kdeclarative.setupBindings();
|
kdeclarative.setupBindings();
|
||||||
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
|
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
|
||||||
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
|
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
|
||||||
|
Loading…
Reference in New Issue
Block a user