forked from openlp/openlp
Update the translation process files and fix issues
This commit is contained in:
parent
4ad426d005
commit
d352d9bc41
@ -8,7 +8,7 @@
|
||||
*.nja
|
||||
*.orig
|
||||
*.pyc
|
||||
*.qm
|
||||
*.ts
|
||||
*.rej
|
||||
*.ropeproject
|
||||
*.~\?~
|
||||
|
@ -179,7 +179,7 @@ class UiAboutDialog(object):
|
||||
hu = translate('OpenLP.AboutForm', 'Hungarian (hu)')
|
||||
ind = translate('OpenLP.AboutForm', 'Indonesian (id)')
|
||||
ja = translate('OpenLP.AboutForm', 'Japanese (ja)')
|
||||
nb = translate('OpenLP.AboutForm', 'Norwegian Bokm\xe5l (nb)')
|
||||
nb = translate('OpenLP.AboutForm', 'Norwegian (nb)')
|
||||
nl = translate('OpenLP.AboutForm', 'Dutch (nl)')
|
||||
pl = translate('OpenLP.AboutForm', 'Polish (pl)')
|
||||
ptbr = translate('OpenLP.AboutForm', 'Portuguese, Brazil (pt_BR)')
|
||||
|
@ -53,7 +53,6 @@ class ScreensTab(SettingsTab):
|
||||
self.setObjectName('self')
|
||||
self.tab_layout = QtWidgets.QVBoxLayout(self)
|
||||
self.tab_layout.setObjectName('tab_layout')
|
||||
|
||||
self.screen_selection_widget = ScreenSelectionWidget(self, ScreenList())
|
||||
self.tab_layout.addWidget(self.screen_selection_widget)
|
||||
self.generic_group_box = QtWidgets.QGroupBox(self)
|
||||
@ -63,13 +62,11 @@ class ScreensTab(SettingsTab):
|
||||
self.display_on_monitor_check.setObjectName('monitor_combo_box')
|
||||
self.generic_group_layout.addWidget(self.display_on_monitor_check)
|
||||
self.tab_layout.addWidget(self.generic_group_box)
|
||||
|
||||
Registry().register_function('config_screen_changed', self.screen_selection_widget.load)
|
||||
|
||||
self.retranslate_ui()
|
||||
|
||||
def retranslate_ui(self):
|
||||
self.setWindowTitle(translate('self', 'self')) # TODO: ???
|
||||
self.generic_group_box.setTitle(translate('OpenLP.ScreensTab', 'Generic screen settings'))
|
||||
self.display_on_monitor_check.setText(translate('OpenLP.ScreensTab', 'Display if a single screen'))
|
||||
|
||||
|
@ -613,7 +613,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R
|
||||
self.log_exception('Importing theme from zip failed {name}'.format(name=file_path))
|
||||
critical_error_message_box(
|
||||
translate('OpenLP.ThemeManager', 'Import Error'),
|
||||
translate('OpenLP.ThemeManager', 'There was a problem imoorting {file_name}.\n\nIt is corrupt,'
|
||||
translate('OpenLP.ThemeManager', 'There was a problem importing {file_name}.\n\nIt is corrupt,'
|
||||
'inaccessible or not a valid theme.').format(file_name=file_path))
|
||||
finally:
|
||||
if not abort_import:
|
||||
|
@ -34,7 +34,7 @@ class SongStrings(object):
|
||||
Author = translate('OpenLP.Ui', 'Author', 'Singular')
|
||||
Authors = translate('OpenLP.Ui', 'Authors', 'Plural')
|
||||
AuthorUnknown = translate('OpenLP.Ui', 'Author Unknown') # Used to populate the database.
|
||||
CopyrightSymbol = translate('OpenLP.Ui', '\xa9', 'Copyright symbol.')
|
||||
CopyrightSymbol = '\xa9'
|
||||
SongBook = translate('OpenLP.Ui', 'Songbook', 'Singular')
|
||||
SongBooks = translate('OpenLP.Ui', 'Songbooks', 'Plural')
|
||||
SongIncomplete = translate('OpenLP.Ui', 'Title and/or verses not found')
|
||||
|
10977
resources/i18n/af.ts
10977
resources/i18n/af.ts
File diff suppressed because it is too large
Load Diff
10975
resources/i18n/bg.ts
10975
resources/i18n/bg.ts
File diff suppressed because it is too large
Load Diff
11003
resources/i18n/cs.ts
11003
resources/i18n/cs.ts
File diff suppressed because it is too large
Load Diff
10996
resources/i18n/da.ts
10996
resources/i18n/da.ts
File diff suppressed because it is too large
Load Diff
10995
resources/i18n/de.ts
10995
resources/i18n/de.ts
File diff suppressed because it is too large
Load Diff
10973
resources/i18n/el.ts
10973
resources/i18n/el.ts
File diff suppressed because it is too large
Load Diff
1
resources/i18n/en.qm
Normal file
1
resources/i18n/en.qm
Normal file
@ -0,0 +1 @@
|
||||
<クdハ<>箆!ソ`。スン
|
14336
resources/i18n/en.ts
14336
resources/i18n/en.ts
File diff suppressed because it is too large
Load Diff
11073
resources/i18n/en_GB.ts
11073
resources/i18n/en_GB.ts
File diff suppressed because it is too large
Load Diff
10995
resources/i18n/en_ZA.ts
10995
resources/i18n/en_ZA.ts
File diff suppressed because it is too large
Load Diff
11055
resources/i18n/es.ts
11055
resources/i18n/es.ts
File diff suppressed because it is too large
Load Diff
10995
resources/i18n/et.ts
10995
resources/i18n/et.ts
File diff suppressed because it is too large
Load Diff
11251
resources/i18n/fi.ts
11251
resources/i18n/fi.ts
File diff suppressed because it is too large
Load Diff
10990
resources/i18n/fr.ts
10990
resources/i18n/fr.ts
File diff suppressed because it is too large
Load Diff
11050
resources/i18n/hu.ts
11050
resources/i18n/hu.ts
File diff suppressed because it is too large
Load Diff
11015
resources/i18n/id.ts
11015
resources/i18n/id.ts
File diff suppressed because it is too large
Load Diff
10975
resources/i18n/ja.ts
10975
resources/i18n/ja.ts
File diff suppressed because it is too large
Load Diff
10975
resources/i18n/ko.ts
10975
resources/i18n/ko.ts
File diff suppressed because it is too large
Load Diff
11065
resources/i18n/lt.ts
11065
resources/i18n/lt.ts
File diff suppressed because it is too large
Load Diff
11053
resources/i18n/nb.ts
11053
resources/i18n/nb.ts
File diff suppressed because it is too large
Load Diff
10993
resources/i18n/nl.ts
10993
resources/i18n/nl.ts
File diff suppressed because it is too large
Load Diff
10995
resources/i18n/pl.ts
10995
resources/i18n/pl.ts
File diff suppressed because it is too large
Load Diff
11008
resources/i18n/pt_BR.ts
11008
resources/i18n/pt_BR.ts
File diff suppressed because it is too large
Load Diff
10995
resources/i18n/ru.ts
10995
resources/i18n/ru.ts
File diff suppressed because it is too large
Load Diff
10994
resources/i18n/sk.ts
10994
resources/i18n/sk.ts
File diff suppressed because it is too large
Load Diff
10985
resources/i18n/sv.ts
10985
resources/i18n/sv.ts
File diff suppressed because it is too large
Load Diff
10974
resources/i18n/ta_LK.ts
10974
resources/i18n/ta_LK.ts
File diff suppressed because it is too large
Load Diff
10974
resources/i18n/th_TH.ts
10974
resources/i18n/th_TH.ts
File diff suppressed because it is too large
Load Diff
10971
resources/i18n/zh_CN.ts
10971
resources/i18n/zh_CN.ts
File diff suppressed because it is too large
Load Diff
10976
resources/i18n/zh_TW.ts
10976
resources/i18n/zh_TW.ts
File diff suppressed because it is too large
Load Diff
9
scripts/.tx/config
Normal file
9
scripts/.tx/config
Normal file
@ -0,0 +1,9 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[openlp.openlp-30x]
|
||||
file_filter = ../resources/i18n/<lang>.ts
|
||||
minimum_perc = 0
|
||||
source_file = ../resources/i18n/en.ts
|
||||
source_lang = en
|
||||
type = qt
|
55
scripts/pull_translations
Executable file
55
scripts/pull_translations
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
##########################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# ---------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2019 OpenLP Developers #
|
||||
# ---------------------------------------------------------------------- #
|
||||
# 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
|
||||
|
||||
|
||||
rm ../resources/i18n/*.ts
|
||||
|
||||
echo
|
||||
echo Downloading the translated files
|
||||
echo
|
||||
tx pull -a --minimum-perc=45
|
||||
|
||||
echo
|
||||
echo Converting files to QT translated files
|
||||
echo
|
||||
cd ../resources/i18n
|
||||
rm *.qm
|
||||
for file in *.ts;
|
||||
do lconvert-qt5 -i $file -o ${file%%ts}qm ;
|
||||
done
|
||||
|
||||
echo Translation update complete
|
52
scripts/push_translations
Executable file
52
scripts/push_translations
Executable file
@ -0,0 +1,52 @@
|
||||
##########################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# ---------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2019 OpenLP Developers #
|
||||
# ---------------------------------------------------------------------- #
|
||||
# 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
|
||||
python3 $pwd/translation_utils.py -p
|
||||
|
||||
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
|
||||
|
||||
#tx push -s
|
||||
|
||||
echo New translation file pushed.
|
||||
|
@ -61,7 +61,7 @@ from lxml import objectify
|
||||
from PyQt5 import QtCore
|
||||
|
||||
SERVER_URL = 'http://www.transifex.com/api/2/project/openlp/resource/openlp-26x/'
|
||||
IGNORED_PATHS = ['scripts']
|
||||
IGNORED_PATHS = ['scripts', 'tests']
|
||||
IGNORED_FILES = ['setup.py']
|
||||
|
||||
verbose_mode = False
|
||||
@ -252,10 +252,7 @@ def prepare_project():
|
||||
line = file
|
||||
print_verbose('Parsing "%s"' % line)
|
||||
lines.append('SOURCES += %s' % line)
|
||||
elif file.endswith('.ts'):
|
||||
line = '%s/%s' % (path, file)
|
||||
print_verbose('Parsing "%s"' % line)
|
||||
lines.append('TRANSLATIONS += %s' % line)
|
||||
lines.append('TRANSLATIONS += resources/i18n/en.ts')
|
||||
lines.sort()
|
||||
file = open(os.path.join(start_dir, 'openlp.pro'), 'w')
|
||||
file.write('\n'.join(lines))
|
||||
|
Loading…
Reference in New Issue
Block a user