2020-05-21 06:28:16 +08:00
|
|
|
# Copyright © 2020 by The qTox Project Contributors
|
|
|
|
#
|
|
|
|
# This file is part of qTox, a Qt-based graphical interface for Tox.
|
|
|
|
# qTox is libre software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# qTox is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with qTox. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
|
|
|
|
# Edit this list if translations are added
|
|
|
|
qt5_add_translation(translations_FILES
|
|
|
|
ar.ts
|
2021-03-04 21:30:49 +08:00
|
|
|
ber.ts
|
2022-02-19 04:09:20 +08:00
|
|
|
be.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
bg.ts
|
|
|
|
cs.ts
|
|
|
|
da.ts
|
|
|
|
de.ts
|
|
|
|
el.ts
|
2022-02-21 20:37:55 +08:00
|
|
|
en.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
eo.ts
|
|
|
|
es.ts
|
|
|
|
et.ts
|
|
|
|
fa.ts
|
|
|
|
fi.ts
|
|
|
|
fr.ts
|
2021-03-04 21:30:49 +08:00
|
|
|
gl.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
he.ts
|
|
|
|
hr.ts
|
|
|
|
hu.ts
|
2022-02-19 04:08:58 +08:00
|
|
|
is.ts
|
2022-02-19 04:09:20 +08:00
|
|
|
it.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
ja.ts
|
|
|
|
jbo.ts
|
2021-03-04 21:30:49 +08:00
|
|
|
kn.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
ko.ts
|
|
|
|
lt.ts
|
|
|
|
mk.ts
|
|
|
|
nl.ts
|
|
|
|
no_nb.ts
|
|
|
|
pl.ts
|
|
|
|
pr.ts
|
|
|
|
pt_BR.ts
|
2022-02-19 04:09:20 +08:00
|
|
|
pt.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
ro.ts
|
|
|
|
ru.ts
|
2021-03-04 21:30:49 +08:00
|
|
|
si.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
sk.ts
|
|
|
|
sl.ts
|
2021-03-04 21:30:49 +08:00
|
|
|
sq.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
sr_Latn.ts
|
2022-02-19 04:09:20 +08:00
|
|
|
sr.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
sv.ts
|
|
|
|
sw.ts
|
|
|
|
ta.ts
|
|
|
|
tr.ts
|
|
|
|
ug.ts
|
|
|
|
uk.ts
|
2022-02-19 04:09:20 +08:00
|
|
|
ur.ts
|
2020-05-21 06:28:16 +08:00
|
|
|
zh_CN.ts
|
|
|
|
zh_TW.ts
|
|
|
|
)
|
|
|
|
|
2020-05-22 05:25:10 +08:00
|
|
|
# Generate a resource file which contains all translation files
|
|
|
|
function(generate_translation_resource)
|
|
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc.in"
|
|
|
|
"<!DOCTYPE RCC>
|
|
|
|
<RCC version=\"1.0\">
|
|
|
|
<qresource prefix=\"/translations\">
|
|
|
|
")
|
|
|
|
foreach(qm ${translations_FILES})
|
|
|
|
get_filename_component(qm_name ${qm} NAME)
|
|
|
|
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc.in"
|
|
|
|
" <file alias=\"${qm_name}\">${qm}</file>\n")
|
|
|
|
endforeach(qm)
|
|
|
|
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc.in"
|
|
|
|
" </qresource>
|
|
|
|
</RCC>
|
|
|
|
")
|
|
|
|
endfunction()
|
2020-05-21 06:28:16 +08:00
|
|
|
|
2020-05-22 05:25:10 +08:00
|
|
|
generate_translation_resource()
|
|
|
|
configure_file(${CMAKE_CURRENT_BINARY_DIR}/translations.qrc.in ./translations.qrc COPYONLY)
|
2020-05-21 06:28:16 +08:00
|
|
|
|
2020-07-06 01:55:09 +08:00
|
|
|
add_library(translations_library STATIC ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
2020-05-22 05:25:10 +08:00
|
|
|
|
|
|
|
# An explicit dependency is needed or AUTORCC will run before the translation files are created
|
|
|
|
set_target_properties(translations_library PROPERTIES AUTOGEN_TARGET_DEPENDS "${translations_FILES}")
|