diff options
Diffstat (limited to 'src/usr/local/www/system_gateways_edit.php')
-rw-r--r-- | src/usr/local/www/system_gateways_edit.php | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/usr/local/www/system_gateways_edit.php b/src/usr/local/www/system_gateways_edit.php index 7c71408..96e839c 100644 --- a/src/usr/local/www/system_gateways_edit.php +++ b/src/usr/local/www/system_gateways_edit.php @@ -155,7 +155,7 @@ if ($_POST) { foreach ($group['item'] as $item) { $items = explode("|", $item); if ($items[0] == $_POST['name']) { - $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Gateway Group '%s'"), $_POST['name'], $group['name']); + $input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be disabled because it is in use on Gateway Group "%2$s"'), $_POST['name'], $group['name']); } } } @@ -167,7 +167,7 @@ if ($_POST) { if ($route['gateway'] == $_POST['name']) { if (!isset($route['disabled'])) { // There is a static route that uses this gateway and is enabled (not disabled). - $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Static Route '%s'"), $_POST['name'], $route['network']); + $input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be disabled because it is in use on Static Route "%2$s"'), $_POST['name'], $route['network']); } } } @@ -259,19 +259,19 @@ if ($_POST) { /* only allow correct IPv4 and IPv6 gateway addresses */ if (($_POST['gateway'] <> "") && is_ipaddr($_POST['gateway']) && $_POST['gateway'] != "dynamic") { if (is_ipaddrv6($_POST['gateway']) && ($_POST['ipprotocol'] == "inet")) { - $input_errors[] = gettext("The IPv6 gateway address '{$_POST['gateway']}' can not be used as a IPv4 gateway'."); + $input_errors[] = sprintf(gettext("The IPv6 gateway address '%s' can not be used as a IPv4 gateway."), $_POST['gateway']); } if (is_ipaddrv4($_POST['gateway']) && ($_POST['ipprotocol'] == "inet6")) { - $input_errors[] = gettext("The IPv4 gateway address '{$_POST['gateway']}' can not be used as a IPv6 gateway'."); + $input_errors[] = sprintf(gettext("The IPv4 gateway address '%s' can not be used as a IPv6 gateway."), $_POST['gateway']); } } /* only allow correct IPv4 and IPv6 monitor addresses */ if (($_POST['monitor'] <> "") && is_ipaddr($_POST['monitor']) && $_POST['monitor'] != "dynamic") { if (is_ipaddrv6($_POST['monitor']) && ($_POST['ipprotocol'] == "inet")) { - $input_errors[] = gettext("The IPv6 monitor address '{$_POST['monitor']}' can not be used on a IPv4 gateway'."); + $input_errors[] = sprintf(gettext("The IPv6 monitor address '%s' can not be used on a IPv4 gateway."), $_POST['monitor']); } if (is_ipaddrv4($_POST['monitor']) && ($_POST['ipprotocol'] == "inet6")) { - $input_errors[] = gettext("The IPv4 monitor address '{$_POST['monitor']}' can not be used on a IPv6 gateway'."); + $input_errors[] = sprintf(gettext("The IPv4 monitor address '%s' can not be used on a IPv6 gateway."), $_POST['monitor']); } } @@ -415,16 +415,16 @@ if ($_POST) { } else if ($_POST['latencyhigh']) { if (is_numeric($_POST['latencyhigh']) && ($_POST['latencyhigh'] > $dpinger_default['loss_interval'])) { - $input_errors[] = gettext(sprintf( - "The high latency threshold needs to be less than or equal to the default loss interval (%d)", - $dpinger_default['loss_interval'])); + $input_errors[] = sprintf( + gettext("The high latency threshold needs to be less than or equal to the default loss interval (%d)"), + $dpinger_default['loss_interval']); } } else if ($_POST['loss_interval']) { if (is_numeric($_POST['loss_interval']) && ($_POST['loss_interval'] < $dpinger_default['latencyhigh'])) { - $input_errors[] = gettext(sprintf( - "The loss interval needs to be greater than or equal to the default high latency threshold (%d)", - $dpinger_default['latencyhigh'])); + $input_errors[] = sprintf( + gettext("The loss interval needs to be greater than or equal to the default high latency threshold (%d)"), + $dpinger_default['latencyhigh']); } } @@ -447,16 +447,16 @@ if ($_POST) { } else if ($_POST['interval']) { if (is_numeric($_POST['interval']) && (($_POST['interval'] * 2) > $dpinger_default['time_period'])) { - $input_errors[] = gettext(sprintf( - "The probe interval needs to be half or less than the default time period over which results are averaged (%d)", - $dpinger_default['time_period'])); + $input_errors[] = sprintf( + gettext("The probe interval needs to be half or less than the default time period over which results are averaged (%d)"), + $dpinger_default['time_period']); } } else if ($_POST['time_period']) { if (is_numeric($_POST['time_period']) && ($_POST['time_period'] < ($dpinger_default['interval'] * 2))) { - $input_errors[] = gettext(sprintf( - "The time period over which results are averaged needs to be at least twice the default probe interval (%d)", - $dpinger_default['interval'])); + $input_errors[] = sprintf( + gettext("The time period over which results are averaged needs to be at least twice the default probe interval (%d)"), + $dpinger_default['interval']); } } @@ -479,16 +479,16 @@ if ($_POST) { } else if ($_POST['interval']) { if (is_numeric($_POST['interval']) && ($_POST['interval'] > $dpinger_default['alert_interval'])) { - $input_errors[] = gettext(sprintf( - "The probe interval needs to be less than or equal to the default alert interval (%d)", - $dpinger_default['alert_interval'])); + $input_errors[] = sprintf( + gettext("The probe interval needs to be less than or equal to the default alert interval (%d)"), + $dpinger_default['alert_interval']); } } else if ($_POST['alert_interval']) { if (is_numeric($_POST['alert_interval']) && ($_POST['alert_interval'] < $dpinger_default['interval'])) { - $input_errors[] = gettext(sprintf( - "The alert interval needs to be greater than or equal to the default probe interval (%d)", - $dpinger_default['interval'])); + $input_errors[] = sprintf( + gettext("The alert interval needs to be greater than or equal to the default probe interval (%d)"), + $dpinger_default['interval']); } } @@ -893,7 +893,7 @@ $group->setHelp('Time interval in milliseconds between checking for an alert con $section->add($group); $section->addInput(new Form_StaticText( - 'Additional information', + gettext('Additional information'), '<span class="help-block">'. gettext('The time period over which results are averaged must be at least twice ' . 'the probe interval, otherwise the averaging would only "average" over a single probe.') . |