From 02b25042f7f9ccbabce3edadb63237b04558a9d7 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 21 Mar 2017 16:31:46 +0100 Subject: [PATCH] [fix] Split confirm_firewall sentence for better translations. --- src/js/yunohost/controllers/firewall.js | 4 ++-- src/locales/en.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/yunohost/controllers/firewall.js b/src/js/yunohost/controllers/firewall.js index d71c35a7..5dfbeeff 100644 --- a/src/js/yunohost/controllers/firewall.js +++ b/src/js/yunohost/controllers/firewall.js @@ -129,7 +129,7 @@ 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'])]), + 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 +149,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/locales/en.json b/src/locales/en.json index 8a59d99c..c01aec86 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -63,6 +63,8 @@ "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 to open port %s (protocol: %s, connection: %s)", + "confirm_firewall_close": "Are you sure 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*.",