From 3911f5e816c054d64b7bba7bb73fea2371de9369 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Thu, 24 Jun 2010 13:04:33 -0300 Subject: Implement gettext() calls --- usr/local/www/firewall_aliases_import.php | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'usr/local/www/firewall_aliases_import.php') diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php index 760688d..47a22d0 100755 --- a/usr/local/www/firewall_aliases_import.php +++ b/usr/local/www/firewall_aliases_import.php @@ -37,7 +37,7 @@ ##|*MATCH=firewall_aliases_import.php* ##|-PRIV -$pgtitle = array("Firewall","Aliases","Bulk import"); +$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Bulk import")); $reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp"); @@ -55,27 +55,27 @@ $a_aliases = &$config['aliases']['alias']; if($_POST['aliasimport'] <> "") { $reqdfields = explode(" ", "name aliasimport"); - $reqdfieldsn = explode(",", "Name,Aliases"); + $reqdfieldsn = array(",", gettext("Name,Aliases")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (is_validaliasname($_POST['name']) == false) - $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _."; + $input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _."); /* check for name duplicates */ if (is_alias($_POST['name'])) - $input_errors[] = "An alias with this name already exists."; + $input_errors[] = gettext("An alias with this name already exists."); /* Check for reserved keyword names */ foreach($reserved_keywords as $rk) if ($rk == $_POST['name']) - $input_errors[] = "Cannot use a reserved keyword as alias name $rk"; + $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk); /* check for name interface description conflicts */ foreach($config['interfaces'] as $interface) { if($interface['descr'] == $_POST['name']) { - $input_errors[] = "An interface description with this name already exists."; + $input_errors[] = gettext("An interface description with this name already exists."); break; } } @@ -90,7 +90,7 @@ if($_POST['aliasimport'] <> "") { $rangesubnets = ip_range_to_subnet_array($startip, $endip); $address .= implode(" ", $rangesubnets); } else if (!is_ipaddr($impip) && !is_subnet($impip) && !empty($impip)) { - $input_errors[] = "$impip is not an IP address. Please correct the error to continue"; + $input_errors[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip); } elseif (!empty($impip)) { $imported[] = $impip; } @@ -127,31 +127,31 @@ include("head.inc");
- + - + + - + +
. - + +
+
Alias Import
Alias Name
- The name of the alias may only consist of the characters a-z, A-Z and 0-9.
Description -
You may enter a description here - for your reference (not parsed).
Aliases to import -
Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc. -
The list may contain only IP addresses.
  - - + " /> + " onclick="history.back()" />
-- cgit v1.1