Update the translation process files and fix issues

This commit is contained in:
Tim Bentley 2019-08-17 12:08:17 +01:00
parent 4ad426d005
commit d352d9bc41
39 changed files with 7401 additions and 315356 deletions

View File

@ -8,7 +8,7 @@
*.nja
*.orig
*.pyc
*.qm
*.ts
*.rej
*.ropeproject
*.~\?~

View File

@ -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)')

View File

@ -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'))

View File

@ -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:

View File

@ -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')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1
resources/i18n/en.qm Normal file
View File

@ -0,0 +1 @@
<クd<>箆!ソ`。スン

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9
scripts/.tx/config Normal file
View 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
View 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
View 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.

View File

@ -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))