diff --git a/src/js/yunohost/controllers/firewall.js b/src/js/yunohost/controllers/firewall.js index d71c35a7..01b90159 100644 --- a/src/js/yunohost/controllers/firewall.js +++ b/src/js/yunohost/controllers/firewall.js @@ -38,7 +38,8 @@ app.get('#/tools/firewall/upnp/:action', function (c) { c.confirm( y18n.t('firewall'), - y18n.t('confirm_upnp_action', [y18n.t(c.params['action'])]), + // confirm_upnp_enable and confirm_upnp_disable + y18n.t('confirm_upnp_' + c.params['action'].toLowerCase()), function(){ params = {'action' : c.params['action']}; c.api('/firewall/upnp', function(data) { @@ -129,7 +130,8 @@ app.get('#/tools/firewall/port/:port/:protocol/:connection/:action', function (c) { c.confirm( y18n.t('firewall'), - y18n.t( 'confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection'])]), + // confirm_firewall_open and confirm_firewall_close + y18n.t( 'confirm_firewall_' + c.params['action'].toLowerCase(), [ c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection'])]), function(){ c.togglePort( c.params['port'], @@ -149,7 +151,7 @@ app.post('#/tools/firewall/port', function (c) { c.confirm( y18n.t('firewall'), - y18n.t('confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection']) ]), + y18n.t('confirm_firewall_' + c.params['action'].toLowerCase(), [ c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection']) ]), function(){ c.togglePort( c.params['port'], diff --git a/src/js/yunohost/controllers/services.js b/src/js/yunohost/controllers/services.js index e6583aaf..2a03c744 100644 --- a/src/js/yunohost/controllers/services.js +++ b/src/js/yunohost/controllers/services.js @@ -59,7 +59,8 @@ app.get('#/services/:service/:action', function (c) { c.confirm( "Service", - y18n.t('confirm_service_action', [y18n.t(c.params['action']), c.params['service']]), + // confirm_service_start, confirm_service_stop, confirm_service_enable and confirm_service_disable + y18n.t('confirm_service_' + c.params['action'].toLowerCase(), [c.params['service']]), function(){ var method = null, endurl = c.params['service']; diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js index b6bf64c3..81d6f6d4 100644 --- a/src/js/yunohost/controllers/tools.js +++ b/src/js/yunohost/controllers/tools.js @@ -74,7 +74,8 @@ else { c.confirm( y18n.t('tools'), - y18n.t('confirm_update_type', [y18n.t('system_'+c.params['type']).toLowerCase()]), + // confirm_update_apps and confirm_update_packages + y18n.t('confirm_update_' + c.params['type'].toLowerCase()), function(){ endurl = ''; if (c.params['type'] == 'packages') {endurl = 'ignore_apps';} diff --git a/src/locales/en.json b/src/locales/en.json index 8eb3626e..2a3ad6d7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -62,15 +62,21 @@ "confirm_app_default": "Are you sure you want to make this app default ?", "confirm_change_maindomain": "Are you sure you want to change the main domain ?", "confirm_delete": "Are you sure you want to delete %s ?", - "confirm_firewall": "Are you sure to %s port %s (protocol: %s, connection: %s)", + "confirm_firewall_open": "Are you sure you want to open port %s? (protocol: %s, connection: %s)", + "confirm_firewall_close": "Are you sure you want to close port %s? (protocol: %s, connection: %s)", "confirm_install_custom_app": "Installing 3rd party applications may compromise the security of your system. Use at your own risk.", "confirm_install_domain_root": "You will not be able to install any other app on %s. Continue ?", "confirm_postinstall": "You are about to launch the post-installation process on the domain %s. It may take a few minutes, *do not interrupt the operation*.", "confirm_restore": "Are you sure you want to restore %s ?", - "confirm_service_action": "Are you sure you want to %s %s ?", + "confirm_service_start": "Are you sure you want to start %s?", + "confirm_service_stop": "Are you sure you want to stop %s?", + "confirm_service_enable": "Are you sure you want to enable %s?", + "confirm_service_disable": "Are you sure you want to disable %s?", "confirm_uninstall": "Are you sure you want to uninstall %s ?", - "confirm_update_type": "Are you sure you want update every %s ?", - "confirm_upnp_action": "Are you sure you want to %s UPnP ?", + "confirm_update_apps": "Are you sure you want to update all applications?", + "confirm_update_packages": "Are you sure you want to update all packages?", + "confirm_upnp_enable": "Are you sure you want to enable UPnP?", + "confirm_upnp_disable": "Are you sure you want to disable UPnP?", "connection": "Connection", "copy": "Copy", "count_min": "%s min",