Replace TRANSLATION_FILES.txt cmake include file with LINGUAS file (#287)
Generate lists of translation (.ts) files by reading LINGUAS in CMake.
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
#===========================================
|
||||
# Create list of ts files from LINGUAS file
|
||||
#===========================================
|
||||
function (expand_linguas out_var linguas_file basename)
|
||||
|
||||
file (STRINGS ${linguas_file} codes REGEX "^[^#].*$")
|
||||
list (TRANSFORM codes REPLACE "\(.+\)" "${basename}_\\1.ts" OUTPUT_VARIABLE filenames)
|
||||
set (${out_var} ${filenames} PARENT_SCOPE)
|
||||
|
||||
endfunction ()
|
||||
|
||||
|
||||
#=======================================
|
||||
# Translation files
|
||||
#=======================================
|
||||
# without this a "make clean" would delete the .ts files
|
||||
set_directory_properties (PROPERTIES CLEAN_NO_CUSTOM 1)
|
||||
|
||||
include (TRANSLATION_FILES.txt)
|
||||
expand_linguas (GLABELS_TS_FILES "LINGUAS" "glabels")
|
||||
expand_linguas (TEMPLATES_TS_FILES "LINGUAS" "templates")
|
||||
|
||||
#
|
||||
# Update strings in C-locale translation files (lupdate+lrelease)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
############################################################
|
||||
#
|
||||
# gLabels-qt application and template translations
|
||||
#
|
||||
# Please keep this file sorted.
|
||||
#
|
||||
############################################################
|
||||
ar
|
||||
bs
|
||||
ca
|
||||
cs
|
||||
da
|
||||
de
|
||||
el
|
||||
en_GB
|
||||
eo
|
||||
es
|
||||
fi
|
||||
fr
|
||||
gl
|
||||
hu
|
||||
id
|
||||
it
|
||||
ja
|
||||
ko
|
||||
lv
|
||||
nb
|
||||
nl
|
||||
oc
|
||||
pl
|
||||
pt_BR
|
||||
pt
|
||||
ro
|
||||
ru
|
||||
sk
|
||||
sl
|
||||
sr@latin
|
||||
sr
|
||||
sv
|
||||
tr
|
||||
uk
|
||||
zh_CN
|
||||
zh_HK
|
||||
zh_TW
|
||||
@@ -1,89 +0,0 @@
|
||||
############################################################
|
||||
#
|
||||
# gLabels Translation Files
|
||||
#
|
||||
############################################################
|
||||
set (GLABELS_TS_FILES
|
||||
glabels_ar.ts
|
||||
glabels_bs.ts
|
||||
glabels_ca.ts
|
||||
glabels_cs.ts
|
||||
glabels_da.ts
|
||||
glabels_de.ts
|
||||
glabels_el.ts
|
||||
glabels_en_GB.ts
|
||||
glabels_eo.ts
|
||||
glabels_es.ts
|
||||
glabels_fi.ts
|
||||
glabels_fr.ts
|
||||
glabels_gl.ts
|
||||
glabels_hu.ts
|
||||
glabels_id.ts
|
||||
glabels_it.ts
|
||||
glabels_ja.ts
|
||||
glabels_ko.ts
|
||||
glabels_lv.ts
|
||||
glabels_nb.ts
|
||||
glabels_nl.ts
|
||||
glabels_oc.ts
|
||||
glabels_pl.ts
|
||||
glabels_pt_BR.ts
|
||||
glabels_pt.ts
|
||||
glabels_ro.ts
|
||||
glabels_ru.ts
|
||||
glabels_sk.ts
|
||||
glabels_sl.ts
|
||||
glabels_sr@latin.ts
|
||||
glabels_sr.ts
|
||||
glabels_sv.ts
|
||||
glabels_tr.ts
|
||||
glabels_uk.ts
|
||||
glabels_zh_CN.ts
|
||||
glabels_zh_HK.ts
|
||||
glabels_zh_TW.ts
|
||||
)
|
||||
|
||||
############################################################
|
||||
#
|
||||
# Translation Files for Product Template Database
|
||||
#
|
||||
############################################################
|
||||
set (TEMPLATES_TS_FILES
|
||||
templates_ar.ts
|
||||
templates_bs.ts
|
||||
templates_ca.ts
|
||||
templates_cs.ts
|
||||
templates_da.ts
|
||||
templates_de.ts
|
||||
templates_el.ts
|
||||
templates_en_GB.ts
|
||||
templates_eo.ts
|
||||
templates_es.ts
|
||||
templates_fi.ts
|
||||
templates_fr.ts
|
||||
templates_gl.ts
|
||||
templates_hu.ts
|
||||
templates_id.ts
|
||||
templates_it.ts
|
||||
templates_ja.ts
|
||||
templates_ko.ts
|
||||
templates_lv.ts
|
||||
templates_nb.ts
|
||||
templates_nl.ts
|
||||
templates_oc.ts
|
||||
templates_pt_BR.ts
|
||||
templates_pt.ts
|
||||
templates_ro.ts
|
||||
templates_ru.ts
|
||||
templates_sk.ts
|
||||
templates_sl.ts
|
||||
templates_sr@latin.ts
|
||||
templates_sr.ts
|
||||
templates_sv.ts
|
||||
templates_tr.ts
|
||||
templates_uk.ts
|
||||
templates_zh_CN.ts
|
||||
templates_zh_HK.ts
|
||||
templates_zh_TW.ts
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user