commit 49031495b501e4477941fa6248fe94cc698f9dcd
Author: Jeann <wjeann@gmail.com>
Date:   Wed Jun 30 00:49:17 2010 -0300

    Implemment gettext() calls

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"); ?>
 							<b><?=gettext("Server");?></b>
 						</td>
 						<td>
-							<b><?=gettext("Query time");></b>
+							<b><?=gettext("Query time");?></b>
 						</td>
 					</tr>
 <?php
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 1e69efdfb8..dc694962aa 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -169,7 +169,7 @@ include("head.inc");
 <form action="firewall_aliases.php" method="post">
 <?php if ($savemsg) print_info_box($savemsg); ?>
 <?php if (is_subsystem_dirty('aliases')): ?><p>
-<?php print_info_box_np gettext("The alias list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?php print_info_box_np (gettext("The alias list has been changed.") <br> gettext("You must apply the changes in order for them to take effect.")); ?>
 <?php endif; ?>
 
 <table width="100%" border="0" cellpadding="0" cellspacing="0">
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 "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
 <?php if (is_subsystem_dirty('natconf')): ?><p>
 <?php
 	if($savemsg)
-		print_info_box_np("{$savemsg}<br>gettext("The NAT configuration has been changed.")<br>gettext("You must apply the changes in order for them to take effect.")");
+		print_info_box_np("{$savemsg} <br> gettext("The NAT configuration has been changed.") <br> gettext("You must apply the changes in order for them to take effect.")");
 	else
 		print_info_box_np(gettext("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect."));
 ?>
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index bcde21b30b..bd4e081d15 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -291,7 +291,7 @@ include("head.inc");
 </script>
 <?php if ($savemsg) print_info_box($savemsg); ?>
 <?php if (is_subsystem_dirty('natconf')): ?><p>
-<?php print_info_box_np gettext(("The NAT configuration has been changed.")<br>gettext("You must apply the changes in order for them to take effect."));?><br>
+<?php print_info_box_np gettext(("The NAT configuration has been changed.") <br> gettext("You must apply the changes in order for them to take effect."));?><br>
 <?php endif; ?>
 <table width="100%" border="0" cellpadding="0" cellspacing="0">  <tr><td>
 <?php
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 1f8dbbc3bd..bdb55bec85 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -45,7 +45,7 @@ require("guiconfig.inc");
 require("filter.inc");
 require("shaper.inc");
 
-$specialsrcdst = explode(" ", gettext("any pptp pppoe l2tp openvpn"););
+$specialsrcdst = explode(" ", gettext("any pptp pppoe l2tp openvpn"));
 $ifdisp = get_configured_interface_with_descr();
 foreach ($ifdisp as $kif => $kdescr) {
 	$specialsrcdst[] = "{$kif}";
@@ -901,7 +901,7 @@ include("head.inc");
 								<option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
 <?php 							foreach ($wkports as $wkport => $wkportdesc): ?>
 									<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
-<?php 							endforeach; ?>
+<?php 							endforeach ;?>
 							</select>
 							<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo $pconfig['dstbeginport']; ?>">
 						</td>
@@ -910,7 +910,7 @@ include("head.inc");
 						<td><?=gettext("to:");?></td>
 						<td>
 							<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstendport" class="formselect" onchange="ext_change()">
-								<option value=""><?=gettext("(other)"?></option>
+								<option value=""><?=gettext("(other)")?></option>
 								<option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
 <?php							foreach ($wkports as $wkport => $wkportdesc): ?>
 									<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
@@ -934,7 +934,7 @@ include("head.inc");
 				<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
 				<strong><?=gettext("Log packets that are handled by this rule");?></strong>
 				<br />
-				<span class="vexpl"><?=gettext("Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).");?></span>
+				<span class="vexpl"><?=gettext("Hint: the firewall has limited local log space.") gettext("Don't turn on logging for everything.") gettext("If you want to do a lot of logging, consider using a remote syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).");?></span>
 			</td>
 		</tr>
 		<tr>
