forked from openlp/openlp
Fix translate() string format and some missed conversions
This commit is contained in:
parent
3e0769d946
commit
292606ba38
@ -223,8 +223,8 @@ class OpenLP(OpenLPMixin, QtWidgets.QApplication):
|
|||||||
translate('OpenLP', 'Backup of the data folder failed!'))
|
translate('OpenLP', 'Backup of the data folder failed!'))
|
||||||
return
|
return
|
||||||
message = translate('OpenLP',
|
message = translate('OpenLP',
|
||||||
'A backup of the data folder has been created'
|
'A backup of the data folder has been created '
|
||||||
'at {text}'.format(text=data_folder_backup_path))
|
'at {text}').format(text=data_folder_backup_path)
|
||||||
QtWidgets.QMessageBox.information(None, translate('OpenLP', 'Backup'), message)
|
QtWidgets.QMessageBox.information(None, translate('OpenLP', 'Backup'), message)
|
||||||
|
|
||||||
# Update the version in the settings
|
# Update the version in the settings
|
||||||
|
@ -286,7 +286,7 @@ def get_uno_command(connection_type='pipe'):
|
|||||||
CONNECTION = '"--accept=pipe,name=openlp_pipe;urp;"'
|
CONNECTION = '"--accept=pipe,name=openlp_pipe;urp;"'
|
||||||
else:
|
else:
|
||||||
CONNECTION = '"--accept=socket,host=localhost,port=2002;urp;"'
|
CONNECTION = '"--accept=socket,host=localhost,port=2002;urp;"'
|
||||||
return '%s %s %s' % (command, OPTIONS, CONNECTION)
|
return '{cmd} {opt} {conn}'.format(cmd=command, opt=OPTIONS, conn=CONNECTION)
|
||||||
|
|
||||||
|
|
||||||
def get_uno_instance(resolver, connection_type='pipe'):
|
def get_uno_instance(resolver, connection_type='pipe'):
|
||||||
@ -336,7 +336,7 @@ def delete_file(file_path_name):
|
|||||||
os.remove(file_path_name)
|
os.remove(file_path_name)
|
||||||
return True
|
return True
|
||||||
except (IOError, OSError):
|
except (IOError, OSError):
|
||||||
log.exception("Unable to delete file %s" % file_path_name)
|
log.exception("Unable to delete file {name}".format(name=file_path_name))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ def check_binary_exists(program_path):
|
|||||||
:param program_path:The full path to the binary to check.
|
:param program_path:The full path to the binary to check.
|
||||||
:return: program output to be parsed
|
:return: program output to be parsed
|
||||||
"""
|
"""
|
||||||
log.debug('testing program_path: %s', program_path)
|
log.debug('testing program_path: {text}'.format(text=program_path))
|
||||||
try:
|
try:
|
||||||
# Setup startupinfo options for check_output to avoid console popping up on windows
|
# Setup startupinfo options for check_output to avoid console popping up on windows
|
||||||
if is_win():
|
if is_win():
|
||||||
@ -404,5 +404,5 @@ def check_binary_exists(program_path):
|
|||||||
except Exception:
|
except Exception:
|
||||||
trace_error_handler(log)
|
trace_error_handler(log)
|
||||||
runlog = ''
|
runlog = ''
|
||||||
log.debug('check_output returned: %s' % runlog)
|
log.debug('check_output returned: {text}'.format(text=runlog))
|
||||||
return runlog
|
return runlog
|
||||||
|
Loading…
Reference in New Issue
Block a user