From 49031495b501e4477941fa6248fe94cc698f9dcd Mon Sep 17 00:00:00 2001 From: Jeann Date: Wed, 30 Jun 2010 00:49:17 -0300 Subject: [PATCH] Implemment gettext() calls --- usr/local/www/diag_dns.php | 2 +- usr/local/www/firewall_aliases.php | 2 +- usr/local/www/firewall_aliases_edit.php | 15 +++++++++------ usr/local/www/firewall_nat.php | 2 +- usr/local/www/firewall_nat_out.php | 2 +- usr/local/www/firewall_rules_edit.php | 8 ++++---- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index a82628dfa6..ee4c3ed5f0 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -124,7 +124,7 @@ include("head.inc"); ?> - +

-You must apply the changes in order for them to take effect.");?> + gettext("You must apply the changes in order for them to take effect.")); ?> diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index a7e50b61e1..e44229e78f 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -137,12 +137,15 @@ if ($_POST) { $x = is_validaliasname($_POST['name']); if (!isset($x)) { $input_errors[] = gettext("Reserved word used for alias name."); - } else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) { - $input_errors[] = gettext("Reserved word used for alias name.)"; - } else { - if (is_validaliasname($_POST['name']) == false) + } + else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) + { + $input_errors[] = gettext("Reserved word used for alias name."); + } + else { + if (is_validaliasname($_POST['name']) == false) $input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _."); - } + } /* check for name conflicts */ if (empty($a_aliases[$id])) { foreach ($a_aliases as $alias) { @@ -259,7 +262,7 @@ if ($_POST) { if (!is_ipaddr($_POST["address{$x}"]) && !is_hostname($_POST["address{$x}"]) && !is_iprange($_POST["address{$x}"])) - $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']; + $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']); } if (is_iprange($_POST["address{$x}"])) { list($startip, $endip) = explode('-', $_POST["address{$x}"]); diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index b66987d9b6..a29e9a8cb1 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -174,7 +174,7 @@ echo "

-gettext("You must apply the changes in order for them to take effect."));?>
+ gettext("You must apply the changes in order for them to take effect."));?>

@@ -910,7 +910,7 @@ include("head.inc");
$kdescr) { $specialsrcdst[] = "{$kif}"; @@ -901,7 +901,7 @@ include("head.inc"); $wkportdesc): ?> - + autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value=""> name="dstendport" class="formselect" onchange="ext_change()"> - + $wkportdesc): ?> @@ -934,7 +934,7 @@ include("head.inc"); >
- Diagnostics: System logs: Settings page).");?> + Diagnostics: System logs: Settings page).");?>