From 39589fbce8fefbd3769208586b397035fe80b058 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Wed, 28 Apr 2010 09:09:33 -0300 Subject: Implement gettext() --- usr/local/www/system_gateway_groups_edit.php | 56 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'usr/local/www/system_gateway_groups_edit.php') diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index 57aaf97..2d4294d 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -47,10 +47,10 @@ if (!is_array($config['gateways']['gateway_group'])) $a_gateway_groups = &$config['gateways']['gateway_group']; $a_gateways = return_gateways_array(); -$categories = array('down' => 'Member Down', - 'downloss' => 'Packet Loss', - 'downlatency' => 'High Latency', - 'downlosslatency' => 'Packet Loss or High Latency'); +$categories = array('down' => gettext("Member Down"), + 'downloss' => gettext("Packet Loss"), + 'downlatency' => gettext("High Latency"), + 'downlosslatency' => gettext("Packet Loss or High Latency")); $id = $_GET['id']; if (isset($_POST['id'])) @@ -82,10 +82,10 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (! isset($_POST['name'])) { - $input_errors[] = "A valid gateway group name must be specified."; + $input_errors[] = gettext("A valid gateway group name must be specified."); } if (! is_validaliasname($_POST['name'])) { - $input_errors[] = "The gateway name must not contain invalid characters."; + $input_errors[] = gettext("The gateway name must not contain invalid characters."); } if (isset($_POST['name'])) { @@ -96,7 +96,7 @@ if ($_POST) { continue; if ($gateway_group['name'] == $_POST['name']) { - $input_errors[] = "A gateway group with this name \"{$_POST['name']}\" already exists."; + $input_errors[] = sprintf(gettext("A gateway group with this name \"%s\" already exists."), $_POST['name']); break; } } @@ -113,7 +113,7 @@ if ($_POST) { } if(count($pconfig['item']) == 0) { - $input_errors[] = "No gateway(s) have been selected to be used in this group"; + $input_errors[] = gettext("No gateway(s) have been selected to be used in this group"); } if (!$input_errors) { @@ -137,7 +137,7 @@ if ($_POST) { } } -$pgtitle = array("System","Gateways","Edit gateway"); +$pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway")); include("head.inc"); ?> @@ -148,16 +148,16 @@ include("head.inc");
- + - + +
- + - + +
- + +
Edit gateway entry
Group Name -
Group Name
Gateway Priority "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo " {$name} - {$gateway['descr']}
"; } ?>
- Link Priority
- The priority selected here defines in what order failover and balancing of links will be done. +
+

Trigger Level -
When to trigger exclusion of a member
Description -
You may enter a description here - for your reference (not parsed).
  - + " class="formbtn" onclick="history.back()"> -- cgit v1.1