diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php
index f218f3c6c8..89a657c3d6 100644
--- a/usr/local/www/interfaces_ppps_edit.php
+++ b/usr/local/www/interfaces_ppps_edit.php
@@ -175,17 +175,17 @@ if ($_POST) {
/* input validation */
switch($_POST['type']) {
case "ppp":
- $reqdfields = explode(" ", "interfaces phone");
- $reqdfieldsn = explode(",", "Link Interface(s),Phone Number");
+ $reqdfields = explode("interfaces phone");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Phone Number"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
case "pppoe":
if ($_POST['ondemand']) {
$reqdfields = explode(" ", "interfaces username password ondemand idletimeout");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "interfaces username password");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
@@ -193,23 +193,23 @@ if ($_POST) {
case "pptp":
if ($_POST['ondemand']) {
$reqdfields = explode(" ", "interfaces username password localip subnet gateway ondemand idletimeout");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "interfaces username password localip subnet gateway");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
default:
- $input_errors[] = "Please choose a Link Type.";
+ $input_errors[] = gettext("Please choose a Link Type.");
break;
}
if ($_POST['type'] == "ppp" && count($_POST['interfaces']) > 1)
- $input_errors[] = "Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.";
+ $input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.");
if (($_POST['provider'] && !is_domain($_POST['provider'])))
- $input_errors[] = "The service name contains invalid characters.";
+ $input_errors[] = gettext("The service name contains invalid characters.");
if (($_POST['idletimeout'] != "") && !is_numericint($_POST['idletimeout']))
- $input_errors[] = "The idle timeout value must be an integer.";
+ $input_errors[] = gettext("The idle timeout value must be an integer.");
if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) &&
$_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23)
$input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
@@ -230,15 +230,15 @@ if ($_POST) {
foreach($_POST['interfaces'] as $iface){
if ($_POST['localip'][$iface] && !is_ipaddr($_POST['localip'][$iface]))
- $input_errors[] = "A valid local IP address must be specified for {$iface}.";
+ $input_errors[] = sprintf(gettext("A valid local IP address must be specified for %s."),$iface);
if ($_POST['gateway'][$iface] && !is_ipaddr($_POST['gateway'][$iface]) && !is_hostname($_POST['gateway'][$iface]))
- $input_errors[] = "A valid gateway IP address OR hostname must be specified for {$iface}.";
+ $input_errors[] = sprintf(gettext("A valid gateway IP address OR hostname must be specified for %s."),$iface);
if ($_POST['bandwidth'][$iface] && !is_numericint($_POST['bandwidth'][$iface]))
- $input_errors[] = "The bandwidth value for {$iface} must be an integer.";
+ $input_errors[] = sprintf(gettext("The bandwidth value for %s must be an integer."),$iface);
if ($_POST['mtu'][$iface] && ($_POST['mtu'][$iface] < 576))
- $input_errors[] = "The MTU for {$iface} must be greater than 576 bytes.";
+ $input_errors[] = sprintf(gettext("The MTU for %s must be greater than 576 bytes."),$iface);
if ($_POST['mru'][$iface] && ($_POST['mru'][$iface] < 576))
- $input_errors[] = "The MRU for {$iface} must be greater than 576 bytes.";
+ $input_errors[] = sprintf(gettext("The MRU for %s must be greater than 576 bytes."),$iface);
}
/*
@@ -370,10 +370,10 @@ if ($_POST) {
} // end if($_POST)
$closehead = false;
-$pgtitle = array("Interfaces","PPPs","Edit");
+$pgtitle = array(gettext("Interfaces"),gettext("PPPs"),gettext("Edit"));
include("head.inc");
-$types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP", "l2tp" => "L2TP"/*, "tcp" => "TCP", "udp" => "UDP"*/ );
+$types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP", "l2tp" => "L2TP"/*, "tcp" => "TCP", "udp" => "UDP"*/ );
?>
@@ -613,7 +613,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
= gettext("reset at a specific date (mm/dd/yyyy)"); ?>
- Note:
+ =gettext("Note: ");?>
= gettext("If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field."); ?>