diff --git a/.gitignore b/.gitignore index 18341dd..e4e3733 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *.so *.dll *.dylib +*.qm # Qt-es object_script.*.Release diff --git a/CMakeLists.txt b/CMakeLists.txt index 72de15c..549d4f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,10 +28,19 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick REQUIRED) file(GLOB SOURCE_CPP "*.cpp" "*.qrc") -add_library(${PROJECT_NAME} SHARED ${SOURCE_CPP}) +add_library(${PROJECT_NAME} ${SOURCE_CPP}) target_link_libraries(${PROJECT_NAME} PUBLIC Qt::Core Qt::Quick) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/en.ts + ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/ru.ts + ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/ja.ts + ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/tr.ts + ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/ua.ts) + + +prepareQM( ${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} "${LANGS}") + setVersion(1 0 1) initAll() diff --git a/QML.qrc b/QML.qrc index d3fcd40..a0fc91e 100644 --- a/QML.qrc +++ b/QML.qrc @@ -6,6 +6,11 @@ <file>NotifyModule/BasePopUp.qml</file> <file>NotifyModule/Metrix.qml</file> <file>NotifyModule/YesNoQuestion.qml</file> + <file>qmlNotify_languages/ua.qm</file> + <file>qmlNotify_languages/tr.qm</file> + <file>qmlNotify_languages/ru.qm</file> + <file>qmlNotify_languages/ja.qm</file> + <file>qmlNotify_languages/en.qm</file> </qresource> <qresource prefix="/icons"> <file alias="warning">icons/Warning.png</file> diff --git a/qmlNotify_languages/en.ts b/qmlNotify_languages/en.ts new file mode 100644 index 0000000..903d1c6 --- /dev/null +++ b/qmlNotify_languages/en.ts @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>NotificationForm</name> + <message> + <location filename="../NotifyModule/NotificationForm.qml" line="16"/> + <location filename="../NotifyModule/NotificationForm.qml" line="18"/> + <source>Message</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/qmlNotify_languages/ja.ts b/qmlNotify_languages/ja.ts new file mode 100644 index 0000000..903d1c6 --- /dev/null +++ b/qmlNotify_languages/ja.ts @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>NotificationForm</name> + <message> + <location filename="../NotifyModule/NotificationForm.qml" line="16"/> + <location filename="../NotifyModule/NotificationForm.qml" line="18"/> + <source>Message</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/qmlNotify_languages/ru.ts b/qmlNotify_languages/ru.ts new file mode 100644 index 0000000..903d1c6 --- /dev/null +++ b/qmlNotify_languages/ru.ts @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>NotificationForm</name> + <message> + <location filename="../NotifyModule/NotificationForm.qml" line="16"/> + <location filename="../NotifyModule/NotificationForm.qml" line="18"/> + <source>Message</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/qmlNotify_languages/tr.ts b/qmlNotify_languages/tr.ts new file mode 100644 index 0000000..903d1c6 --- /dev/null +++ b/qmlNotify_languages/tr.ts @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>NotificationForm</name> + <message> + <location filename="../NotifyModule/NotificationForm.qml" line="16"/> + <location filename="../NotifyModule/NotificationForm.qml" line="18"/> + <source>Message</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/qmlNotify_languages/ua.ts b/qmlNotify_languages/ua.ts new file mode 100644 index 0000000..903d1c6 --- /dev/null +++ b/qmlNotify_languages/ua.ts @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>NotificationForm</name> + <message> + <location filename="../NotifyModule/NotificationForm.qml" line="16"/> + <location filename="../NotifyModule/NotificationForm.qml" line="18"/> + <source>Message</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS>