From 1c5142d2625430dc4c4560e9fc11ee4e7963fd78 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Fri, 16 Jul 2010 10:50:27 -0300 Subject: Implement gettext() calls on load_balancer_pool_edit.php --- usr/local/www/load_balancer_pool_edit.php | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'usr') diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index f34a31a..748580f 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -60,7 +60,7 @@ if (isset($id) && $a_pool[$id]) { $pconfig['monitor'] = $a_pool[$id]['monitor']; } -$changedesc = "Load Balancer: Pool: "; +$changedesc = gettext("Load Balancer: Pool:") . " "; $changecount = 0; if ($_POST) { @@ -71,27 +71,27 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "name port monitor servers"); - $reqdfieldsn = explode(",", "Name,Port,Monitor,Server List"); + $reqdfieldsn = array(gettext("Name"),gettext("Port"),gettext("Monitor"),gettext("Server List")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); /* Ensure that our pool names are unique */ for ($i=0; isset($config['load_balancer']['lbpool'][$i]); $i++) if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id)) - $input_errors[] = "This pool name has already been used. Pool names must be unique."; + $input_errors[] = gettext("This pool name has already been used. Pool names must be unique."); if (!is_port($_POST['port'])) - $input_errors[] = "The port must be an integer between 1 and 65535."; + $input_errors[] = gettext("The port must be an integer between 1 and 65535."); if (is_array($_POST['servers'])) { foreach($pconfig['servers'] as $svrent) { if (!is_ipaddr($svrent)) { - $input_errors[] = "{$svrent} is not a valid IP address (in \"enabled\" list)."; + $input_errors[] = sprintf(gettext("%s is not a valid IP address (in \"enabled\" list)."), $svrent); } } } if (is_array($_POST['serversdisabled'])) { foreach($pconfig['serversdisabled'] as $svrent) { if (!is_ipaddr($svrent)) { - $input_errors[] = "{$svrent} is not a valid IP address (in \"disabled\" list)."; + $input_errors[] = sprintf(gettext("%s is not a valid IP address (in \"disabled\" list)."), $svrent); } } } @@ -100,14 +100,14 @@ if ($_POST) { $m[$config['load_balancer']['monitor_type'][$i]['name']] = $config['load_balancer']['monitor_type'][$i]; if (!isset($m[$_POST['monitor']])) - $input_errors[] = "Invalid monitor chosen."; + $input_errors[] = gettext("Invalid monitor chosen."); if (!$input_errors) { $poolent = array(); if(isset($id) && $a_pool[$id]) $poolent = $a_pool[$id]; if($poolent['name'] != "") - $changedesc .= " modified '{$poolent['name']}' pool:"; + $changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']); update_if_changed("name", $poolent['name'], $_POST['name']); update_if_changed("description", $poolent['desc'], $_POST['desc']); @@ -137,7 +137,7 @@ if ($_POST) { } } -$pgtitle = array("Services", "Load Balancer","Pool","Edit"); +$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"),gettext("Edit")); #$statusurl = "status_lb_vs.php"; $statusurl = "status_lb_pool.php"; $logurl = "diag_logs_relayd.php"; @@ -162,36 +162,36 @@ function clearcombo(){
- + - + - + - + - + - + - + - + - +
Add/edit Load Balancer - Pool entry
Name size="16" maxlength="16">
Description size="64">
Port size="16" maxlength="16">
-
This is the port your servers are listening on.
+
.
 
Add item to pool
Monitor
Server IP Address -
+ " onclick="AddServerToPool(document.iform);">
 
Current Pool Members
Members @@ -279,8 +279,8 @@ echo "";
- Pool Disabled +

"; ?>

- + " onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />

@@ -255,7 +255,7 @@ function clearcombo(){
- Enabled (default) +

"; ?>

- + " onclick="RemoveServerFromPool(document.iform, 'servers[]');" />

 
- - + " onClick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);"> + " onclick="history.back()"> -- cgit v1.1