From 7a03e6087bd3429882019dd1c64abbf3fa536190 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Thu, 15 Jul 2010 12:56:24 -0300 Subject: Implement gettext() calls on load_balancer_relay_protocol_edit.php --- .../www/load_balancer_relay_protocol_edit.php | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'usr') diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php index 519dd0b..1a9e9f9 100755 --- a/usr/local/www/load_balancer_relay_protocol_edit.php +++ b/usr/local/www/load_balancer_relay_protocol_edit.php @@ -62,7 +62,7 @@ if (isset($id) && $a_protocol[$id]) { $pconfig['type'] = 'http'; } -$changedesc = "Load Balancer: Relay Protocol: "; +$changedesc = gettext("Load Balancer: Relay Protocol:"); . " "; $changecount = 0; @@ -76,14 +76,14 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "name type desc"); - $reqdfieldsn = explode(",", "Name,Type,Description"); + $reqdfieldsn = array(gettext("Name"),gettext("Type"),gettext("Description")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); /* Ensure that our monitor names are unique */ for ($i=0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) if (($_POST['name'] == $config['load_balancer']['lbprotocol'][$i]['name']) && ($i != $id)) - $input_errors[] = "This protocol name has already been used. Protocol names must be unique."; + $input_errors[] = gettext("This protocol name has already been used. Protocol names must be unique."); switch($_POST['type']) { case 'tcp': @@ -99,13 +99,13 @@ if ($_POST) { if(isset($id) && $a_protocol[$id]) $protent = $a_protocol[$id]; if($protent['name'] != "") - $changedesc .= " modified '{$protent['name']}' load balancing protocol:"; + $changedesc .= " " . sprintf(gettext("modified '%s' load balancing protocol:"), $protent['name']); - update_if_changed("name", $protent['name'], $pconfig['name']); - update_if_changed("type", $protent['type'], $pconfig['type']); - update_if_changed("description", $protent['desc'], $pconfig['desc']); - update_if_changed("type", $protent['type'], $pconfig['type']); - update_if_changed("action", $protent['lbaction'], $pconfig['lbaction']); + update_if_changed(gettext("name"), $protent['name'], $pconfig['name']); + update_if_changed(gettext("type"), $protent['type'], $pconfig['type']); + update_if_changed(gettext("description"), $protent['desc'], $pconfig['desc']); + update_if_changed(gettext("type"), $protent['type'], $pconfig['type']); + update_if_changed(gettext("action"), $protent['lbaction'], $pconfig['lbaction']); if (isset($id) && $a_protocol[$id]) { /* modify all virtual servers with this name */ @@ -131,14 +131,14 @@ if ($_POST) { } } -$pgtitle = array("Services", "Load Balancer","Relay Protocol","Edit"); +$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Protocol"),gettext("Edit")); #$statusurl = "status_lb_vs.php"; $statusurl = "status_lb_pool.php"; $logurl = "diag_logs_relayd.php"; include("head.inc"); -$types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS"); +$types = array("http" => gettext("HTTP"), "tcp" => gettext("TCP"), "dns" => gettext("DNS")); ?>