Translations was added
This commit is contained in:
@@ -37,19 +37,16 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
|||||||
MANUAL_FINALIZATION
|
MANUAL_FINALIZATION
|
||||||
${PROJECT_SOURCES}
|
${PROJECT_SOURCES}
|
||||||
)
|
)
|
||||||
# Define target properties for Android with Qt 6 as:
|
|
||||||
set_property(TARGET beerlog APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
|
set_property(TARGET beerlog APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/android)
|
${CMAKE_CURRENT_SOURCE_DIR}/android)
|
||||||
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
|
|
||||||
|
|
||||||
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
qt6_add_translations(beerlog TS_FILES ${TS_FILES})
|
||||||
else()
|
else()
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_library(beerlog SHARED
|
add_library(beerlog SHARED
|
||||||
${PROJECT_SOURCES}
|
${PROJECT_SOURCES}
|
||||||
)
|
)
|
||||||
# Define properties for Android with Qt 5 after find_package() calls as:
|
set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
|
||||||
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
|
|
||||||
else()
|
else()
|
||||||
add_executable(beerlog
|
add_executable(beerlog
|
||||||
${PROJECT_SOURCES}
|
${PROJECT_SOURCES}
|
||||||
@@ -59,6 +56,7 @@ else()
|
|||||||
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(beerlog
|
target_link_libraries(beerlog
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::WebSockets)
|
PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::WebSockets)
|
||||||
|
|
||||||
@@ -70,6 +68,10 @@ set_target_properties(beerlog PROPERTIES
|
|||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(TARGETS beerlog
|
||||||
|
BUNDLE DESTINATION .
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
|
||||||
if(QT_VERSION_MAJOR EQUAL 6)
|
if(QT_VERSION_MAJOR EQUAL 6)
|
||||||
qt_import_qml_plugins(beerlog)
|
qt_import_qml_plugins(beerlog)
|
||||||
qt_finalize_executable(beerlog)
|
qt_finalize_executable(beerlog)
|
||||||
|
|||||||
@@ -17,41 +17,54 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>OrdersView</name>
|
<name>OrdersView</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/OrdersView.qml" line="56"/>
|
<location filename="qml/Views/OrdersView.qml" line="9"/>
|
||||||
|
<source>Orders</source>
|
||||||
|
<translation>Заказы</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/Views/OrdersView.qml" line="58"/>
|
||||||
<source>Summary: %1</source>
|
<source>Summary: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Итого: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ProductsView</name>
|
<name>ProductsView</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/ProductsView.qml" line="88"/>
|
<location filename="qml/Views/ProductsView.qml" line="87"/>
|
||||||
<source>Summary: %1</source>
|
<source>Summary: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Итого: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/ProductsView.qml" line="95"/>
|
<location filename="qml/Views/ProductsView.qml" line="94"/>
|
||||||
<source>Order</source>
|
<source>Order</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Заказать</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsView</name>
|
<name>SettingsView</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/SettingsView.qml" line="8"/>
|
<location filename="qml/Views/SettingsView.qml" line="9"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>Настройки</translation>
|
<translation>Настройки</translation>
|
||||||
</message>
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsViewModel</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/SettingsView.qml" line="14"/>
|
<location filename="viewmodels/settingsviewmodel.cpp" line="11"/>
|
||||||
<source>BeerLog service address</source>
|
<source>BeerLog service address</source>
|
||||||
<translation>Адрес сервиса BeerLog</translation>
|
<translation>Адрес сервиса BeerLog</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/Views/SettingsView.qml" line="19"/>
|
<location filename="viewmodels/settingsviewmodel.cpp" line="12"/>
|
||||||
<source>Selected user id</source>
|
<source>Selected user id</source>
|
||||||
<translation>Выбранный пользователь</translation>
|
<translation>Выбранный пользователь</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="viewmodels/settingsviewmodel.cpp" line="13"/>
|
||||||
|
<source>Selected store</source>
|
||||||
|
<translation>Выбранный магазин</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>main</name>
|
<name>main</name>
|
||||||
@@ -61,29 +74,28 @@
|
|||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/main.qml" line="73"/>
|
<location filename="qml/main.qml" line="91"/>
|
||||||
<source>BeerLog v0.1</source>
|
<source>BeerLog v0.1</source>
|
||||||
<oldsource>BeerLog v1.0.0</oldsource>
|
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/main.qml" line="78"/>
|
<location filename="qml/main.qml" line="96"/>
|
||||||
<source>Orders</source>
|
<source>Orders</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Заказы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/main.qml" line="82"/>
|
<location filename="qml/main.qml" line="100"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>Настройки</translation>
|
<translation>Настройки</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/main.qml" line="86"/>
|
<location filename="qml/main.qml" line="104"/>
|
||||||
<location filename="qml/main.qml" line="122"/>
|
<location filename="qml/main.qml" line="140"/>
|
||||||
<source>Quit</source>
|
<source>Quit</source>
|
||||||
<translation>Выход</translation>
|
<translation>Выход</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/main.qml" line="126"/>
|
<location filename="qml/main.qml" line="144"/>
|
||||||
<source>Realy quit the application?</source>
|
<source>Realy quit the application?</source>
|
||||||
<translation>Действительно выйти из приложения?</translation>
|
<translation>Действительно выйти из приложения?</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -4,13 +4,11 @@
|
|||||||
<file>Components/MenuBackButton.qml</file>
|
<file>Components/MenuBackButton.qml</file>
|
||||||
<file>qtquickcontrols2.conf</file>
|
<file>qtquickcontrols2.conf</file>
|
||||||
<file>logo.png</file>
|
<file>logo.png</file>
|
||||||
<file>beerlog_ru_RU.qm</file>
|
|
||||||
<file>Components/MainMenu.qml</file>
|
<file>Components/MainMenu.qml</file>
|
||||||
<file>Views/OrdersView.qml</file>
|
<file>Views/OrdersView.qml</file>
|
||||||
<file>Views/SettingsView.qml</file>
|
<file>Views/SettingsView.qml</file>
|
||||||
<file>Components/SubtitledItemDelegate.qml</file>
|
<file>Components/SubtitledItemDelegate.qml</file>
|
||||||
<file>Components/qmldir</file>
|
<file>Components/qmldir</file>
|
||||||
<file>qt_ru.qm</file>
|
|
||||||
<file>Views/ProductsView.qml</file>
|
<file>Views/ProductsView.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Reference in New Issue
Block a user