From e15bcbf877c74345e3417ba6b66efe69da2f1b17 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 26 Jan 2019 16:34:10 +0100 Subject: [PATCH] QmlPluginLoader: Register i18n functions also without libintl --- src/lib/plugins/qml/qmlpluginloader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/plugins/qml/qmlpluginloader.cpp b/src/lib/plugins/qml/qmlpluginloader.cpp index 507d925bc..8159b4b9a 100644 --- a/src/lib/plugins/qml/qmlpluginloader.cpp +++ b/src/lib/plugins/qml/qmlpluginloader.cpp @@ -71,5 +71,8 @@ void QmlPluginLoader::initEngineAndComponent() m_engine->globalObject().setProperty(QSL("__falkon_i18n"), m_engine->newQObject(i18n)); m_engine->globalObject().setProperty(QSL("i18n"), m_engine->evaluate(QSL("function (s) { return __falkon_i18n.i18n(s) }"))); m_engine->globalObject().setProperty(QSL("i18np"), m_engine->evaluate(QSL("function (s1, s2) { return __falkon_i18n.i18np(s1, s2) }"))); +#else + m_engine->globalObject().setProperty(QSL("i18n"), m_engine->evaluate(QSL("function (s) { return s }"))); + m_engine->globalObject().setProperty(QSL("i18np"), m_engine->evaluate(QSL("function (s1, s2) { return s1 }"))); #endif }