From 946623c3067e064efe366a15ea3971222ba54cdc Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Wed, 14 Jul 2010 09:41:40 -0300 Subject: Implement gettext() calls on services_captiveportal_vouchers_edit.php --- .../www/services_captiveportal_vouchers_edit.php | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'usr/local/www/services_captiveportal_vouchers_edit.php') diff --git a/usr/local/www/services_captiveportal_vouchers_edit.php b/usr/local/www/services_captiveportal_vouchers_edit.php index cacbb61..7381f90 100644 --- a/usr/local/www/services_captiveportal_vouchers_edit.php +++ b/usr/local/www/services_captiveportal_vouchers_edit.php @@ -35,7 +35,6 @@ ##|*MATCH=services_captiveportal_vouchers_edit.php* ##|-PRIV -$pgtitle = array("Services", "Captive portal", "Edit Voucher Rolls"); $statusurl = "status_captiveportal_vouchers.php"; $logurl = "diag_logs_auth.php"; @@ -46,6 +45,8 @@ require("shaper.inc"); require("captiveportal.inc"); require_once("voucher.inc"); +$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit Voucher Rolls")); + if (!is_array($config['voucher'])) { $config['voucher'] = array(); } @@ -76,26 +77,26 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "number count minutes"); - $reqdfieldsn = explode(",", "Number,Count,minutes"); + $reqdfieldsn = array(gettext("Number"),getext("Count"),gettext("minutes")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); // Look for duplicate roll # foreach($a_roll as $re) { if($re['number'] == $_POST['number']) { - $input_errors[] = "Roll number {$_POST['number']} already exists."; + $input_errors[] = sprintf(gettext("Roll number %s already exists."), $_POST['number']); break; } } if (!is_numeric($_POST['number']) || $_POST['number'] >= $maxnumber) - $input_errors[] = "Roll number must be numeric and less than $maxnumber"; + $input_errors[] = sprintf(gettext("Roll number must be numeric and less than %s"), $maxnumber); if (!is_numeric($_POST['count']) || $_POST['count'] < 1 || $_POST['count'] > $maxcount) - $input_errors[] = "A roll has at least one voucher and less than $maxcount."; + $input_errors[] = sprintf(gettext("A roll has at least one voucher and less than %s."), $maxcount); if (!is_numeric($_POST['minutes']) || $_POST['minutes'] < 1) - $input_errors[] = "Each voucher must be good for at least 1 minute."; + $input_errors[] = gettext("Each voucher must be good for at least 1 minute."); if (!$input_errors) { @@ -154,41 +155,41 @@ include("head.inc");
- + - + - + - +
Roll##
- Enter the Roll# (0..) found on top of the generated/printed vouchers. + # (0..) .
Minutes per Ticket
- Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication. + .
Count
- Enter the number of vouchers (1..) found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again. + (1..) .
Comment
- Can be used to further identify this roll. Ignored by the system. + .
  - + "> -- cgit v1.1