forked from openlp/openlp
Merge branch 'master' into 'master'
Fix errors in translatable texts. See merge request openlp/openlp!179
This commit is contained in:
commit
d2881ad6e1
@ -170,7 +170,7 @@ class OpenLP(QtCore.QObject, LogMixin):
|
||||
'stored on removable device, that device needs to be made available.\n\nYou may '
|
||||
'reset the data location back to the default location, or you can try to make the '
|
||||
'current location available.\n\nDo you want to reset to the default data location? '
|
||||
'If not, OpenLP will be closed so you can try to fix the the problem.')
|
||||
'If not, OpenLP will be closed so you can try to fix the problem.')
|
||||
.format(path=data_folder_path),
|
||||
QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No),
|
||||
QtWidgets.QMessageBox.No)
|
||||
|
@ -451,8 +451,8 @@ class UiStrings(metaclass=Singleton):
|
||||
self.View = translate('OpenLP.Ui', 'View')
|
||||
self.ViewMode = translate('OpenLP.Ui', 'View Mode')
|
||||
self.Video = translate('OpenLP.Ui', 'Video')
|
||||
self.WebDownloadText = translate('OpenLP.Ui', 'Web Interface, Download and Install latest Version')
|
||||
self.ZeroconfErrorIntro = translate('OpenLP.Ui', 'There was a problem avertising OpenLP\'s remote '
|
||||
self.WebDownloadText = translate('OpenLP.Ui', 'Web Interface, Download and Install Latest Version')
|
||||
self.ZeroconfErrorIntro = translate('OpenLP.Ui', 'There was a problem advertising OpenLP\'s remote '
|
||||
'interface on the network:')
|
||||
self.ZeroconfGenericError = translate('OpenLP.Ui', 'An unknown error occurred')
|
||||
self.ZeroconfNonUniqueError = translate('OpenLP.Ui', 'OpenLP already seems to be advertising itself')
|
||||
|
@ -31,7 +31,7 @@ class JSONMixin(object):
|
||||
|
||||
:cvar:`_json_keys` is used to specify the attributes of the subclass that you wish to serialize.
|
||||
:vartype _json_keys: list[str]
|
||||
:cvar:`_name` set to override the the subclass name, useful if using a `proxy` class
|
||||
:cvar:`_name` set to override the subclass name, useful if using a `proxy` class
|
||||
:vartype _name: str
|
||||
"""
|
||||
_json_keys = []
|
||||
|
@ -219,7 +219,7 @@ class PathType(types.TypeDecorator):
|
||||
|
||||
def coerce_compared_value(self, op, value):
|
||||
"""
|
||||
Some times it make sense to compare a PathType with a string. In the case a string is used coerce the the
|
||||
Some times it make sense to compare a PathType with a string. In the case a string is used coerce the
|
||||
PathType to a UnicodeText type.
|
||||
|
||||
:param op: The operation being carried out. Not used, as we only care about the type that is being used with the
|
||||
|
@ -115,7 +115,7 @@ S_NETWORK_IDLE = 400
|
||||
S_NETWORK_SENDING = 401
|
||||
S_NETWORK_RECEIVING = 402
|
||||
|
||||
# Map PJlink errors to local status
|
||||
# Map PJLink errors to local status
|
||||
PJLINK_ERRORS = {
|
||||
'ERRA': E_AUTHENTICATION, # Authentication error
|
||||
'ERR1': E_UNDEFINED, # Undefined command error
|
||||
@ -417,7 +417,7 @@ STATUS_MSG = {
|
||||
E_LAMP: translate('OpenLP.ProjectorConstants', 'Projector lamp error'),
|
||||
E_NETWORK: translate('OpenLP.ProjectorConstants',
|
||||
'An error occurred with the network (Possibly someone pulled the plug?)'),
|
||||
E_NO_AUTHENTICATION: translate('OpenLP.ProjectorConstants', 'PJlink authentication Mismatch Error'),
|
||||
E_NO_AUTHENTICATION: translate('OpenLP.ProjectorConstants', 'PJLink authentication Mismatch Error'),
|
||||
E_NOT_CONNECTED: translate('OpenLP.ProjectorConstants', 'Projector not connected error'),
|
||||
E_PARAMETER: translate('OpenLP.ProjectorConstants', 'PJLink returned "ERR2: Invalid Parameter"'),
|
||||
E_PREFIX: translate('OpenLP.ProjectorConstants', 'PJLink Invalid prefix character'),
|
||||
|
@ -207,7 +207,7 @@ class PJLink(QtNetwork.QTcpSocket):
|
||||
:param poll_time: Time (in seconds) to poll connected projector
|
||||
:param socket_timeout: Time (in seconds) to abort the connection if no response
|
||||
"""
|
||||
log.debug('PJlink(projector="{projector}", args="{args}" kwargs="{kwargs}")'.format(projector=projector,
|
||||
log.debug('PJLink(projector="{projector}", args="{args}" kwargs="{kwargs}")'.format(projector=projector,
|
||||
args=args,
|
||||
kwargs=kwargs))
|
||||
super().__init__()
|
||||
|
@ -56,7 +56,7 @@ class Ui_ThemeManager(object):
|
||||
def setup_ui(self, widget):
|
||||
"""
|
||||
Define the UI
|
||||
:param widget: The screen object the the dialog is to be attached to.
|
||||
:param widget: The screen object the dialog is to be attached to.
|
||||
"""
|
||||
# start with the layout
|
||||
self.layout = QtWidgets.QVBoxLayout(widget)
|
||||
|
@ -72,4 +72,3 @@ class UiThemeProgressDialog(object):
|
||||
:param about_dialog: The QDialog object to translate
|
||||
"""
|
||||
theme_progress_dialog.setWindowTitle(translate('OpenLP.Themes', 'Recreating Theme Thumbnails'))
|
||||
self.label.setText(translate('OpenLP.Themes', 'TextLabel'))
|
||||
|
@ -168,7 +168,7 @@ class ProxyDialog(QtWidgets.QDialog):
|
||||
|
||||
def accept(self):
|
||||
"""
|
||||
Reimplement the the accept slot so that the ProxyWidget settings can be saved.
|
||||
Reimplement the accept slot so that the ProxyWidget settings can be saved.
|
||||
:rtype: None
|
||||
"""
|
||||
self.proxy_widget.save()
|
||||
|
@ -810,7 +810,7 @@ def send_error_message(error_type):
|
||||
critical_error_message_box(
|
||||
translate('BiblesPlugin.HTTPBible', 'Download Error'),
|
||||
translate('BiblesPlugin.HTTPBible', 'There was a problem downloading your verse selection. Please check '
|
||||
'your Internet connection, and if this error continues to occur please consider reporting a bug'
|
||||
'your Internet connection, and if this error continues to occur, please consider reporting a bug'
|
||||
'.'))
|
||||
elif error_type == 'parse':
|
||||
critical_error_message_box(
|
||||
|
@ -197,9 +197,9 @@ class MediaClipSelectorForm(QtWidgets.QDialog, Ui_MediaClipSelector, RegistryPro
|
||||
self.application.set_normal_cursor()
|
||||
return
|
||||
if not os.path.exists(path):
|
||||
log.debug('Given path does not exists')
|
||||
log.debug('Given path does not exist')
|
||||
critical_error_message_box(message=translate('MediaPlugin.MediaClipSelectorForm',
|
||||
'Given path does not exists'))
|
||||
'Given path does not exist'))
|
||||
self.toggle_disable_load_media(False)
|
||||
self.application.set_normal_cursor()
|
||||
return
|
||||
|
@ -76,11 +76,11 @@ class Ui_SelectPlanDialog(object):
|
||||
'Import As New Service'))
|
||||
self.update_existing_button.setText(translate('PlanningCenterPlugin.PlanningCenterForm', 'Refresh Service'))
|
||||
self.update_existing_button.setToolTip(translate('PlanningCenterPlugin.PlanningCenterForm',
|
||||
'Refresh Existing Service from Planning Center. \
|
||||
This will update song lyrics or item orders that \
|
||||
have changed'))
|
||||
'Refresh Existing Service from Planning Center. '
|
||||
'This will update song lyrics or item orders that '
|
||||
'have changed'))
|
||||
self.edit_auth_button.setText(translate('PlanningCenterPlugin.PlanningCenterForm', 'Edit Authentication'))
|
||||
self.edit_auth_button.setToolTip(translate('PlanningCenterPlugin.PlanningCenterForm', 'Edit the Application \
|
||||
ID and Secret Code to login to Planning Center Online'))
|
||||
self.edit_auth_button.setToolTip(translate('PlanningCenterPlugin.PlanningCenterForm', 'Edit the Application '
|
||||
'ID and Secret Code to login to Planning Center Online'))
|
||||
self.song_theme_selection_label.setText(translate('PlanningCenterPlugin.PlanningCenterForm', 'Song Theme'))
|
||||
self.slide_theme_selection_label.setText(translate('PlanningCenterPlugin.PlanningCenterForm', 'Slide Theme'))
|
||||
|
@ -68,8 +68,10 @@ class SelectPlanForm(QtWidgets.QDialog, Ui_SelectPlanDialog):
|
||||
# check our credentials and connection to the PlanningCenter server
|
||||
organization = self.planning_center_api.check_credentials()
|
||||
if len(organization) == 0:
|
||||
QtWidgets.QMessageBox.warning(self.parent(), "Authentication Failed", "Authentiation Failed. Check your \
|
||||
credentials in OpenLP Settings", QtWidgets.QMessageBox.Ok)
|
||||
QtWidgets.QMessageBox.warning(self.parent(), 'Authentication Failed',
|
||||
'Authentiation Failed. '
|
||||
'Check your credentials in OpenLP Settings.',
|
||||
QtWidgets.QMessageBox.Ok)
|
||||
return
|
||||
# set the Service Type Dropdown Box from PCO
|
||||
service_types_list = self.planning_center_api.get_service_type_list()
|
||||
|
@ -75,8 +75,8 @@ class PlanningCenterTab(SettingsTab):
|
||||
|
||||
self.notice_label.setText(
|
||||
translate('PlanningCenterPlugin.PlanningCenterTab', '<strong>Note:</strong> '
|
||||
'An Internet connection and a Planning Center Online Account are required in order to \
|
||||
import plans from Planning Center Online.')
|
||||
'An Internet connection and a Planning Center Online Account are '
|
||||
'required in order to import plans from Planning Center Online.')
|
||||
)
|
||||
self.instructions_label.setText(
|
||||
translate('PlanningCenterPlugin.PlanningCenterTab',
|
||||
|
@ -73,8 +73,8 @@ class PlanningCenterPlugin(Plugin):
|
||||
text=translate('PlanningCenterPlugin', 'Planning Center Service'),
|
||||
visible=False,
|
||||
statustip=translate('PlanningCenterPlugin',
|
||||
'Import Planning Center Service Plan \
|
||||
from Planning Center Online.'),
|
||||
'Import Planning Center Service Plan '
|
||||
'from Planning Center Online.'),
|
||||
triggers=self.on_import_planning_center_triggered
|
||||
)
|
||||
import_menu.addAction(self.import_planning_center)
|
||||
@ -102,8 +102,8 @@ class PlanningCenterPlugin(Plugin):
|
||||
PlanningCenter plugin
|
||||
"""
|
||||
return translate('PlanningCenterPlugin', '<strong>PlanningCenter Plugin</strong>'
|
||||
'<br />The planningcenter plugin provides an interface to import \
|
||||
service plans from the Planning Center Online v2 API.')
|
||||
'<br />The planningcenter plugin provides an interface to import '
|
||||
'service plans from the Planning Center Online v2 API.')
|
||||
|
||||
def set_plugin_text_strings(self):
|
||||
"""
|
||||
@ -124,8 +124,8 @@ class PlanningCenterPlugin(Plugin):
|
||||
# Middle Header Bar
|
||||
tooltips = {
|
||||
'load': '',
|
||||
'import': translate('PlanningCenterPlugin', 'Import All Plan Items \
|
||||
into Current Service'),
|
||||
'import': translate('PlanningCenterPlugin', 'Import All Plan Items '
|
||||
'into Current Service'),
|
||||
'new': '',
|
||||
'edit': '',
|
||||
'delete': '',
|
||||
|
@ -35,7 +35,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class Controller(object):
|
||||
"""
|
||||
This is the Presentation listener who acts on events from the slide controller and passes the messages on the the
|
||||
This is the Presentation listener who acts on events from the slide controller and passes the messages on the
|
||||
correct presentation handlers.
|
||||
"""
|
||||
log.info('Controller loaded')
|
||||
|
@ -431,5 +431,5 @@ class SongBeamerImport(SongImport):
|
||||
if audio_file_path.is_file():
|
||||
self.add_media_file(audio_file_path)
|
||||
else:
|
||||
log.debug('Could not import mediafile "{audio_file_path}" since it does not exists!'
|
||||
log.debug('Could not import mediafile "{audio_file_path}" since it does not exist!'
|
||||
.format(audio_file_path=audio_file_path))
|
||||
|
@ -139,7 +139,7 @@ def test_settings_nonexisting():
|
||||
"""Test the Settings on query for non-existing value"""
|
||||
# GIVEN: A new Settings setup
|
||||
with pytest.raises(KeyError) as cm:
|
||||
# WHEN reading a setting that doesn't exists
|
||||
# WHEN reading a setting that doesn't exist
|
||||
Settings().value('core/does not exists')
|
||||
|
||||
# THEN: An exception with the non-existing key should be thrown
|
||||
|
@ -73,7 +73,7 @@ def test_build_file_mask_string(media_item):
|
||||
|
||||
def test_clean_up_thumbnails(media_item):
|
||||
"""
|
||||
Test that the clean_up_thumbnails method works as expected when files exists.
|
||||
Test that the clean_up_thumbnails method works as expected when files exist.
|
||||
"""
|
||||
# GIVEN: A mocked controller, and mocked os.path.getmtime
|
||||
mocked_disabled_controller = MagicMock()
|
||||
@ -123,7 +123,7 @@ def test_clean_up_thumbnails_missing_file(media_item):
|
||||
# WHEN: calling clean_up_thumbnails
|
||||
media_item.clean_up_thumbnails(presentation_file, True)
|
||||
|
||||
# THEN: doc.presentation_deleted should have been called since the presentation file did not exists.
|
||||
# THEN: doc.presentation_deleted should have been called since the presentation file did not exist.
|
||||
mocked_doc.assert_has_calls([call.get_thumbnail_path(1, True), call.presentation_deleted()], True)
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ def test_click_load_button(form):
|
||||
# THEN: we should get an error
|
||||
assert form.media_path_combobox.currentText() == '/non-existing/test-path.test',\
|
||||
'The media path should be the given one.'
|
||||
mocked_critical_error_message_box.assert_called_with(message='Given path does not exists')
|
||||
mocked_critical_error_message_box.assert_called_with(message='Given path does not exist')
|
||||
|
||||
# WHEN: The load button is clicked with a mocked existing path
|
||||
mocked_os_path_exists.return_value = True
|
||||
|
Loading…
Reference in New Issue
Block a user