diff --git a/src/scripting/scripting.cpp b/src/scripting/scripting.cpp index a902ce7d00..c66288e963 100644 --- a/src/scripting/scripting.cpp +++ b/src/scripting/scripting.cpp @@ -34,6 +34,7 @@ // KDE #include #include +#include #include // Qt #include @@ -626,6 +627,7 @@ KWin::Scripting::Scripting(QObject *parent) , m_workspaceWrapper(new QtScriptWorkspaceWrapper(this)) { m_qmlEngine->setProperty("_kirigamiTheme", QStringLiteral("KirigamiPlasmaStyle")); + m_qmlEngine->rootContext()->setContextObject(new KLocalizedContext(m_qmlEngine)); init(); QDBusConnection::sessionBus().registerObject(QStringLiteral("/Scripting"), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportScriptableInvokables); connect(Workspace::self(), &Workspace::configChanged, this, &Scripting::start);