added suport languages

This commit is contained in:
Andrei Yankovich 2021-05-05 16:12:50 +03:00
parent 3e96b63841
commit 48a1b6fd22
8 changed files with 81 additions and 1 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
*.so
*.dll
*.dylib
*.qm
# Qt-es
object_script.*.Release

View File

@ -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()

View File

@ -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>

13
qmlNotify_languages/en.ts Normal file
View File

@ -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>

13
qmlNotify_languages/ja.ts Normal file
View File

@ -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>

13
qmlNotify_languages/ru.ts Normal file
View File

@ -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>

13
qmlNotify_languages/tr.ts Normal file
View File

@ -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>

13
qmlNotify_languages/ua.ts Normal file
View File

@ -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>