mirror of https://github.com/qTox/qTox.git
4 changed files with 89 additions and 68 deletions
@ -0,0 +1,82 @@ |
|||||||
|
# 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 |
||||||
|
be.ts |
||||||
|
bg.ts |
||||||
|
cs.ts |
||||||
|
da.ts |
||||||
|
de.ts |
||||||
|
el.ts |
||||||
|
eo.ts |
||||||
|
es.ts |
||||||
|
et.ts |
||||||
|
fa.ts |
||||||
|
fi.ts |
||||||
|
fr.ts |
||||||
|
he.ts |
||||||
|
hr.ts |
||||||
|
hu.ts |
||||||
|
it.ts |
||||||
|
ja.ts |
||||||
|
jbo.ts |
||||||
|
ko.ts |
||||||
|
lt.ts |
||||||
|
mk.ts |
||||||
|
nl.ts |
||||||
|
no_nb.ts |
||||||
|
pl.ts |
||||||
|
pr.ts |
||||||
|
pt.ts |
||||||
|
pt_BR.ts |
||||||
|
ro.ts |
||||||
|
ru.ts |
||||||
|
sk.ts |
||||||
|
sl.ts |
||||||
|
sr.ts |
||||||
|
sr_Latn.ts |
||||||
|
sv.ts |
||||||
|
sw.ts |
||||||
|
ta.ts |
||||||
|
tr.ts |
||||||
|
ug.ts |
||||||
|
uk.ts |
||||||
|
zh_CN.ts |
||||||
|
zh_TW.ts |
||||||
|
) |
||||||
|
|
||||||
|
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> |
||||||
|
") |
||||||
|
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different |
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc.in |
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc) |
||||||
|
|
||||||
|
add_library(translations_library ${translations_FILES} ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc) |
Loading…
Reference in new issue