Commit 89ce4c55 authored by Nicolas Fella's avatar Nicolas Fella

Enable translations

parent 32564cd0
......@@ -10,7 +10,7 @@ endif()
qt5_add_resources(ktrip_SRCS resources.qrc)
add_executable(ktrip ${ktrip_SRCS})
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KPublicTransport)
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KF5::I18n KPublicTransport)
if (ANDROID)
target_link_libraries(ktrip PRIVATE
......
......@@ -33,6 +33,8 @@
#include <KPublicTransport/JourneyQueryModel>
#include <KPublicTransport/Manager>
#include <KLocalizedContext>
#include "androidutils.h"
#ifdef Q_OS_ANDROID
......@@ -48,6 +50,7 @@ int main(int argc, char *argv[])
#endif
QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:/qml/main.qml")));
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
qmlRegisterType<LocationQueryModel>("org.kde.ktrip", 0, 1, "LocationQueryModel");
qmlRegisterType<KPublicTransport::JourneyQueryModel>("org.kde.ktrip", 0, 1, "JourneyQueryModel");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment