2019-09-17 16:51:18 +00:00
|
|
|
#!/bin/sh
|
2019-08-17 11:08:17 +00:00
|
|
|
##########################################################################
|
|
|
|
# OpenLP - Open Source Lyrics Projection #
|
|
|
|
# ---------------------------------------------------------------------- #
|
2022-02-01 10:10:57 +00:00
|
|
|
# Copyright (c) 2008-2022 OpenLP Developers #
|
2019-08-17 11:08:17 +00:00
|
|
|
# ---------------------------------------------------------------------- #
|
|
|
|
# This program is free 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. #
|
|
|
|
# #
|
|
|
|
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>. #
|
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# This script automates the update of the translations on OpenLP.
|
|
|
|
#
|
|
|
|
# It uses the tx client from Transifex for all the heavy lifting
|
|
|
|
# All download *.ts files are converted to *.qm files which are used by
|
|
|
|
# OpenLP.
|
|
|
|
#
|
|
|
|
###############################################################################
|
|
|
|
pwd=`pwd`
|
|
|
|
result=${PWD##*/}; echo $result
|
|
|
|
|
|
|
|
if [ $result != 'scripts' ] ; then
|
|
|
|
echo 'This script must be run from the scripts directory'
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Generation translation control file
|
|
|
|
echo
|
|
|
|
rm ../resources/i18n/*.ts
|
2020-01-01 02:53:08 +00:00
|
|
|
python3 $pwd/translation_utils.py -p
|
2019-08-17 11:08:17 +00:00
|
|
|
|
|
|
|
echo Creating base translation file
|
|
|
|
cd ..
|
|
|
|
pylupdate5 -verbose -noobsolete openlp.pro
|
|
|
|
cd scripts
|
|
|
|
|
|
|
|
echo Check of invalid characters in push file
|
|
|
|
grep -axv '.*' ../resources/i18n/en.ts
|
|
|
|
|
2019-08-18 09:15:51 +00:00
|
|
|
tx push -s
|
2019-08-17 11:08:17 +00:00
|
|
|
|
|
|
|
echo New translation file pushed.
|
|
|
|
|