mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[i18n] Use named arguments for remaining translations in app.py
This commit is contained in:
parent
62050963de
commit
fcc1fe57dc
2 changed files with 9 additions and 9 deletions
|
@ -19,12 +19,12 @@
|
|||
"app_no_upgrade" : "No app to upgrade",
|
||||
"app_not_installed" : "{app:s} is not installed",
|
||||
"app_not_correctly_installed" : "{app:s} seems to be not correctly installed",
|
||||
"custom_app_url_required" : "You must provide an URL to upgrade your custom app {:s}",
|
||||
"custom_app_url_required" : "You must provide an URL to upgrade your custom app {app:s}",
|
||||
"app_recent_version_required" : "{app:s} requires a more recent version of YunoHost",
|
||||
"app_upgraded" : "{app:s} successfully upgraded",
|
||||
"app_upgrade_failed" : "Unable to upgrade {app:s}",
|
||||
"app_id_invalid" : "Invalid app id",
|
||||
"app_already_installed" : "{:s} is already installed",
|
||||
"app_already_installed" : "{app:s} is already installed",
|
||||
"app_removed" : "{app:s} successfully removed",
|
||||
"app_location_already_used" : "An app is already installed on this location",
|
||||
"app_location_install_failed" : "Unable to install the app on this location",
|
||||
|
@ -75,8 +75,8 @@
|
|||
"dyndns_cron_remove_failed" : "Unable to remove DynDNS cron job",
|
||||
"dyndns_cron_removed" : "DynDNS cron job successfully removed",
|
||||
|
||||
"port_available" : "Port {} is available",
|
||||
"port_unavailable" : "Port {} is not available",
|
||||
"port_available" : "Port {port:d} is available",
|
||||
"port_unavailable" : "Port {port:d} is not available",
|
||||
"port_already_opened" : "Port {} is already opened for {:s} connections",
|
||||
"port_already_closed" : "Port {} is already closed for {:s} connections",
|
||||
"iptables_unavailable" : "You cannot play with iptables here. You are either in a container or your kernel does not support it.",
|
||||
|
|
|
@ -343,7 +343,7 @@ def app_upgrade(auth, app=[], url=None, file=None):
|
|||
elif url:
|
||||
manifest = _fetch_app_from_git(url)
|
||||
elif new_app_dict is None or 'lastUpdate' not in new_app_dict or 'git' not in new_app_dict:
|
||||
logger.warning(m18n.n('custom_app_url_required', app_id))
|
||||
logger.warning(m18n.n('custom_app_url_required', app=app_id))
|
||||
continue
|
||||
elif (new_app_dict['lastUpdate'] > current_app_dict['lastUpdate']) \
|
||||
or ('update_time' not in current_app_dict['settings'] \
|
||||
|
@ -458,7 +458,7 @@ def app_install(auth, app, label=None, args=None):
|
|||
if instance_number > 1 :
|
||||
if 'multi_instance' not in manifest or not is_true(manifest['multi_instance']):
|
||||
raise MoulinetteError(errno.EEXIST,
|
||||
m18n.n('app_already_installed', app_id))
|
||||
m18n.n('app_already_installed', app=app_id))
|
||||
|
||||
# Change app_id to the forked app id
|
||||
app_id = app_id + '__' + str(instance_number)
|
||||
|
@ -813,10 +813,10 @@ def app_checkport(port):
|
|||
s.connect(("localhost", int(port)))
|
||||
s.close()
|
||||
except socket.error:
|
||||
logger.success(m18n.n('port_available', int(port)))
|
||||
logger.success(m18n.n('port_available', port=int(port)))
|
||||
else:
|
||||
raise MoulinetteError(errno.EINVAL,
|
||||
m18n.n('port_unavailable', int(port)))
|
||||
m18n.n('port_unavailable', port=int(port)))
|
||||
|
||||
|
||||
def app_checkurl(auth, url, app=None):
|
||||
|
@ -1014,7 +1014,7 @@ def _get_app_settings(app_id):
|
|||
return settings
|
||||
except (IOError, TypeError, KeyError):
|
||||
logger.exception(m18n.n('app_not_correctly_installed',
|
||||
app=app_id))
|
||||
app=app_id))
|
||||
return {}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue