Add a test that i18nd is used throughout
This commit is contained in:
parent
61dadaa558
commit
d6b8ea9161
@ -60,3 +60,9 @@ ecm_mark_as_test(sortfiltermodeltest)
|
|||||||
if(QT_QTOPENGL_FOUND)
|
if(QT_QTOPENGL_FOUND)
|
||||||
target_link_libraries(storagetest Qt5::OpenGL)
|
target_link_libraries(storagetest Qt5::OpenGL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#Add a test that i18n is not used directly in any import.
|
||||||
|
# It should /always/ be i18nd
|
||||||
|
find_program(SH bash)
|
||||||
|
add_test(i18ndcheck ${SH} ${CMAKE_CURRENT_SOURCE_DIR}/i18ndcheck.sh ${CMAKE_SOURCE_DIR}/src/declarativeimports)
|
||||||
|
9
autotests/i18ndcheck.sh
Normal file
9
autotests/i18ndcheck.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#If this test fails it means you are probably using i18n() in your QML code
|
||||||
|
#This should be replaced by i18nd in order to for i18n to load the correct catalog
|
||||||
|
|
||||||
|
#First arg should be the directory to check
|
||||||
|
|
||||||
|
! find $1 -name '*.qml' | xargs grep 'i18n[^d]*('
|
||||||
|
|
Loading…
Reference in New Issue
Block a user