Commit 07e9f6ce authored by Carson Black's avatar Carson Black

i18n

parent c558f153
......@@ -19,10 +19,11 @@ find_package(Qt5 COMPONENTS Widgets Core Quick QuickControls2 WebEngine REQUIRED
find_package(KF5Plasma)
find_package(KF5Kirigami2)
find_package(KF5PlasmaQuick)
find_package(KF5I18n)
add_executable(${PROJECT_NAME} "src/main.cpp" "qrc/qml.qrc" "qrc/images.qrc" "src/iconsetter.cpp" "src/iconsetter.h" "src/iconmanipulator.cpp" "src/iconmanipulator.h")
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::WebEngine Qt5::Core Qt5::Quick Qt5::QuickControls2 KF5::Kirigami2 KF5::Plasma KF5::PlasmaQuick)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::WebEngine Qt5::Core Qt5::Quick Qt5::QuickControls2 KF5::Kirigami2 KF5::Plasma KF5::PlasmaQuick KF5::I18n)
install(TARGETS ikona DESTINATION bin)
install(FILES data/me.appadeia.ikona.desktop DESTINATION share/applications)
......
#!/bin/sh
# invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources
# the results are stored in a pseudo .cpp file to be picked up by xgettext.
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
# invoke the grantlee extract script for translatable string from Grantlee themes
$EXTRACT_GRANTLEE_TEMPLATE_STRINGS `find . -name \*.html` >> html.cpp
# if your application contains tips-of-the-day, call preparetips as well.
$PREPARETIPS > tips.cpp
# call xgettext on all source files. If your sources have other filename
# extensions besides .cc, .cpp, and .h, just add them in the find call.
$XGETTEXT `find . -name \*.cc -o -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/APPNAME.pot
\ No newline at end of file
......@@ -5,6 +5,7 @@ qt5_dep = dependency('qt5', modules: ['Widgets', 'Core', 'Quick', 'QuickControls
kf5plasma_dep = dependency('KF5Plasma')
kf5plasmaquick_dep = dependency('KF5PlasmaQuick')
kf5kirigami2_dep = dependency('KF5Kirigami2')
kf5i18n_dep = dependency('KF5I18n')
inc = include_directories('src')
......
......@@ -85,7 +85,7 @@ Item {
PlasmaComponents.Label {
color: "white"
id: copied
text: "Copied!"
text: i18nc("This color has just been copied!", "Copied!")
font.bold: false
font.pointSize: 10
opacity: 0
......
......@@ -187,7 +187,7 @@ Item {
Label {
anchors.verticalCenter: parent.verticalCenter
color: root.rightColor
text: "Montage made with Ikona"
text: i18n("Montage made with Ikona")
}
}
IconManipulator {
......
......@@ -178,7 +178,7 @@ Item {
Label {
anchors.verticalCenter: parent.verticalCenter
color: root.rightColor
text: "Montage made with Ikona"
text: i18n("Montage made with Ikona")
}
}
function open() {
......
This diff is collapsed.
......@@ -10,6 +10,7 @@
#include <Plasma/Svg>
#include <QIcon>
#include <QtWebEngine>
#include <KLocalizedContext>
#include "iconsetter.h"
#include "iconmanipulator.h"
......@@ -85,5 +86,7 @@ int main(int argc, char *argv[])
if (engine.rootObjects().isEmpty())
return -1;
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
return app.exec();
}
......@@ -4,5 +4,5 @@ ikona = executable('ikona',
ikona_sources,
processed_files,
include_directories: inc,
dependencies: [qt5_dep, kf5plasma_dep, kf5plasmaquick_dep, kf5kirigami2_dep],
dependencies: [qt5_dep, kf5plasma_dep, kf5plasmaquick_dep, kf5kirigami2_dep, kf5i18n_dep],
install: true)
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