Internationalization of various system*.php

This commit is contained in:
Phil Davis 2016-02-03 01:09:30 +05:45
parent 250061b099
commit 762faef5db
13 changed files with 77 additions and 75 deletions

View File

@ -181,16 +181,16 @@ if ($_POST) {
$dnsname="dns{$dnscounter}";
$dnsgwname="dns{$dnscounter}gw";
if (($_POST[$dnsname] && !is_ipaddr($_POST[$dnsname]))) {
$input_errors[] = gettext("A valid IP address must be specified for DNS server $dnscounter.");
$input_errors[] = sprintf(gettext("A valid IP address must be specified for DNS server %s."), $dnscounter);
} else {
if (($_POST[$dnsgwname] <> "") && ($_POST[$dnsgwname] <> "none")) {
// A real gateway has been selected.
if (is_ipaddr($_POST[$dnsname])) {
if ((is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) {
$input_errors[] = gettext("You can not specify IPv6 gateway '{$_POST[$dnsgwname]}' for IPv4 DNS server '{$_POST[$dnsname]}'");
$input_errors[] = sprintf(gettext('You can not specify IPv6 gateway "%1$s" for IPv4 DNS server "%2$s".'), $_POST[$dnsgwname], $_POST[$dnsname]);
}
if ((is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) {
$input_errors[] = gettext("You can not specify IPv4 gateway '{$_POST[$dnsgwname]}' for IPv6 DNS server '{$_POST[$dnsname]}'");
$input_errors[] = sprintf(gettext('You can not specify IPv4 gateway "%1$s" for IPv6 DNS server "%2$s".'), $_POST[$dnsgwname], $_POST[$dnsname]);
}
} else {
// The user selected a gateway but did not provide a DNS address. Be nice and set the gateway back to "none".

View File

@ -743,13 +743,13 @@ events.push(function() {
var htext = '<span class="text-success">';
if (val == 'normal') {
htext += 'The default optimization algorithm';
htext += '<?=gettext("The default optimization algorithm");?>';
} else if (val == 'high-latency') {
htext += 'Used for eg. satellite links. Expires idle connections later than default';
htext += '<?=gettext("Used for eg. satellite links. Expires idle connections later than default");?>';
} else if (val == 'aggressive') {
htext += 'Expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections';
htext += '<?=gettext("Expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections");?>';
} else if (val == 'conservative') {
htext += 'Tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization';
htext += '<?=gettext("Tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization");?>';
}
htext += '</span>';

View File

@ -111,7 +111,7 @@ if ($act == "del") {
/* Remove server from temp list used later on this page. */
unset($a_server[$_GET['id']]);
$savemsg = gettext("Authentication Server") . " " . htmlspecialchars($serverdeleted) . " " . gettext("deleted") . "<br />";
$savemsg = sprintf(gettext("Authentication Server %s deleted"), htmlspecialchars($serverdeleted));
write_config($savemsg);
}
@ -379,11 +379,13 @@ if($_POST && $input_errors) {
include("head.inc");
if ($input_errors)
if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg)
if ($savemsg) {
print_info_box($savemsg, 'success');
}
$tab_array = array();
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
@ -392,8 +394,7 @@ $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.ph
$tab_array[] = array(gettext("Servers"), true, "system_authservers.php");
display_top_tabs($tab_array);
if (!($act == "new" || $act == "edit" || $input_errors))
{
if (!($act == "new" || $act == "edit" || $input_errors)) {
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Authentication Servers')?></h2></div>

View File

@ -128,7 +128,7 @@ if ($act == "del") {
$name = $a_ca[$id]['descr'];
unset($a_ca[$id]);
write_config();
$savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted"), htmlspecialchars($name)) . "<br />";
$savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted"), htmlspecialchars($name));
pfSenseHeader("system_camanager.php");
exit;
}
@ -246,20 +246,20 @@ if ($_POST) {
if ($pconfig['method'] != "existing") {
/* Make sure we do not have invalid characters in the fields for the certificate */
if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) {
array_push($input_errors, "The field 'Descriptive Name' contains invalid characters.");
array_push($input_errors, gettext("The field 'Descriptive Name' contains invalid characters."));
}
for ($i = 0; $i < count($reqdfields); $i++) {
if ($reqdfields[$i] == 'dn_email') {
if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["dn_email"])) {
array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters.");
array_push($input_errors, gettext("The field 'Distinguished name Email Address' contains invalid characters."));
}
} else if ($reqdfields[$i] == 'dn_commonname') {
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["dn_commonname"])) {
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters.");
array_push($input_errors, gettext("The field 'Distinguished name Common Name' contains invalid characters."));
}
} else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"])) {
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
array_push($input_errors, sprintf(gettext("The field '%s' contains invalid characters."), $reqdfieldsn[$i]));
}
}
if (!in_array($_POST["keylen"], $ca_keylens)) {

View File

@ -137,7 +137,7 @@ if ($act == "del") {
unset($a_cert[$id]);
write_config();
$savemsg = sprintf(gettext("Certificate %s successfully deleted"), htmlspecialchars($a_cert[$id]['descr'])) . "<br />";
$savemsg = sprintf(gettext("Certificate %s successfully deleted"), htmlspecialchars($a_cert[$id]['descr']));
pfSenseHeader("system_certmanager.php");
exit;
}
@ -247,7 +247,7 @@ if ($act == "csr") {
}
if ($_POST) {
// This is just the blank altername name that is added for display purposes. We don't want to validate/save it
// This is just the blank alternate name that is added for display purposes. We don't want to validate/save it
if ($_POST['altname_value0'] == "") {
unset($_POST['altname_type0']);
unset($_POST['altname_value0']);
@ -371,14 +371,14 @@ if ($_POST) {
for ($i = 0; $i < count($reqdfields); $i++) {
if (preg_match('/email/', $reqdfields[$i])) { /* dn_email or csr_dn_name */
if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]])) {
array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters.");
array_push($input_errors, gettext("The field 'Distinguished name Email Address' contains invalid characters."));
}
} else if (preg_match('/commonname/', $reqdfields[$i])) { /* dn_commonname or csr_dn_commonname */
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]])) {
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters.");
array_push($input_errors, gettext("The field 'Distinguished name Common Name' contains invalid characters."));
}
} else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST[$reqdfields[$i]])) {
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
array_push($input_errors, sprintf(gettext("The field '%s' contains invalid characters."), $reqdfieldsn[$i]));
}
}
@ -1052,7 +1052,7 @@ foreach ($a_cert as $i => $cert):
<i><?=$cert_types[$cert['type']]?></i><br />
<?php endif?>
<?php if (is_array($purpose)): ?>
CA: <b><?=$purpose['ca']?></b>, Server: <b><?=$purpose['server']?></b>
CA: <b><?=$purpose['ca']?></b>, <?=gettext("Server")?>: <b><?=$purpose['server']?></b>
<?php endif?>
</td>
<td><?=$caname?></td>
@ -1067,25 +1067,25 @@ foreach ($a_cert as $i => $cert):
</td>
<td>
<?php if (is_cert_revoked($cert)): ?>
<i>Revoked </i>
<i><?=gettext("Revoked")?></i>
<?php endif?>
<?php if (is_webgui_cert($cert['refid'])): ?>
webConfigurator
<?=gettext("webConfigurator")?>
<?php endif?>
<?php if (is_user_cert($cert['refid'])): ?>
User Cert
<?=gettext("User Cert")?>
<?php endif?>
<?php if (is_openvpn_server_cert($cert['refid'])): ?>
OpenVPN Server
<?=gettext("OpenVPN Server")?>
<?php endif?>
<?php if (is_openvpn_client_cert($cert['refid'])): ?>
OpenVPN Client
<?=gettext("OpenVPN Client")?>
<?php endif?>
<?php if (is_ipsec_cert($cert['refid'])): ?>
IPsec Tunnel
<?=gettext("IPsec Tunnel")?>
<?php endif?>
<?php if (is_captiveportal_cert($cert['refid'])): ?>
Captive Portal
<?=gettext("Captive Portal")?>
<?php endif?>
<?php
$refid = $cert['refid'];

View File

@ -123,7 +123,7 @@ if (!$thiscrl && (($act != "") && ($act != "new"))) {
if ($act == "del") {
$name = htmlspecialchars($thiscrl['descr']);
if (crl_in_use($id)) {
$savemsg = sprintf(gettext("Certificate Revocation List %s is in use and cannot be deleted"), $name) . "<br />";
$savemsg = sprintf(gettext("Certificate Revocation List %s is in use and cannot be deleted"), $name);
} else {
foreach ($a_crl as $cid => $acrl) {
if ($acrl['refid'] == $thiscrl['refid']) {
@ -131,7 +131,7 @@ if ($act == "del") {
}
}
write_config("Deleted CRL {$name}.");
$savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted"), $name) . "<br />";
$savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted"), $name);
}
}
@ -212,13 +212,13 @@ if ($act == "delcert") {
$certname = htmlspecialchars($thiscert['descr']);
$crlname = htmlspecialchars($thiscrl['descr']);
if (cert_unrevoke($thiscert, $thiscrl)) {
$savemsg = sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname) . "<br />";
$savemsg = sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname);
// refresh IPsec and OpenVPN CRLs
openvpn_refresh_crls();
vpn_ipsec_configure();
write_config(sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname));
write_config($savemsg);
} else {
$savemsg = sprintf(gettext("Failed to delete Certificate %s from CRL %s"), $certname, $crlname) . "<br />";
$savemsg = sprintf(gettext("Failed to delete Certificate %s from CRL %s"), $certname, $crlname);
}
$act="edit";
}

View File

@ -106,7 +106,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_gateway_groups[$_GET['id']]) {
$changedesc .= gettext("removed gateway group") . " {$_GET['id']}";
$changedesc .= sprintf(gettext("removed gateway group %s"), $_GET['id']);
foreach ($config['filter']['rule'] as $idx => $rule) {
if ($rule['gateway'] == $a_gateway_groups[$_GET['id']]['name']) {
unset($config['filter']['rule'][$idx]['gateway']);

View File

@ -146,7 +146,7 @@ if ($_POST) {
}
/* check for overlaps */
if ($_POST['name'] == $gwname) {
$input_errors[] = sprintf(gettext('A gateway group cannot have the same name with a gateway "%s" please choose another name.'), $_POST['name']);
$input_errors[] = sprintf(gettext('A gateway group cannot have the same name as a gateway "%s" please choose another name.'), $_POST['name']);
}
}

View File

@ -115,9 +115,9 @@ function can_delete_disable_gateway_item($id, $disable = false) {
$items = explode("|", $item);
if ($items[0] == $a_gateways[$id]['name']) {
if (!$disable) {
$input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Gateway Group '%s'"), $a_gateways[$id]['name'], $group['name']);
$input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be deleted because it is in use on Gateway Group "%2$s"'), $a_gateways[$id]['name'], $group['name']);
} else {
$input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Gateway Group '%s'"), $a_gateways[$id]['name'], $group['name']);
$input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be disabled because it is in use on Gateway Group "%2$s"'), $a_gateways[$id]['name'], $group['name']);
}
}
}
@ -129,11 +129,11 @@ function can_delete_disable_gateway_item($id, $disable = false) {
if ($route['gateway'] == $a_gateways[$id]['name']) {
if (!$disable) {
// The user wants to delete this gateway, but there is a static route (enabled or disabled) that refers to the gateway.
$input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Static Route '%s'"), $a_gateways[$id]['name'], $route['network']);
$input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be deleted because it is in use on Static Route "%2$s"'), $a_gateways[$id]['name'], $route['network']);
} else if (!isset($route['disabled'])) {
// The user wants to disable this gateway.
// But 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'"), $a_gateways[$id]['name'], $route['network']);
$input_errors[] = sprintf(gettext('Gateway "%1$s" cannot be disabled because it is in use on Static Route "%2$s"'), $a_gateways[$id]['name'], $route['network']);
}
}
}
@ -208,7 +208,7 @@ if (isset($_POST['del_x'])) {
$items_deleted .= "{$rulei} ";
}
if (!empty($items_deleted)) {
write_config("Gateways: removed gateways {$items_deleted}");
write_config(sprintf(gettext("Gateways: removed gateways %s", $items_deleted)));
mark_subsystem_dirty('staticroutes');
}
header("Location: system_gateways.php");

View File

@ -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.') .

View File

@ -140,7 +140,7 @@ function delete_static_route($id) {
if ($_GET['act'] == "del") {
if ($a_routes[$_GET['id']]) {
$changedesc = $changedesc_prefix . gettext("removed route to") . " " . $a_routes[$_GET['id']]['network'];
$changedesc = $changedesc_prefix . sprintf(gettext("removed route to %s"), $a_routes[$_GET['id']]['network']);
delete_static_route($_GET['id']);
unset($a_routes[$_GET['id']]);
write_config($changedesc);
@ -152,12 +152,13 @@ if ($_GET['act'] == "del") {
if (isset($_POST['del_x'])) {
/* delete selected routes */
if (is_array($_POST['route']) && count($_POST['route'])) {
$changedesc = $changedesc_prefix . gettext("removed route to");
$deleted_routes = "";
foreach ($_POST['route'] as $routei) {
$changedesc .= " " . $a_routes[$routei]['network'];
$deleted_routes .= " " . $a_routes[$routei]['network'];
delete_static_route($routei);
unset($a_routes[$routei]);
}
$changedesc = $changedesc_prefix . sprintf(gettext("removed route to%s"), $deleted_routes);
write_config($changedesc);
header("Location: system_routes.php");
exit;
@ -170,15 +171,15 @@ if (isset($_POST['del_x'])) {
// Do not enable a route whose gateway is disabled
if (isset($a_gateways[$a_routes[$_GET['id']]['gateway']]['disabled'])) {
$do_update_config = false;
$input_errors[] = $changedesc_prefix . gettext("gateway is disabled, cannot enable route to") . " " . $a_routes[$_GET['id']]['network'];
$input_errors[] = $changedesc_prefix . sprintf(gettext("gateway is disabled, cannot enable route to %s"), $a_routes[$_GET['id']]['network']);
} else {
unset($a_routes[$_GET['id']]['disabled']);
$changedesc = $changedesc_prefix . gettext("enabled route to") . " " . $a_routes[$_GET['id']]['network'];
$changedesc = $changedesc_prefix . sprintf(gettext("enabled route to %s"), $a_routes[$_GET['id']]['network']);
}
} else {
delete_static_route($_GET['id']);
$a_routes[$_GET['id']]['disabled'] = true;
$changedesc = $changedesc_prefix . gettext("disabled route to") . " " . $a_routes[$_GET['id']]['network'];
$changedesc = $changedesc_prefix . sprintf(gettext("disabled route to %s"), $a_routes[$_GET['id']]['network']);
}
if ($do_update_config) {

View File

@ -130,7 +130,7 @@ if ($_POST) {
} else {
// Note that the 3rd parameter "disabled" must be passed as explicitly true or false.
if (!validate_address_family($_POST['network'], $_POST['gateway'], $_POST['disabled'] ? true : false)) {
$input_errors[] = gettext("The gateway '{$a_gateways[$_POST['gateway']]['gateway']}' is a different Address Family than network '{$_POST['network']}'.");
$input_errors[] = sprintf(gettext('The gateway "%1$s" is a different Address Family than network "%2$s".'), $a_gateways[$_POST['gateway']]['gateway'], $_POST['network']);
}
}
}

View File

@ -126,7 +126,7 @@ $section->addInput(new Form_Select(
fwbranch,
'Branch',
(is_pkg_installed($g['product_name'] . "-repo")) ? "stable":"development",
["stable" => "Stable", "development" => "Development"]
["stable" => gettext("Stable"), "development" => gettext("Development")]
))->setHelp('Please select the stable, or the development branch from which to update the system firmware. ' . ' <br />' .
'Use of the development version is at your own risk!');