Gui: Create .qm out of .ts files

This commit is contained in:
wmayer
2023-04-30 18:33:19 +02:00
parent 66347cd987
commit cc35c6167c
46 changed files with 17 additions and 44 deletions

View File

@@ -85,3 +85,13 @@ function(qt_create_resource_file outfile)
string(APPEND QRC " </qresource>\n</RCC>\n")
file(WRITE ${outfile} ${QRC})
endfunction()
function(qt_create_resource_file_prefix outfile)
set(QRC "<RCC>\n <qresource prefix=\"/translations\">\n")
foreach (it ${ARGN})
get_filename_component(qmfile "${it}" NAME)
string(APPEND QRC " <file>${qmfile}</file>")
endforeach()
string(APPEND QRC " </qresource>\n</RCC>\n")
file(WRITE ${outfile} ${QRC})
endfunction()

View File

@@ -1819,6 +1819,7 @@ static void init_resources()
// init resources
Q_INIT_RESOURCE(resource);
Q_INIT_RESOURCE(translation);
Q_INIT_RESOURCE(FreeCAD_translation);
}
void Application::initApplication()

View File

@@ -351,9 +351,14 @@ SET(Gui_UIC_SRCS
VectorListEditor.ui
)
SET(Gui_RES_SRCS
set (FreeCAD_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Language/FreeCAD_translation.qrc)
qt_find_and_add_translation(QM_SRCS "Language/FreeCAD_*.ts"
${CMAKE_CURRENT_BINARY_DIR}/Language)
qt_create_resource_file_prefix(${FreeCAD_TR_QRC} ${QM_SRCS})
set(Gui_RES_SRCS
Icons/resource.qrc
Language/translation.qrc
${FreeCAD_TR_QRC}
QSint/actionpanel/schemes.qrc
)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,48 +23,5 @@
<file>qtbase_sk.qm</file>
<file>qtbase_uk.qm</file>
<file>qtmultimedia_pl.qm</file>
<file>FreeCAD_af.qm</file>
<file>FreeCAD_de.qm</file>
<file>FreeCAD_fi.qm</file>
<file>FreeCAD_fr.qm</file>
<file>FreeCAD_hr.qm</file>
<file>FreeCAD_it.qm</file>
<file>FreeCAD_nl.qm</file>
<file>FreeCAD_no.qm</file>
<file>FreeCAD_pl.qm</file>
<file>FreeCAD_ru.qm</file>
<file>FreeCAD_uk.qm</file>
<file>FreeCAD_tr.qm</file>
<file>FreeCAD_sv-SE.qm</file>
<file>FreeCAD_zh-TW.qm</file>
<file>FreeCAD_pt-BR.qm</file>
<file>FreeCAD_cs.qm</file>
<file>FreeCAD_sk.qm</file>
<file>FreeCAD_es-ES.qm</file>
<file>FreeCAD_zh-CN.qm</file>
<file>FreeCAD_ja.qm</file>
<file>FreeCAD_ro.qm</file>
<file>FreeCAD_hu.qm</file>
<file>FreeCAD_pt-PT.qm</file>
<file>FreeCAD_sr.qm</file>
<file>FreeCAD_el.qm</file>
<file>FreeCAD_sl.qm</file>
<file>FreeCAD_eu.qm</file>
<file>FreeCAD_ca.qm</file>
<file>FreeCAD_gl.qm</file>
<file>FreeCAD_kab.qm</file>
<file>FreeCAD_ko.qm</file>
<file>FreeCAD_fil.qm</file>
<file>FreeCAD_id.qm</file>
<file>FreeCAD_lt.qm</file>
<file>FreeCAD_val-ES.qm</file>
<file>FreeCAD_ar.qm</file>
<file>FreeCAD_vi.qm</file>
<file>FreeCAD_es-AR.qm</file>
<file>FreeCAD_bg.qm</file>
<file>FreeCAD_ka.qm</file>
<file>FreeCAD_sr-CS.qm</file>
<file>FreeCAD_be.qm</file>
</qresource>
</RCC>