Fix i18n message catalog naming, add catalog for generator app

Summary:
* rust_qt_binding_generator uses tr() calls, but was missing
  catalog extraction and catalog loading
* .pot is not part of the catalog name
* Demo_qt is too generic name

Reviewers: vandenoever

Reviewed By: vandenoever

Differential Revision: https://phabricator.kde.org/D9458
master
Friedrich W. H. Kossebau 2017-12-21 15:49:04 +01:00
parent a3e02d39ec
commit 98779b0d44
4 changed files with 17 additions and 3 deletions

View File

@ -40,7 +40,9 @@ if (KF5Kirigami2_FOUND)
add_definitions(-DKIRIGAMI2)
endif()
ecm_create_qm_loader(Demo_QM_LOADER Demo_qt.pot)
if (ECM_FOUND)
ecm_create_qm_loader(Demo_QM_LOADER rqbgdemo_qt)
endif()
set(Demo_SRCS src/main.cpp src/Bindings.cpp src/SortedModel.cpp
resource_file.qrc ${Demo_QM_LOADER})

6
demo/Messages.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# Extract strings from all source files.
# EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with
# lconvert.
$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/rqbgdemo_qt.pot

View File

@ -1,6 +1,12 @@
if (ECM_FOUND)
ecm_create_qm_loader(rust_qt_binding_generator_QM_LOADER rust_qt_binding_generator_qt)
endif()
add_executable(rust_qt_binding_generator main.cpp
parseJson.cpp cpp.cpp rust.cpp helper.cpp)
parseJson.cpp cpp.cpp rust.cpp helper.cpp
${rust_qt_binding_generator_QM_LOADER}
)
target_link_libraries(rust_qt_binding_generator
Qt5::Core
)

View File

@ -3,4 +3,4 @@
# Extract strings from all source files.
# EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with
# lconvert.
$EXTRACT_TR_STRINGS `find demo -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/Demo_qt.pot
$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h` -o $podir/rust_qt_binding_generator_qt.pot