summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/bandwidth_by_ip.php2
-rwxr-xr-xusr/local/www/carp_status.php24
-rw-r--r--usr/local/www/easyrule.php14
-rw-r--r--usr/local/www/edit.php24
-rwxr-xr-xusr/local/www/exec.php36
-rwxr-xr-xusr/local/www/exec_raw.php2
-rwxr-xr-xusr/local/www/graph.php34
-rw-r--r--usr/local/www/graph_cpu.php10
-rwxr-xr-xusr/local/www/halt.php10
-rwxr-xr-xusr/local/www/index.php30
-rw-r--r--usr/local/www/installer.php14
-rwxr-xr-xusr/local/www/license.php240
-rwxr-xr-xusr/local/www/load_balancer_monitor.php12
-rwxr-xr-xusr/local/www/load_balancer_monitor_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_pool.php12
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php16
-rwxr-xr-xusr/local/www/load_balancer_relay_action_edit.php42
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php12
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol_edit.php44
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php10
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php52
-rwxr-xr-xusr/local/www/preload.php4
-rwxr-xr-xusr/local/www/progress.php18
-rwxr-xr-xusr/local/www/reboot.php19
-rwxr-xr-xusr/local/www/restart_httpd.php18
-rwxr-xr-xusr/local/www/services_captiveportal.php303
-rwxr-xr-xusr/local/www/services_captiveportal_filemanager.php53
-rwxr-xr-xusr/local/www/services_captiveportal_ip.php37
-rwxr-xr-xusr/local/www/services_captiveportal_ip_edit.php41
-rwxr-xr-xusr/local/www/services_captiveportal_mac.php37
-rwxr-xr-xusr/local/www/services_captiveportal_mac_edit.php42
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php123
-rw-r--r--usr/local/www/services_captiveportal_vouchers_edit.php31
-rwxr-xr-xusr/local/www/services_dhcp.php196
-rwxr-xr-xusr/local/www/services_dhcp_edit.php44
-rwxr-xr-xusr/local/www/services_dhcp_relay.php32
-rwxr-xr-xusr/local/www/services_dnsmasq.php80
-rwxr-xr-xusr/local/www/services_dnsmasq_domainoverride_edit.php28
-rwxr-xr-xusr/local/www/services_dnsmasq_edit.php42
-rwxr-xr-xusr/local/www/services_dyndns.php20
-rw-r--r--usr/local/www/services_dyndns_edit.php54
-rwxr-xr-xusr/local/www/services_igmpproxy.php24
-rwxr-xr-xusr/local/www/services_igmpproxy_edit.php52
-rw-r--r--usr/local/www/services_rfc2136.php12
-rw-r--r--usr/local/www/services_rfc2136_edit.php62
-rwxr-xr-xusr/local/www/services_snmp.php62
-rwxr-xr-xusr/local/www/services_wol.php42
-rwxr-xr-xusr/local/www/services_wol_edit.php26
-rwxr-xr-xusr/local/www/status.php10
-rwxr-xr-xusr/local/www/status_captiveportal.php12
-rw-r--r--usr/local/www/status_captiveportal_test.php16
-rw-r--r--usr/local/www/status_captiveportal_voucher_rolls.php24
-rw-r--r--usr/local/www/status_captiveportal_vouchers.php22
-rwxr-xr-xusr/local/www/status_dhcp_leases.php40
-rw-r--r--usr/local/www/status_filter_reload.php4
-rwxr-xr-xusr/local/www/status_gateway_groups.php26
-rwxr-xr-xusr/local/www/status_gateways.php28
-rwxr-xr-xusr/local/www/status_graph.php14
-rw-r--r--usr/local/www/status_graph_cpu.php6
-rwxr-xr-xusr/local/www/status_interfaces.php80
-rwxr-xr-xusr/local/www/status_lb_pool.php24
-rwxr-xr-xusr/local/www/status_lb_vs.php16
-rw-r--r--usr/local/www/status_openvpn.php42
-rwxr-xr-xusr/local/www/status_queues.php16
-rwxr-xr-xusr/local/www/status_rrd_graph.php34
-rw-r--r--usr/local/www/status_rrd_graph_img.php12
-rwxr-xr-xusr/local/www/status_rrd_graph_settings.php80
-rwxr-xr-xusr/local/www/status_services.php44
-rw-r--r--usr/local/www/status_upnp.php14
-rwxr-xr-xusr/local/www/status_wireless.php10
-rw-r--r--usr/local/www/upload_progress.php18
-rw-r--r--usr/local/www/uploadconfig.php8
-rwxr-xr-xusr/local/www/vpn_ipsec.php70
-rw-r--r--usr/local/www/vpn_ipsec_keys.php26
-rw-r--r--usr/local/www/vpn_ipsec_keys_edit.php22
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php102
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php138
-rw-r--r--usr/local/www/vpn_ipsec_phase2.php106
-rw-r--r--usr/local/www/vpn_l2tp.php24
-rw-r--r--usr/local/www/vpn_l2tp_users.php6
-rw-r--r--usr/local/www/vpn_l2tp_users_edit.php4
-rw-r--r--usr/local/www/vpn_openvpn_client.php150
-rw-r--r--usr/local/www/vpn_openvpn_csc.php158
-rw-r--r--usr/local/www/vpn_openvpn_server.php244
-rwxr-xr-xusr/local/www/vpn_pppoe.php110
-rwxr-xr-xusr/local/www/vpn_pppoe_users.php22
-rwxr-xr-xusr/local/www/vpn_pppoe_users_edit.php32
-rwxr-xr-xusr/local/www/vpn_pptp.php129
-rwxr-xr-xusr/local/www/vpn_pptp_users.php22
-rwxr-xr-xusr/local/www/vpn_pptp_users_edit.php32
-rwxr-xr-xusr/local/www/wizard.php6
-rwxr-xr-xusr/local/www/xmlrpc.php30
93 files changed, 2164 insertions, 2119 deletions
diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php
index e2d2417..744a2b0 100755
--- a/usr/local/www/bandwidth_by_ip.php
+++ b/usr/local/www/bandwidth_by_ip.php
@@ -56,6 +56,6 @@ for ($x=2; $x<12; $x++){
//no bandwidth usage found
if ($someinfo == false)
- echo "no info";
+ echo gettext("no info");
?>
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index 8693625..69d1401 100755
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -70,9 +70,9 @@ if($_POST['disablecarp'] <> "") {
}
}
}
- $savemsg = "{$carp_counter} IPs have been disabled.";
+ $savemsg = sprintf(gettext("%s IPs have been disabled."), $carp_counter);
} else {
- $savemsg = "CARP has been enabled.";
+ $savemsg = gettext("CARP has been enabled.");
mwexec("/sbin/sysctl net.inet.carp.allow=1");
interfaces_carp_setup();
if(is_array($config['virtualip']['vip'])) {
@@ -95,7 +95,7 @@ if($_POST['disablecarp'] <> "") {
$status = get_carp_status();
-$pgtitle = array("Status","CARP");
+$pgtitle = array(gettext("Status"),gettext("CARP"));
include("head.inc");
?>
@@ -119,10 +119,10 @@ include("head.inc");
if($carpcount > 0) {
if($status == false) {
$carp_enabled = false;
- echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Enable Carp\">";
+ echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Enable Carp") . "\">";
} else {
$carp_enabled = true;
- echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">";
+ echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Disable Carp") . "\">";
}
}
?>
@@ -130,13 +130,13 @@ include("head.inc");
<p>
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td class="listhdrr"><b><center>CARP Interface</center></b></td>
- <td class="listhdrr"><b><center>Virtual IP</center></b></td>
- <td class="listhdrr"><b><center>Status</center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("CARP Interface"); ?></center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("Virtual IP"); ?></center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("Status"); ?></center></b></td>
</tr>
<?php
if ($carpcount == 0) {
- echo "</td></tr></table></table></div><center><br>Could not locate any defined CARP interfaces.";
+ echo "</td></tr></table></table></div><center><br>" . gettext("Could not locate any defined CARP interfaces") . ".";
echo "</center>";
include("fend.inc");
@@ -184,15 +184,15 @@ include("head.inc");
<p/>
<span class="vexpl">
-<span class="red"><strong>Note:</strong></span>
+<span class="red"><strong><?=gettext("Note"); ?>:</strong></span>
<br />
-You can configure CARP settings <a href="pkg_edit.php?xml=carp_settings.xml&id=0">here</a>.
+<?=gettext("You can configure CARP settings"); ?> <a href="pkg_edit.php?xml=carp_settings.xml&id=0"><?=gettext("here"); ?></a>.
</span>
<p/>
<?php
- echo "<br>pfSync nodes:<br>";
+ echo "<br>" . gettext("pfSync nodes") . ":<br>";
echo "<pre>";
system("/sbin/pfctl -vvss | /usr/bin/grep creator | /usr/bin/cut -d\" \" -f7 | /usr/bin/sort -u");
echo "</pre>";
diff --git a/usr/local/www/easyrule.php b/usr/local/www/easyrule.php
index 3055616..85e20a3 100644
--- a/usr/local/www/easyrule.php
+++ b/usr/local/www/easyrule.php
@@ -31,7 +31,7 @@
pfSense_MODULE: filter
*/
-$pgtitle = "Status : EasyRule";
+$pgtitle = gettext("Status : EasyRule");
require_once("guiconfig.inc");
require_once("easyrule.inc");
require_once("filter.inc");
@@ -66,14 +66,14 @@ include("head.inc"); ?>
<?php if ($message) { ?>
<br/>
-Message: <?php echo $message; ?>
+<?=gettext("Message"); ?>: <?php echo $message; ?>
<br/>
<? } else { ?>
-This is the Easy Rule status page, mainly used to display errors when adding rules.
-If you are seeing this, there apparently was not an error, and you navigated to the
-page directly without telling it what to do.<br/><br/>
-This page is meant to be called from the block/pass buttons on the Firewall Logs page, <a href="diag_logs_filter.php">Status &gt; System Logs,
-Firewall Tab</a>.
+<?=gettext("This is the Easy Rule status page, mainly used to display errors when adding rules. " .
+"If you are seeing this, there apparently was not an error, and you navigated to the " .
+"page directly without telling it what to do"); ?>.<br/><br/>
+<?=gettext("This page is meant to be called from the block/pass buttons on the Firewall Logs page"); ?>, <a href="diag_logs_filter.php"><?=gettext("Status"); ?> &gt; <?=gettext("System Logs, " .
+"Firewall Tab"); ?></a>.
<br />
<? } ?>
</td></tr></table>
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 817c00f..6b71ad2 100644
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -37,15 +37,15 @@ if($_REQUEST['action']) {
switch($_REQUEST['action']) {
case 'load':
if(strlen($_REQUEST['file']) < 1) {
- echo "|5|No file name specified.|";
+ echo "|5|" . gettext("No file name specified") . ".|";
} elseif(is_dir($_REQUEST['file'])) {
- echo "|4|Loading a directory is not supported.|";
+ echo "|4|" . gettext("Loading a directory is not supported") . ".|";
} elseif(! is_file($_REQUEST['file'])) {
- echo "|3|File does not exist or is not a regular file.|";
+ echo "|3|" . gettext("File does not exist or is not a regular file") . ".|";
} else {
$data = file_get_contents(urldecode($_REQUEST['file']));
if($data === false) {
- echo "|1|Failed to read file.|";
+ echo "|1|" . gettext("Failed to read file") . ".|";
} else {
echo "|0|{$_REQUEST['file']}|{$data}|";
}
@@ -53,7 +53,7 @@ if($_REQUEST['action']) {
exit;
case 'save':
if(strlen($_REQUEST['file']) < 1) {
- echo "|No file name specified.|";
+ echo "|" . gettext("No file name specified") . ".|";
} else {
conf_mount_rw();
$_REQUEST['data'] = str_replace("\r", "", $_REQUEST['data']);
@@ -63,11 +63,11 @@ if($_REQUEST['action']) {
if(file_exists("/tmp/config.cache"))
unlink("/tmp/config.cache");
if($ret === false) {
- echo "|Failed to write file.|";
+ echo "|" . gettext("Failed to write file") . ".|";
} elseif($ret <> strlen($_REQUEST['data'])) {
- echo "|Error while writing file.|";
+ echo "|" . gettext("Error while writing file") . ".|";
} else {
- echo "|File successfully saved.|";
+ echo "|" . gettext("File successfully saved") . ".|";
}
}
exit;
@@ -86,7 +86,7 @@ outputJavaScriptFileInline("filebrowser/browser.js");
<script type="text/javascript">
function loadFile() {
- $("fileStatus").innerHTML = "Loading file ...";
+ $("fileStatus").innerHTML = "<?=gettext("Loading file"); ?> ...";
Effect.Appear("fileStatusBox", { duration: 0.5 });
new Ajax.Request(
@@ -105,7 +105,7 @@ outputJavaScriptFileInline("filebrowser/browser.js");
if(values.shift() == "0") {
var file = values.shift();
- $("fileStatus").innerHTML = "File successfully loaded.";
+ $("fileStatus").innerHTML = "<?=gettext("File successfully loaded"); ?>.";
$("fileContent").value = values.join("|");
var lang = "none";
@@ -128,7 +128,7 @@ outputJavaScriptFileInline("filebrowser/browser.js");
}
function saveFile(file) {
- $("fileStatus").innerHTML = "Saving file ...";
+ $("fileStatus").innerHTML = "<?=gettext("Saving file"); ?> ...";
Effect.Appear("fileStatusBox", { duration: 0.5 });
var fileContent = escape($("fileContent").value);
@@ -165,7 +165,7 @@ outputJavaScriptFileInline("filebrowser/browser.js");
<table width="100%" cellpadding="9" cellspacing="9">
<tr>
<td align="center" class="list">
- Save / Load from path:
+ <?=gettext("Save / Load from path"); ?>:
<input type="text" class="formfld file" id="fbTarget" size="45" />
<input type="button" class="formbtn" onclick="loadFile();" value="<?=gettext('Load');?>" />
<input type="button" class="formbtn" id="fbOpen" value="<?=gettext('Browse');?>" />
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php
index 37a5464..2d29a83 100755
--- a/usr/local/www/exec.php
+++ b/usr/local/www/exec.php
@@ -88,7 +88,7 @@ $ScriptName = $HTTP_SERVER_VARS['SCRIPT_NAME'];
$arrDT = localtime();
$intYear = $arrDT[5] + 1900;
-$pgtitle = array("Diagnostics","Execute command");
+$pgtitle = array(gettext("Diagnostics"),gettext("Execute command"));
include("head.inc");
?>
@@ -150,7 +150,7 @@ if (isBlank( $_POST['txtRecallBuffer'] )) {
// If nothing in recall buffer, then error.
if (!arrRecallBuffer.length) {
- alert( 'Nothing to recall!' );
+ alert( '<?=gettext("Nothing to recall"); ?>!' );
form.txtCommand.focus();
return;
}
@@ -219,8 +219,8 @@ pre {
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<?php if (isBlank($_POST['txtCommand'])): ?>
-<p class="red"><strong>Note: this function is unsupported. Use it
-on your own risk!</strong></p>
+<p class="red"><strong><?=gettext("Note: this function is unsupported. Use it " .
+"on your own risk"); ?>!</strong></p>
<?php endif; ?>
<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
<?php
@@ -250,10 +250,10 @@ if (!isBlank($_POST['txtPHPCommand'])) {
<form action="exec.php" method="POST" enctype="multipart/form-data" name="frmExecPlus" onSubmit="return frmExecPlus_onSubmit( this );">
<table>
<tr>
- <td colspan="2" valign="top" class="vnsepcell">Execute Shell command</td>
+ <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Execute Shell command"); ?></td>
</tr>
<tr>
- <td class="label" align="right">Command:</td>
+ <td class="label" align="right"><?=gettext("Command"); ?>:</td>
<td class="type"><input id="txtCommand" name="txtCommand" type="text" class="formfld unknown" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td>
</tr>
<tr>
@@ -261,60 +261,60 @@ if (!isBlank($_POST['txtPHPCommand'])) {
<td valign="top" class="label">
<input type="hidden" name="txtRecallBuffer" value="<?=$_POST['txtRecallBuffer'] ?>">
<input type="button" class="button" name="btnRecallPrev" value="<" onClick="btnRecall_onClick( this.form, -1 );">
- <input type="submit" class="button" value="Execute">
+ <input type="submit" class="button" value="<?=gettext("Execute"); ?>">
<input type="button" class="button" name="btnRecallNext" value=">" onClick="btnRecall_onClick( this.form, 1 );">
- <input type="button" class="button" value="Clear" onClick="return Reset_onClick( this.form );">
+ <input type="button" class="button" value="<?=gettext("Clear"); ?>" onClick="return Reset_onClick( this.form );">
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="vnsepcell">Download</td>
+ <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Download"); ?></td>
</tr>
<tr>
- <td align="right">File to download:</td>
+ <td align="right"><?=gettext("File to download"); ?>:</td>
<td>
<input name="dlPath" type="text" class="formfld file" id="dlPath" size="50">
</td></tr>
<tr>
<td valign="top">&nbsp;&nbsp;&nbsp;</td>
<td valign="top" class="label">
- <input name="submit" type="submit" class="button" id="download" value="Download">
+ <input name="submit" type="submit" class="button" id="download" value="<?=gettext("Download"); ?>">
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="vnsepcell">Upload</td>
+ <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Upload"); ?></td>
</tr>
<tr>
- <td align="right">File to upload:</td>
+ <td align="right"><?=gettext("File to upload"); ?>:</td>
<td valign="top" class="label">
<input name="ulfile" type="file" class="formfld file" id="ulfile">
</td></tr>
<tr>
<td valign="top">&nbsp;&nbsp;&nbsp;</td>
<td valign="top" class="label">
- <input name="submit" type="submit" class="button" id="upload" value="Upload"></td>
+ <input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload"); ?>"></td>
</tr>
<tr>
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="vnsepcell">PHP Execute</td>
+ <td colspan="2" valign="top" class="vnsepcell"><?=gettext("PHP Execute"); ?></td>
</tr>
<tr>
- <td align="right">Command:</td>
+ <td align="right"><?=gettext("Command"); ?>:</td>
<td class="type"><textarea id="txtPHPCommand" name="txtPHPCommand" type="text" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand']);?></textarea></td>
</tr>
<tr>
<td valign="top">&nbsp;&nbsp;&nbsp;</td>
<td valign="top" class="label">
- <input type="submit" class="button" value="Execute">
+ <input type="submit" class="button" value="<?=gettext("Execute"); ?>">
<p>
- <strong>Example:</strong> interfaces_carp_setup();
+ <strong><?=gettext("Example"); ?>:</strong> interfaces_carp_setup();
</td>
</tr>
diff --git a/usr/local/www/exec_raw.php b/usr/local/www/exec_raw.php
index e18bfe0..c7beeae 100755
--- a/usr/local/www/exec_raw.php
+++ b/usr/local/www/exec_raw.php
@@ -44,7 +44,7 @@ include("guiconfig.inc");
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
if($_REQUEST['cmd'] == "") {
- echo "Nothing specified. Cannot continue.";
+ echo gettext("Nothing specified. Cannot continue.");
exit;
}
passthru($_REQUEST['cmd']);
diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php
index fa521d8..9ada3dc 100755
--- a/usr/local/www/graph.php
+++ b/usr/local/www/graph.php
@@ -103,18 +103,18 @@ print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
<text id="grid_txt1" x="<?=$width?>" y="<?=$height/4*1?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
<text id="grid_txt2" x="<?=$width?>" y="<?=$height/4*2?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
<text id="grid_txt3" x="<?=$width?>" y="<?=$height/4*3?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
- <text id="graph_in_lbl" x="5" y="8" <?=$attribs['in']?>>In</text>
- <text id="graph_out_lbl" x="5" y="16" <?=$attribs['out']?>>Out</text>
+ <text id="graph_in_lbl" x="5" y="8" <?=$attribs['in']?>><?=gettext("In"); ?></text>
+ <text id="graph_out_lbl" x="5" y="16" <?=$attribs['out']?>><?=gettext("Out"); ?></text>
<text id="graph_in_txt" x="20" y="8" <?=$attribs['in']?>> </text>
<text id="graph_out_txt" x="20" y="16" <?=$attribs['out']?>> </text>
<text id="ifname" x="<?=$width?>" y="8" <?=$attribs['graphname']?> text-anchor="end"><?=$ifname?></text>
- <text id="switch_unit" x="<?=$width*0.55?>" y="5" <?=$attribs['switch_unit']?>>Switch to bytes/s</text>
- <text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>>AutoScale (<?=$scale_type?>)</text>
+ <text id="switch_unit" x="<?=$width*0.55?>" y="5" <?=$attribs['switch_unit']?>><?=gettext("Switch to bytes/s"); ?></text>
+ <text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>><?=gettext("AutoScale"); ?> (<?=$scale_type?>)</text>
<text id="datetime" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text>
- <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>>Graph shows last <?=$time_interval*$nb_plot?> seconds</text>
+ <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>><?=gettext("Graph shows last"); ?> <?=$time_interval*$nb_plot?> <?=gettext("seconds"); ?></text>
<polygon id="axis_arrow_x" <?=$attribs['axis']?> points="<?=($width) . "," . ($height)?> <?=($width-2) . "," . ($height-2)?> <?=($width-2) . "," . $height?>"/>
<text id="error" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['error']?> text-anchor="middle"><?=$error_text?></text>
- <text id="collect_initial" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle">Collecting initial data, please wait...</text>
+ <text id="collect_initial" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle"><?=gettext("Collecting initial data, please wait"); ?>...</text>
</g>
<script type="text/ecmascript">
<![CDATA[
@@ -126,14 +126,14 @@ print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
if (typeof getURL == 'undefined') {
getURL = function(url, callback) {
if (!url)
- throw 'No URL for getURL';
+ throw '<?=gettext("No URL for getURL"); ?>';
try {
if (typeof callback.operationComplete == 'function')
callback = callback.operationComplete;
} catch (e) {}
if (typeof callback != 'function')
- throw 'No callback function for getURL';
+ throw '<?=gettext("No callback function for getURL"); ?>';
var http_request = null;
if (typeof XMLHttpRequest != 'undefined') {
@@ -149,7 +149,7 @@ if (typeof getURL == 'undefined') {
}
}
if (!http_request)
- throw 'Both getURL and XMLHttpRequest are undefined';
+ throw '<?=gettext("Both getURL and XMLHttpRequest are undefined"); ?>';
http_request.onreadystatechange = function() {
if (http_request.readyState == 4) {
@@ -186,13 +186,13 @@ function init(evt) {
function switch_unit(event)
{
- SVGDoc.getElementById('switch_unit').firstChild.data = 'Switch to ' + unit + '/s';
+ SVGDoc.getElementById('switch_unit').firstChild.data = '<?=gettext("Switch to"); ?> ' + unit + '/s';
unit = (unit == 'bits') ? 'bytes' : 'bits';
}
function switch_scale(event)
{
- scale_type = (scale_type == 'up') ? 'follow' : 'up';
+ scale_type = (scale_type == 'up') ? '<?=gettext("follow"); ?>' : '<?=gettext("up"); ?>';
SVGDoc.getElementById('switch_scale').firstChild.data = 'AutoScale (' + scale_type + ')';
}
@@ -352,21 +352,21 @@ function formatSpeed(speed, unit) {
function formatSpeedBits(speed) {
// format speed in bits/sec, input: bytes/sec
if (speed < 125000)
- return Math.round(speed / 125) + " Kbps";
+ return Math.round(speed / 125) + " " + <?=gettext("Kbps"); ?>;
if (speed < 125000000)
- return Math.round(speed / 1250)/100 + " Mbps";
+ return Math.round(speed / 1250)/100 + " " + <?=gettext("Mbps"); ?>;
// else
- return Math.round(speed / 1250000)/100 + " Gbps"; /* wow! */
+ return Math.round(speed / 1250000)/100 + " " + <?=gettext("Gbps"); ?>; /* wow! */
}
function formatSpeedBytes(speed) {
// format speed in bytes/sec, input: bytes/sec
if (speed < 1048576)
- return Math.round(speed / 10.24)/100 + " KB/s";
+ return Math.round(speed / 10.24)/100 + " " + <?=gettext("KB/s"); ?>;
if (speed < 1073741824)
- return Math.round(speed / 10485.76)/100 + " MB/s";
+ return Math.round(speed / 10485.76)/100 + " " + <?=gettext("MB/s"); ?>;
// else
- return Math.round(speed / 10737418.24)/100 + " GB/s"; /* wow! */
+ return Math.round(speed / 10737418.24)/100 + " " + <?=gettext("GB/s"); ?>; /* wow! */
}
function LZ(x) {
diff --git a/usr/local/www/graph_cpu.php b/usr/local/www/graph_cpu.php
index 2dce113..3908153 100644
--- a/usr/local/www/graph_cpu.php
+++ b/usr/local/www/graph_cpu.php
@@ -78,8 +78,8 @@ print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
<text id="grid_txt2" x="100%" y="50%" <?=$attribs['grid_txt']?> text-anchor="end">50%</text>
<text id="grid_txt3" x="100%" y="75%" <?=$attribs['grid_txt']?> text-anchor="end">25%</text>
<text id="graph_cpu_txt" x="4" y="8" <?=$attribs['cpu']?>> </text>
- <text id="error" x="50%" y="50%" visibility="hidden" <?=$attribs['error']?> text-anchor="middle">Cannot get CPU load</text>
- <text id="collect_initial" x="50%" y="50%" visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle">Collecting initial data, please wait...</text>
+ <text id="error" x="50%" y="50%" visibility="hidden" <?=$attribs['error']?> text-anchor="middle"><?=gettext("Cannot get CPU load"); ?></text>
+ <text id="collect_initial" x="50%" y="50%" visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle"><?=gettext("Collecting initial data, please wait"); ?>...</text>
</g>
<script type="text/ecmascript">
<![CDATA[
@@ -91,14 +91,14 @@ print('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n");?>
if (typeof getURL == 'undefined') {
getURL = function(url, callback) {
if (!url)
- throw 'No URL for getURL';
+ throw '<?=gettext("No URL for getURL"); ?>';
try {
if (typeof callback.operationComplete == 'function')
callback = callback.operationComplete;
} catch (e) {}
if (typeof callback != 'function')
- throw 'No callback function for getURL';
+ throw '<?=gettext("No callback function for getURL"); ?>';
var http_request = null;
if (typeof XMLHttpRequest != 'undefined') {
@@ -114,7 +114,7 @@ if (typeof getURL == 'undefined') {
}
}
if (!http_request)
- throw 'Both getURL and XMLHttpRequest are undefined';
+ throw '<?=gettext("Both getURL and XMLHttpRequest are undefined"); ?>';
http_request.onreadystatechange = function() {
if (http_request.readyState == 4) {
diff --git a/usr/local/www/halt.php b/usr/local/www/halt.php
index 0867b60..1bfda93 100755
--- a/usr/local/www/halt.php
+++ b/usr/local/www/halt.php
@@ -49,14 +49,14 @@ require("captiveportal.inc");
if ($_POST) {
if ($_POST['Submit'] != " No ") {
system_halt();
- $rebootmsg = "The system is halting now. This may take one minute.";
+ $rebootmsg = gettext("The system is halting now. This may take one minute.");
} else {
header("Location: index.php");
exit;
}
}
-$pgtitle = array("Diagnostics","Halt system");
+$pgtitle = array(gettext("Diagnostics"),gettext("Halt system"));
include('head.inc');
?>
@@ -64,10 +64,10 @@ include('head.inc');
<?php include("fbegin.inc"); ?>
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
<form action="halt.php" method="post">
- <p><strong>Are you sure you want to halt the system?</strong></p>
+ <p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
<p>
- <input name="Submit" type="submit" class="formbtn" value=" Yes ">
- <input name="Submit" type="submit" class="formbtn" value=" No ">
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> ">
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> ">
</p>
</form>
<?php endif; ?>
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index ec3122e..fd03119 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -89,7 +89,7 @@ if (!is_array($config['widgets'])) {
}
}
- write_config("Widget configuration has been changed.");
+ write_config(gettext("Widget configuration has been changed."));
header("Location: index.php");
exit;
}
@@ -145,10 +145,10 @@ EOF;
echo "<center>\n";
echo "<img src=\"/themes/{$g['theme']}/images/logo.gif\" border=\"0\"><p>\n";
echo "<div \" style=\"width:700px;background-color:#ffffff\" id=\"nifty\">\n";
- echo "Welcome to {$g['product_name']}!<p>\n";
- echo "One moment while we start the initial setup wizard.<p>\n";
- echo "Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.<p>\n";
- echo "To bypass the wizard, click on the {$g['product_name']} logo on the initial page.\n";
+ echo sprintf(gettext("Welcome to %s!\n"),$g['product_name']) . "<p>";
+ echo gettext("One moment while we start the initial setup wizard.") . "<p>\n";
+ echo gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.") . "<p>\n";
+ echo sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."),$g['product_name']) . "\n";
echo "</div>\n";
echo "<meta http-equiv=\"refresh\" content=\"1;url=wizard.php?xml=setup_wizard.xml\">\n";
echo "<script type=\"text/javascript\">\n";
@@ -423,7 +423,7 @@ EOD;
$closehead = false;
## Set Page Title and Include Header
-$pgtitle = array("{$g['product_name']} Dashboard");
+$pgtitle = array(gettext("{$g['product_name']} Dashboard"));
include("head.inc");
echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/domLib.js\"></script>\n";
@@ -449,7 +449,7 @@ echo $jscriptstr;
echo "<center><img src=\"./themes/".$g['theme']."/images/logobig.jpg\"></center><br>";
?>
<div id="widgetcontainer" style="display:none">
- <div id="content1"><h1>Available Widgets</h1><p><?php
+ <div id="content1"><h1><?=gettext("Available Widgets"); ?></h1><p><?php
$widgetfiles_add = $widgetfiles;
sort($widgetfiles_add);
foreach($widgetfiles_add as $widget) {
@@ -487,7 +487,7 @@ echo $jscriptstr;
<div id="welcome-container">
<h1>
<div style="float:left;width:80%;padding: 2px">
- Welcome to the Dashboard page!
+ <?=gettext("Welcome to the Dashboard page"); ?>!
</div>
<div onclick="domTT_close(this);showAllWidgets();" style="float:right;width:8%; cursor:pointer;padding: 5px;" >
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_close.gif" />
@@ -495,22 +495,22 @@ echo $jscriptstr;
<div style="clear:both;"></div>
</h1>
<p>
- This page allows you to customize the information you want to be displayed!<br/>
- To get started click the <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"> icon to add widgets.<br/>
+ <?=gettext("This page allows you to customize the information you want to be displayed!");?><br/>
+ <?=gettext("To get started click the");?> <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"> <?=gettext("icon to add widgets.");?><br/>
<br/>
- You can move any widget around by clicking and dragging the title.
+ <?=gettext("You can move any widget around by clicking and dragging the title.");?>
</p>
</div>
</div>
<input type="hidden" value="" name="sequence" id="sequence">
-<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="Click here to add widgets" style="cursor: pointer;" onmouseup="domTT_activate(this, event, 'content', document.getElementById('content1'), 'type', 'velcro', 'delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" />
+<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="<?=gettext("Click here to add widgets"); ?>" style="cursor: pointer;" onmouseup="domTT_activate(this, event, 'content', document.getElementById('content1'), 'type', 'velcro', 'delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" />
-<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_info_pkg.gif" alt="Click here for help" style="cursor: help;" onmouseup="hideAllWidgets();domTT_activate(this, event, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '','delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" />
+<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_info_pkg.gif" alt="<?=gettext("Click here for help"); ?>" style="cursor: help;" onmouseup="hideAllWidgets();domTT_activate(this, event, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '','delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" />
&nbsp;&nbsp;&nbsp;
- <input id="submit" name="submit" type="submit" style="display:none" onclick="return updatePref();" class="formbtn" value="Save Settings" />
+ <input id="submit" name="submit" type="submit" style="display:none" onclick="return updatePref();" class="formbtn" value="<?=gettext("Save Settings");?>" />
</p>
<div id="niftyOutter">
@@ -662,7 +662,7 @@ echo $jscriptstr;
<div id="<?php echo $widgetname;?>-loader" style="display:<?php echo $display; ?>;">
<br>
<center>
- <img src="./themes/<?= $g['theme']; ?>/images/misc/widget_loader.gif" width=25 height=25 alt="Loading selected widget...">
+ <img src="./themes/<?= $g['theme']; ?>/images/misc/widget_loader.gif" width=25 height=25 alt="<?=gettext("Loading selected widget"); ?>...">
</center>
<br>
</div> <?php } if ($divdisplay != "block") $display = none; ?>
diff --git a/usr/local/www/installer.php b/usr/local/www/installer.php
index f5e37e0..978ce71 100644
--- a/usr/local/www/installer.php
+++ b/usr/local/www/installer.php
@@ -105,7 +105,7 @@ function start_installation() {
return;
$fd = fopen("/tmp/installer.sh", "w");
if(!$fd) {
- die("Could not open /tmp/installer.sh for writing");
+ die(gettext("Could not open /tmp/installer.sh for writing"));
exit;
}
fwrite($fd, "rm /tmp/.pc-sysinstall/pc-sysinstall.log 2>/dev/null\n");
@@ -235,12 +235,12 @@ function begin_quick_easy_install() {
$disk = installer_find_first_disk();
if(!$disk) {
// XXX: hide progress bar
- $savemsg = "Could not find a suitable disk for installation";
- update_installer_status_win("Could not find a suitable disk for installation.");
+ $savemsg = gettext("Could not find a suitable disk for installation");
+ update_installer_status_win(gettext("Could not find a suitable disk for installation."));
return;
}
write_out_pc_sysinstaller_config($disk);
- update_installer_status_win("Beginning installation on disk {$disk}.");
+ update_installer_status_win(sprintf(gettext("Beginning installation on disk %s."),$disk));
start_installation();
}
@@ -281,7 +281,7 @@ function body_html() {
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
$one_two = true;
- $pgtitle = "{$g['product_name']}: Installer";
+ $pgtitle = "{$g['product_name']}: " . gettext("Installer");
include("head.inc");
echo <<<EOF
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
@@ -467,7 +467,7 @@ function installer_main() {
$zfs_enabled = "or <a href=\"installer.php?state=quickeasyinstall&fstype=ZFS\">ZFS</a> ";
$disk = installer_find_first_disk();
if(!$disk)
- echo "WARNING: Could not find any suitable disks for installation.";
+ echo gettext("WARNING: Could not find any suitable disks for installation.");
page_table_start();
echo <<<EOF
<form action="installer.php" method="post" state="step1_post">
@@ -507,4 +507,4 @@ EOF;
end_html();
}
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/license.php b/usr/local/www/license.php
index 2a83d00..2bd699b 100755
--- a/usr/local/www/license.php
+++ b/usr/local/www/license.php
@@ -42,176 +42,176 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
-<p class="pgtitle">License</p>
+<p class="pgtitle"><?=gettext("License");?></p>
- <p><strong><?=$g['product_name'];?> is Copyright &copy; <?=$g['product_copyright_years'];?> by <?=$g['product_copyright'];?><br>
- All rights reserved.</strong></p>
+ <p><strong><?=$g['product_name'];?> <?=gettext("is Copyright");?> &copy; <?=$g['product_copyright_years'];?> <?=gettext("by");?> <?=$g['product_copyright'];?><br>
+ <?=gettext("All rights reserved");?>.</strong></p>
- <p><strong>m0n0wall is Copyright &copy; 2002-2007 by Manuel Kasper
+ <p><strong><?=gettext("m0n0wall is Copyright ");?>&copy; <?=gettext("2002-2007 by Manuel Kasper");?>
(<a href="mailto:mk@neon1.net">mk@neon1.net</a>).<br>
- All rights reserved.</strong></p>
- <p> Redistribution and use in source and binary forms, with or without<br>
- modification, are permitted provided that the following conditions
- are met:<br>
- <br>
- 1. Redistributions of source code must retain the above copyright
- notice,<br>
- this list of conditions and the following disclaimer.<br>
- <br>
- 2. Redistributions in binary form must reproduce the above copyright<br>
- notice, this list of conditions and the following disclaimer in
- the<br>
- documentation and/or other materials provided with the distribution.<br>
- <br>
- <strong>THIS SOFTWARE IS PROVIDED &quot;AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES,<br>
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY<br>
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- SHALL THE<br>
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY,<br>
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- OF<br>
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS<br>
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- IN<br>
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- OF THE<br>
- POSSIBILITY OF SUCH DAMAGE</strong>.</p>
+ <?=gettext("All rights reserved");?>.</strong></p>
+ <p> <?=gettext("Redistribution and use in source and binary forms, with or without");?><br>
+ <?=gettext("modification, are permitted provided that the following conditions ".
+ "are met");?>:<br>
+ <br>
+ <?=gettext("1. Redistributions of source code must retain the above copyright ".
+ "notice,");?><br>
+ <?=gettext("this list of conditions and the following disclaimer");?>.<br>
+ <br>
+ <?=gettext("2. Redistributions in binary form must reproduce the above copyright");?><br>
+ <?=gettext("notice, this list of conditions and the following disclaimer in ".
+ "the");?><br>
+ <?=gettext("documentation and/or other materials provided with the distribution.");?><br>
+ <br>
+ <strong><?=gettext("THIS SOFTWARE IS PROVIDED ");?>&quot;<?=gettext("AS IS'' AND ANY EXPRESS ".
+ "OR IMPLIED WARRANTIES,");?><br>
+ <?=gettext("INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY");?><br>
+ <?=gettext("AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT ".
+ "SHALL THE");?><br>
+ <?=gettext("AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ".
+ "EXEMPLARY,");?><br>
+ <?=gettext("OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT ".
+ "OF");?><br>
+ <?=gettext("SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ".
+ "BUSINESS");?><br>
+ <?=gettext("INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER ".
+ "IN");?><br>
+ <?=gettext("CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)");?><br>
+ <?=gettext("ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED ".
+ "OF THE");?><br>
+ <?=gettext("POSSIBILITY OF SUCH DAMAGE");?></strong>.</p>
<hr size="1">
- <p>The following persons have contributed code to m0n0wall:</p>
+ <p><?=gettext("The following persons have contributed code to m0n0wall");?>:</p>
<p>Bob Zoller (<a href="mailto:bob@kludgebox.com">bob@kludgebox.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Diagnostics: Ping
- function; WLAN channel auto-select; DNS forwarder</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Diagnostics: Ping ".
+ "function; WLAN channel auto-select; DNS forwarder");?></font></em><br>
<br>
Michael Mee (<a href="mailto:mikemee2002@pobox.com">mikemee2002@pobox.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Timezone and NTP
- client support</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Timezone and NTP ".
+ "client support");?></font></em><br>
<br>
Magne Andreassen (<a href="mailto:magne.andreassen@bluezone.no">magne.andreassen@bluezone.no</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Remote syslog'ing;
- some code bits for DHCP server on optional interfaces</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Remote syslog'ing; ".
+ "some code bits for DHCP server on optional interfaces");?></font></em><br>
<br>
Rob Whyte (<a href="mailto:rob@g-labs.com">rob@g-labs.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Idea/code bits
- for encrypted webConfigurator passwords; minimalized SNMP agent</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Idea/code bits ".
+ "for encrypted webConfigurator passwords; minimalized SNMP agent");?></font></em><br>
<br>
Petr Verner (<a href="mailto:verner@ipps.cz">verner@ipps.cz</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Advanced outbound
- NAT: destination selection</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Advanced outbound ".
+ "NAT: destination selection");?></font></em><br>
<br>
Bruce A. Mah (<a href="mailto:bmah@acm.org">bmah@acm.org</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Filtering bridge
- patches </font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Filtering bridge ".
+ "patches ");?></font></em><br>
<br>
Jim McBeath (<a href="mailto:monowall@j.jimmc.org">monowall@j.jimmc.org</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Filter rule patches
- (ordering, block/pass, disabled); better status page;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;webConfigurator assign network ports page </font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("Filter rule patches ".
+ "(ordering, block/pass, disabled); better status page;");?><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<?=gettext("webConfigurator assign network ports page ");?></font></em><br>
<br>
Chris Olive (<a href="mailto:chris@technologEase.com">chris@technologEase.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">enhanced &quot;execute
- command&quot; page</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("enhanced ");?>&quot;<?=gettext("execute ".
+ "command");?>&quot;<?=gettext(" page");?></font></em><br>
<br>
Pauline Middelink (<a href="mailto:middelink@polyware.nl">middelink@polyware.nl</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">DHCP client: send hostname patch</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("DHCP client: send hostname patch");?></font></em><br>
<br>
Björn Pålsson (<a href="mailto:bjorn@networksab.com">bjorn@networksab.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">DHCP lease list page</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("DHCP lease list page");?></font></em><br>
<br>
Peter Allgeyer (<a href="mailto:allgeyer@web.de">allgeyer@web.de</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">&quot;reject&quot; type filter rules; dial-on-demand</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">&quot;<?=gettext("reject");?>&quot; <?=gettext("type filter rules; dial-on-demand");?></font></em><br>
<br>
Thierry Lechat (<a href="mailto:dev@lechat.org">dev@lechat.org</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">SVG-based traffic grapher</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("SVG-based traffic grapher");?></font></em><br>
<br>
Steven Honson (<a href="mailto:steven@honson.org">steven@honson.org</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">per-user IP address assignments for PPTP VPN</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("per-user IP address assignments for PPTP VPN");?></font></em><br>
<br>
Kurt Inge Smådal (<a href="mailto:kurt@emsp.no">kurt@emsp.no</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">NAT on optional interfaces</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("NAT on optional interfaces");?></font></em><br>
<br>
Dinesh Nair (<a href="mailto:dinesh@alphaque.com">dinesh@alphaque.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">captive portal: pass-through MAC/IP addresses, RADIUS authentication &amp; accounting;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"></font></em>HTTP server concurrency limit</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("captive portal: pass-through MAC/IP addresses, RADIUS authentication");?> &amp; <?=gettext("accounting;");?><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"></font></em><?=gettext("HTTP server concurrency limit");?></font></em><br>
<br>
Justin Ellison (<a href="mailto:justin@techadvise.com">justin@techadvise.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">traffic shaper TOS matching; magic shaper; DHCP deny unknown clients;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;IPsec user FQDNs; DHCP relay</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("traffic shaper TOS matching; magic shaper; DHCP deny unknown clients;");?><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<?=gettext("IPsec user FQDNs; DHCP relay");?></font></em><br>
<br>
Michael Hanselmann (<a href="mailto:m0n0@hansmi.ch">m0n0@hansmi.ch</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">IDE hard disk standby</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("IDE hard disk standby");?></font></em><br>
<br>
Audun Larsen (<a href="mailto:larsen@xqus.com">larsen@xqus.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">CPU/memory usage display</font></em><br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("CPU/memory usage display");?></font></em><br>
<br>
Peter Curran (<a href="mailto:peter@closeconsultants.com">peter@closeconsultants.com</a>)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">OpenVPN support</font></em></p>
+ &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666"><?=gettext("OpenVPN support");?></font></em></p>
<hr size="1">
- <p>{$g['product_name']} is based upon/includes various free software packages,
- listed below.<br>
- The author of {$g['product_name']} would like to thank the authors of these
- software packages for their efforts.</p>
+ <p>{$g['product_name']} <?=gettext("is based upon/includes various free software packages, ".
+ "listed below.");?><br>
+ <?=gettext("The author of ");?>{$g['product_name']}<?=gettext(" would like to thank the authors of these " .
+ "software packages for their efforts");?>.</p>
<p>FreeBSD (<a href="http://www.freebsd.org" target="_blank">http://www.freebsd.org</a>)<br>
- Copyright &copy; 1994-2003 FreeBSD, Inc. All rights reserved.<br>
+ <?=gettext("Copyright");?> &copy;<?=gettext(" 1994-2003 FreeBSD, Inc. All rights reserved");?>.<br>
<br>
- This product includes PHP, freely available from <a href="http://www.php.net/" target="_blank">http://www.php.net</a>.<br>
- Copyright &copy; 1999 - 2003 The PHP Group. All rights reserved.<br>
+ <?=gettext("This product includes PHP, freely available from");?> <a href="http://www.php.net/" target="_blank">http://www.php.net</a>.<br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("1999 - 2003 The PHP Group. All rights reserved");?>.<br>
<br>
- LightTPD (<a href="http://www.lighttpd.net" target="_blank">http://www.lighttpd.net)</a><br>
- Copyright &copy; 2004 by Jan Kneschke <jan@kneschke.de>
- All rights reserved.<br>
+ <?=gettext("LightTPD"); ?> (<a href="http://www.lighttpd.net" target="_blank">http://www.lighttpd.net)</a><br>
+ <?=gettext("Copyright"); ?> &copy;<?=gettext(" 2004 by Jan Kneschke ");?><jan@kneschke.de>
+ <?=gettext("All rights reserved.");?><br>
<br>
- ISC DHCP server (<a href="http://www.isc.org/products/DHCP/" target="_blank">http://www.isc.org/products/DHCP</a>)<br>
- Copyright &copy; 1996-2003 Internet Software Consortium. All rights
- reserved.<br>
+ <?=gettext("ISC DHCP server ");?>(<a href="http://www.isc.org/products/DHCP/" target="_blank">http://www.isc.org/products/DHCP</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("1996-2003 Internet Software Consortium. All rights ".
+ "reserved.");?><br>
<br>
- PF (<a href="http://www.openbsd.org/faq/pf" target="_blank">http://www.openbsd.org</a>)<br>
+ <?=gettext("PF"); ?> (<a href="http://www.openbsd.org/faq/pf" target="_blank">http://www.openbsd.org</a>)<br>
<br>
- MPD - Multi-link PPP daemon for FreeBSD (<a href="http://www.dellroad.org/mpd" target="_blank">http://www.dellroad.org/mpd</a>)<br>
- Copyright &copy; 2003-2004, Archie L. Cobbs, Michael Bretterklieber, Alexander Motin<br>
- All rights reserved.<br>
- <br>
- Circular log support for FreeBSD syslogd (<a href="http://software.wwwi.com/syslogd/" target="_blank">http://software.wwwi.com/syslogd</a>)<br>
- Copyright &copy; 2001 Jeff Wheelhouse (jdw@wwwi.com)<br>
- <br>
- Dnsmasq - a DNS forwarder for NAT firewalls (<a href="http://www.thekelleys.org.uk" target="_blank">http://www.thekelleys.org.uk</a>)<br>
- Copyright &copy; 2000-2003 Simon Kelley.<br>
- <br>
- Racoon (<a href="http://www.kame.net/racoon" target="_blank">http://www.kame.net/racoon</a>)<br>
- Copyright &copy; 1995-2002 WIDE Project. All rights reserved.<br>
- <br>
- msntp (<a href="http://www.hpcf.cam.ac.uk/export" target="_blank">http://www.hpcf.cam.ac.uk/export</a>)<br>
- Copyright &copy; 1996, 1997, 2000 N.M. Maclaren, University of Cambridge.
- All rights reserved.<br>
- <br>
- UCD-SNMP (<a href="http://www.ece.ucdavis.edu/ucd-snmp" target="_blank">http://www.ece.ucdavis.edu/ucd-snmp</a>)<br>
- Copyright &copy; 1989, 1991, 1992 by Carnegie Mellon University.<br>
- Copyright &copy; 1996, 1998-2000 The Regents of the University of
- California. All rights reserved.<br>
- Copyright &copy; 2001-2002, Network Associates Technology, Inc.
- All rights reserved.<br>
- Portions of this code are copyright &copy; 2001-2002, Cambridge
- Broadband Ltd. All rights reserved.<br>
- <br>
- choparp (<a href="http://choparp.sourceforge.net/" target="_blank">http://choparp.sourceforge.net</a>)<br>
- Copyright &copy; 1997 Takamichi Tateoka (tree@mma.club.uec.ac.jp)<br>
- Copyright &copy; 2002 Thomas Quinot (thomas@cuivre.fr.eu.org)<br>
- <br>
- BPALogin (<a href="http://bpalogin.sourceforge.net/" target="_blank">http://bpalogin.sourceforge.net</a>) - lightweight portable BIDS2 login client<br>
- Copyright &copy; 2001-3 Shane Hyde, and others.<br>
- <br>
- php-radius (<a href="http://www.mavetju.org/programming/php.php" target="_blank">http://www.mavetju.org/programming/php.php</a>)<br>
- Copyright 2000, 2001, 2002 by Edwin Groothuis. All rights reserved.<br>
- This product includes software developed by Edwin Groothuis.<br>
+ <?=gettext("MPD - Multi-link PPP daemon for FreeBSD");?> (<a href="http://www.dellroad.org/mpd" target="_blank">http://www.dellroad.org/mpd</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; 2003-2004, Archie L. Cobbs, Michael Bretterklieber, Alexander Motin<br>
+ <?=gettext("All rights reserved.");?><br>
+ <br>
+ <?=gettext("Circular log support for FreeBSD syslogd ");?>(<a href="http://software.wwwi.com/syslogd/" target="_blank">http://software.wwwi.com/syslogd</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; 2001 Jeff Wheelhouse (jdw@wwwi.com)<br>
+ <br>
+ <?=gettext("Dnsmasq - a DNS forwarder for NAT firewalls");?> (<a href="http://www.thekelleys.org.uk" target="_blank">http://www.thekelleys.org.uk</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; 2000-2003 Simon Kelley.<br>
+ <br>
+ <?=gettext("Racoon"); ?> (<a href="http://www.kame.net/racoon" target="_blank">http://www.kame.net/racoon</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("1995-2002 WIDE Project. All rights reserved.");?><br>
+ <br>
+ <?=gettext("msntp"); ?> (<a href="http://www.hpcf.cam.ac.uk/export" target="_blank">http://www.hpcf.cam.ac.uk/export</a>)<br>
+ <?=gettext("Copyright"); ?> &copy;<?=gettext(" 1996, 1997, 2000 N.M. Maclaren, University of Cambridge. ".
+ "All rights reserved.");?><br>
+ <br>
+ <?=gettext("UCD-SNMP"); ?> (<a href="http://www.ece.ucdavis.edu/ucd-snmp" target="_blank">http://www.ece.ucdavis.edu/ucd-snmp</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("1989, 1991, 1992 by Carnegie Mellon University.");?><br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("1996, 1998-2000 The Regents of the University of ".
+ "California. All rights reserved");?>.<br>
+ <?=gettext("Copyright"); ?> &copy; <?=gettext("2001-2002, Network Associates Technology, Inc. ".
+ "All rights reserved.");?><br>
+ <?=gettext("Portions of this code are copyright");?> &copy; <?=gettext("2001-2002, Cambridge ".
+ "Broadband Ltd. All rights reserved.");?><br>
+ <br>
+ <?=gettext("choparp"); ?> (<a href="http://choparp.sourceforge.net/" target="_blank">http://choparp.sourceforge.net</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; 1997 Takamichi Tateoka (tree@mma.club.uec.ac.jp)<br>
+ <?=gettext("Copyright"); ?> &copy; 2002 Thomas Quinot (thomas@cuivre.fr.eu.org)<br>
+ <br>
+ <?=gettext("BPALogin"); ?> (<a href="http://bpalogin.sourceforge.net/" target="_blank">http://bpalogin.sourceforge.net</a>) - <?=gettext("lightweight portable BIDS2 login client");?><br>
+ <?=gettext("Copyright"); ?> &copy;<?=gettext(" 2001-3 Shane Hyde, and others.");?><br>
+ <br>
+ <?=gettext("php-radius"); ?> (<a href="http://www.mavetju.org/programming/php.php" target="_blank">http://www.mavetju.org/programming/php.php</a>)<br>
+ <?=gettext("Copyright 2000, 2001, 2002 by Edwin Groothuis. All rights reserved.");?><br>
+ <?=gettext("This product includes software developed by Edwin Groothuis.");?><br>
<br>
- wol (<a href="http://ahh.sourceforge.net/wol" target="_blank">http://ahh.sourceforge.net/wol</a>)<br>
- Copyright &copy; 2000,2001,2002,2003,2004 Thomas Krennwallner &lt;krennwallner@aon.at&gt;
+ <?=gettext("wol"); ?> (<a href="http://ahh.sourceforge.net/wol" target="_blank">http://ahh.sourceforge.net/wol</a>)<br>
+ <?=gettext("Copyright"); ?> &copy; 2000,2001,2002,2003,2004 Thomas Krennwallner &lt;krennwallner@aon.at&gt;
<br>
- OpenVPN (<a href="http://openvpn.net/" target="_blank">http://openvpn.net/</a>)
- Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
+ <?=gettext("OpenVPN"); ?> (<a href="http://openvpn.net/" target="_blank">http://openvpn.net/</a>)
+ <?=gettext("Copyright (C) 2002-2005 OpenVPN Solutions LLC ");?><info@openvpn.net>
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 86f7530..5cb4ec7 100755
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -69,7 +69,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['lbpool'])) {
foreach ($config['load_balancer']['pool'] as $pool) {
if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one pool.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool.");
break;
}
}
@@ -85,7 +85,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services", "Load Balancer","Monitor");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -99,16 +99,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", true, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), true, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php
index 934be05..630e31d 100755
--- a/usr/local/www/load_balancer_monitor_edit.php
+++ b/usr/local/www/load_balancer_monitor_edit.php
@@ -63,7 +63,7 @@ if (isset($id) && $a_monitor[$id]) {
$pconfig['options']['code'] = 200;
}
-$changedesc = "Load Balancer: Monitor: ";
+$changedesc = gettext("Load Balancer: Monitor:") . " ";
$changecount = 0;
if ($_POST) {
@@ -85,14 +85,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']['monitor_type'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id))
- $input_errors[] = "This monitor name has already been used. Monitor names must be unique.";
+ $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique.");
switch($_POST['type']) {
case 'icmp': {
@@ -106,17 +106,17 @@ if ($_POST) {
if (is_array($pconfig['options'])) {
if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") {
if (!is_hostname($pconfig['options']['host'])) {
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
}
}
if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") {
// Check code
if(!is_rfc2616_code($pconfig['options']['code'])) {
- $input_errors[] = "HTTP(s) codes must be from RFC2616.";
+ $input_errors[] = gettext("HTTP(s) codes must be from RFC2616.");
}
}
if (!isset($pconfig['options']['path']) || $pconfig['options']['path'] == "") {
- $input_errors[] = "The path to monitor must be set.";
+ $input_errors[] = gettext("The path to monitor must be set.");
}
}
break;
@@ -139,7 +139,7 @@ if ($_POST) {
if(isset($id) && $a_monitor[$id])
$monent = $a_monitor[$id];
if($monent['name'] != "")
- $changedesc .= " modified '{$monent['name']}' monitor:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' monitor"), $monent['name']) . ":";
update_if_changed("name", $monent['name'], $pconfig['name']);
update_if_changed("type", $monent['type'], $pconfig['type']);
@@ -187,13 +187,13 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Monitor","Edit");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"),gettext("Edit"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
-$types = array("icmp" => "ICMP", "tcp" => "TCP", "http" => "HTTP", "https" => "HTTPS", "send" => "Send/Expect");
+$types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => gettext("HTTP"), "https" => gettext("HTTPS"), "send" => gettext("Send/Expect"));
?>
@@ -226,22 +226,22 @@ function updateType(t){
<form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Monitor entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Monitor entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="type" name="type">
<?
@@ -262,23 +262,23 @@ function updateType(t){
<tr align="left" id="tcp"<?= $pconfig['type'] == "tcp" ? "" : " style=\"display:none;\""?>>
</tr>
<tr align="left" id="http"<?= $pconfig['type'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">HTTP</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("HTTP"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Path</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
<input name="http_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"{$pconfig['options']['path']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Host</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed.
+ <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/><?=gettext("Hostname for Host: header if needed."); ?>
</td>
</td>
<tr align="left">
- <td valign="top" align="right" class="vtable">HTTP Code</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
<?= print_rfc2616_select("http_options_code", $pconfig['options']['code']); ?>
</td>
@@ -295,23 +295,23 @@ function updateType(t){
</td>
</tr>
<tr align="left" id="https"<?= $pconfig['type'] == "https" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">HTTPS</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("HTTPS"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Path</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
<input name="https_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"{$pconfig['options']['path']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Host</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed.
+ <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/><?=gettext("Hostname for Host: header if needed."); ?>
</td>
</td>
<tr align="left">
- <td valign="top" align="right" class="vtable">HTTP Code</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
<?= print_rfc2616_select("https_options_code", $pconfig['options']['code']); ?>
</td>
@@ -329,17 +329,17 @@ function updateType(t){
</td>
</tr>
<tr align="left" id="send"<?= $pconfig['type'] == "send" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Send/Expect</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Send/Expect"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Send string</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Send string"); ?></td>
<td class="vtable" colspan="2">
<input name="send_options_send" type="text" <?if(isset($pconfig['options']['send'])) echo "value=\"{$pconfig['options']['send']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Expect string</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Expect string"); ?></td>
<td class="vtable" colspan="2">
<input name="send_options_expect" type="text" <?if(isset($pconfig['options']['expect'])) echo "value=\"{$pconfig['options']['expect']}\"";?>size="64">
</td>
@@ -350,7 +350,7 @@ function updateType(t){
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="Save"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_monitor[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php
index bc97d85..2cb4ff8 100755
--- a/usr/local/www/load_balancer_pool.php
+++ b/usr/local/www/load_balancer_pool.php
@@ -69,7 +69,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
if ($vs['pool'] == $a_pool[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one virtual server.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
}
@@ -94,7 +94,7 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$a_pool[$i]['monitor'] = "<a href=\"/load_balancer_monitor_edit.php?id={$mondex[$a_pool[$i]['monitor']]}\">{$a_pool[$i]['monitor']}</a>";
}
-$pgtitle = array("Services", "Load Balancer","Pool");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -108,16 +108,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", true, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), true, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
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(){
<form action="load_balancer_pool_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Add/edit Load Balancer - Pool entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add/edit Load Balancer - Pool entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" id="monitorport_text" class="vncellreq">Port</td>
+ <td width="22%" valign="top" id="monitorport_text" class="vncellreq"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"{$pconfig['port']}\"";?> size="16" maxlength="16"><br>
- <div id="monitorport_desc">This is the port your servers are listening on.</div>
+ <div id="monitorport_desc"><?=gettext("This is the port your servers are listening on"); ?>.</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Add item to pool</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add item to pool"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Monitor"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['monitor_type'])): ?>
<select id="monitor" name="monitor">
@@ -206,33 +206,33 @@ function clearcombo(){
}
?>
<?php else: ?>
- <b>NOTE:</b> Please add a monitor IP address on the monitors tab if you wish to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a monitor IP address on the monitors tab if you wish to use this feature"); ?>.
<?php endif; ?>
</select>
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Server IP Address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" size="16" style="float: left;">
- <input class="formbtn" type="button" name="button1" value="Add to pool" onclick="AddServerToPool(document.iform);"><br>
+ <input class="formbtn" type="button" name="button1" value="<?=gettext("Add to pool"); ?>" onclick="AddServerToPool(document.iform);"><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Current Pool Members</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Current Pool Members"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Members</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Members"); ?></td>
<td width="78%" class="vtable" colspan="2" valign="top">
<table>
<tbody>
<tr>
<td>
<center>
- <b>Pool Disabled</b>
+ <b><?=gettext("Pool Disabled"); ?></b>
<p/>
<select id="serversDisabledSelect" name="serversdisabled[]" multiple="true" size="5">
@@ -245,7 +245,7 @@ function clearcombo(){
echo "</select>";
?>
<p/>
- <input class="formbtn" type="button" name="removeDisabled" value="Remove" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />
+ <input class="formbtn" type="button" name="removeDisabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />
</td>
<td valign="middle">
@@ -255,7 +255,7 @@ function clearcombo(){
<td>
<center>
- <b>Enabled (default)</b>
+ <b><?=gettext("Enabled (default)"); ?></b>
<p/>
<select id="serversSelect" name="servers[]" multiple="true" size="5">
@@ -268,7 +268,7 @@ if (is_array($pconfig['servers'])) {
echo "</select>";
?>
<p/>
- <input class="formbtn" type="button" name="removeEnabled" value="Remove" onclick="RemoveServerFromPool(document.iform, 'servers[]');" />
+ <input class="formbtn" type="button" name="removeEnabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'servers[]');" />
</td>
</tr>
</tbody>
@@ -279,8 +279,8 @@ echo "</select>";
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<br/>
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);">
- <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);">
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_pool[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php
index 5e73cfb..f93397b 100755
--- a/usr/local/www/load_balancer_relay_action.php
+++ b/usr/local/www/load_balancer_relay_action.php
@@ -71,7 +71,7 @@ if ($_GET['act'] == "del") {
foreach ($config['load_balancer']['lbprotocol'] as $lbp) {
foreach($lbp['lbaction'] as $lba) {
if ($lba['name'] == $a_action[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one relay protocol.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one relay protocol.");
break;
}
}
@@ -101,7 +101,7 @@ if ($_GET['act'] == "del") {
}
*/
-$pgtitle = array("Services", "Load Balancer","Relay Action");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Action"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -115,18 +115,18 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") ".<br>" gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
- $tab_array[] = array("Relay Actions", true, "load_balancer_relay_action.php");
- $tab_array[] = array("Relay Protocols", false, "load_balancer_relay_protocol.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Relay Actions"), true, "load_balancer_relay_action.php");
+ $tab_array[] = array(gettext("Relay Protocols"), false, "load_balancer_relay_protocol.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php
index d623fef..5942ca1 100755
--- a/usr/local/www/load_balancer_relay_action_edit.php
+++ b/usr/local/www/load_balancer_relay_action_edit.php
@@ -62,7 +62,7 @@ if (isset($id) && $a_action[$id]) {
$pconfig['action'] = 'change';
}
-$changedesc = "Load Balancer: Relay Action: ";
+$changedesc = gettext("Load Balancer: Relay Action:") . " ";
$changecount = 0;
$kv = array('key', 'value');
@@ -114,14 +114,14 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name protocol direction action desc");
- $reqdfieldsn = explode(",", "Name,Protocol,Direction,Action,Description");
+ $reqdfieldsn = array(gettext("Name"),gettext("Protocol"),gettext("Direction"),gettext("Action"),gettext("Description"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* Ensure that our monitor names are unique */
for ($i=0; isset($config['load_balancer']['lbactions'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['lbactions'][$i]['name']) && ($i != $id))
- $input_errors[] = "This action name has already been used. Action names must be unique.";
+ $input_errors[] = gettext("This action name has already been used. Action names must be unique.");
if (!$input_errors) {
@@ -129,7 +129,7 @@ if ($_POST) {
if(isset($id) && $a_action[$id])
$actent = $a_action[$id];
if($actent['name'] != "")
- $changedesc .= " modified '{$actent['name']}' action:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' action:"), $actent['name']);
update_if_changed("name", $actent['name'], $pconfig['name']);
update_if_changed("protocol", $actent['protocol'], $pconfig['protocol']);
@@ -175,13 +175,13 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Relay Action","Edit");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Action"),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"));
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
@@ -403,23 +403,23 @@ document.observe("dom:loaded", function() {
<form action="load_balancer_relay_action_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Relay Action entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Action entry"); ?></td>
</tr>
<tr align="left" id="name">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<!-- Protocol -->
<tr align="left" id="protocol_row">
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="protocol" name="protocol">
<?
@@ -438,7 +438,7 @@ document.observe("dom:loaded", function() {
<!-- Direction -->
<tr align="left" id="direction_row">
- <td width="22%" valign="top" class="vncellreq">Direction</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="direction" name="direction" style="disabled">
<?
@@ -458,7 +458,7 @@ document.observe("dom:loaded", function() {
<!-- Type -->
<tr align="left" id="type_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?
foreach ($actions['direction'] as $dir => $v) {
@@ -479,7 +479,7 @@ document.observe("dom:loaded", function() {
<!-- Action -->
<tr align="left" id="action_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Action</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Action"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="action" name="action" style=\"display: none;\">
<?
@@ -501,18 +501,18 @@ document.observe("dom:loaded", function() {
</select>
<br/>
<table><tr>
-<td><div id="input_action_value">Value&nbsp;<input id="option_action_value" name="option_action_value" type="text" <?if(isset($pconfig['options']['value'])) echo "value=\"{$pconfig['options']['value']}\"";?>size="20"></div></td>
+<td><div id="input_action_value"><?=gettext("Value"); ?>&nbsp;<input id="option_action_value" name="option_action_value" type="text" <?if(isset($pconfig['options']['value'])) echo "value=\"{$pconfig['options']['value']}\"";?>size="20"></div></td>
<td><div id="action_action_value"></div></td>
-<td><div id="input_action_key">Key&nbsp;<input id="option_action_key" name="option_action_key" type="text" <?if(isset($pconfig['options']['akey'])) echo "value=\"{$pconfig['options']['akey']}\"";?>size="20"></div></td>
+<td><div id="input_action_key"><?=gettext("Key"); ?>&nbsp;<input id="option_action_key" name="option_action_key" type="text" <?if(isset($pconfig['options']['akey'])) echo "value=\"{$pconfig['options']['akey']}\"";?>size="20"></div></td>
<td><div id="action_action_id"></div></td>
-<td><div id="input_action_id">ID&nbsp;<input id="option_action_id" name="option_action_id" type="text" <?if(isset($pconfig['options']['id'])) echo "value=\"{$pconfig['options']['id']}\"";?>size="20"></div></td>
+<td><div id="input_action_id"><?=gettext("ID"); ?>&nbsp;<input id="option_action_id" name="option_action_id" type="text" <?if(isset($pconfig['options']['id'])) echo "value=\"{$pconfig['options']['id']}\"";?>size="20"></div></td>
</tr></table>
</td>
</tr>
<tr align="left" id="tcp_options_row"<?= $pconfig['protocol'] == "tcp" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Options</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Options"); ?</td>
<td width="78%" class="vtable" colspan="2">
- XXX: TODO
+ XXX: <?=gettext("TODO"); ?>
<select id="options" name="options">
<!-- XXX TODO >
<?
@@ -530,9 +530,9 @@ document.observe("dom:loaded", function() {
</td>
</tr>
<tr align="left" id="ssl_options_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Options</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Options"); ?></td>
<td width="78%" class="vtable" colspan="2">
- XXX: TODO
+ XXX: <?=gettext("TODO"); ?>
<!-- XXX TODO >
<select id="options" name="options">
<?
@@ -552,7 +552,7 @@ document.observe("dom:loaded", function() {
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_action[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php
index d184f1d..673bc63 100755
--- a/usr/local/www/load_balancer_relay_protocol.php
+++ b/usr/local/www/load_balancer_relay_protocol.php
@@ -68,7 +68,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
if ($vs['protocol'] == $a_protocol[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one virtual server.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
}
@@ -97,7 +97,7 @@ if ($_GET['act'] == "del") {
}
*/
-$pgtitle = array("Services", "Load Balancer","Relay Protocol");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Protocol"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -111,16 +111,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
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"));
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<script language="javascript">
@@ -186,16 +186,16 @@ document.observe('dom:loaded', function(){
<form action="load_balancer_relay_protocol_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Relay Protocol entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Protocol entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="type" name="type">
<?
@@ -212,7 +212,7 @@ document.observe('dom:loaded', function(){
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
@@ -221,17 +221,17 @@ document.observe('dom:loaded', function(){
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Add / remove available actions</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add / remove available actions"); ?></td>
</tr>
<tr align="left" id="actions">
- <td width="22%" valign="top" class="vncellreq">Actions</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Actions"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table>
<tbody>
<tr>
<td>
<center>
- <b>Available Actions</b>
+ <b><?=gettext("Available Actions"); ?></b>
<br/>
<select id="available_action" name="available_action[]" multiple="true" size="5">
<?php
@@ -246,14 +246,14 @@ echo "</select>";
</td>
<td valign="middle">
<center>
- <input class="formbtn" type="button" name="copyToEnabled" value="Add" onclick="copyOption($('available_action'), $('lbaction'));" /><br/>
- <input class="formbtn" type="button" name="removeFromEnabled" value="Remove" onclick="deleteOption($('lbaction'));" />
+ <input class="formbtn" type="button" name="copyToEnabled" value="<?=gettext("Add"); ?>" onclick="copyOption($('available_action'), $('lbaction'));" /><br/>
+ <input class="formbtn" type="button" name="removeFromEnabled" value="<?=gettext("Remove"); ?>" onclick="deleteOption($('lbaction'));" />
</center>
</td>
<td>
<center>
- <b>Enabled Actions</b>
+ <b><?=gettext("Enabled Actions"); ?></b>
<br/>
<select id="lbaction" name="lbaction[]" multiple="true" size="5">
<?php
@@ -274,7 +274,7 @@ echo "</select>";
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_protocol[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 4e6186e..0390678 100755
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -93,7 +93,7 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
}
}
-$pgtitle = array("Services","Load Balancer","Virtual Servers");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Virtual Servers"));
$statusurl = "status_lb_vs.php";
#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -107,16 +107,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The virtual server configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", true, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), true, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 0cd91e5..247c42b 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -58,7 +58,7 @@ if (isset($id) && $a_vs[$id]) {
$pconfig['mode'] = 'redirect';
}
-$changedesc = "Load Balancer: Virtual Server: ";
+$changedesc = gettext("Load Balancer: Virtual Server:") . " ";
$changecount = 0;
if ($_POST) {
@@ -69,12 +69,12 @@ if ($_POST) {
switch($pconfig['mode']) {
case "redirect": {
$reqdfields = explode(" ", "ipaddr name port mode");
- $reqdfieldsn = explode(",", "IP Address, Name, Port, Mode");
+ $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Mode"));
break;
}
case "relay": {
$reqdfields = explode(" ", "ipaddr name port mode relay_protocol");
- $reqdfieldsn = explode(",", "IP Address, Name, Port, Relay Protocol");
+ $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Relay Protocol"));
break;
}
}
@@ -83,22 +83,22 @@ if ($_POST) {
for ($i=0; isset($config['load_balancer']['virtual_server'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['virtual_server'][$i]['name']) && ($i != $id))
- $input_errors[] = "This virtual server name has already been used. Virtual server names must be unique.";
+ $input_errors[] = gettext("This virtual server name has already been used. Virtual server 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_ipaddr($_POST['ipaddr']))
- $input_errors[] = "{$_POST['ipaddr']} is not a valid IP address.";
+ $input_errors[] = sprintf(gettext("%s is not a valid IP address."), $_POST['ipaddr']);
if (!$input_errors) {
$vsent = array();
if(isset($id) && $a_vs[$id])
$vsent = $a_vs[$id];
if($vsent['name'] != "")
- $changedesc .= " modified '{$vsent['name']}' vs:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' vs"), $vsent['name']) . ":";
else
- $changedesc .= " created '{$_POST['name']}' vs:";
+ $changedesc .= " " . sprintf(gettext("created '%s' vs"), $_POST['name']) . ":";
update_if_changed("name", $vsent['name'], $_POST['name']);
update_if_changed("desc", $vsent['desc'], $_POST['desc']);
@@ -128,7 +128,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Virtual Server","Edit");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Virtual Server"),gettext("Edit"));
$statusurl = "status_lb_vs.php";
#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -174,39 +174,39 @@ document.observe("dom:loaded", function() {
<form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="3" valign="top" class="listtopic">Edit Load Balancer - Virtual Server entry</td>
+ <td colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?>size="32" maxlength="32">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">IP Address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="16" maxlength="16">
- <br>This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster.
+ <br><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster"); ?>.
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Port</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"{$pconfig['port']}\"";?> size="16" maxlength="16">
- <br>This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster.
+ <br><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster"); ?>.
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Virtual Server Pool</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Virtual Server Pool"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
- <b>NOTE:</b> Please add a pool on the Pools tab to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a pool on the Pools tab to use this feature"); ?>.
<?php else: ?>
<select id="pool" name="pool">
<?php
@@ -222,13 +222,13 @@ document.observe("dom:loaded", function() {
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Fall Back Pool</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Fall Back Pool"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
- <b>NOTE:</b> Please add a pool on the Pools tab to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a pool on the Pools tab to use this feature"); ?>.
<?php else: ?>
<select id="sitedown" name="sitedown">
- <option value=""<?=$pconfig['sitedown'] == '' ? ' selected' : ''?>>none</option>
+ <option value=""<?=$pconfig['sitedown'] == '' ? ' selected' : ''?>><?=gettext("none"); ?></option>
<?php
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
@@ -238,7 +238,7 @@ document.observe("dom:loaded", function() {
}
?>
</select>
- <br><b>NOTE:</b> This is the server that clients will be redirected to if *ALL* servers in the pool are offline.
+ <br><b><?=gettext("NOTE"); ?>:</b> <?=gettext("This is the server that clients will be redirected to if *ALL* servers in the pool are offline"); ?>.
<?php endif; ?>
</td>
</tr>
@@ -255,7 +255,7 @@ document.observe("dom:loaded", function() {
</tr>
-->
<tr id="relay" align="left" style="display:none;">
- <td width="22%" valign="top" class="vncellreq">Relay Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Relay Protocol"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="relay_protocol" name="relay_protocol">
<?php
@@ -272,8 +272,8 @@ document.observe("dom:loaded", function() {
</tr>
<tr align="left">
<td align="left" valign="bottom">
- <input name="Submit" type="submit" class="formbtn" value="Submit">
- <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -282,7 +282,7 @@ document.observe("dom:loaded", function() {
</table>
</form>
<br/>
- <span class="red"><strong>Note:</strong></span> Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up.
+ <span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up"); ?>.
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/preload.php b/usr/local/www/preload.php
index 0774949..c70d54e 100755
--- a/usr/local/www/preload.php
+++ b/usr/local/www/preload.php
@@ -3,7 +3,7 @@
/* make sure we are coming from 127.0.0.1 */
$ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
if($ip <> "127.0.0.1")
- die("You are not allowed to access this page.");
+ die(gettext("You are not allowed to access this page."));
/* preload */
@@ -63,4 +63,4 @@ include('/usr/local/www/includes/functions.inc.php');
include("fbegin.inc");
include("fend.inc");
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/progress.php b/usr/local/www/progress.php
index 95aae82..839a18e 100755
--- a/usr/local/www/progress.php
+++ b/usr/local/www/progress.php
@@ -22,7 +22,7 @@ $X = upload_progress_meter_get_info( $_GET["UPLOAD_IDENTIFIER"] );
if (!$X) {
if ( array_key_exists( "e", $_GET ) ) {
- echo "<HTML><BODY onLoad='window.close();'>Invalid Meter ID! {$_GET["UPLOAD_IDENTIFIER"]}";
+ echo "<HTML><BODY onLoad='window.close();'>" . gettext("Invalid Meter ID") . "! {$_GET["UPLOAD_IDENTIFIER"]}";
echo ('</BODY></HTML>');
}else{
echo ('<HTML><meta HTTP-EQUIV="Refresh" CONTENT="1; url='. $url .'"><BODY></BODY></HTML>');
@@ -42,7 +42,7 @@ if (!$X) {
$total = nice_value($X['bytes_total']);
if ($X['bytes_total'] > 1 && $X['bytes_uploaded'] >= $X['bytes_total'] && $X['est_sec'] == 0) {
- echo ('<HTML><BODY onLoad="window.close()"> UPLOAD completed!</BODY></HTML>');
+ echo ('<HTML><BODY onLoad="window.close()"> ' . gettext("UPLOAD completed") . '!</BODY></HTML>');
} else {
?>
@@ -52,7 +52,7 @@ if (!$X) {
<meta HTTP-EQUIV="Refresh" CONTENT="1; url=<?=$url?>">
-<TITLE>Uploading Files... Please wait ...</TITLE>
+<TITLE><?=gettext("Uploading Files"); ?>... <?=gettext("Please wait"); ?> ...</TITLE>
<style type='text/css'> td {font-size: 10pt }</style>
@@ -62,7 +62,7 @@ if (!$X) {
<table height="100%" width="100%" cellPadding="4" cellSpacing="4" style="border:1px solid #990000;">
<tr><td>
- <font face="arial"><b><center>Uploading files...</b></center>
+ <font face="arial"><b><center><?=gettext("Uploading files");?>...</b></center>
<br>
@@ -81,17 +81,17 @@ if (!$X) {
<TABLE WIDTH="100%">
<tr>
- <td align="right"><font face="arial"><b>Time Remaining:</td><td><font face="arial"><?=$eta?></td>
- <td align="right"><font face="arial"><b>Speed:</td><td><font face="arial"><font face="arial"><?=$speed?>KB/sec</td>
+ <td align="right"><font face="arial"><b><?=gettext("Time Remaining");?>:</td><td><font face="arial"><?=$eta?></td>
+ <td align="right"><font face="arial"><b><?=gettext("Speed:");?></td><td><font face="arial"><font face="arial"><?=$speed?><?=gettext("KB/sec");?></td>
</tr>
<tr>
- <td align="right"><font face="arial"><b>Uploaded:</td><td><font face="arial"><?=$upl?></td>
- <td align="right"><font face="arial"><b>File Size:</td><td><font face="arial"><?=$total?></td>
+ <td align="right"><font face="arial"><b><?=gettext("Uploaded");?>:</td><td><font face="arial"><?=$upl?></td>
+ <td align="right"><font face="arial"><b><?=gettext("File Size");?>:</td><td><font face="arial"><?=$total?></td>
</tr>
<tr>
- <td align="right"><font face="arial"><b>Completed:</td><td><font face="arial"><?=$meter?>%</td>
+ <td align="right"><font face="arial"><b><?=gettext("Completed");?>:</td><td><font face="arial"><?=$meter?>%</td>
<td align="right"><font face="arial"><b></td><td><font face="arial"></td>
</tr>
diff --git a/usr/local/www/reboot.php b/usr/local/www/reboot.php
index df607a7..07faa19 100755
--- a/usr/local/www/reboot.php
+++ b/usr/local/www/reboot.php
@@ -41,14 +41,14 @@ require("functions.inc");
require("captiveportal.inc");
if ($_POST) {
- if ($_POST['Submit'] == " Yes ") {
- $rebootmsg = "The system is rebooting now. This may take one minute.";
+ if ($_POST['Submit'] == gettext(" Yes ")) {
+ $rebootmsg = gettext("The system is rebooting now. This may take one minute.");
} else {
Header("Location: /");
}
}
-$pgtitle = array("Diagnostics","Reboot System");
+$pgtitle = array(gettext("Diagnostics"),gettext("Reboot System"));
include("head.inc");
?>
@@ -56,10 +56,10 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
<form action="reboot.php" method="post">
- <p><strong>Are you sure you want to reboot the system?</strong></p>
+ <p><strong><?=gettext("Are you sure you want to reboot the system?");?></strong></p>
<p>
- <input name="Submit" type="submit" class="formbtn" value=" Yes ">
- <input name="Submit" type="submit" class="formbtn" value=" No ">
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> ">
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> ">
</p>
</form>
<?php endif; ?>
@@ -69,13 +69,14 @@ include("head.inc");
<?php
if ($_POST) {
- if ($_POST['Submit'] == " Yes ") {
+ $reply = " " . gettext("Yes") . " ";
+ if ($_POST['Submit'] == $reply) {
echo "<meta http-equiv=\"refresh\" content=\"70;url=/\">";
system_reboot();
- $rebootmsg = "The system is rebooting now. This may take one minute.";
+ $rebootmsg = gettext("The system is rebooting now. This may take one minute.");
} else {
exit;
}
}
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/restart_httpd.php b/usr/local/www/restart_httpd.php
index 87fe5a2..b037ac5 100755
--- a/usr/local/www/restart_httpd.php
+++ b/usr/local/www/restart_httpd.php
@@ -39,7 +39,7 @@
require_once("guiconfig.inc");
-$pgtitle = array("Restarting httpd");
+$pgtitle = array(gettext("Restarting httpd"));
include("head.inc");
?>
@@ -47,18 +47,18 @@ include("head.inc");
<form>
<?php include("fbegin.inc"); ?>
-Mounting file systems read/write...
+<?=gettext("Mounting file systems read/write");?>...
<?php flush(); sleep(1); conf_mount_rw(); ?>
-Done.<br>
-Forcing all PHP file permissions to 0755...
+<?=gettext("Done");?>.<br>
+<?=gettext("Forcing all PHP file permissions to 0755");?>...
<?php flush(); sleep(1); system('/bin/chmod -R 0755 /usr/local/www/*.php'); ?>
-Done.<br>
-Mounting file systems read only...
+<?=gettext("Done");?>.<br>
+<?=gettext("Mounting file systems read only");?>...
<?php flush(); sleep(1); conf_mount_ro(); ?>
-Done.<br>
-Restarting mini_httpd...
+<?=gettext("Done");?>.<br>
+<?=gettext("Restarting mini_httpd");?>...
<?php flush(); sleep(1); system_webgui_start(); ?>
-Done.<br>
+<?=gettext("Done");?>.<br>
<?php
include("fend.inc");
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index fc5a1a9..512dbf9 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -38,7 +38,6 @@
##|*MATCH=services_captiveportal.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -48,6 +47,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal'])) {
$config['captiveportal'] = array();
$config['captiveportal']['page'] = array();
@@ -111,60 +112,60 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "cinterface");
- $reqdfieldsn = explode(",", "Interface");
+ $reqdfieldsn = array(gettext("Interface"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* make sure no interfaces are bridged */
foreach ($pconfig['cinterface'] as $cpbrif)
if (link_interface_to_bridge($cpbrif))
- $input_errors[] = "The captive portal cannot be used on interface {$cpbrif} since it is part of a bridge.";
+ $input_errors[] = sprintf(gettext("The captive portal cannot be used on interface %s since it is part of a bridge."), $cpbrif);
if ($_POST['httpslogin_enable']) {
if (!$_POST['cert'] || !$_POST['key']) {
- $input_errors[] = "Certificate and key must be specified for HTTPS login.";
+ $input_errors[] = gettext("Certificate and key must be specified for HTTPS login.");
} else {
if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))
- $input_errors[] = "This certificate does not appear to be valid.";
+ $input_errors[] = gettext("This certificate does not appear to be valid.");
if (!strstr($_POST['cacert'], "BEGIN CERTIFICATE") || !strstr($_POST['cacert'], "END CERTIFICATE"))
- $input_errors[] = "This intermmediate certificate does not appear to be valid.";
+ $input_errors[] = gettext("This intermmediate certificate does not appear to be valid.");
if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
- $input_errors[] = "This key does not appear to be valid.";
+ $input_errors[] = gettext("This key does not appear to be valid.");
}
if (!$_POST['httpsname'] || !is_domain($_POST['httpsname'])) {
- $input_errors[] = "The HTTPS server name must be specified for HTTPS login.";
+ $input_errors[] = gettext("The HTTPS server name must be specified for HTTPS login.");
}
}
}
if ($_POST['timeout'] && (!is_numeric($_POST['timeout']) || ($_POST['timeout'] < 1))) {
- $input_errors[] = "The timeout must be at least 1 minute.";
+ $input_errors[] = gettext("The timeout must be at least 1 minute.");
}
if ($_POST['idletimeout'] && (!is_numeric($_POST['idletimeout']) || ($_POST['idletimeout'] < 1))) {
- $input_errors[] = "The idle timeout must be at least 1 minute.";
+ $input_errors[] = gettext("The idle timeout must be at least 1 minute.");
}
if (($_POST['radiusip'] && !is_ipaddr($_POST['radiusip']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['radiusip']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip']);
}
if (($_POST['radiusip2'] && !is_ipaddr($_POST['radiusip2']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['radiusip2']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip2']);
}
if (($_POST['radiusport'] && !is_port($_POST['radiusport']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusport']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport']);
}
if (($_POST['radiusport2'] && !is_port($_POST['radiusport2']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusport2']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport2']);
}
if (($_POST['radiusacctport'] && !is_port($_POST['radiusacctport']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusacctport']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusacctport']);
}
if ($_POST['maxproc'] && (!is_numeric($_POST['maxproc']) || ($_POST['maxproc'] < 4) || ($_POST['maxproc'] > 100))) {
- $input_errors[] = "The total maximum number of concurrent connections must be between 4 and 100.";
+ $input_errors[] = gettext("The total maximum number of concurrent connections must be between 4 and 100.");
}
$mymaxproc = $_POST['maxproc'] ? $_POST['maxproc'] : 16;
if ($_POST['maxprocperip'] && (!is_numeric($_POST['maxprocperip']) || ($_POST['maxprocperip'] > $mymaxproc))) {
- $input_errors[] = "The maximum number of concurrent connections per client IP address may not be larger than the global maximum.";
+ $input_errors[] = gettext("The maximum number of concurrent connections per client IP address may not be larger than the global maximum.");
}
if (!$input_errors) {
@@ -289,11 +290,11 @@ function enable_change(enable_change) {
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", true, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), true, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
@@ -303,10 +304,10 @@ function enable_change(enable_change) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable captive portal </strong></td>
+ <strong><?=gettext("Enable captive portal"); ?> </strong></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interfaces</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interfaces"); ?></td>
<td width="78%" class="vtable">
<select name="cinterface[]" multiple="true" size="<?php echo count($config['interfaces']); ?>" class="formselect" id="cinterface">
<?php
@@ -317,113 +318,113 @@ function enable_change(enable_change) {
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Select the interface(s) to enable for captive portal.</span></td>
+ <span class="vexpl"><?=gettext("Select the interface(s) to enable for captive portal"); ?>.</span></td>
</tr>
<tr>
- <td valign="top" class="vncell">Maximum concurrent connections</td>
+ <td valign="top" class="vncell"><?=gettext("Maximum concurrent connections"); ?></td>
<td class="vtable">
<table cellpadding="0" cellspacing="0">
<tr>
<td><input name="maxprocperip" type="text" class="formfld unknown" id="maxprocperip" size="5"
-value="<?=htmlspecialchars($pconfig['maxprocperip']);?>"> per client IP address (0 = no limit)</td>
+value="<?=htmlspecialchars($pconfig['maxprocperip']);?>"> <?=gettext("per client IP address (0 = no limit)"); ?></td>
</tr>
</table>
-This setting limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in
-to the captive portal, but rather how many users can load the portal page or authenticate at the same time!
-Default is 4 connections per client IP address, with a total maximum of 16 connections.</td>
+<?=gettext("This setting limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in " .
+"to the captive portal, but rather how many users can load the portal page or authenticate at the same time! " .
+"Default is 4 connections per client IP address, with a total maximum of 16 connections"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Idle timeout</td>
+ <td valign="top" class="vncell"><?=gettext("Idle timeout"); ?></td>
<td class="vtable">
<input name="idletimeout" type="text" class="formfld unknown" id="idletimeout" size="6" value="<?=htmlspecialchars($pconfig['idletimeout']);?>">
-minutes<br>
-Clients will be disconnected after this amount of inactivity. They may log in again immediately, though. Leave this field blank for no idle timeout.</td>
+<?=gettext("minutes"); ?><br>
+<?=gettext("Clients will be disconnected after this amount of inactivity. They may log in again immediately, though. Leave this field blank for no idle timeout"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hard timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hard timeout"); ?></td>
<td width="78%" class="vtable">
<input name="timeout" type="text" class="formfld unknown" id="timeout" size="6" value="<?=htmlspecialchars($pconfig['timeout']);?>">
- minutes<br>
- Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set).</td>
+ <?=gettext("minutes"); ?><br>
+ <?=gettext("Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set)"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Logout popup window</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Logout popup window"); ?></td>
<td width="78%" class="vtable">
<input name="logoutwin_enable" type="checkbox" class="formfld" id="logoutwin_enable" value="yes" <?php if($pconfig['logoutwin_enable']) echo "checked"; ?>>
- <strong>Enable logout popup window</strong><br>
- If enabled, a popup window will appear when clients are allowed through the captive portal. This allows clients to explicitly disconnect themselves before the idle or hard timeout occurs.</td>
+ <strong><?=gettext("Enable logout popup window"); ?></strong><br>
+ <?=gettext("If enabled, a popup window will appear when clients are allowed through the captive portal. This allows clients to explicitly disconnect themselves before the idle or hard timeout occurs"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Redirection URL</td>
+ <td valign="top" class="vncell"><?=gettext("Redirection URL"); ?></td>
<td class="vtable">
<input name="redirurl" type="text" class="formfld url" id="redirurl" size="60" value="<?=htmlspecialchars($pconfig['redirurl']);?>">
<br>
-If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried
-to access after they've authenticated.</td>
+<?=gettext("If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried " .
+"to access after they've authenticated"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Concurrent user logins</td>
+ <td valign="top" class="vncell"><?=gettext("Concurrent user logins"); ?></td>
<td class="vtable">
<input name="noconcurrentlogins" type="checkbox" class="formfld" id="noconcurrentlogins" value="yes" <?php if ($pconfig['noconcurrentlogins']) echo "checked"; ?>>
- <strong>Disable concurrent logins</strong><br>
- If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected.</td>
+ <strong><?=gettext("Disable concurrent logins"); ?></strong><br>
+ <?=gettext("If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">MAC filtering </td>
+ <td valign="top" class="vncell"><?=gettext("MAC filtering"); ?> </td>
<td class="vtable">
<input name="nomacfilter" type="checkbox" class="formfld" id="nomacfilter" value="yes" <?php if ($pconfig['nomacfilter']) echo "checked"; ?>>
- <strong>Disable MAC filtering</strong><br>
- If this option is set, no attempts will be made to ensure that the MAC address of clients stays the same while they're logged in.
- This is required when the MAC address of the client cannot be determined (usually because there are routers between <?php echo $g['product_name'] ?> and the clients).
- If this is enabled, RADIUS MAC authentication cannot be used.</td>
+ <strong><?=gettext("Disable MAC filtering"); ?></strong><br>
+ <?=gettext("If this option is set, no attempts will be made to ensure that the MAC address of clients stays the same while they're logged in." .
+ "This is required when the MAC address of the client cannot be determined (usually because there are routers between"); ?> <?php echo $g['product_name'] ?> <?=gettext("and the clients)"); ?>.
+ <?=gettext("If this is enabled, RADIUS MAC authentication cannot be used"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Pass-through MAC Auto Entry</td>
+ <td valign="top" class="vncell"><?=gettext("Pass-through MAC Auto Entry"); ?></td>
<td class="vtable">
<input name="passthrumacadd" type="checkbox" class="formfld" id="passthrumacadd" value="yes" <?php if ($pconfig['passthrumacadd']) echo "checked"; ?>>
- <strong>Enable Pass-through MAC automatic additions</strong><br>
- If this option is set, a MAC passthrough entry is automatically added after the user has successfully authenticated. Users of that MAC address will never have to authenticate again.
- To remove the passthrough MAC entry you either have to log in and remove it manually from the <a href="services_captiveportal_mac.php">Pass-through MAC tab</a> or send a POST from another system to remove it.
- If this is enabled, RADIUS MAC authentication cannot be used. Also, the logout window will not be shown.
+ <strong><?=gettext("Enable Pass-through MAC automatic additions"); ?></strong><br>
+ <?=gettext("If this option is set, a MAC passthrough entry is automatically added after the user has successfully authenticated. Users of that MAC address will never have to authenticate again"); ?>.
+ <?=gettext("To remove the passthrough MAC entry you either have to log in and remove it manually from the"); ?> <a href="services_captiveportal_mac.php">Pass-through MAC tab</a> <?=gettext("or send a POST from another system to remove it"); ?>.
+ <?=gettext("If this is enabled, RADIUS MAC authentication cannot be used. Also, the logout window will not be shown"); ?>.
<br/><br/>
<input name="passthrumacaddusername" type="checkbox" class="formfld" id="passthrumacaddusername" value="yes" <?php if ($pconfig['passthrumacaddusername']) echo "checked"; ?>>
- <strong>Enable Pass-through MAC automatic addition with username</strong><br>
- If this option is set, with the automatically MAC passthrough entry created the username, used during authentication, will be saved.
- To remove the passthrough MAC entry you either have to log in and remove it manually from the <a href="services_captiveportal_mac.php">Pass-through MAC tab</a> or send a POST from another system to remove it.
+ <strong><?=gettext("Enable Pass-through MAC automatic addition with username"); ?></strong><br>
+ <?=gettext("If this option is set, with the automatically MAC passthrough entry created the username, used during authentication, will be saved"); ?>.
+ <?=gettext("To remove the passthrough MAC entry you either have to log in and remove it manually from the"); ?> <a href="services_captiveportal_mac.php"><?=gettext("Pass-through MAC tab"); ?></a> <?=gettext("or send a POST from another system to remove it"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Per-user bandwidth restriction</td>
+ <td valign="top" class="vncell"><?=gettext("Per-user bandwidth restriction"); ?></td>
<td class="vtable">
<input name="peruserbw" type="checkbox" class="formfld" id="peruserbw" value="yes" <?php if ($pconfig['peruserbw']) echo "checked"; ?>>
- <strong>Enable per-user bandwidth restriction</strong><br><br>
+ <strong><?=gettext("Enable per-user bandwidth restriction"); ?></strong><br><br>
<table cellpadding="0" cellspacing="0">
<tr>
- <td>Default download</td>
- <td><input type="text" class="formfld unknown" name="bwdefaultdn" id="bwdefaultdn" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultdn']);?>"> Kbit/s</td>
+ <td><?=gettext("Default download"); ?></td>
+ <td><input type="text" class="formfld unknown" name="bwdefaultdn" id="bwdefaultdn" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultdn']);?>"> <?=gettext("Kbit/s"); ?></td>
</tr>
<tr>
- <td>Default upload</td>
- <td><input type="text" class="formfld unknown" name="bwdefaultup" id="bwdefaultup" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultup']);?>"> Kbit/s</td>
+ <td><?=gettext("Default upload"); ?></td>
+ <td><input type="text" class="formfld unknown" name="bwdefaultup" id="bwdefaultup" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultup']);?>"> <?=gettext("Kbit/s"); ?></td>
</tr></table>
<br>
- If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit. </td>
+ <?=gettext("If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit"); ?>. </td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?></td>
<td width="78%" class="vtable">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="none" onClick="enable_change(false)" <?php if($pconfig['auth_method']!="local" && $pconfig['auth_method']!="radius") echo "checked"; ?>>
- No Authentication</td>
+ <?=gettext("No Authentication"); ?></td>
</tr>
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="local" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="local") echo "checked"; ?>>
- Local <a href="system_usermanager.php">User Manager</a></td>
+ <?=gettext("Local"); ?> <a href="system_usermanager.php"><?=gettext("User Manager"); ?></a></td>
</tr>
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="radius" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius") echo "checked"; ?>>
- RADIUS Authentication</td>
+ <?=gettext("RADIUS Authentication"); ?></td>
</tr><tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
@@ -431,40 +432,40 @@ to access after they've authenticated.</td>
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Primary RADIUS server</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Primary RADIUS server"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">IP address</td>
+ <td class="vncell" valign="top"><?=gettext("IP address"); ?></td>
<td class="vtable"><input name="radiusip" type="text" class="formfld unknown" id="radiusip" size="20" value="<?=htmlspecialchars($pconfig['radiusip']);?>"><br>
- Enter the IP address of the RADIUS server which users of the captive portal have to authenticate against.</td>
+ <?=gettext("Enter the IP address of the RADIUS server which users of the captive portal have to authenticate against"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Port</td>
+ <td class="vncell" valign="top"><?=gettext("Port"); ?></td>
<td class="vtable"><input name="radiusport" type="text" class="formfld unknown" id="radiusport" size="5" value="<?=htmlspecialchars($pconfig['radiusport']);?>"><br>
- Leave this field blank to use the default port (1812).</td>
+ <?=gettext("Leave this field blank to use the default port (1812)"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Shared secret&nbsp;&nbsp;</td>
+ <td class="vncell" valign="top"><?=gettext("Shared secret"); ?>&nbsp;&nbsp;</td>
<td class="vtable"><input name="radiuskey" type="text" class="formfld unknown" id="radiuskey" size="16" value="<?=htmlspecialchars($pconfig['radiuskey']);?>"><br>
- Leave this field blank to not use a RADIUS shared secret (not recommended).</td>
+ <?=gettext("Leave this field blank to not use a RADIUS shared secret (not recommended)"); ?>.</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Secondary RADIUS server</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Secondary RADIUS server"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">IP address</td>
+ <td class="vncell" valign="top"><?=gettext("IP address"); ?></td>
<td class="vtable"><input name="radiusip2" type="text" class="formfld unknown" id="radiusip2" size="20" value="<?=htmlspecialchars($pconfig['radiusip2']);?>"><br>
- If you have a second RADIUS server, you can activate it by entering its IP address here.</td>
+ <?=gettext("If you have a second RADIUS server, you can activate it by entering its IP address here"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Port</td>
+ <td class="vncell" valign="top"><?=gettext("Port"); ?></td>
<td class="vtable"><input name="radiusport2" type="text" class="formfld unknown" id="radiusport2" size="5" value="<?=htmlspecialchars($pconfig['radiusport2']);?>"></td>
</tr>
<tr>
- <td class="vncell" valign="top">Shared secret&nbsp;&nbsp;</td>
+ <td class="vncell" valign="top"><?=gettext("Shared secret"); ?>&nbsp;&nbsp;</td>
<td class="vtable"><input name="radiuskey2" type="text" class="formfld unknown" id="radiuskey2" size="16"
value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
</tr>
@@ -472,66 +473,66 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Accounting</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Accounting"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable"><input name="radacct_enable" type="checkbox" id="radacct_enable" value="yes" onClick="enable_change(false)" <?php if($pconfig['radacct_enable']) echo "checked"; ?>>
- <strong>send RADIUS accounting packets</strong><br>
- If this is enabled, RADIUS accounting packets will be sent to the primary RADIUS server.</td>
+ <strong><?=gettext("send RADIUS accounting packets"); ?></strong><br>
+ <?=gettext("If this is enabled, RADIUS accounting packets will be sent to the primary RADIUS server"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Accounting port</td>
+ <td class="vncell" valign="top"><?=gettext("Accounting port"); ?></td>
<td class="vtable"><input name="radiusacctport" type="text" class="formfld unknown" id="radiusacctport" size="5" value="<?=htmlspecialchars($pconfig['radiusacctport']);?>"><br>
- Leave blank to use the default port (1813).</td>
+ <?=gettext("Leave blank to use the default port (1813)"); ?>.</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Reauthentication</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Reauthentication"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable"><input name="reauthenticate" type="checkbox" id="reauthenticate" value="yes" onClick="enable_change(false)" <?php if($pconfig['reauthenticate']) echo "checked"; ?>>
- <strong>Reauthenticate connected users every minute</strong><br>
- If reauthentication is enabled, Access-Requests will be sent to the RADIUS server for each user that is
- logged in every minute. If an Access-Reject is received for a user, that user is disconnected from the captive portal immediately.</td>
+ <strong><?=gettext("Reauthenticate connected users every minute"); ?></strong><br>
+ <?=gettext("If reauthentication is enabled, Access-Requests will be sent to the RADIUS server for each user that is " .
+ "logged in every minute. If an Access-Reject is received for a user, that user is disconnected from the captive portal immediately"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Accounting updates</td>
+ <td class="vncell" valign="top"><?=gettext("Accounting updates"); ?></td>
<td class="vtable">
- <input name="reauthenticateacct" type="radio" value="" <?php if(!$pconfig['reauthenticateacct']) echo "checked"; ?>> no accounting updates<br>
- <input name="reauthenticateacct" type="radio" value="stopstart" <?php if($pconfig['reauthenticateacct'] == "stopstart") echo "checked"; ?>> stop/start accounting<br>
- <input name="reauthenticateacct" type="radio" value="interimupdate" <?php if($pconfig['reauthenticateacct'] == "interimupdate") echo "checked"; ?>> interim update
+ <input name="reauthenticateacct" type="radio" value="" <?php if(!$pconfig['reauthenticateacct']) echo "checked"; ?>> <?=gettext("no accounting updates"); ?><br>
+ <input name="reauthenticateacct" type="radio" value="stopstart" <?php if($pconfig['reauthenticateacct'] == "stopstart") echo "checked"; ?>> <?=gettext("stop/start accounting"); ?><br>
+ <input name="reauthenticateacct" type="radio" value="interimupdate" <?php if($pconfig['reauthenticateacct'] == "interimupdate") echo "checked"; ?>> <?=gettext("interim update"); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">RADIUS MAC authentication</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("RADIUS MAC authentication"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable">
- <input name="radmac_enable" type="checkbox" id="radmac_enable" value="yes" onClick="enable_change(false)" <?php if ($pconfig['radmac_enable']) echo "checked"; ?>><strong>Enable RADIUS MAC authentication</strong><br>
- If this option is enabled, the captive portal will try to authenticate users by sending their MAC address as the username and the password
- entered below to the RADIUS server.</td>
+ <input name="radmac_enable" type="checkbox" id="radmac_enable" value="yes" onClick="enable_change(false)" <?php if ($pconfig['radmac_enable']) echo "checked"; ?>><strong><?=gettext("Enable RADIUS MAC authentication"); ?></strong><br>
+ <?=gettext("If this option is enabled, the captive portal will try to authenticate users by sending their MAC address as the username and the password " .
+ "entered below to the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td class="vncell">Shared secret</td>
+ <td class="vncell"><?=gettext("Shared secret"); ?></td>
<td class="vtable"><input name="radmac_secret" type="text" class="formfld unknown" id="radmac_secret" size="16" value="<?=htmlspecialchars($pconfig['radmac_secret']);?>"></td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">RADIUS options</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("RADIUS options"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">Radius ip attribute</td>
+ <td class="vncell" valign="top"><?=gettext("Radius ip attribute"); ?></td>
<td>
<select name="radiussrcip_attribute" id="radiussrcip_attribute">
<?php $iflist = get_configured_interface_with_descr();
@@ -561,20 +562,20 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
</select><br/>
- Choose the ip to use for calling station attribute.
+ <?=gettext("Choose the ip to use for calling station attribute"); ?>.
</td>
</tr>
<tr>
- <td class="vncell" valign="top">Session-Timeout</td>
- <td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked"; ?>><strong>Use RADIUS Session-Timeout attributes</strong><br>
- When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute.</td>
+ <td class="vncell" valign="top"><?=gettext("Session-Timeout"); ?></td>
+ <td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked"; ?>><strong><?=gettext("Use RADIUS Session-Timeout attributes"); ?></strong><br>
+ <?=gettext("When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Type</td>
+ <td class="vncell" valign="top"><?=gettext("Type"); ?></td>
<td class="vtable"><select name="radiusvendor" id="radiusvendor">
- <option>default</option>
+ <option><?=gettext("default"); ?></option>
<?php
$radiusvendors = array("cisco");
foreach ($radiusvendors as $radiusvendor){
@@ -584,18 +585,18 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
echo "<option value=\"$radiusvendor\">$radiusvendor</option>\n";
}
?></select><br>
- If RADIUS type is set to Cisco, in Access-Requests the value of Calling-Station-Id will be set to the client's IP address and
- the Called-Station-Id to the client's MAC address. Default behavior is Calling-Station-Id = client's MAC address and Called-Station-Id = <?=$g['product_name']?>'s WAN IP address.</td>
+ <?=gettext("If RADIUS type is set to Cisco, in Access-Requests the value of Calling-Station-Id will be set to the client's IP address and " .
+ "the Called-Station-Id to the client's MAC address. Default behavior is Calling-Station-Id = client's MAC address and Called-Station-Id"); ?> = <?=$g['product_name']?>'s <?=gettext("WAN IP address"); ?>.</td>
</tr>
</table>
</tr>
<tr>
- <td class="vncell" valign="top">MAC address format</td>
+ <td class="vncell" valign="top"><?=gettext("MAC address format"); ?></td>
<td class="vtable">
<select name="radmac_format" id="radmac_format">
- <option>default</option>
+ <option><?=gettext("default"); ?></option>
<?php
- $macformats = array("singledash","ietf","cisco","unformatted");
+ $macformats = array(gettext("singledash"),gettext("ietf"),gettext("cisco"),gettext("unformatted"));
foreach ($macformats as $macformat) {
if ($pconfig['radmac_format'] == $macformat)
echo "<option selected value=\"$macformat\">$macformat</option>\n";
@@ -604,50 +605,50 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
</select></br>
- This option changes the MAC address format used in the whole RADIUS system. Change this if you also
- need to change the username format for RADIUS MAC authentication.<br>
- default: 00:11:22:33:44:55<br>
- singledash: 001122-334455<br>
- ietf: 00-11-22-33-44-55<br>
- cisco: 0011.2233.4455<br>
- unformatted: 001122334455
+ <?=getetxt("This option changes the MAC address format used in the whole RADIUS system. Change this if you also " .
+ "need to change the username format for RADIUS MAC authentication"); ?>.<br>
+ <?=gettext("default"); ?>: 00:11:22:33:44:55<br>
+ <?=gettext("singledash"); ?>: 001122-334455<br>
+ <?=gettext("ietf"); ?>: 00-11-22-33-44-55<br>
+ <?=gettext("cisco"); ?>: 0011.2233.4455<br>
+ <?=gettext("unformatted"); ?>: 001122334455
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS login</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS login"); ?></td>
<td class="vtable">
<input name="httpslogin_enable" type="checkbox" class="formfld" id="httpslogin_enable" value="yes" <?php if($pconfig['httpslogin_enable']) echo "checked"; ?>>
- <strong>Enable HTTPS login</strong><br>
- If enabled, the username and password will be transmitted over an HTTPS connection to protect against eavesdroppers. A server name, certificate and matching private key must also be specified below.</td>
+ <strong><?=gettext("Enable HTTPS login"); ?></strong><br>
+ <?=gettext("If enabled, the username and password will be transmitted over an HTTPS connection to protect against eavesdroppers. A server name, certificate and matching private key must also be specified below"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS server name </td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS server name"); ?> </td>
<td class="vtable">
<input name="httpsname" type="text" class="formfld unknown" id="httpsname" size="30" value="<?=htmlspecialchars($pconfig['httpsname']);?>"><br>
- This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on <?=$g['product_name']?>. </td>
+ <?=gettext("This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on"); ?> <?=$g['product_name']?>. </td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS certificate</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS certificate"); ?></td>
<td class="vtable">
<textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
<br>
- Paste a signed certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a signed certificate in X.509 PEM format here"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS private key</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS private key"); ?></td>
<td class="vtable">
<textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
<br>
- Paste an RSA private key in PEM format here.</td>
+ <?=gettext("Paste an RSA private key in PEM format here"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS intermediate certificate</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS intermediate certificate"); ?></td>
<td class="vtable">
<textarea name="cacert" cols="65" rows="7" id="cacert" class="formpre"><?=htmlspecialchars($pconfig['cacert']);?></textarea>
<br>
- Paste a certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a certificate in X.509 PEM format here"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Portal page contents</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Portal page contents"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input type="file" name="htmlfile" class="formfld file" id="htmlfile"><br>
<?php
@@ -659,14 +660,14 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
<?php if ($config['captiveportal']['page']['htmltext']): ?>
- <a href="<?=$href?>" target="_new">View current page</a>
+ <a href="<?=$href?>" target="_new"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
- Upload an HTML/PHP file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to &quot;$PORTAL_ACTION$&quot;)
-with a submit button (name=&quot;accept&quot;) and a hidden field with name=&quot;redirurl&quot; and value=&quot;$PORTAL_REDIRURL$&quot;.
-Include the &quot;auth_user&quot; and &quot;auth_pass&quot; and/or &quot;auth_voucher&quot; input fields if authentication is enabled, otherwise it will always fail.
-Example code for the form:<br>
+ <?=gettext("Upload an HTML/PHP file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to"); ?> &quot;$PORTAL_ACTION$&quot;)
+<?=gettext("with a submit button"); ?> (name=&quot;accept&quot;) <?=gettext("and a hidden field with"); ?> name=&quot;redirurl&quot; <?=gettext("and"); ?> value=&quot;$PORTAL_REDIRURL$&quot;.
+<?=gettext("Include the"); ?> &quot;auth_user&quot; <?=gettext("and"); ?> &quot;auth_pass&quot; <?=gettext("and/or"); ?> &quot;auth_voucher&quot; <?=gettext("input fields if authentication is enabled, otherwise it will always fail"); ?>.
+<?=gettext("Example code for the form"); ?>:<br>
<br>
<tt>&lt;form method=&quot;post&quot; action=&quot;$PORTAL_ACTION$&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&lt;input name=&quot;auth_user&quot; type=&quot;text&quot;&gt;<br>
@@ -677,43 +678,43 @@ Example code for the form:<br>
&lt;/form&gt;</tt></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication<br>
- error page<br>
- contents</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?><br>
+ <?=gettext("error page"); ?><br>
+ <?=gettext("contents"); ?></td>
<td class="vtable">
<input name="errfile" type="file" class="formfld file" id="errfile"><br>
<?php if ($config['captiveportal']['page']['errtext']): ?>
- <a href="?act=viewerrhtml" target="_blank">View current page</a>
+ <a href="?act=viewerrhtml" target="_blank"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
-The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs.
-You may include &quot;$PORTAL_MESSAGE$&quot;, which will be replaced by the error or reply messages from the RADIUS server, if any.</td>
+<?=gettext("The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs. " .
+"You may include"); ?> &quot;$PORTAL_MESSAGE$&quot;, <?=gettext("which will be replaced by the error or reply messages from the RADIUS server, if any"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Logout<br>
- page<br>
- contents</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Logout"); ?><br>
+ <?=gettext("page"); ?><br>
+ <?=gettext("contents"); ?></td>
<td class="vtable">
<input name="logoutfile" type="file" class="formfld file" id="logoutfile"><br>
<?php if ($config['captiveportal']['page']['logouttext']): ?>
- <a href="?act=viewlogouthtml" target="_blank">View current page</a>
+ <a href="?act=viewlogouthtml" target="_blank"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
-The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs.
-You may include &quot;$PORTAL_MESSAGE$&quot;, which will be replaced by the error or reply messages from the RADIUS server, if any.</td>
+<?=gettext("The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs. " .
+"You may include"); ?> &quot;$PORTAL_MESSAGE$&quot;, <?=gettext("which will be replaced by the error or reply messages from the RADIUS server, if any"); ?>.</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>Changing any settings on this page will disconnect all clients! Don't forget to enable the DHCP server on your captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page. Also, the DNS forwarder needs to be enabled for DNS lookups by unauthenticated clients to work. </span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("Changing any settings on this page will disconnect all clients! Don't forget to enable the DHCP server on your captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page. Also, the DNS forwarder needs to be enabled for DNS lookups by unauthenticated clients to work"); ?>. </span></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php
index efef6b7..9e99395 100755
--- a/usr/local/www/services_captiveportal_filemanager.php
+++ b/usr/local/www/services_captiveportal_filemanager.php
@@ -49,7 +49,6 @@ function cpelements_sort() {
usort($config['captiveportal']['element'],"cpelementscmp");
}
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -60,6 +59,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['element']))
$config['captiveportal']['element'] = array();
@@ -85,14 +86,14 @@ if ($_POST) {
// is there already a file with that name?
foreach ($a_element as $element) {
if ($element['name'] == $name) {
- $input_errors[] = "A file with the name '$name' already exists.";
+ $input_errors[] = sprintf(gettext("A file with the name '%s' already exists."), $name);
break;
}
}
// check total file size
if (($total_size + $size) > $g['captiveportal_element_sizelimit']) {
- $input_errors[] = "The total size of all files uploaded may not exceed " .
+ $input_errors[] = gettext("The total size of all files uploaded may not exceed ") .
format_bytes($g['captiveportal_element_sizelimit']) . ".";
}
@@ -135,24 +136,24 @@ include("head.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", true, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), true, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
<td class="tabcont">
<table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="70%" class="listhdrr">Name</td>
- <td width="20%" class="listhdr">Size</td>
+ <td width="70%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="20%" class="listhdr"><?=gettext("Size"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add file" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add file"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -162,14 +163,14 @@ include("head.inc");
<td class="listlr"><?=htmlspecialchars($element['name']);?></td>
<td class="listr" align="right"><?=format_bytes($element['size']);?></td>
<td valign="middle" nowrap class="list">
- <a href="services_captiveportal_filemanager.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this file?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete file" width="17" height="17" border="0"></a>
+ <a href="services_captiveportal_filemanager.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this file?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete file"); ?>" width="17" height="17" border="0"></a>
</td>
</tr>
<?php $i++; endforeach; ?>
<?php if (count($a_element) > 0): ?>
<tr>
- <td class="listlr" style="background-color: #eee"><strong>TOTAL</strong></td>
+ <td class="listlr" style="background-color: #eee"><strong><?=gettext("TOTAL"); ?></strong></td>
<td class="listr" style="background-color: #eee" align="right"><strong><?=format_bytes($total_size);?></strong></td>
<td valign="middle" nowrap class="list"></td>
</tr>
@@ -178,9 +179,9 @@ include("head.inc");
<?php if ($_GET['act'] == 'add'): ?>
<tr>
<td class="listlr" colspan="2"><input type="file" name="new" class="formfld file" size="40" id="new">
- <input name="Submit" type="submit" class="formbtn" value="Upload"></td>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Upload"); ?>"></td>
<td valign="middle" nowrap class="list">
- <a href="services_captiveportal_filemanager.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="cancel" width="17" height="17" border="0"></a>
+ <a href="services_captiveportal_filemanager.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("cancel"); ?>" width="17" height="17" border="0"></a>
</td>
</tr>
<?php else: ?>
@@ -190,7 +191,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add file" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add file"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -198,21 +199,21 @@ include("head.inc");
<?php endif; ?>
</table>
<span class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Any files that you upload here with the filename prefix of captiveportal- will
- be made available in the root directory of the captive portal HTTP(S) server.
- You may reference them directly from your portal page HTML code using relative paths.
- Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the
- file manager. Then you can include it in your portal page like this:<br><br>
+ <?=gettext("Any files that you upload here with the filename prefix of captiveportal- will " .
+ "be made available in the root directory of the captive portal HTTP(S) server. " .
+ "You may reference them directly from your portal page HTML code using relative paths. " .
+ "Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the " .
+ "file manager. Then you can include it in your portal page like this"); ?>:<br><br>
<tt>&lt;img src=&quot;captiveportal-test.jpg&quot; width=... height=...&gt;</tt>
<br><br>
- In addition, you can also upload .php files for execution. You can pass the filename
- to your custom page from the initial page by using text similar to:
+ <?=gettext("In addition, you can also upload .php files for execution. You can pass the filename " .
+ "to your custom page from the initial page by using text similar to"); ?>:
<br><br>
- <tt>&lt;a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$"&gt;Acceptable usage policy&lt/a&gt;</tt>
+ <tt>&lt;a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$"&gt;<?=gettext("Acceptable usage policy"); ?>&lt/a&gt;</tt>
<br><br>
- The total size limit for all files is <?=format_bytes($g['captiveportal_element_sizelimit']);?>.</span>
+ <?=gettext("The total size limit for all files is"); ?> <?=format_bytes($g['captiveportal_element_sizelimit']);?>.</span>
</td>
</tr>
</table>
diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php
index 171f583..cefd866 100755
--- a/usr/local/www/services_captiveportal_ip.php
+++ b/usr/local/www/services_captiveportal_ip.php
@@ -39,7 +39,6 @@
##|*MATCH=services_captiveportal_ip.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -49,6 +48,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['allowedip']))
$config['captiveportal']['allowedip'] = array();
@@ -89,11 +90,11 @@ include("head.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", true, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), true, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -101,13 +102,13 @@ include("head.inc");
<td class="tabcont">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">IP address</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("IP address"); ?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add address" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -136,8 +137,8 @@ include("head.inc");
<td class="listbg">
<?=htmlspecialchars($ip['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list"> <a href="services_captiveportal_ip_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="edit address" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_captiveportal_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this address?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete address" width="17" height="17" border="0"></a></td>
+ <td valign="middle" nowrap class="list"> <a href="services_captiveportal_ip_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit address"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="services_captiveportal_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this address?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -146,27 +147,27 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add address" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example. By specifying <em>from</em> addresses, it may be used to always allow pass-through access from a client behind the captive portal.</p>
+ <?=gettext("Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example. By specifying"); ?> <em><?=gettext("from"); ?></em> <?=gettext("addresses, it may be used to always allow pass-through access from a client behind the captive portal"); ?>.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><span class="vexpl">any <img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"> x.x.x.x </span></td>
- <td><span class="vexpl">All connections <strong>to</strong> the IP address are allowed</span></td>
+ <td><span class="vexpl"><?=gettext("any"); ?> <img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"> x.x.x.x </span></td>
+ <td><span class="vexpl"><?=gettext("All connections"); ?> <strong>to</strong> <?=gettext("the IP address are allowed"); ?></span></td>
</tr>
<tr>
<td colspan="5" height="4"></td>
</tr>
<tr>
- <td>x.x.x.x <span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"></span> any&nbsp;&nbsp;&nbsp; </td>
- <td><span class="vexpl">All connections <strong>from</strong> the IP address are allowed </span></td>
+ <td>x.x.x.x <span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"></span> <?=gettext("any"); ?>&nbsp;&nbsp;&nbsp; </td>
+ <td><span class="vexpl"><?=gettext("All connections"); ?> <strong><?=gettext("from"); ?></strong> <?=gettext("the IP address are allowed"); ?> </span></td>
</tr>
<tr>
<td><span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_pass.gif" width="11" height="11" align="right"></span>&nbsp;&nbsp;&nbsp;&nbsp; </td>
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php
index e6eab55..779ddd3 100755
--- a/usr/local/www/services_captiveportal_ip_edit.php
+++ b/usr/local/www/services_captiveportal_ip_edit.php
@@ -49,7 +49,6 @@ function allowedips_sort() {
usort($config['captiveportal']['allowedip'],"allowedipscmp");
}
-$pgtitle = array("Services","Captive portal","Edit allowed IP address");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -59,6 +58,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit allowed IP address"));
+
if (!is_array($config['captiveportal']['allowedip']))
$config['captiveportal']['allowedip'] = array();
@@ -84,24 +85,24 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "ip");
- $reqdfieldsn = explode(",", "Allowed IP address");
+ $reqdfieldsn = array(gettext("Allowed IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['ip']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['ip']);
}
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
- $input_errors[] = "Upload speed needs to be an integer";
+ $input_errors[] = gettext("Upload speed needs to be an integer");
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down']))
- $input_errors[] = "Download speed needs to be an integer";
+ $input_errors[] = gettext("Download speed needs to be an integer");
foreach ($a_allowedips as $ipent) {
if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent))
continue;
if ($ipent['ip'] == $_POST['ip']){
- $input_errors[] = "[" . $_POST['ip'] . "] already allowed." ;
+ $input_errors[] = sprintf("[%s] %s.", $_POST['ip'], gettext("already allowed")) ;
break ;
}
}
@@ -155,11 +156,11 @@ include("head.inc");
<form action="services_captiveportal_ip_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Direction</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
<td width="78%" class="vtable">
<select name="dir" class="formfld">
<?php
- $dirs = explode(" ", "Both From To") ;
+ $dirs = array(gettext("Both"),gettext("From"),gettext("To")) ;
foreach ($dirs as $dir): ?>
<option value="<?=strtolower($dir);?>" <?php if (strtolower($dir) == strtolower($pconfig['dir'])) echo "selected";?> >
<?=htmlspecialchars($dir);?>
@@ -167,11 +168,11 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br>
- <span class="vexpl">Use <em>From</em> to always allow an IP address through the captive portal (without authentication).
- Use <em>To</em> to allow access from all clients (even non-authenticated ones) behind the portal to this IP address.</span></td>
+ <span class="vexpl"><?=gettext("Use"); ?> <em><?=gettext("From"); ?></em> <?=gettext("to always allow an IP address through the captive portal (without authentication)"); ?>.
+ <?=gettext("Use"); ?> <em><?=gettext("To"); ?></em> <?=gettext("to allow access from all clients (even non-authenticated ones) behind the portal to this IP address"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="17" value="<?=htmlspecialchars($pconfig['ip']);?>">
/<select name='sn' class="formselect" id='sn'>
@@ -180,31 +181,31 @@ include("head.inc");
<?php endfor; ?>
</select>
<br>
- <span class="vexpl">IP address and subnet mask. Use /32 for a single IP.</span></td>
+ <span class="vexpl"><?=gettext("IP address and subnet mask. Use /32 for a single IP.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth up</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable">
<input name="bw_up" type="text" class="formfld unknown" id="bw_up" size="10" value="<?=htmlspecialchars($pconfig['bw_up']);?>">
- <br> <span class="vexpl">Enter a upload limit to be enforced on this IP address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a upload limit to be enforced on this IP address in Kbit/s"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth down</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth down"); ?></td>
<td width="78%" class="vtable">
<input name="bw_down" type="text" class="formfld unknown" id="bw_down" size="10" value="<?=htmlspecialchars($pconfig['bw_down']);?>">
- <br> <span class="vexpl">Enter a download limit to be enforced on this IP address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this IP address in Kbit/s"); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_allowedips[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index 38989a5..fd2193c 100755
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -38,7 +38,6 @@
##|*MATCH=services_captiveportal_mac.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -48,6 +47,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['passthrumac']))
$config['captiveportal']['passthrumac'] = array();
@@ -69,7 +70,7 @@ if ($_POST) {
if ($_POST['postafterlogin']) {
if (!is_array($a_passthrumacs)) {
- echo "No entry exists yet!\n";
+ echo gettext("No entry exists yet!") ."\n";
exit;
}
if ($_POST['username']) {
@@ -77,7 +78,7 @@ if ($_POST) {
if (!empty($mac))
$_POST['delmac'] = $mac['mac'];
else
- echo "No entry exists for this username: {$_POST['username']}\n";
+ echo gettext("No entry exists for this username:") . " " . $_POST['username'] . "\n";
}
if ($_POST['delmac']) {
$found = false;
@@ -95,9 +96,9 @@ if ($_POST) {
}
unset($a_passthrumacs[$idx]);
write_config();
- echo "The entry was sucessfully deleted\n";
+ echo gettext("The entry was sucessfully deleted") . "\n";
} else
- echo "No entry exists for this mac address: {$_POST['delmac']}\n";
+ echo gettext("No entry exists for this mac address:") . " " . $_POST['delmac'] . "\n";
}
exit;
}
@@ -124,17 +125,17 @@ include("head.inc");
<form action="services_captiveportal_mac.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('passthrumac')): ?><p>
-<?php print_info_box_np("The captive portal MAC address configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The captive portal MAC address configuration has been changed.<br>You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", true, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), true, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -142,8 +143,8 @@ include("head.inc");
<td class="tabcont">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">MAC address</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("MAC address"); ?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_passthrumacs as $mac): ?>
@@ -154,19 +155,19 @@ include("head.inc");
<td class="listbg">
<?=htmlspecialchars($mac['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list"> <a href="services_captiveportal_mac_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="edit host" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_captiveportal_mac.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this host?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete host" width="17" height="17" border="0"></a></td>
+ <td valign="middle" nowrap class="list"> <a href="services_captiveportal_mac_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit host"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="services_captiveportal_mac.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete host"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<td class="list" colspan="2">&nbsp;</td>
- <td class="list"> <a href="services_captiveportal_mac_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add host" width="17" height="17" border="0"></a></td>
+ <td class="list"> <a href="services_captiveportal_mac_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add host"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td colspan="2" class="list"><span class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Adding MAC addresses as pass-through MACs allows them access through the captive portal automatically without being taken to the portal page. </span></td>
+ <?=gettext("Adding MAC addresses as pass-through MACs allows them access through the captive portal automatically without being taken to the portal page"); ?>. </span></td>
<td class="list">&nbsp;</td>
</tr>
</table>
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php
index d5dace5..c16b228 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -48,7 +48,6 @@ function passthrumacs_sort() {
usort($config['captiveportal']['passthrumac'],"passthrumacscmp");
}
-$pgtitle = array("Services","Captive portal","Edit pass-through MAC address");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -58,6 +57,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit pass-through MAC address"));
+
if (!is_array($config['captiveportal']['passthrumac']))
$config['captiveportal']['passthrumac'] = array();
@@ -81,26 +82,26 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mac");
- $reqdfieldsn = explode(",", "MAC address");
+ $reqdfieldsn = array(gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$_POST['mac'] = str_replace("-", ":", $_POST['mac']);
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified. [".$_POST['mac']."]";
+ $input_errors[] = sprintf("%s. [%s]", gettext("A valid MAC address must be specified"), $_POST['mac']);
}
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
- $input_errors[] = "Upload speed needs to be an integer";
+ $input_errors[] = gettext("Upload speed needs to be an integer");
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down']))
- $input_errors[] = "Download speed needs to be an integer";
+ $input_errors[] = gettext("Download speed needs to be an integer");
foreach ($a_passthrumacs as $macent) {
if (isset($id) && ($a_passthrumacs[$id]) && ($a_passthrumacs[$id] === $macent))
continue;
if ($macent['mac'] == $_POST['mac']){
- $input_errors[] = "[" . $_POST['mac'] . "] already allowed." ;
+ $input_errors[] = sprintf("[%s] %s.", $_POST['mac'], gettext("already allowed"));
break;
}
}
@@ -129,8 +130,17 @@ if ($_POST) {
$ruleno = captiveportal_get_ipfw_passthru_ruleno($oldmac);
if ($ruleno) {
captiveportal_free_ipfw_ruleno($ruleno);
+<<<<<<< HEAD
+ $rules = sprintf("%s %s\n", gettext("delete"), $ruleno);
+ $rules .= gettext("delete") . " " . ++$ruleno . "\n";
+ $rules .= captiveportal_passthrumac_configure_entry($mac);
+ file_put_contents("{$g['tmp_path']}/tmpmacedit{$id}", $rules);
+ mwexec("/sbin/ipfw -q {$g['tmp_path']}/tmpmacedit{$id}");
+ @unlink("{$g['tmp_path']}/tmpmacedit{$id}");
+=======
$rules = "delete {$ruleno}\n";
$rules .= "delete " . ++$ruleno . "\n";
+>>>>>>> mainline/master
}
$rules .= captiveportal_passthrumac_configure_entry($mac);
@@ -150,35 +160,35 @@ include("head.inc");
<form action="services_captiveportal_mac_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="mac" type="text" class="formfld unknown" id="mac" size="17" value="<?=htmlspecialchars($pconfig['mac']);?>">
<br>
- <span class="vexpl">MAC address (6 hex octets separated by colons)</span></td>
+ <span class="vexpl"><?=gettext("MAC address (6 hex octets separated by colons)"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth up</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable">
<input name="bw_up" type="text" class="formfld unknown" id="bw_up" size="10" value="<?=htmlspecialchars($pconfig['bw_up']);?>">
- <br> <span class="vexpl">Enter a upload limit to be enforced on this MAC address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a upload limit to be enforced on this MAC address in Kbit/s"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth down</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth down"); ?></td>
<td width="78%" class="vtable">
<input name="bw_down" type="text" class="formfld unknown" id="bw_down" size="10" value="<?=htmlspecialchars($pconfig['bw_down']);?>">
- <br> <span class="vexpl">Enter a download limit to be enforced on this MAC address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this MAC address in Kbit/s"); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_passthrumacs[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index f6c4577..c6cf3e9 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -36,7 +36,6 @@
##|*MATCH=services_captiveportal_vouchers.php*
##|-PRIV
-$pgtitle = array("Services", "Captive portal", "Vouchers");
$statusurl = "status_captiveportal_vouchers.php";
$logurl = "diag_logs_auth.php";
@@ -47,6 +46,8 @@ require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Vouchers"));
+
if (!is_array($config['voucher'])) {
$config['voucher'] = array();
}
@@ -87,10 +88,10 @@ if (!isset($config['voucher']['publickey'])) {
}
}
if (!isset($config['voucher']['msgnoaccess'])) {
- $config['voucher']['msgnoaccess'] = "Voucher invalid";
+ $config['voucher']['msgnoaccess'] = gettext("Voucher invalid");
}
if (!isset($config['voucher']['msgexpired'])) {
- $config['voucher']['msgexpired'] = "Voucher expired";
+ $config['voucher']['msgexpired'] = gettext("Voucher expired");
}
$a_roll = &$config['voucher']['roll'];
@@ -115,7 +116,7 @@ if ($_GET['act'] == "csv") {
if (strstr($privkey,"BEGIN RSA PRIVATE KEY")) {
$fd = fopen("{$g['varetc_path']}/voucher.private","w");
if (!$fd) {
- $input_errors[] = "Cannot write private key file.\n";
+ $input_errors[] = gettext("Cannot write private key file") . ".\n";
} else {
chmod("{$g['varetc_path']}/voucher.private", 0600);
fwrite($fd, $privkey);
@@ -135,7 +136,7 @@ if ($_GET['act'] == "csv") {
}
}
} else {
- $input_errors[] = "Need private RSA key to print vouchers\n";
+ $input_errors[] = gettext("Need private RSA key to print vouchers") . "\n";
}
}
@@ -159,37 +160,37 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "charset rollbits ticketbits checksumbits publickey magic saveinterval");
- $reqdfieldsn = explode(",", "charset,rollbits,ticketbits,checksumbits,publickey,magic,saveinterval");
+ $reqdfieldsn = array(gettext("charset"),gettext("rollbits"),gettext("ticketbits"),gettext("checksumbits"),gettext("publickey"),gettext("magic"),gettext("saveinterval"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
}
if ($_POST['charset'] && (strlen($_POST['charset'] < 2))) {
- $input_errors[] = "Need at least 2 characters to create vouchers.";
+ $input_errors[] = gettext("Need at least 2 characters to create vouchers.");
}
if ($_POST['charset'] && (strpos($_POST['charset'],"\"")>0)) {
- $input_errors[] = "Double quotes aren't allowed.";
+ $input_errors[] = gettext("Double quotes aren't allowed.");
}
if ($_POST['charset'] && (strpos($_POST['charset'],",")>0)) {
- $input_errors[] = "',' aren't allowed.";
+ $input_errors[] = "',' " . gettext("aren't allowed.");
}
if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31))) {
- $input_errors[] = "# of Bits to store Roll Id needs to be between 1..31.";
+ $input_errors[] = gettext("# of Bits to store Roll Id needs to be between 1..31.");
}
if ($_POST['ticketbits'] && (!is_numeric($_POST['ticketbits']) || ($_POST['ticketbits'] < 1) || ($_POST['ticketbits'] > 16))) {
- $input_errors[] = "# of Bits to store Ticket Id needs to be between 1..16.";
+ $input_errors[] = gettext("# of Bits to store Ticket Id needs to be between 1..16.");
}
if ($_POST['checksumbits'] && (!is_numeric($_POST['checksumbits']) || ($_POST['checksumbits'] < 1) || ($_POST['checksumbits'] > 31))) {
- $input_errors[] = "# of Bits to store checksum needs to be between 1..31.";
+ $input_errors[] = gettext("# of Bits to store checksum needs to be between 1..31.");
}
if ($_POST['saveinterval'] && (!is_numeric($_POST['saveinterval']) || ($_POST['saveinterval'] < 1))) {
- $input_errors[] = "Save interval in minutes cant be negative.";
+ $input_errors[] = gettext("Save interval in minutes cant be negative.");
}
if ($_POST['publickey'] && (!strstr($_POST['publickey'],"BEGIN PUBLIC KEY"))) {
- $input_errors[] = "This doesn't look like an RSA Public key.";
+ $input_errors[] = gettext("This doesn't look like an RSA Public key.");
}
if ($_POST['privatekey'] && (!strstr($_POST['privatekey'],"BEGIN RSA PRIVATE KEY"))) {
- $input_errors[] = "This doesn't look like an RSA Private key.";
+ $input_errors[] = gettext("This doesn't look like an RSA Private key.");
}
if (!$input_errors) {
@@ -208,7 +209,7 @@ if ($_POST) {
write_config();
voucher_configure();
if (isset($config['voucher']['enable']) && !isset($config['captiveportal']['enable'])) {
- $savemsg = "Don't forget to configure and enable Captive Portal.";
+ $savemsg = gettext("Don't forget to configure and enable Captive Portal.");
}
}
}
@@ -242,11 +243,11 @@ function enable_change(enable_change) {
<ul id="tabnav">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", true, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), true, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</ul>
@@ -258,18 +259,18 @@ function enable_change(enable_change) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable Vouchers</strong></td>
+ <strong><?=gettext("Enable Vouchers"); ?></strong></td>
</tr>
<tr>
- <td valign="top" class="vncell">Voucher Rolls</td>
+ <td valign="top" class="vncell"><?=gettext("Voucher Rolls"); ?></td>
<td class="vtable">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane">
<tr>
- <td width="10%" class="listhdrr">Roll#</td>
- <td width="20%" class="listhdrr">Minutes/Ticket</td>
- <td width="20%" class="listhdrr"># of Tickets</td>
- <td width="35%" class="listhdr">Comment</td>
+ <td width="10%" class="listhdrr"><?=gettext("Roll"); ?>#</td>
+ <td width="20%" class="listhdrr"><?=gettext("Minutes/Ticket"); ?></td>
+ <td width="20%" class="listhdrr"># <?=gettext("of Tickets"); ?></td>
+ <td width="35%" class="listhdr"><?=gettext("Comment"); ?></td>
<td width="15%" class="list"></td>
</tr>
<?php $i = 0; foreach($a_roll as $rollent): ?>
@@ -288,9 +289,9 @@ function enable_change(enable_change) {
</td>
<td valign="middle" nowrap class="list">
<?php if ($pconfig['enable']): ?>
- <a href="services_captiveportal_vouchers_edit.php?id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="edit voucher" width="17" height="17" border="0" alt="edit voucher"></a>
- <a href="services_captiveportal_vouchers.php?act=del&amp;id=<?=$i; ?>" onclick="return confirm('Do you really want to delete this voucher? This makes all vouchers from this roll invalid')"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_x.gif" title="delete vouchers" width="17" height="17" border="0" alt="delete vouchers"></a>
- <a href="services_captiveportal_vouchers.php?act=csv&amp;id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_log_s.gif" title="generate vouchers for this roll to CSV file" width="11" height="15" border="0" alt="generate vouchers for this roll to CSV file"></a>
+ <a href="services_captiveportal_vouchers_edit.php?id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit voucher"); ?>" width="17" height="17" border="0" alt="<?=gettext("edit voucher"); ?>"></a>
+ <a href="services_captiveportal_vouchers.php?act=del&amp;id=<?=$i; ?>" onclick="return confirm('<?=gettext("Do you really want to delete this voucher? This makes all vouchers from this roll invalid"); ?>')"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete vouchers"); ?>" width="17" height="17" border="0" alt="<?=gettext("delete vouchers"); ?>"></a>
+ <a href="services_captiveportal_vouchers.php?act=csv&amp;id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_log_s.gif" title="<?=gettext("generate vouchers for this roll to CSV file"); ?>" width="11" height="15" border="0" alt="<?=gettext("generate vouchers for this roll to CSV file"); ?>"></a>
<?php endif;?>
</td>
</tr>
@@ -299,99 +300,99 @@ function enable_change(enable_change) {
<td class="list" colspan="4"></td>
<?php
if ($pconfig['enable']) {
- echo "<td class=\"list\"> <a href=\"services_captiveportal_vouchers_edit.php\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" title=\"add voucher\" width=\"17\" height=\"17\" border=\"0\" alt=\"add voucher\"></a></td>";
+ echo "<td class=\"list\"> <a href=\"services_captiveportal_vouchers_edit.php\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" title=\"" . gettext("add voucher") . "\" width=\"17\" height=\"17\" border=\"0\" alt=\"" . gettext("add voucher") . "\"></a></td>";
}
?>
</tr>
</table>
<?php if ($pconfig['enable']): ?>
-Create, generate and activate Rolls with Vouchers that allow access through the
-captive portal for the configured time. Once a voucher is activated,
-its clock is started and runs uninterrupted until it expires. During that
-time, the voucher can be re-used from the same or a different computer. If the voucher
-is used again from another computer, the previous session is stopped.
+<?=gettext("Create, generate and activate Rolls with Vouchers that allow access through the " .
+"captive portal for the configured time. Once a voucher is activated, " .
+"its clock is started and runs uninterrupted until it expires. During that " .
+"time, the voucher can be re-used from the same or a different computer. If the voucher " .
+"is used again from another computer, the previous session is stopped"); ?>.
<?php else: ?>
-Enable Voucher support first using the checkbox above and hit Save at the bottom.</td>
+<?=gettext("Enable Voucher support first using the checkbox above and hit Save at the bottom"); ?>.</td>
<?php endif;?>
</tr>
<tr>
- <td valign="top" class="vncellreq">Voucher public key</td>
+ <td valign="top" class="vncellreq"><?=gettext("Voucher public key"); ?></td>
<td class="vtable">
<textarea name="publickey" cols="65" rows="4" id="publickey" class="formpre"><?=htmlspecialchars($pconfig['publickey']);?></textarea>
<br>
- Paste an RSA public key (64 Bit or smaller) in PEM format here. This key is used to decrypt vouchers.</td>
+ <?=gettext("Paste an RSA public key (64 Bit or smaller) in PEM format here. This key is used to decrypt vouchers"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Voucher private key</td>
+ <td valign="top" class="vncell"><?=gettext("Voucher private key"); ?></td>
<td class="vtable">
<textarea name="privatekey" cols="65" rows="5" id="privatekey" class="formpre"><?=htmlspecialchars($pconfig['privatekey']);?></textarea>
<br>
- Paste an RSA private key (64 Bit or smaller) in PEM format here. This key is only used to generate encrypted vouchers and doesn't need to be available if the vouchers have been generated offline.</td>
+ <?=gettext("Paste an RSA private key (64 Bit or smaller) in PEM format here. This key is only used to generate encrypted vouchers and doesn't need to be available if the vouchers have been generated offline"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Character set</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Character set"); ?></td>
<td width="78%" class="vtable">
<input name="charset" type="text" class="formfld" id="charset" size="80" value="<?=htmlspecialchars($pconfig['charset']);?>">
<br>
- Tickets are generated with the specified character set. It should contain printable characters (numbers, lower case and upper case letters) that are hard to confuse with others. Avoid e.g. 0/O and l/1.</td>
+ <?=gettext("Tickets are generated with the specified character set. It should contain printable characters (numbers, lower case and upper case letters) that are hard to confuse with others. Avoid e.g. 0/O and l/1"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Roll Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Roll Bits"); ?></td>
<td width="78%" class="vtable">
<input name="rollbits" type="text" class="formfld" id="rollbits" size="2" value="<?=htmlspecialchars($pconfig['rollbits']);?>">
<br>
- Reserves a range in each voucher to store the Roll# it belongs to. Allowed range: 1..31. Sum of Roll+Ticket+Checksum bits must be one Bit less than the RSA key size.</td>
+ <?=gettext("Reserves a range in each voucher to store the Roll# it belongs to. Allowed range: 1..31. Sum of Roll+Ticket+Checksum bits must be one Bit less than the RSA key size"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Ticket Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Ticket Bits"); ?></td>
<td width="78%" class="vtable">
<input name="ticketbits" type="text" class="formfld" id="ticketbits" size="2" value="<?=htmlspecialchars($pconfig['ticketbits']);?>">
<br>
- Reserves a range in each voucher to store the Ticket# it belongs to. Allowed range: 1..16. Using 16 bits allows a roll to have up to 65535 vouchers. A bit array, stored in RAM and in the config, is used to mark if a voucher has been used. A bit array for 65535 vouchers requires 8 KB of storage.</td>
+ <?=gettext("Reserves a range in each voucher to store the Ticket# it belongs to. Allowed range: 1..16. Using 16 bits allows a roll to have up to 65535 vouchers. A bit array, stored in RAM and in the config, is used to mark if a voucher has been used. A bit array for 65535 vouchers requires 8 KB of storage"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Checksum Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Checksum Bits"); ?></td>
<td width="78%" class="vtable">
<input name="checksumbits" type="text" class="formfld" id="checksumbits" size="2" value="<?=htmlspecialchars($pconfig['checksumbits']);?>">
<br>
- Reserves a range in each voucher to store a simple checksum over Roll# and Ticket#. Allowed range is 0..31.</td>
+ <?=gettext("Reserves a range in each voucher to store a simple checksum over Roll# and Ticket#. Allowed range is 0..31"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Magic Number</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Magic Number"); ?></td>
<td width="78%" class="vtable">
<input name="magic" type="text" class="formfld" id="magic" size="20" value="<?=htmlspecialchars($pconfig['magic']);?>">
<br>
- Magic number stored in every voucher. Verified during voucher check. Size depends on how many bits are left by Roll+Ticket+Checksum bits. If all bits are used, no magic number will be used and checked.</td>
+ <?=gettext("Magic number stored in every voucher. Verified during voucher check. Size depends on how many bits are left by Roll+Ticket+Checksum bits. If all bits are used, no magic number will be used and checked"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Save Interval</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Save Interval"); ?></td>
<td width="78%" class="vtable">
<input name="saveinterval" type="text" class="formfld" id="saveinterval" size="4" value="<?=htmlspecialchars($pconfig['saveinterval']);?>">
- Minutes<br>
- The list of active and used vouchers can be stored in the system's configuration file once every x minutes to survive power outages. No save is done if no new vouchers have been activated. Enter 0 to never write runtime state to XML config.</td>
+ <?=gettext("Minutes"); ?><br>
+ <?=gettext("The list of active and used vouchers can be stored in the system's configuration file once every x minutes to survive power outages. No save is done if no new vouchers have been activated. Enter 0 to never write runtime state to XML config"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Invalid Voucher Message</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Invalid Voucher Message"); ?></td>
<td width="78%" class="vtable">
<input name="msgnoaccess" type="text" class="formfld" id="msgnoaccess" size="80" value="<?=htmlspecialchars($pconfig['msgnoaccess']);?>">
- <br>Error message displayed for invalid vouchers on captive portal error page ($PORTAL_MESSAGE$).</td>
+ <br><?=gettext("Error message displayed for invalid vouchers on captive portal error page"); ?> ($PORTAL_MESSAGE$).</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Expired Voucher Message</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Expired Voucher Message"); ?></td>
<td width="78%" class="vtable">
<input name="msgexpired" type="text" class="formfld" id="msgexpired" size="80" value="<?=htmlspecialchars($pconfig['msgexpired']);?>">
- <br>Error message displayed for expired vouchers on captive portal error page ($PORTAL_MESSAGE$).</td>
+ <br><?=gettext("Error message displayed for expired vouchers on captive portal error page"); ?> ($PORTAL_MESSAGE$).</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="enable_change(true)">
</td>
</tr>
<tr>
<td colspan="2" class="list"><p class="vexpl">
- <span class="red"><strong> Note:<br> </strong></span>
- Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings.
+ <span class="red"><strong> <?=gettext("Note"); ?>:<br> </strong></span>
+ <?=gettext("Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings"); ?>.
</p>
</td>
</tr>
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");
<form action="services_captiveportal_vouchers_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="content pane">
<tr>
- <td width="22%" valign="top" class="vncellreq">Roll#</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Roll"); ?>#</td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="number" type="text" class="formfld" id="number" size="10" value="<?=htmlspecialchars($pconfig['number']);?>">
<br>
- <span class="vexpl">Enter the Roll# (0..<?=htmlspecialchars($maxnumber);?>) found on top of the generated/printed vouchers.</span>
+ <span class="vexpl"><?=gettext("Enter the Roll"); ?># (0..<?=htmlspecialchars($maxnumber);?>) <?=gettext("found on top of the generated/printed vouchers"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Minutes per Ticket</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Minutes per Ticket"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="minutes" type="text" class="formfld" id="minutes" size="10" value="<?=htmlspecialchars($pconfig['minutes']);?>">
<br>
- <span class="vexpl">Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication.</span>
+ <span class="vexpl"><?=gettext("Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Count</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Count"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="count" type="text" class="formfld" id="count" size="10" value="<?=htmlspecialchars($pconfig['count']);?>">
<br>
- <span class="vexpl">Enter the number of vouchers (1..<?=htmlspecialchars($maxcount);?>) found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again.</span>
+ <span class="vexpl"><?=gettext("Enter the number of vouchers"); ?> (1..<?=htmlspecialchars($maxcount);?>) <?=gettext("found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Comment</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Comment"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="comment" type="text" class="formfld" id="comment" size="60" value="<?=htmlspecialchars($pconfig['comment']);?>">
<br>
- <span class="vexpl">Can be used to further identify this roll. Ignored by the system.</span>
+ <span class="vexpl"><?=gettext("Can be used to further identify this roll. Ignored by the system"); ?>.</span>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_roll[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 79fd1d8..95d3c06 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -113,7 +113,7 @@ if($config['installedpackages']['olsrd']) {
}
if (!$_GET['if'])
- $savemsg = "<b>The DHCP Server can only be enabled on interfaces configured with static IP addresses.<p> Only interfaces configured with a static IP will be shown.</p></b>";
+ $savemsg = "<b> . "gettext("The DHCP Server can only be enabled on interfaces configured with static IP addresses") . ".<p>" . gettext("Only interfaces configured with a static IP will be shown") . ".</p></b>");
$iflist = get_configured_interface_with_descr();
@@ -208,47 +208,47 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "range_from range_to");
- $reqdfieldsn = explode(",", "Range begin,Range end");
+ $reqdfieldsn = array(gettext("Range begin"),gettext("Range end"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['range_from'] && !is_ipaddr($_POST['range_from'])))
- $input_errors[] = "A valid range must be specified.";
+ $input_errors[] = gettext("A valid range must be specified.");
if (($_POST['range_to'] && !is_ipaddr($_POST['range_to'])))
- $input_errors[] = "A valid range must be specified.";
+ $input_errors[] = gettext("A valid range must be specified.");
if (($_POST['gateway'] && !is_ipaddr($_POST['gateway'])))
- $input_errors[] = "A valid IP address must be specified for the gateway.";
+ $input_errors[] = gettext("A valid IP address must be specified for the gateway.");
if (($_POST['wins1'] && !is_ipaddr($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddr($_POST['wins2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary WINS servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary DNS servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60)))
- $input_errors[] = "The default lease time must be at least 60 seconds.";
+ $input_errors[] = gettext("The default lease time must be at least 60 seconds.");
if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime'])))
- $input_errors[] = "The maximum lease time must be at least 60 seconds and higher than the default lease time.";
+ $input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
- $input_errors[] = "A valid domain name must be specified for the dynamic DNS registration.";
+ $input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
if (($_POST['ntp1'] && !is_ipaddr($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddr($_POST['ntp2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary NTP servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
- $input_errors[] = "A valid domain name must be specified for the DNS domain.";
+ $input_errors[] = gettext("A valid domain name must be specified for the DNS domain.");
if (($_POST['tftp'] && (!is_ipaddr($_POST['tftp']) && !is_domain($_POST['tftp']))))
- $input_errors[] = "A valid IP address or hostname must be specified for the TFTP server.";
+ $input_errors[] = gettext("A valid IP address or hostname must be specified for the TFTP server.");
if (($_POST['nextserver'] && !is_ipaddr($_POST['nextserver'])))
- $input_errors[] = "A valid IP address must be specified for the network boot server.";
+ $input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
if(gen_subnet($ifcfgip, $ifcfgsn) == $_POST['range_from'])
- $input_errors[] = "You cannot use the network address in the starting subnet range.";
+ $input_errors[] = gettext("You cannot use the network address in the starting subnet range.");
if(gen_subnet_max($ifcfgip, $ifcfgsn) == $_POST['range_to'])
- $input_errors[] = "You cannot use the broadcast address in the ending subnet range.";
+ $input_errors[] = gettext("You cannot use the broadcast address in the ending subnet range.");
// Disallow a range that includes the virtualip
if (is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $vip) {
if($vip['interface'] == $if)
if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
- $input_errors[] = "The subnet range cannot overlap with virtual IP address {$vip['subnet']}.";
+ $input_errors[] = printf(gettext("The subnet range cannot overlap with virtual IP address %s."),$vip['subnet']);
}
}
@@ -259,15 +259,15 @@ if ($_POST) {
if ((ip2ulong($_POST['range_from']) < $subnet_start) || (ip2ulong($_POST['range_from']) > $subnet_end) ||
(ip2ulong($_POST['range_to']) < $subnet_start) || (ip2ulong($_POST['range_to']) > $subnet_end)) {
- $input_errors[] = "The specified range lies outside of the current subnet.";
+ $input_errors[] = gettext("The specified range lies outside of the current subnet.");
}
if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to']))
- $input_errors[] = "The range is invalid (first element higher than second element).";
+ $input_errors[] = gettext("The range is invalid (first element higher than second element).");
/* make sure that the DHCP Relay isn't enabled on this interface */
if (isset($config['dhcrelay'][$if]['enable']))
- $input_errors[] = "You must disable the DHCP relay on the {$iflist[$if]} interface before enabling the DHCP server.";
+ $input_errors[] = printf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]);
}
}
@@ -372,7 +372,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","DHCP server");
+$pgtitle = array(gettext("Services"),gettext("DHCP server"));
$statusurl = "status_dhcp_leases.php";
$logurl = "diag_logs_dhcp.php";
@@ -466,7 +466,7 @@ include("head.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php
if ($dhcrelay_enabled) {
- echo "DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.";
+ echo gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.");
include("fend.inc");
echo "</body>";
echo "</html>";
@@ -474,7 +474,7 @@ include("head.inc");
}
?>
<?php if (is_subsystem_dirty('staticmaps')): ?><p>
-<?php print_info_box_np("The static mapping configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
@@ -513,31 +513,31 @@ include("head.inc");
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable DHCP server on
- <?=htmlspecialchars($iflist[$if]);?>
- interface</strong></td>
+ <strong><?php printf(gettext("Enable DHCP server on " .
+ "%s " .
+ "interface"),htmlspecialchars($iflist[$if]));?></strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked"; ?>>
- <strong>Deny unknown clients</strong><br>
- If this is checked, only the clients defined below will get DHCP leases from this server. </td>
+ <strong><?=gettext("Deny unknown clients");?></strong><br>
+ <?=gettext("If this is checked, only the clients defined below will get DHCP leases from this server. ");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet");?></td>
<td width="78%" class="vtable">
<?=gen_subnet($ifcfgip, $ifcfgsn);?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet mask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet mask");?></td>
<td width="78%" class="vtable">
<?=gen_subnet_mask($ifcfgsn);?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Available range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Available range");?></td>
<td width="78%" class="vtable">
<?php
$range_from = ip2long(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
@@ -554,7 +554,7 @@ include("head.inc");
</tr>
<?php if($is_olsr_enabled): ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet Mask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet Mask");?></td>
<td width="78%" class="vtable">
<select name="netmask" class="formselect" id="netmask">
<?php
@@ -571,115 +571,115 @@ include("head.inc");
</tr>
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Range");?></td>
<td width="78%" class="vtable">
<input name="range_from" type="text" class="formfld unknown" id="range_from" size="20" value="<?=htmlspecialchars($pconfig['range_from']);?>">
&nbsp;to&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="20" value="<?=htmlspecialchars($pconfig['range_to']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">WINS servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS servers");?></td>
<td width="78%" class="vtable">
<input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"><br>
<input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
<input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
<input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br>
- NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.
+ <?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
<td width="78%" class="vtable">
<input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br>
- The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.
+ <?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Domain name</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td>
<td width="78%" class="vtable">
<input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"><br>
- The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.
+ <?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Domain search list</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- The DHCP server can optionally provide a domain search list.
+ <?=gettext("The DHCP server can optionally provide a domain search list.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Default lease time</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td>
<td width="78%" class="vtable">
<input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>">
- seconds<br>
- This is used for clients that do not ask for a specific
- expiration time.<br>
- The default is 7200 seconds.
+ <?=gettext("seconds");?><br>
+ <?=gettext("This is used for clients that do not ask for a specific " .
+ "expiration time"); ?>.<br>
+ <?=gettext("The default is 7200 seconds");?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Maximum lease time</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td>
<td width="78%" class="vtable">
<input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>">
- seconds<br>
- This is the maximum lease time for clients that ask
- for a specific expiration time.<br>
- The default is 86400 seconds.
+ <?=gettext("seconds");?><br>
+ <?=gettext("This is the maximum lease time for clients that ask".
+ " for a specific expiration time"); ?>.<br>
+ <?=gettext("The default is 86400 seconds");?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Failover peer IP:</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Failover peer IP");?>:</td>
<td width="78%" class="vtable">
<input name="failover_peerip" type="text" class="formfld host" id="failover_peerip" size="20" value="<?=htmlspecialchars($pconfig['failover_peerip']);?>"><br>
- Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP.
+ <?=gettext("Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Static ARP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Static ARP");?></td>
<td width="78%" class="vtable">
<table>
<tr>
<td>
<input valign="middle" type="checkbox" value="yes" name="staticarp" id="staticarp" <?php if($pconfig['staticarp']) echo " checked"; ?>>&nbsp;
</td>
- <td><b>Enable Static ARP entries</b></td>
+ <td><b><?=gettext("Enable Static ARP entries");?></b></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
- <span class="red"><strong>Note:</strong></span> Only the machines listed below will be able to communicate with the firewall on this NIC.
+ <span class="red"><strong><?=gettext("Note");?>:</strong></span> <?=gettext("Only the machines listed below will be able to communicate with the firewall on this NIC.");?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dynamic DNS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
- <input type="button" onClick="show_ddns_config()" value="Advanced"></input> - Show Dynamic DNS</a>
+ <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?></a>
</div>
<div id="showddns" style="display:none">
<input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>>&nbsp;
- <b>Enable registration of DHCP client names in DNS.</b><br />
+ <b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br />
<p>
<input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br />
- Note: Leave blank to disable dynamic DNS registration.<br />
- Enter the dynamic DNS domain which will be used to register client names in the DNS server.
+ <?=gettext("Note: Leave blank to disable dynamic DNS registration");?>.<br />
+ <?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server");?>.
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NTP servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
<div id="showntpbox">
- <input type="button" onClick="show_ntp_config()" value="Advanced"></input> - Show NTP configuration</a>
+ <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?></a>
</div>
<div id="showntp" style="display:none">
<input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br>
@@ -688,56 +688,56 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">TFTP server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
<td width="78%" class="vtable">
<div id="showtftpbox">
- <input type="button" onClick="show_tftp_config()" value="Advanced"></input> - Show TFTP configuration</a>
+ <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?></a>
</div>
<div id="showtftp" style="display:none">
<input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br>
- Leave blank to disable. Enter a full hostname or IP for the TFTP server.
+ <?=gettext("Leave blank to disable. Enter a full hostname or IP for the TFTP server.");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">LDAP URI</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
<td width="78%" class="vtable">
<div id="showldapbox">
- <input type="button" onClick="show_ldap_config()" value="Advanced"></input> - Show LDAP configuration</a>
+ <input type="button" onClick="show_ldap_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show LDAP configuration");?></a>
</div>
<div id="showldap" style="display:none">
<input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>"><br>
- Leave blank to disable. Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com
+ <?=gettext("Leave blank to disable. Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Enable network booting</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
<td width="78%" class="vtable">
<div id="shownetbootbox">
- <input type="button" onClick="show_netboot_config()" value="Advanced"></input> - Show Network booting</a>
+ <input type="button" onClick="show_netboot_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Network booting");?></a>
</div>
<div id="shownetboot" style="display:none">
<input valign="middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked"; ?>>&nbsp;
- <b>Enables network booting.</b>
+ <b><?=gettext("Enables network booting.");?></b>
<p>
- Enter the IP of the <b>next-server</b>
+ <?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b>
<input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>">
- and the filename
+ <?=gettext("and the filename");?>
<input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
- Note: You need both a filename and a boot server configured for this to work!
+ <?=gettext("Note: You need both a filename and a boot server configured for this to work!");?>
<p>
- Enter the <b>root-path</b>-string
+ <?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>
<input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br>
- Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname
+ <?=gettext("Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Additional BOOTP/DHCP Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
<td width="78%" class="vtable">
<div id="shownumbervaluebox">
- <input type="button" onClick="show_shownumbervalue()" value="Advanced"></input> - Show Additional BOOTP/DHCP Options</a>
+ <input type="button" onClick="show_shownumbervalue()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Additional BOOTP/DHCP Options");?></a>
</div>
<div id="shownumbervalue" style="display:none">
<table id="maintable">
@@ -745,13 +745,13 @@ include("head.inc");
<tr>
<td colspan="3">
<div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp">
- Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information. For a list of available options please visit this <a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_new">URL</a>.
+ <?=gettext("Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information. For a list of available options please visit this"); ?> <a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_new"><?=gettext("URL"); ?></a>
</div>
</td>
</tr>
<tr>
- <td><div id="onecolumn">Number</div></td>
- <td><div id="twocolumn">Value</div></td>
+ <td><div id="onecolumn"><?=gettext("Number");?></div></td>
+ <td><div id="twocolumn"><?=gettext("Value");?></div></td>
</tr>
<?php $counter = 0; ?>
<?php
@@ -770,7 +770,7 @@ include("head.inc");
<input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld" id="value<?php echo $counter; ?>" size="55" value="<?=htmlspecialchars($value);?>" />
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
</td>
</tr>
<?php $counter++; ?>
@@ -780,7 +780,7 @@ include("head.inc");
</tfoot>
</table>
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="add another entry" />
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
</a>
<script type="text/javascript">
field_counter_js = 2;
@@ -796,29 +796,29 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"> <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>The DNS servers entered in <a href="system.php">System:
- General setup</a> (or the <a href="services_dnsmasq.php">DNS
- forwarder</a>, if enabled) </span><span class="vexpl">will
- be assigned to clients by the DHCP server.<br>
+ <td width="78%"> <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("The DNS servers entered in"); ?><a href="system.php">System:
+ General setup</a> <?=gettext("(or the"); ?> <a href="services_dnsmasq.php"><?=gettext("DNS"); ?>
+ forwarder</a>, <?=gettext("if enabled)"); ?> </span><span class="vexpl"><?=gettext("will " .
+ "be assigned to clients by the DHCP server"); ?>.<br>
<br>
- The DHCP lease table can be viewed on the <a href="status_dhcp_leases.php">Status:
- DHCP leases</a> page.<br>
+ <?=gettext("The DHCP lease table can be viewed on the"); ?> <a href="status_dhcp_leases.php"><?=gettext("Status: " .
+ "DHCP leases"); ?></a> <?=gettext("page"); ?>.<br>
</span></p>
</td>
</tr>
</table>
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">MAC address</td>
- <td width="15%" class="listhdrr">IP address</td>
- <td width="20%" class="listhdrr">Hostname</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("MAC address");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("IP address");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -848,7 +848,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_dhcp_edit.php?if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=$if;?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this mapping?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=$if;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index 02a7315..202f4e5 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -101,7 +101,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mac");
- $reqdfieldsn = explode(",", "MAC address");
+ $reqdfieldsn = array(gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -110,21 +110,21 @@ if ($_POST) {
if ($_POST['hostname']) {
if (!is_hostname($_POST['hostname'])) {
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
} else {
if (strpos($_POST['hostname'],'.')) {
- $input_errors[] = "A valid hostname is specified, but the domain name part should be omitted";
+ $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
}
}
}
if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) {
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
}
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
}
if($static_map_enabled && !$_POST['ipaddr']) {
- $input_errors[] = "Static map is enabled. You must specify an IP address.";
+ $input_errors[] = gettext("Static map is enabled. You must specify an IP address.");
}
/* check for overlaps */
@@ -133,7 +133,7 @@ if ($_POST) {
continue;
if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || ($mapent['mac'] == $_POST['mac'])) {
- $input_errors[] = "This Hostname, IP or MAC address already exists.";
+ $input_errors[] = gettext("This Hostname, IP or MAC address already exists.");
break;
}
}
@@ -146,7 +146,7 @@ if ($_POST) {
$lansubnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
if ((ip2ulong($_POST['ipaddr']) < $lansubnet_start) ||
(ip2ulong($_POST['ipaddr']) > $lansubnet_end)) {
- $input_errors[] = "The IP address must lie in the {$ifcfgdescr} subnet.";
+ $input_errors[] = sprintf(gettext("The IP address must lie in the %s subnet."),$ifcfgdescr);
}
}
@@ -176,7 +176,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DHCP","Edit static mapping");
+$pgtitle = array(gettext("Services"),gettext("DHCP"),gettext("Edit static mapping"));
$statusurl = "status_dhcp_leases.php";
$logurl = "diag_logs_dhcp.php";
@@ -190,10 +190,10 @@ include("head.inc");
<form action="services_dhcp_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Static DHCP Mapping</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>">
<?php
@@ -201,35 +201,35 @@ include("head.inc");
$mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`;
$mac = str_replace("\n","",$mac);
?>
- <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#">Copy my MAC address</a>
+ <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a>
<br>
- <span class="vexpl">Enter a MAC address in the following format:
- xx:xx:xx:xx:xx:xx</span></td>
+ <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
+ "xx:xx:xx:xx:xx:xx");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
<br>
- If no IP address is given, one will be dynamically allocated from the pool.</td>
+ <?=gettext("If no IP address is given, one will be dynamically allocated from the pool.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hostname</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="hostname" type="text" class="formfld unknown" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>">
- <br> <span class="vexpl">Name of the host, without domain part.</span></td>
+ <br> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here ".
+ "for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_maps[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index 0075fa2..25fa4bf 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -106,17 +106,17 @@ if ($_POST) {
if (isset($_POST['proxydhcp']))
$_POST['server'] = get_wan_dhcp_server();
$reqdfields = explode(" ", "server");
- $reqdfieldsn = explode(",", "Destination Server");
+ $reqdfieldsn = array(gettext("Destination Server"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['server'] && !is_ipaddr($_POST['server'])))
- $input_errors[] = "A valid Destination Server IP address must be specified.";
+ $input_errors[] = gettext("A valid Destination Server IP address must be specified.");
if (!$input_errors) {
/* make sure that the DHCP server isn't enabled on this interface */
if (isset($config['dhcpd'][$if]['enable']))
- $input_errors[] = "You must disable the DHCP server on the {$iflist[$if]} interface before enabling the DHCP Relay.";
+ $input_errors[] = sprintf(gettext("You must disable the DHCP server on the %s interface before enabling the DHCP Relay."),$iflist[$if]);
/* make sure that the DHCP server isn't running on any of the implied interfaces */
foreach ($config['interfaces'] as $ifname => $ifcfg) {
$subnet = $ifcfg['ipaddr'] . "/" . $ifcfg['subnet'];
@@ -126,11 +126,11 @@ if ($_POST) {
if (!isset($destif))
$destif = "wan";
if (isset($config['dhcpd'][$destif]['enable']))
- $input_errors[] = "You must disable the DHCP server on the {$destif} interface before enabling the DHCP Relay.";
+ $input_errors[] = sprintf(gettext("You must disable the DHCP server on the %s interface before enabling the DHCP Relay."),$destif);
/* if proxydhcp is selected, make sure DHCP is enabled on WAN */
if (isset($config['dhcrelay']['proxydhcp']) && $config['interfaces']['wan']['ipaddr'] != "dhcp")
- $input_errors[] = "You must have DHCP active on the WAN interface before enabling the DHCP proxy option.";
+ $input_errors[] = gettext("You must have DHCP active on the WAN interface before enabling the DHCP proxy option.");
}
}
@@ -149,7 +149,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DHCP Relay");
+$pgtitle = array(gettext("Services"),gettext("DHCP Relay"));
include("head.inc");
?>
@@ -181,7 +181,7 @@ function enable_change(enable_over) {
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php
if ($dhcpd_enabled) {
- echo "DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.";
+ echo gettext("DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.");
include("fend.inc");
echo "</body>";
echo "</html>";
@@ -214,31 +214,31 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable DHCP relay on
- <?=htmlspecialchars($iflist[$if]);?>
- interface</strong></td>
+ <strong><?php printf(gettext("Enable DHCP relay on " .
+ "%s " .
+ "interface"),htmlspecialchars($iflist[$if]));?></strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="agentoption" type="checkbox" value="yes" <?php if ($pconfig['agentoption']) echo "checked"; ?>>
- <strong>Append circuit ID and agent ID to requests</strong><br>
- If this is checked, the DHCP relay will append the circuit ID (<?=$g['product_name'];?> interface number) and the agent ID to the DHCP request.</td>
+ <strong><?=(gettext("Append circuit ID and agent ID to requests"); ?></strong><br>
+ <?php printf("If this is checked, the DHCP relay will append the circuit ID (%s interface number) and the agent ID to the DHCP request.", $g['product_name']); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Destination server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Destination server");?></td>
<td width="78%" class="vtable">
- <input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change(false)"> Proxy requests to DHCP server on WAN subnet
+ <input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change(false)"> <?=gettext("Proxy requests to DHCP server on WAN subnet");?>
<br><br><input name="server" type="text" class="formfld unknown" id="server" size="20" value="<?=htmlspecialchars($pconfig['server']);?>">
<br>
- This is the IP address of the server to which the DHCP packet is relayed. Select "Proxy requests to DHCP server on WAN subnet" to relay DHCP packets to the server that was used on the WAN interface.
+ <?=gettext("This is the IP address of the server to which the DHCP packet is relayed. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
</td>
</tr>
</table>
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 4215655..910065b 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -100,7 +100,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","DNS forwarder");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"));
include("head.inc");
?>
@@ -121,65 +121,65 @@ function enable_change(enable_over) {
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('hosts')): ?><p>
-<?php print_info_box_np("The DNS forwarder configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td class="vtable"><p>
<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked";?> onClick="enable_change(false)">
- <strong>Enable DNS forwarder<br>
+ <strong><?=gettext("Enable DNS forwarder");?><br>
</strong></p></td>
</tr>
<tr>
<td class="vtable"><p>
<input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if ($pconfig['regdhcp'] == "yes") echo "checked";?>>
- <strong>Register DHCP leases in DNS forwarder<br>
- </strong>If this option is set, then machines that specify
- their hostname when requesting a DHCP lease will be registered
- in the DNS forwarder, so that their name can be resolved.
- You should also set the domain in <a href="system.php">System:
- General setup</a> to the proper value.</p>
+ <strong><?=gettext("Register DHCP leases in DNS forwarder");?><br>
+ </strong><?php printf(gettext("If this option is set, then machines that specify".
+ " their hostname when requesting a DHCP lease will be registered".
+ " in the DNS forwarder, so that their name can be resolved.".
+ " You should also set the domain in %sSystem:".
+ " General setup%s to the proper value."),'<a href="system.php">','</a>')?></p>
</td>
</tr>
<tr>
<td class="vtable"><p>
<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked";?>>
- <strong>Register DHCP static mappings in DNS forwarder<br>
- </strong>If this option is set, then DHCP static mappings will
- be registered in the DNS forwarder, so that their name can be
- resolved. You should also set the domain in <a href="system.php">
- System: General setup</a> to the proper value.</p>
+ <strong><?=gettext("Register DHCP static mappings in DNS forwarder");?><br>
+ </strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
+ "be registered in the DNS forwarder, so that their name can be ".
+ "resolved. You should also set the domain in %s".
+ "System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
</td>
</tr>
<tr>
- <td> <input name="submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <td> <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
- <td><p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>If the DNS forwarder is enabled, the DHCP
- service (if enabled) will automatically serve the LAN IP
- address as a DNS server to DHCP clients so they will use
- the forwarder. The DNS forwarder will use the DNS servers
- entered in <a href="system.php">System: General setup</a>
- or those obtained via DHCP or PPP on WAN if the &quot;Allow
- DNS server list to be overridden by DHCP/PPP on WAN&quot;
- is checked. If you don't use that option (or if you use
- a static IP address on WAN), you must manually specify at
- least one DNS server on the <a href="system.php">System:
- General setup</a> page.<br>
+ <td><p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("If the DNS forwarder is enabled, the DHCP".
+ " service (if enabled) will automatically serve the LAN IP".
+ " address as a DNS server to DHCP clients so they will use".
+ " the forwarder. The DNS forwarder will use the DNS servers".
+ " entered in %sSystem: General setup%s".
+ " or those obtained via DHCP or PPP on WAN if the &quot;Allow".
+ " DNS server list to be overridden by DHCP/PPP on WAN&quot;".
+ " is checked. If you don't use that option (or if you use".
+ " a static IP address on WAN), you must manually specify at".
+ " least one DNS server on the %sSystem:".
+ "General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br>
<br>
- You may enter records that override the results from the
- forwarders below.</span></p></td>
+ <?=gettext("You may enter records that override the results from the".
+ " forwarders below.");?></span></p></td>
</tr>
</table>
&nbsp;<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Host</td>
- <td width="25%" class="listhdrr">Domain</td>
- <td width="20%" class="listhdrr">IP</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Host");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Domain");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("IP");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -207,7 +207,7 @@ function enable_change(enable_over) {
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td><a href="services_dnsmasq.php?type=host&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this host?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td><a href="services_dnsmasq.php?type=host&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</tr>
@@ -227,16 +227,16 @@ function enable_change(enable_over) {
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr><td>&nbsp;</td></tr>
<tr>
- <td><p>Below you can override an entire domain by specifying an
- authoritative DNS server to be queried for that domain.</p></td>
+ <td><p><?=gettext("Below you can override an entire domain by specifying an".
+ " authoritative DNS server to be queried for that domain.");?></p></td>
</tr>
</table>
&nbsp;<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="35%" class="listhdrr">Domain</td>
- <td width="20%" class="listhdrr">IP</td>
- <td width="35%" class="listhdr">Description</td>
+ <td width="35%" class="listhdrr"><?=gettext("Domain");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("IP");?></td>
+ <td width="35%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -258,7 +258,7 @@ function enable_change(enable_over) {
<?=htmlspecialchars($doment['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this domain override?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php
index 8570198..e55b6ee 100755
--- a/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -62,15 +62,15 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "domain ip");
- $reqdfieldsn = explode(",", "Domain,IP address");
+ $reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['domain'] && !is_domain($_POST['domain']))) {
- $input_errors[] = "A valid domain must be specified.";
+ $input_errors[] = gettext("A valid domain must be specified.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
}
if (!$input_errors) {
@@ -93,7 +93,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DNS forwarder","Edit Domain Override");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit Domain Override"));
include("head.inc");
?>
@@ -104,30 +104,30 @@ include("head.inc");
<form action="services_dnsmasq_domainoverride_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Domain</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl">Domain to override (NOTE: this does not have to be a valid TLD!)<br>
- e.g. <em>test</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Domain to override (NOTE: this does not have to be a valid TLD!)"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("test"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl">IP address of the authoritative DNS server for this domain<br>
- e.g. <em>192.168.100.100</em></span></td>
+ <br> <span class="vexpl"><?=gettext("IP address of the authoritative DNS server for this domain"); ?><br>
+ <?=gettext("e.g."); ?> <em>192.168.100.100</em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_domainOverrides[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php
index 7438758..a80ff00 100755
--- a/usr/local/www/services_dnsmasq_edit.php
+++ b/usr/local/www/services_dnsmasq_edit.php
@@ -77,18 +77,18 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "domain ip");
- $reqdfieldsn = explode(",", "Domain,IP address");
+ $reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['host'] && !is_hostname($_POST['host'])))
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
- $input_errors[] = "A valid domain must be specified.";
+ $input_errors[] = gettext("A valid domain must be specified.");
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
/* check for overlaps */
foreach ($a_hosts as $hostent) {
@@ -96,7 +96,7 @@ if ($_POST) {
continue;
if (($hostent['host'] == $_POST['host']) && ($hostent['domain'] == $_POST['domain'])) {
- $input_errors[] = "This host/domain already exists.";
+ $input_errors[] = gettext("This host/domain already exists.");
break;
}
}
@@ -123,7 +123,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DNS forwarder","Edit host");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit host"));
include("head.inc");
?>
@@ -134,41 +134,41 @@ include("head.inc");
<form action="services_dnsmasq_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit DNS Forwarder entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit DNS Forwarder entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Host</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Host");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>">
- <br> <span class="vexpl">Name of the host, without
- domain part<br>
- e.g. <em>myhost</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Name of the host, without".
+ " domain part"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("myhost"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Domain</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
<input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl">Domain of the host<br>
- e.g. <em>example.com</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Domain of the host"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("example.com"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl">IP address of the host<br>
- e.g. <em>192.168.100.100</em></span></td>
+ <br> <span class="vexpl"><?=gettext("IP address of the host"); ?><br>
+ <?=gettext("e.g."); ?> <em>192.168.100.100</em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_hosts[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index c68227e..b9d2e01 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -73,7 +73,7 @@ function dyndnsCheckIP($int) {
return $ip_address;
}
-$pgtitle = array("Services", "Dynamic DNS clients");
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS clients"));
include("head.inc");
?>
@@ -86,8 +86,8 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("DynDns", true, "services_dyndns.php");
- $tab_array[] = array("RFC 2136", false, "services_rfc2136.php");
+ $tab_array[] = array(gettext("DynDns"), true, "services_dyndns.php");
+ $tab_array[] = array(gettext("RFC 2136"), false, "services_rfc2136.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -97,10 +97,10 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" class="listhdrr"></td>
- <td width="15%" class="listhdrr">Service</td>
- <td width="20%" class="listhdrr">Hostname</td>
- <td width="20%" class="listhdrr">Cached IP</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Service");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_dyndns as $dyndns): ?>
@@ -148,7 +148,7 @@ include("head.inc");
<?=htmlspecialchars($dyndns['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_dyndns_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -157,9 +157,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong></span>
- IP addresses appearing in green are up to date with Dynamic DNS provider.
+ <?=gettext("IP addresses appearing in green are up to date with Dynamic DNS provider.");?>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index c79734a..bf3c207 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -81,14 +81,14 @@ if ($_POST) {
$reqdfields = array();
$reqdfieldsn = array();
$reqdfields = array_merge($reqdfields, explode(" ", "host username password type"));
- $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,Username,Password,Service type"));
+ $reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Hostname"),gettext("Username"),gettext("Password"),gettext("Service type")));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['mx'] && !is_domain($_POST['mx'])))
- $input_errors[] = "The MX contains invalid characters.";
+ $input_errors[] = gettext("The MX contains invalid characters.");
if (($_POST['username'] && !is_dyndns_username($_POST['username'])) || $_POST['username'] == "")
- $input_errors[] = "The username contains invalid characters.";
+ $input_errors[] = gettext("The username contains invalid characters.");
if (!$input_errors) {
$dyndns = array();
@@ -124,7 +124,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","Dynamic DNS client");
+$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client"));
include("head.inc");
?>
@@ -138,18 +138,18 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>Dynamic DNS client</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
<td width="78%" class="vtable">
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?>>
+ <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked"; ?>>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Service type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
<td width="78%" class="vtable">
<select name="type" class="formselect" id="type">
<?php
@@ -163,7 +163,7 @@ include("head.inc");
</select></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface to monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect" id="interface">
<?php $iflist = get_configured_interface_with_descr();
@@ -175,47 +175,47 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hostname</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>">
<br>
<span class="vexpl">
- <span class="red"><strong>Note:<br></strong>
+ <span class="red"><strong><?=gettext("Note");?>:<br></strong>
</span>
- Enter the complete host/domain name. example: myhost.dyndns.org
+ <?=gettext("Enter the complete host/domain name. example: myhost.dyndns.org");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">MX</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
<td width="78%" class="vtable">
<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>">
<br>
- Note: With DynDNS service you can only use a hostname, not an IP address.
+ <?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
<br>
- Set this option only if you need a special MX record. Not
- all services support this.</td>
+ <?=gettext("Set this option only if you need a special MX record. Not".
+ " all services support this.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Wildcards</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
<td width="78%" class="vtable">
<input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked"; ?>>
- Enable Wildcard</td>
+ <?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable">
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>">
</td>
@@ -223,8 +223,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="Cancel"></a>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
+ <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
<?php if (isset($id) && $a_dyndns[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -232,10 +232,10 @@ include("head.inc");
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>You must configure a DNS server in <a href="system.php">System:
- General setup</a> or allow the DNS server list to be overridden
- by DHCP/PPP on WAN for dynamic DNS updates to work.</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem:
+ General setup%s or allow the DNS server list to be overridden
+ by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td>
</tr>
</table>
</form>
diff --git a/usr/local/www/services_igmpproxy.php b/usr/local/www/services_igmpproxy.php
index 7141b5d..3d45e74 100755
--- a/usr/local/www/services_igmpproxy.php
+++ b/usr/local/www/services_igmpproxy.php
@@ -77,7 +77,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","IGMP Proxy");
+$pgtitle = array(gettext("Services"),gettext("IGMP Proxy"));
include("head.inc");
?>
@@ -87,20 +87,20 @@ include("head.inc");
<form action="services_igmpproxy.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('igmpproxy')): ?><p>
-<?php print_info_box_np("The IGMP entry list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?php print_info_box_np(gettext("The IGMP entry list has been changed") ".<br>" gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="25%" class="listhdrr">Values</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Values");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>"></a></td>
</tr>
</table>
</td>
@@ -130,8 +130,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit igmpentry"></a></td>
- <td><a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this igmpentry? All elements that still use it will become invalid (e.g. filter rules)!')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit igmpentry"); ?>"></a></td>
+ <td><a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this igmpentry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete igmpentry");?>"></a></td>
</tr>
</table>
</td>
@@ -143,7 +143,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>"></a></td>
</td>
</tr>
</table>
@@ -152,13 +152,13 @@ include("head.inc");
<tr>
<td colspan="2" width="78%">
<br />
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<br />
</td>
</tr>
<tr>
<td class="tabcont" colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/services_igmpproxy_edit.php b/usr/local/www/services_igmpproxy_edit.php
index a6f2571..d2acfc5 100755
--- a/usr/local/www/services_igmpproxy_edit.php
+++ b/usr/local/www/services_igmpproxy_edit.php
@@ -43,7 +43,7 @@
##|*MATCH=services_igmpproxy_edit.php*
##|-PRIV
-$pgtitle = array("Firewall","IGMP Proxy", "Edit");
+$pgtitle = array(gettext("Firewall"),gettext("IGMP Proxy"), gettext("Edit"));
require("guiconfig.inc");
@@ -76,7 +76,7 @@ if ($_POST) {
if (isset($id) && $id == $pid)
continue;
if ($proxyentry['type'] == "upstream" && $proxyentry['ifname'] != $_POST['interface'])
- $input_errors[] = "Only one 'upstream' interface can be configured.";
+ $input_errors[] = gettext("Only one 'upstream' interface can be configured.");
}
}
$igmpentry = array();
@@ -154,10 +154,10 @@ include("head.inc");
<form action="services_igmpproxy_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">IGMP Proxy Edit</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("IGMP Proxy Edit");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Interface</td>
+ <td valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td class="vtable"> <select name="ifname" id="ifname" >
<?php $iflist = get_configured_interface_with_descr();
foreach ($iflist as $ifnam => $ifdescr) {
@@ -171,56 +171,56 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
<br />
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed).");?>
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Type</td>
+ <td valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td class="vtable">
<select name="type" class="formselect" id="type" >
- <option value="upstream" <?php if ($pconfig['type'] == "upstream") echo "selected"; ?>>Upstream Interface</option>
- <option value="downstream" <?php if ($pconfig['type'] == "downstream") echo "selected"; ?>>Downstream Interface</option>
+ <option value="upstream" <?php if ($pconfig['type'] == "upstream") echo "selected"; ?>><?=gettext("Upstream Interface");?></option>
+ <option value="downstream" <?php if ($pconfig['type'] == "downstream") echo "selected"; ?>><?=gettext("Downstream Interface");?></option>
</select>
<br />
<span class="vexpl">
- The <b>upstream</b> network interface is the outgoing interface which is
- responsible for communicating to available multicast data sources.
- There can only be one upstream interface.
+ <?=gettext("The <b>upstream</b> network interface is the outgoing interface which is".
+ " responsible for communicating to available multicast data sources.".
+ " There can only be one upstream interface.");?>
</span>
<br />
<span class="vexpl">
- <b>Downstream</b> network interfaces are the distribution interfaces to the
- destination networks, where multicast clients can join groups and
- receive multicast data. One or more downstream interfaces must be configured.
+ <b><?=gettext("Downstream"); ?></b> <?=gettext("network interfaces are the distribution interfaces to the".
+ " destination networks, where multicast clients can join groups and".
+ " receive multicast data. One or more downstream interfaces must be configured.");?>
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Threshold</td>
+ <td valign="top" class="vncell"><?=gettext("Threshold");?></td>
<td class="vtable">
<input name="threshold" class="formfld unknown" id="threshold" value="<?php echo $pconfig['threshold'];?>">
<br />
<span class="vexpl">
- Defines the TTL threshold for the network interface. Packets
- with a lower TTL than the threshols value will be ignored. This
- setting is optional, and by default the threshold is 1.
+ <?=gettext("Defines the TTL threshold for the network interface. Packets".
+ " with a lower TTL than the threshols value will be ignored. This".
+ " setting is optional, and by default the threshold is 1.");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport">Network (s)</div></td>
+ <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport"><?=gettext("Network (s)");?></div></td>
<td width="78%" class="vtable">
<table id="maintable">
<tbody>
<tr>
- <td><div id="onecolumn">Network</div></td>
- <td><div id="twocolumn">CIDR</div></td>
+ <td><div id="onecolumn"><?=gettext("Network");?></div></td>
+ <td><div id="twocolumn"><?=gettext("CIDR");?></div></td>
</tr>
<?php
@@ -254,7 +254,7 @@ include("head.inc");
</select>
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
</td>
</tr>
<?php
@@ -269,15 +269,15 @@ include("head.inc");
</tfoot>
</table>
<a onclick="javascript:addRowTo('maintable'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="add another entry" />
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
</a>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
- <a href="services_igmpproxy.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" /></a>
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
+ <a href="services_igmpproxy.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
<?php if (isset($id) && $a_igmpproxy[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/services_rfc2136.php b/usr/local/www/services_rfc2136.php
index a8e9913..563ee26 100644
--- a/usr/local/www/services_rfc2136.php
+++ b/usr/local/www/services_rfc2136.php
@@ -52,7 +52,7 @@ if ($_GET['act'] == "del") {
exit;
}
-$pgtitle = array("Services", "RFC 2136 clients");
+$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients"));
include("head.inc");
?>
@@ -65,8 +65,8 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("DynDns", false, "services_dyndns.php");
- $tab_array[] = array("RFC 2136", true, "services_rfc2136.php");
+ $tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php");
+ $tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -76,8 +76,8 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" class="listhdrr"></td>
- <td width="25%" class="listhdrr">Hostname</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_rfc2136 as $rfc2136): ?>
@@ -96,7 +96,7 @@ include("head.inc");
<?=htmlspecialchars($rfc2136['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_rfc2136_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php
index a7d9e7b..f195786 100644
--- a/usr/local/www/services_rfc2136_edit.php
+++ b/usr/local/www/services_rfc2136_edit.php
@@ -68,16 +68,16 @@ if ($_POST) {
$reqdfields = array();
$reqdfieldsn = array();
$reqdfields = array_merge($reqdfields, explode(" ", "host ttl keyname keydata"));
- $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,TTL,Key name,Key"));
+ $reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Hostname"), gettext("TTL"), gettext("Key name"), gettext("Key"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['host'] && !is_domain($_POST['host'])))
- $input_errors[] = "The DNS update host name contains invalid characters.";
+ $input_errors[] = gettext("The DNS update host name contains invalid characters.");
if (($_POST['ttl'] && !is_numericint($_POST['ttl'])))
- $input_errors[] = "The DNS update TTL must be an integer.";
+ $input_errors[] = gettext("The DNS update TTL must be an integer.");
if (($_POST['keyname'] && !is_domain($_POST['keyname'])))
- $input_errors[] = "The DNS update key name contains invalid characters.";
+ $input_errors[] = gettext("The DNS update key name contains invalid characters.");
if (!$input_errors) {
$rfc2136 = array();
@@ -97,7 +97,7 @@ if ($_POST) {
else
$a_rfc2136[] = $rfc2136;
- write_config("New/Edited RFC2136 dnsupdate entry was posted.");
+ write_config(gettext("New/Edited RFC2136 dnsupdate entry was posted."));
$retval = services_dnsupdate_process();
@@ -106,7 +106,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","RFC 2136 client", "Edit");
+$pgtitle = array(gettext("Services"),gettext("RFC 2136 client"), gettext("Edit"));
include("head.inc");
?>
@@ -120,18 +120,18 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>RFC 2136 client</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("RFC 2136 client");?></strong></td></tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Enable</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?>>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface to monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect" id="interface">
<?php $iflist = get_configured_interface_with_descr();
@@ -143,52 +143,52 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hostname</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>">
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">TTL</td>
+ <td valign="top" class="vncellreq"><?=gettext("TTL"); ?></td>
<td class="vtable">
<input name="ttl" type="text" class="formfld unknown" id="ttl" size="6" value="<?=htmlspecialchars($pconfig['ttl']);?>">
- seconds</td>
+ <?=gettext("seconds");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Key name");?></td>
<td class="vtable">
<input name="keyname" type="text" class="formfld unknown" id="keyname" size="30" value="<?=htmlspecialchars($pconfig['keyname']);?>">
<br>
- This must match the setting on the DNS server.</td>
+ <?=gettext("This must match the setting on the DNS server.");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key type </td>
+ <td valign="top" class="vncellreq"><?=gettext("Key type");?> </td>
<td class="vtable">
- <input name="keytype" type="radio" value="zone" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> Zone &nbsp;
- <input name="keytype" type="radio" value="host" <?php if ($pconfig['keytype'] == "host") echo "checked"; ?>> Host &nbsp;
- <input name="keytype" type="radio" value="user" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>> User
+ <input name="keytype" type="radio" value="zone" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> <?=gettext("Zone");?> &nbsp;
+ <input name="keytype" type="radio" value="host" <?php if ($pconfig['keytype'] == "host") echo "checked"; ?>> <?=gettext("Host");?> &nbsp;
+ <input name="keytype" type="radio" value="user" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>><?=gettext(" User");?>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key</td>
+ <td valign="top" class="vncellreq"><?=gettext("Key");?></td>
<td class="vtable">
<input name="keydata" type="text" class="formfld unknown" id="keydata" size="70" value="<?=htmlspecialchars($pconfig['keydata']);?>">
<br>
- Paste an HMAC-MD5 key here.</td>
+ <?=gettext("Paste an HMAC-MD5 key here.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Server</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server");?></td>
<td width="78%" class="vtable">
<input name="server" type="text" class+"formfld" id="server" size="30" value="<?=htmlspecialchars($pconfig['server'])?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
- <input name="usetcp" type="checkbox" id="usetcp" value="yes" <?php if ($pconfig['usetcp']) echo "checked"; ?>>
- <strong>Use TCP instead of UDP</strong></td>
+ <input name="usetcp" type="checkbox" id="usetcp" value="<?=gettext("yes");?>" <?php if ($pconfig['usetcp']) echo "checked"; ?>>
+ <strong><?=gettext("Use TCP instead of UDP");?></strong></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>">
</td>
@@ -196,8 +196,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="Cancel"></a>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
+ <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
<?php if (isset($id) && $a_rfc2136[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -205,10 +205,10 @@ include("head.inc");
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>You must configure a DNS server in <a href="system.php">System:
- General setup</a> or allow the DNS server list to be overridden
- by DHCP/PPP on WAN for dynamic DNS updates to work.</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem: " .
+ "General setup %sor allow the DNS server list to be overridden " .
+ "by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">', '</a>');?></span></td>
</tr>
</table>
</form>
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index a9f8b7b..50f70d3 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -84,11 +84,11 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "rocommunity");
- $reqdfieldsn = explode(",", "Community");
+ $reqdfieldsn = array(gettext("Community"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "pollport");
- $reqdfieldsn = explode(",", "Polling Port");
+ $reqdfieldsn = array(gettext("Polling Port"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -96,15 +96,15 @@ if ($_POST) {
if ($_POST['trapenable']) {
$reqdfields = explode(" ", "trapserver");
- $reqdfieldsn = explode(",", "Trap server");
+ $reqdfieldsn = array(gettext("Trap server"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "trapserverport");
- $reqdfieldsn = explode(",", "Trap server port");
+ $reqdfieldsn = array(gettext("Trap server port"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "trapstring");
- $reqdfieldsn = explode(",", "Trap string");
+ $reqdfieldsn = array(gettext("Trap string"));
do_input_validation($_POST, $reqdfields, $reqdfields, $reqdfieldsn, &$input_errors);
}
@@ -149,7 +149,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","SNMP");
+$pgtitle = array(gettext("Services"),gettext("SNMP"));
include("head.inc");
?>
@@ -259,35 +259,35 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>SNMP Daemon</strong></td>
- <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td>
+ <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Polling Port </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
<td width="78%" class="vtable">
<input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=$pconfig['pollport'] ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>">
- <br>Enter the port to accept polling events on (default 161)</br>
+ <br><?=gettext("Enter the port to accept polling events on (default 161)");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">System location</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
<td width="78%" class="vtable">
<input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">System contact</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
<td width="78%" class="vtable">
<input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Read Community String</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
<td width="78%" class="vtable">
<input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>">
<br>The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.</br>
@@ -319,33 +319,33 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>SNMP Traps</strong></td>
- <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td>
+ <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Trap server</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
<td width="78%" class="vtable">
<input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>">
- <br>Enter trap server name</br>
+ <br><?=gettext("Enter trap server name");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Trap server port </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
<td width="78%" class="vtable">
<input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=$pconfig['trapserverport'] ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>">
- <br>Enter the port to send the traps to (default 162)</br>
+ <br><?=gettext("Enter the port to send the traps to (default 162)");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Enter the SNMP trap string</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
<td width="78%" class="vtable">
<input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>">
- <br>Trap string</br>
+ <br><?=gettext("Trap string");?></br>
</td>
</tr>
@@ -354,37 +354,37 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>Modules</strong></td>
+ <tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td>
<td align="right" class="optsect_s">&nbsp;</td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">SNMP Modules</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
<td width="78%" class="vtable">
- <input name="mibii" type="checkbox" id="mibii" value="yes" <?php if ($pconfig['mibii']) echo "checked"; ?> >MibII
+ <input name="mibii" type="checkbox" id="mibii" value="yes" <?php if ($pconfig['mibii']) echo "checked"; ?> ><?=gettext("MibII"); ?>
<br />
- <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> >Netgraph
+ <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> ><?=gettext("Netgraph"); ?>
<br />
- <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> >PF
+ <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> ><?=gettext("PF"); ?>
<br />
- <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources
+ <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources");?>
</td>
</tr>
<?php if(!$config['interfaces']['lan']): ?>
<tr>
<td width="22%" valign="top" class="vtable"></td>
<td width="78%" class="vtable">
- <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
+ <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong><?=gettext("Bind to LAN interface only");?></strong>
<br>
- This option can be useful when trying to access the SNMP agent
- by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
+ <?=gettext("This option can be useful when trying to access the SNMP agent".
+ " by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.");?></td>
</tr>
<?php endif; ?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
</td>
</tr>
</table>
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index faf0bf9..b798e39 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -58,10 +58,10 @@ if($_GET['wakeall'] <> "") {
get_interface_subnet($if));
/* Execute wol command and check return code. */
if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
- $savemsg .= "Sent magic packet to {$mac} ({$description}).<br>";
+ $savemsg .= sprintf(gettext("Sent magic packet to %s (%s)%s"),$mac, $description, ".<br>");
}
else {
- $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$description} ({$mac}) did not complete successfully.<br>";
+ $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully%s"),'<a href=\"/diag_logs.php\">','</a>',$description,$mac,".<br>");
}
}
}
@@ -83,9 +83,9 @@ if ($_POST || $_GET['mac']) {
/* input validation */
if (!$mac || !is_macaddr($mac))
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
if (!$if)
- $input_errors[] = "A valid interface must be specified.";
+ $input_errors[] = gettext("A valid interface must be specified.");
if (!$input_errors) {
/* determine broadcast address */
@@ -93,10 +93,10 @@ if ($_POST || $_GET['mac']) {
get_interface_subnet($if));
/* Execute wol command and check return code. */
if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
- $savemsg .= "Sent magic packet to {$mac}.";
+ $savemsg .= sprintf(gettext("Sent magic packet to %s."),$mac);
}
else {
- $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$mac} did not complete successfully.<br>";
+ $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s did not complete successfully%s"),'<a href=\"/diag_logs.php\">', '</a>', $mac, ".<br>");
}
}
}
@@ -110,7 +110,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","Wake on LAN");
+$pgtitle = array(gettext("Services"),gettext("Wake on LAN"));
include("head.inc");
?>
@@ -122,10 +122,10 @@ include("head.inc");
<form action="services_wol.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Wake on LAN</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Wake on LAN");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -136,29 +136,29 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Choose which interface the host to be woken up is connected to.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface the host to be woken up is connected to.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld unknown" id="mac" size="20" value="<?=htmlspecialchars($mac);?>">
<br>
- Enter a MAC address <span class="vexpl"> in the following format: xx:xx:xx:xx:xx:xx</span></td></tr>
+ <?=gettext("Enter a MAC address ");?><span class="vexpl"> <?=gettext("in the following format: xx:xx:xx:xx:xx:xx");?></span></td></tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Send">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Send");?>">
</td>
</tr>
</table>
&nbsp;<br>
- Wake all clients at once: <a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/>
- Or Click the MAC address to wake up an individual device:
+ <?=gettext("Wake all clients at once: ");?><a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/>
+ <?=gettext("Or Click the MAC address to wake up an individual device:");?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Interface</td>
- <td width="25%" class="listhdrr">MAC address</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("MAC address");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -187,7 +187,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_wol_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -209,9 +209,9 @@ include("head.inc");
<span class="vexpl">
<span class="red">
<strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong>
- </span>This service can be used to wake up (power on) computers by sending special &quot;Magic Packets&quot;. The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings).
+ </span><?=gettext("This service can be used to wake up (power on) computers by sending special"); ?> &quot;<?=gettext("Magic Packets"); ?>&quot;. <?=gettext("The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings). ");?>
</span>
</form>
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php
index 04a7f2f..f495abf 100755
--- a/usr/local/www/services_wol_edit.php
+++ b/usr/local/www/services_wol_edit.php
@@ -79,7 +79,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface mac");
- $reqdfieldsn = explode(",", "Interface,MAC address");
+ $reqdfieldsn = array(gettext("Interface"),gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -87,7 +87,7 @@ if ($_POST) {
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
}
if (!$input_errors) {
@@ -109,7 +109,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","Wake on LAN","Edit");
+$pgtitle = array(gettext("Services"),gettext("Wake on LAN"),gettext("Edit"));
include("head.inc");
?>
@@ -120,10 +120,10 @@ include("head.inc");
<form action="services_wol_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit WOL entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit WOL entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formfld">
<?php
@@ -134,27 +134,27 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Choose which interface this host is connected to.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this host is connected to.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>">
<br>
- <span class="vexpl">Enter a MAC address in the following format:
- xx:xx:xx:xx:xx:xx<em></em></span></td>
+ <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
+ "xx:xx:xx:xx:xx:xx");?><em></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_wol[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/status.php b/usr/local/www/status.php
index d1985e3..f01b5bf 100755
--- a/usr/local/www/status.php
+++ b/usr/local/www/status.php
@@ -107,7 +107,7 @@ function defCmd($command) {
/* List all of the commands as an index. */
function listCmds() {
global $commands;
- echo "<p>This status page includes the following information:\n";
+ echo "<p>" . gettext("This status page includes the following information") . ":\n";
echo "<ul width=\"700\">\n";
for ($i = 0; isset($commands[$i]); $i++ ) {
echo "<li><strong><a href=\"#" . $commands[$i][0] . "\">" . $commands[$i][0] . "</a></strong>\n";
@@ -222,10 +222,10 @@ pre {
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<strong><?=$currentDate;?></strong>
-<p><span class="red"><strong>Note: make sure to remove any sensitive information
-(passwords, maybe also IP addresses) before posting
-information from this page in public places (like mailing lists)!</strong></span><br>
-Passwords in config.xml have been automatically removed.
+<p><span class="red"><strong><?=gettext("Note: make sure to remove any sensitive information " .
+"(passwords, maybe also IP addresses) before posting " .
+"information from this page in public places (like mailing lists)"); ?>!</strong></span><br>
+<?=gettext("Passwords in config.xml have been automatically removed"); ?>.
<div id="cmdspace" style="width:700px">
<?php listCmds(); ?>
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index 22be0be..fc24ee8 100755
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -51,7 +51,7 @@ if ($_GET['act'] == "del") {
exit;
}
-$pgtitle = array("Status: Captive portal");
+$pgtitle = array(gettext("Status: Captive portal"));
include("head.inc");
@@ -107,10 +107,10 @@ if ($_GET['order']) {
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Active Users", true, "status_captiveportal.php");
- $tab_array[] = array("Active Vouchers", false, "status_captiveportal_vouchers.php");
- $tab_array[] = array("Voucher Rolls", false, "status_captiveportal_voucher_rolls.php");
- $tab_array[] = array("Test Vouchers", false, "status_captiveportal_test.php");
+ $tab_array[] = array(gettext("Active Users"), true, "status_captiveportal.php");
+ $tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php");
+ $tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -141,7 +141,7 @@ if ($_GET['order']) {
<td class="listr"><?php if ($cpent[5]) echo htmlspecialchars(date("m/d/Y H:i:s", $cpent[5]));?></td>
<?php endif; ?>
<td valign="middle" class="list" nowrap>
- <a href="?order=<?=$_GET['order'];?>&showact=<?=$_GET['showact'];?>&act=del&id=<?=$cpent[1];?>" onclick="return confirm('Do you really want to disconnect this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <a href="?order=<?=$_GET['order'];?>&showact=<?=$_GET['showact'];?>&act=del&id=<?=$cpent[1];?>" onclick="return confirm(gettext('Do you really want to disconnect this client?'))"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php endforeach; ?>
</table>
diff --git a/usr/local/www/status_captiveportal_test.php b/usr/local/www/status_captiveportal_test.php
index 5d89810..c6d1dab 100644
--- a/usr/local/www/status_captiveportal_test.php
+++ b/usr/local/www/status_captiveportal_test.php
@@ -35,7 +35,6 @@
##|*MATCH=status_captiveportal_test.php*
##|-PRIV
-$pgtitle = array("Status", "Captive portal", "Test Vouchers");
require("guiconfig.inc");
require("functions.inc");
require("filter.inc");
@@ -45,6 +44,7 @@ require_once("voucher.inc");
include("head.inc");
include("fbegin.inc");
+$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Test Vouchers"));
?>
<form action="status_captiveportal_test.php" method="post" enctype="multipart/form-data" name="iform" id="iform">
@@ -52,10 +52,10 @@ include("fbegin.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Active Users", false, "status_captiveportal.php");
- $tab_array[] = array("Active Vouchers", false, "status_captiveportal_vouchers.php");
- $tab_array[] = array("Voucher Rolls", false, "status_captiveportal_voucher_rolls.php");
- $tab_array[] = array("Test Vouchers", true, "status_captiveportal_test.php");
+ $tab_array[] = array(gettext("Active Users"), false, "status_captiveportal.php");
+ $tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php");
+ $tab_array[] = array(gettext("Test Vouchers"), true, "status_captiveportal_test.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -64,16 +64,16 @@ include("fbegin.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="content pane">
<tr>
- <td valign="top" class="vncellreq">Voucher(s)</td>
+ <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td>
<td class="vtable">
<textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea>
<br>
-Enter multiple vouchers separated by space or newline. The remaining time, if valid, will be shown for each voucher.</td>
+<?=gettext("Enter multiple vouchers separated by space or newline. The remaining time, if valid, will be shown for each voucher"); ?>.</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Submit">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
</td>
</tr>
</table>
diff --git a/usr/local/www/status_captiveportal_voucher_rolls.php b/usr/local/www/status_captiveportal_voucher_rolls.php
index 8863365..3276c7b 100644
--- a/usr/local/www/status_captiveportal_voucher_rolls.php
+++ b/usr/local/www/status_captiveportal_voucher_rolls.php
@@ -35,13 +35,13 @@
##|*MATCH=status_captiveportal_voucher_rolls.php*
##|-PRIV
-$pgtitle = array("Status", "Captive portal", "Voucher Rolls");
require("guiconfig.inc");
require("functions.inc");
require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Voucher Rolls"));
if (!is_array($config['voucher']['roll'])) {
$config['voucher']['roll'] = array();
@@ -57,10 +57,10 @@ include("fbegin.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Active Users", false, "status_captiveportal.php");
- $tab_array[] = array("Active Vouchers", false, "status_captiveportal_vouchers.php");
- $tab_array[] = array("Voucher Rolls", true, "status_captiveportal_voucher_rolls.php");
- $tab_array[] = array("Test Vouchers", false, "status_captiveportal_test.php");
+ $tab_array[] = array(gettext("Active Users"), false, "status_captiveportal.php");
+ $tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("Voucher Rolls"), true, "status_captiveportal_voucher_rolls.php");
+ $tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -69,13 +69,13 @@ include("fbegin.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane">
<tr>
- <td class="listhdrr">Roll#</td>
- <td class="listhdrr">Minutes/Ticket</td>
- <td class="listhdrr"># of Tickets</td>
- <td class="listhdrr">Comment</td>
- <td class="listhdrr">used</td>
- <td class="listhdrr">active</td>
- <td class="listhdr">ready</td>
+ <td class="listhdrr"><?=gettext("Roll#"); ?></td>
+ <td class="listhdrr"><?=gettext("Minutes/Ticket"); ?></td>
+ <td class="listhdrr"><?=gettext("# of Tickets"); ?></td>
+ <td class="listhdrr"><?=gettext("Comment"); ?></td>
+ <td class="listhdrr"><?=gettext("used"); ?></td>
+ <td class="listhdrr"><?=gettext("active"); ?></td>
+ <td class="listhdr"><?=gettext("ready"); ?></td>
</tr>
<?php
$voucherlck = lock('voucher');
diff --git a/usr/local/www/status_captiveportal_vouchers.php b/usr/local/www/status_captiveportal_vouchers.php
index fa9942d..39a6f56 100644
--- a/usr/local/www/status_captiveportal_vouchers.php
+++ b/usr/local/www/status_captiveportal_vouchers.php
@@ -35,13 +35,13 @@
##|*MATCH=status_captiveportal_vouchers.php*
##|-PRIV
-$pgtitle = array("Status", "Captive portal", "Vouchers");
require("guiconfig.inc");
require("functions.inc");
require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Vouchers"));
function clientcmp($a, $b) {
global $order;
@@ -87,10 +87,10 @@ include("fbegin.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Active Users", false, "status_captiveportal.php");
- $tab_array[] = array("Active Vouchers", true, "status_captiveportal_vouchers.php");
- $tab_array[] = array("Voucher Rolls", false, "status_captiveportal_voucher_rolls.php");
- $tab_array[] = array("Test Vouchers", false, "status_captiveportal_test.php");
+ $tab_array[] = array(gettext("Active Users"), false, "status_captiveportal.php");
+ $tab_array[] = array(gettext("Active Vouchers"), true, "status_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php");
+ $tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -99,11 +99,11 @@ include("fbegin.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane">
<tr>
- <td class="listhdrr"><a href="?order=0&showact=<?=$_GET['showact'];?>">Voucher</a></td>
- <td class="listhdrr"><a href="?order=1&showact=<?=$_GET['showact'];?>">Roll</a></td>
- <td class="listhdrr"><a href="?order=2&showact=<?=$_GET['showact'];?>">Activated at</a></td>
- <td class="listhdrr"><a href="?order=3&showact=<?=$_GET['showact'];?>">Expires in</a></td>
- <td class="listhdr"><a href="?order=4&showact=<?=$_GET['showact'];?>">Expires at</a></td>
+ <td class="listhdrr"><a href="?order=0&showact=<?=$_GET['showact'];?>"><?=gettext("Voucher"); ?></a></td>
+ <td class="listhdrr"><a href="?order=1&showact=<?=$_GET['showact'];?>"><?=gettext("Roll"); ?></a></td>
+ <td class="listhdrr"><a href="?order=2&showact=<?=$_GET['showact'];?>"><?=gettext("Activated at"); ?></a></td>
+ <td class="listhdrr"><a href="?order=3&showact=<?=$_GET['showact'];?>"><?=gettext("Expires in"); ?></a></td>
+ <td class="listhdr"><a href="?order=4&showact=<?=$_GET['showact'];?>"><?=gettext("Expires at"); ?></a></td>
<td class="list"></td>
</tr>
<?php foreach ($db as $dbent): ?>
@@ -111,7 +111,7 @@ include("fbegin.inc");
<td class="listlr"><?=$dbent[0];?></td>
<td class="listr"><?=$dbent[1];?></td>
<td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[2]));?></td>
- <td class="listr"><?=$dbent[3];?> min</td>
+ <td class="listr"><?=$dbent[3];?> <?=gettext("min"); ?></td>
<td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $dbent[4]));?></td>
<td class="list"></td>
</tr>
diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php
index a95984c..f7981c8 100755
--- a/usr/local/www/status_dhcp_leases.php
+++ b/usr/local/www/status_dhcp_leases.php
@@ -45,7 +45,7 @@
require("guiconfig.inc");
-$pgtitle = array("Status","DHCP leases");
+$pgtitle = array(gettext("Status"),gettext("DHCP leases"));
$leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases";
@@ -280,11 +280,11 @@ if(count($pools) > 0) {
?>
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">Failover Group</a></td>
- <td class="listhdrr">My State</a></td>
- <td class="listhdrr">Since</a></td>
- <td class="listhdrr">Peer State</a></td>
- <td class="listhdrr">Since</a></td>
+ <td class="listhdrr"><?=gettext("Failover Group"); ?></a></td>
+ <td class="listhdrr"><?=gettext("My State"); ?></a></td>
+ <td class="listhdrr"><?=gettext("Since"); ?></a></td>
+ <td class="listhdrr"><?=gettext("Peer State"); ?></a></td>
+ <td class="listhdrr"><?=gettext("Since"); ?></a></td>
</tr>
<?php
foreach ($pools as $data) {
@@ -311,13 +311,13 @@ foreach ($pools as $data) {
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr"><a href="#">IP address</a></td>
- <td class="listhdrr"><a href="#">MAC address</a></td>
- <td class="listhdrr"><a href="#">Hostname</a></td>
- <td class="listhdrr"><a href="#">Start</a></td>
- <td class="listhdrr"><a href="#">End</a></td>
- <td class="listhdrr"><a href="#">Online</a></td>
- <td class="listhdrr"><a href="#">Lease Type</a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("IP address"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("MAC address"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("Hostname"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("Start"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("End"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("Online"); ?></a></td>
+ <td class="listhdrr"><a href="#"><?=gettext("Lease Type"); ?></a></td>
</tr>
<?php
foreach ($leases as $data) {
@@ -354,7 +354,7 @@ foreach ($leases as $data) {
echo "<tr>\n";
echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane}&nbsp;</td>\n";
if ($data['online'] != "online") {
- echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac={$data['mac']}\" title=\"send Wake on LAN packet to this MAC address\">{$data['mac']}</a>{$fspane}&nbsp;</td>\n";
+ echo "<td class=\"listr\">{$fspans}<a href=\"services_wol.php?if={$data['if']}&mac={$data['mac']}\" title=\"" . gettext("send Wake on LAN packet to this MAC address") ."\">{$data['mac']}</a>{$fspane}&nbsp;</td>\n";
} else {
echo "<td class=\"listr\">{$fspans}{$data['mac']}{$fspane}&nbsp;</td>\n";
}
@@ -371,19 +371,19 @@ foreach ($leases as $data) {
if ($data['type'] == "dynamic") {
echo "<td valign=\"middle\"><a href=\"services_dhcp_edit.php?if={$data['if']}&mac={$data['mac']}&hostname={$data['hostname']}\">";
- echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"add a static mapping for this MAC address\"></a></td>\n";
+ echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\"></a></td>\n";
} else {
echo "<td class=\"list\" valign=\"middle\">";
echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\"></td>\n";
}
echo "<td valign=\"middle\"><a href=\"services_wol_edit.php?if={$data['if']}&mac={$data['mac']}&descr={$data['hostname']}\">";
- echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_wol_all.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"add a Wake on LAN mapping for this MAC address\"></a></td>\n";
+ echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_wol_all.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a Wake on LAN mapping for this MAC address") ."\"></a></td>\n";
/* Only show the button for offline dynamic leases */
if (($data['type'] == "dynamic") && ($data['online'] != "online")) {
echo "<td class=\"list\" valign=\"middle\"><a href=\"status_dhcp_leases.php?deleteip={$data['ip']}&all={$_GET['all']}\">";
- echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"delete this DHCP lease\"></a></td>\n";
+ echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\"></a></td>\n";
}
echo "</tr>\n";
}
@@ -396,14 +396,14 @@ foreach ($leases as $data) {
<input type="hidden" name="order" value="<?=$_GET['order'];?>">
<?php if ($_GET['all']): ?>
<input type="hidden" name="all" value="0">
-<input type="submit" class="formbtn" value="Show active and static leases only">
+<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>">
<?php else: ?>
<input type="hidden" name="all" value="1">
-<input type="submit" class="formbtn" value="Show all configured leases">
+<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>">
<?php endif; ?>
</form>
<?php if($leases == 0): ?>
-<p><strong>No leases file found. Is the DHCP server active?</strong></p>
+<p><strong><?=gettext("No leases file found. Is the DHCP server active"); ?>?</strong></p>
<?php endif; ?>
<?php include("fend.inc"); ?>
diff --git a/usr/local/www/status_filter_reload.php b/usr/local/www/status_filter_reload.php
index 67c5517..3d97c8e 100644
--- a/usr/local/www/status_filter_reload.php
+++ b/usr/local/www/status_filter_reload.php
@@ -41,7 +41,7 @@ require_once("globals.inc");
require_once("guiconfig.inc");
require_once("functions.inc");
-$pgtitle = array("Status","Filter Reload Status");
+$pgtitle = array(gettext("Status"),gettext("Filter Reload Status"));
if(file_exists("{$g['varrun_path']}/filter_reload_status"))
$status = file_get_contents("{$g['varrun_path']}/filter_reload_status");
@@ -67,7 +67,7 @@ include("head.inc");
<p>
-<div id="reloadinfo" name="reloadinfo">This page will automatically refresh every 3 seconds until the filter is done reloading.</div>
+<div id="reloadinfo" name="reloadinfo"><?=gettext("This page will automatically refresh every 3 seconds until the filter is done reloading"); ?>.</div>
diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php
index 2a91b77..f70f539 100755
--- a/usr/local/www/status_gateway_groups.php
+++ b/usr/local/www/status_gateway_groups.php
@@ -45,11 +45,11 @@ if (!is_array($config['gateways']['gateway_group']))
$config['gateways']['gateway_group'] = array();
$a_gateway_groups = &$config['gateways']['gateway_group'];
-$changedesc = "Gateway Groups: ";
+$changedesc = gettext("Gateway Groups") . ": ";
$gateways_status = return_gateways_status();
-$pgtitle = array("Status","Gateway Groups");
+$pgtitle = array(gettext("Status"),gettext("Gateway Groups"));
include("head.inc");
?>
@@ -61,8 +61,8 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Gateways", false, "status_gateways.php");
- $tab_array[1] = array("Groups", true, "status_gateway_groups.php");
+ $tab_array[0] = array(gettext("Gateways"), false, "status_gateways.php");
+ $tab_array[1] = array(gettext("Groups"), true, "status_gateway_groups.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -71,9 +71,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Group Name</td>
- <td width="50%" class="listhdrr">Gateways</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Group Name"); ?></td>
+ <td width="50%" class="listhdrr"><?=gettext("Gateways"); ?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
<?php $i = 0; foreach ($a_gateway_groups as $gateway_group): ?>
<tr>
@@ -97,7 +97,7 @@ include("head.inc");
echo "<tr>";
foreach($priorities as $number => $tier) {
- echo "<td width='120'>Tier $number</td>";
+ printf(gettext("%sTier %s%s"), "<td width='120'>", $number, "</td>");
}
echo "</tr>\n";
@@ -120,19 +120,19 @@ include("head.inc");
if($p == $c) {
$status = $gateways_status[$monitor]['status'];
if (stristr($status, "down")) {
- $online = "Offline";
+ $online = gettext("Offline");
$bgcolor = "lightcoral";
} elseif (stristr($status, "loss")) {
- $online = "Warning, Packetloss";
+ $online = gettext("Warning, Packetloss");
$bgcolor = "khaki";
} elseif (stristr($status, "delay")) {
- $online = "Warning, Latency";
+ $online = gettext("Warning, Latency");
$bgcolor = "khaki";
} elseif ($status == "none") {
- $online = "Online";
+ $online = gettext("Online");
$bgcolor = "lightgreen";
} else {
- $online = "Unknown";
+ $online = gettext("Unknown");
$bgcolor = "lightblue";
}
echo "<td bgcolor='$bgcolor'>". htmlspecialchars($member) .", $online</td>";
diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php
index bffdb3b..eac1b2f 100755
--- a/usr/local/www/status_gateways.php
+++ b/usr/local/www/status_gateways.php
@@ -48,7 +48,7 @@ $gateways_status = return_gateways_status();
$now = time();
$year = date("Y");
-$pgtitle = array("Status","Gateways");
+$pgtitle = array(gettext("Status"),gettext("Gateways"));
include("head.inc");
?>
@@ -59,8 +59,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Gateways", true, "status_gateways.php");
- $tab_array[] = array("Gateway Groups", false, "status_gateway_groups.php");
+ $tab_array[] = array(gettext("Gateways"), true, "status_gateways.php");
+ $tab_array[] = array(gettext("Gateway Groups"), false, "status_gateway_groups.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -69,11 +69,11 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Gateway</td>
- <td width="10%" class="listhdrr">Monitor</td>
- <td width="30%" class="listhdrr">Status</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Gateway"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Monitor"); ?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Status"); ?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
<?php foreach ($gateways_status as $target => $gateway) {
?>
@@ -91,16 +91,16 @@ include("head.inc");
<table border="0" cellpadding="0" cellspacing="2">
<?php
if (stristr($gateway['status'], "down")) {
- $online = "Offline";
+ $online = gettext("Offline");
$bgcolor = "lightcoral";
} elseif (stristr($gateway['status'], "loss")) {
- $online = "Warning, Packetloss";
+ $online = gettext("Warning, Packetloss");
$bgcolor = "khaki";
} elseif (stristr($gateway['status'], "delay")) {
- $online = "Warning, Latency";
+ $online = gettext("Warning, Latency");
$bgcolor = "khaki";
} elseif ($gateway['status'] == "none") {
- $online = "Online";
+ $online = gettext("Online");
$bgcolor = "lightgreen";
}
echo "<tr><td bgcolor=\"$bgcolor\" > $online </td><td>";
@@ -110,9 +110,9 @@ include("head.inc");
array_shift($lastchange);
array_shift($lastchange);
$lastchange = implode(" ", $lastchange);
- echo "Last check $lastchange";
+ printf(gettext("Last check %s"), $lastchange);
} else {
- echo "Gathering data";
+ echo gettext("Gathering data");
}
echo "</td></tr>";
?>
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index a4f940b..c8ad06d 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -59,7 +59,7 @@ if ($_GET['if'])
else
$curif = "wan";
-$pgtitle = array("Status","Traffic Graph");
+$pgtitle = array(gettext("Status"),gettext("Traffic Graph"));
include("head.inc");
@@ -149,7 +149,7 @@ function updateBandwidthHosts(data){
<?php include("fbegin.inc"); ?>
<?php
-$ifdescrs = array('wan' => 'WAN', 'lan' => 'LAN');
+$ifdescrs = array('wan' => gettext('WAN'), 'lan' => gettext('LAN'));
for($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
if(isset($config['interfaces']['opt' . $j]['enable']))
@@ -173,7 +173,7 @@ foreach ($ifdescrs as $ifn => $ifd) {
?>
</select>
</form>
-<p><span class="red"><strong>Note:</strong></span> the <a href="http://www.adobe.com/svg/viewer/install/" target="_blank">Adobe SVG Viewer</a>, Firefox 1.5 or later or other browser supporting SVG is required to view the graph.
+<p><span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("the"); ?> <a href="http://www.adobe.com/svg/viewer/install/" target="_blank"><?=gettext("Adobe SVG Viewer"); ?></a>, <?=gettext("Firefox 1.5 or later or other browser supporting SVG is required to view the graph"); ?>.
<p><form method="post" action="status_graph.php">
</form>
<p>
@@ -181,15 +181,15 @@ foreach ($ifdescrs as $ifn => $ifd) {
<div class="widgetdiv" style="padding: 5px; float:left; width:46%">
<object data="graph.php?ifnum=<?=$curif;?>&amp;ifname=<?=rawurlencode($ifdescrs[$curif]);?>" type="image/svg+xml" width="<?=$width;?>" height="<?=$height;?>">
<param name="src" value="graph.php?ifnum=<?=$curif;?>&amp;ifname=<?=rawurlencode($ifdescrs[$curif]);?>" />
- Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin.
+ <?=gettext("Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin"); ?>.
</object>
</div>
<div class="widgetdiv" style="padding: 5px; float:right; width:48%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td class="listtopic" valign="top">Host IP</td>
- <td class="listtopic" valign="top">Bandwidth In</td>
- <td class="listtopic" valign="top">Bandwidth Out</td>
+ <td class="listtopic" valign="top"><?=gettext("Host IP"); ?></td>
+ <td class="listtopic" valign="top"><?=gettext("Bandwidth In"); ?></td>
+ <td class="listtopic" valign="top"><?=gettext("Bandwidth Out"); ?></td>
</tr>
<tr id="host0" style="display:none">
<td id="hostip0" class="vncell">
diff --git a/usr/local/www/status_graph_cpu.php b/usr/local/www/status_graph_cpu.php
index 6d8278c..cefe472 100644
--- a/usr/local/www/status_graph_cpu.php
+++ b/usr/local/www/status_graph_cpu.php
@@ -38,17 +38,17 @@
##|*MATCH=status_graph_cpu.php*
##|-PRIV
-$pgtitle = array("Status", "CPU load");
+$pgtitle = array(gettext("Status"), gettext("CPU load"));
require("guiconfig.inc");
include("head.inc");
include("fbegin.inc");
-$pgtitle = "Status: CPU Graph";
+$pgtitle = gettext("Status: CPU Graph");
?>
<div align="center">
<embed src="graph_cpu.php" type="image/svg+xml"
width="550" height="275" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
</div>
-<br><span class="red"><strong>Note:</strong></span> if you can't see the graph, you may have to install the <a href="http://www.adobe.com/svg/viewer/install/" target="_blank">Adobe SVG viewer</a>.
+<br><span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("if you can't see the graph, you may have to install the"); ?> <a href="http://www.adobe.com/svg/viewer/install/" target="_blank"><?=gettext("Adobe SVG viewer"); ?></a>.
<?php include("fend.inc"); ?>
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index 52d6a93..d6fdced 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -55,7 +55,7 @@ if ($_GET['if']) {
exit;
}
-$pgtitle = array("Status","Interfaces");
+$pgtitle = array(gettext("Status"),gettext("Interfaces"));
include("head.inc");
?>
@@ -76,11 +76,11 @@ include("head.inc");
<?php endif; ?>
<tr>
<td colspan="2" class="listtopic">
- <?=htmlspecialchars($ifname);?> interface (<?=htmlspecialchars($ifinfo['hwif']);?>)
+ <?=htmlspecialchars($ifname);?> <?=gettext("interface"); ?> (<?=htmlspecialchars($ifinfo['hwif']);?>)
</td>
</tr>
<tr>
- <td width="22%" class="vncellt">Status</td>
+ <td width="22%" class="vncellt"><?=gettext("Status"); ?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['status']);?>
</td>
@@ -94,56 +94,56 @@ include("head.inc");
<?=htmlspecialchars($ifinfo['dhcplink']);?>&nbsp;&nbsp;
<?php if ($ifinfo['dhcplink'] == "up"): ?>
<a href="status_interfaces.php?action=Release&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Release" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Release");?>" class="formbtns">
<?php else: ?>
<a href="status_interfaces.php?action=Renew&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Renew" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Renew");?>" class="formbtns">
<?php endif; ?>
</a>
</td>
</tr>
<?php endif; if ($ifinfo['pppoelink']): ?>
<tr>
- <td width="22%" class="vncellt">PPPoE</td>
+ <td width="22%" class="vncellt"><?=gettext("PPPoE"); ?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['pppoelink']);?>&nbsp;&nbsp;
<?php if ($ifinfo['pppoelink'] == "up"): ?>
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Disconnect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns">
<?php else: ?>
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Connect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns">
<?php endif; ?>
</a>
</td>
</tr>
<?php endif; if ($ifinfo['pptplink']): ?>
<tr>
- <td width="22%" class="vncellt">PPTP</td>
+ <td width="22%" class="vncellt"><?=gettext("PPTP"); ?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['pptplink']);?>&nbsp;&nbsp;
<?php if ($ifinfo['pptplink'] == "up"): ?>
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Disconnect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns">
<?php else: ?>
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Connect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns">
<?php endif; ?>
</a>
</td>
</tr>
<?php endif; if ($ifinfo['ppplink']): ?>
<tr>
- <td width="22%" class="vncellt">PPP</td>
+ <td width="22%" class="vncellt"><?=gettext("PPP"); ?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['pppinfo']);?>
<?php if ($ifinfo['ppplink'] == "up"): ?>
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Disconnect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns">
<?php else: ?>
<?php if (!$ifinfo['nodevice']): ?>
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
- <input type="button" name="<?php echo $ifdescr; ?>" value="Connect" class="formbtns">
+ <input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns">
<?php endif; ?>
<?php endif; ?>
</a>
@@ -151,14 +151,14 @@ include("head.inc");
</tr>
<?php endif; if ($ifinfo['ppp_uptime'] || $ifinfo['ppp_uptime_accumulated']): ?>
<tr>
- <td width="22%" class="vncellt">Uptime <?php if ($ifinfo['ppp_uptime_accumulated']) echo "(historical)"; ?></td>
+ <td width="22%" class="vncellt"><?=gettext("Uptime ");?><?php if ($ifinfo['ppp_uptime_accumulated']) echo "(historical)"; ?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['ppp_uptime']);?> <?=htmlspecialchars($ifinfo['ppp_uptime_accumulated']);?>
</td>
</tr>
<?php endif; if ($ifinfo['macaddr']): ?>
<tr>
- <td width="22%" class="vncellt">MAC address</td>
+ <td width="22%" class="vncellt"><?=gettext("MAC address");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['macaddr']);?>
</td>
@@ -167,7 +167,7 @@ include("head.inc");
<?php if ($ifinfo['dhcplink'] != "down" && $ifinfo['pppoelink'] != "down" && $ifinfo['pptplink'] != "down"): ?>
<?php if ($ifinfo['ipaddr']): ?>
<tr>
- <td width="22%" class="vncellt">IP address</td>
+ <td width="22%" class="vncellt"><?=gettext("IP address");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['ipaddr']);?>
&nbsp;
@@ -175,14 +175,14 @@ include("head.inc");
</tr>
<?php endif; ?><?php if ($ifinfo['subnet']): ?>
<tr>
- <td width="22%" class="vncellt">Subnet mask</td>
+ <td width="22%" class="vncellt"><?=gettext("Subnet mask");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['subnet']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['gateway']): ?>
<tr>
- <td width="22%" class="vncellt">Gateway</td>
+ <td width="22%" class="vncellt"><?=gettext("Gateway");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($config['interfaces'][$ifdescr]['gateway']);?>
<?=htmlspecialchars($ifinfo['gateway']);?>
@@ -190,7 +190,7 @@ include("head.inc");
</tr>
<?php endif; if ($ifdescr == "wan" && file_exists("{$g['varetc_path']}/resolv.conf")): ?>
<tr>
- <td width="22%" class="vncellt">ISP DNS servers</td>
+ <td width="22%" class="vncellt"><?=gettext("ISP DNS servers");?></td>
<td width="78%" class="listr">
<?php
$dns_servers = get_dns_servers();
@@ -202,49 +202,49 @@ include("head.inc");
</tr>
<?php endif; endif; if ($ifinfo['media']): ?>
<tr>
- <td width="22%" class="vncellt">Media</td>
+ <td width="22%" class="vncellt"><?=gettext("Media");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['media']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['channel']): ?>
<tr>
- <td width="22%" class="vncellt">Channel</td>
+ <td width="22%" class="vncellt"><?=gettext("Channel");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['channel']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['ssid']): ?>
<tr>
- <td width="22%" class="vncellt">SSID</td>
+ <td width="22%" class="vncellt"><?=gettext("SSID");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['ssid']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['bssid']): ?>
<tr>
- <td width="22%" class="vncellt">BSSID</td>
+ <td width="22%" class="vncellt"><?=gettext("BSSID");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['bssid']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['rate']): ?>
<tr>
- <td width="22%" class="vncellt">Rate</td>
+ <td width="22%" class="vncellt"><?=gettext("Rate");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['rate']);?>
</td>
</tr>
<?php endif; ?><?php if ($ifinfo['rssi']): ?>
<tr>
- <td width="22%" class="vncellt">RSSI</td>
+ <td width="22%" class="vncellt"><?=gettext("RSSI");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['rssi']);?>
</td>
</tr>
<?php endif; ?>
<tr>
- <td width="22%" class="vncellt">In/out packets</td>
+ <td width="22%" class="vncellt"><?=gettext("In/out packets");?></td>
<td width="78%" class="listr">
<?php
echo htmlspecialchars($ifinfo['inpkts'] . "/" . $ifinfo['outpkts'] . " (");
@@ -253,7 +253,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" class="vncellt">In/out packets (pass)</td>
+ <td width="22%" class="vncellt"><?=gettext("In/out packets (pass)");?></td>
<td width="78%" class="listr">
<?php
echo htmlspecialchars($ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass'] . " (");
@@ -262,7 +262,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" class="vncellt">In/out packets (block)</td>
+ <td width="22%" class="vncellt"><?=gettext("In/out packets (block)");?></td>
<td width="78%" class="listr">
<?php
echo htmlspecialchars($ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock'] . " (");
@@ -272,7 +272,7 @@ include("head.inc");
</tr>
<?php if (isset($ifinfo['inerrs'])): ?>
<tr>
- <td width="22%" class="vncellt">In/out errors</td>
+ <td width="22%" class="vncellt"><?=gettext("In/out errors");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);?>
</td>
@@ -280,7 +280,7 @@ include("head.inc");
<?php endif; ?>
<?php if (isset($ifinfo['collisions'])): ?>
<tr>
- <td width="22%" class="vncellt">Collisions</td>
+ <td width="22%" class="vncellt"><?=gettext("Collisions");?></td>
<td width="78%" class="listr">
<?=htmlspecialchars($ifinfo['collisions']);?>
</td>
@@ -289,7 +289,7 @@ include("head.inc");
<?php endif; ?>
<?php if ($ifinfo['bridge']): ?>
<tr>
- <td width="22%" class="vncellt">Bridge (<?=$ifinfo['bridgeint']?>)</td>
+ <td width="22%" class="vncellt"><?php printf(gettext("Bridge (%s)"),$ifinfo['bridgeint']);?></td>
<td width="78%" class="listr">
<?=$ifinfo['bridge'];?>
</td>
@@ -311,12 +311,12 @@ include("head.inc");
?>
<?php if($interrupt_total): ?>
<tr>
- <td width="22%" class="vncellt">Interrupts/Second</td>
+ <td width="22%" class="vncellt"><?=gettext("Interrupts/Second");?></td>
<td width="78%" class="listr">
<?php
- echo $interrupt_total . " total";
+ echo $interrupt_total . " " . gettext("total");
echo "<br/>";
- echo $interrupt_sec . " rate";
+ echo $interrupt_sec . " " . gettext("rate");
?>
</td>
</tr>
@@ -327,10 +327,10 @@ include("head.inc");
<br/>
-</strong>Using dial-on-demand will bring the connection up again if any packet
-triggers it. To substantiate this point: disconnecting manually
-will <strong>not</strong> prevent dial-on-demand from making connections
-to the outside! Don't use dial-on-demand if you want to make sure that the line
-is kept disconnected.
+</strong><?php printf(gettext("Using dial-on-demand will bring the connection up again if any packet ".
+"triggers it. To substantiate this point: disconnecting manually ".
+"will %snot%s prevent dial-on-demand from making connections ".
+"to the outside! Don't use dial-on-demand if you want to make sure that the line ".
+"is kept disconnected."),'<strong>','</strong>')?>
<?php include("fend.inc"); ?>
diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php
index 5a87e35..54f3398 100755
--- a/usr/local/www/status_lb_pool.php
+++ b/usr/local/www/status_lb_pool.php
@@ -55,7 +55,7 @@ if (!$nentries)
$now = time();
$year = date("Y");
-$pgtitle = array("Status","Load Balancer","Pool");
+$pgtitle = array(gettext("Status"),gettext("Load Balancer"),gettext("Pool"));
include("head.inc");
?>
@@ -67,8 +67,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Pools", true, "status_lb_pool.php");
- $tab_array[] = array("Virtual Servers", false, "status_lb_vs.php");
+ $tab_array[] = array(gettext("Pools"), true, "status_lb_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -77,11 +77,11 @@ include("head.inc");
<div id="mainarea">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" name="sortabletable" id="sortabletable">
<tr>
- <td width="10%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="10%" class="listhdrr">Gateways</td>
- <td width="30%" class="listhdrr">Status</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Gateways");?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Status");?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description");?></td>
</tr>
<?php $i = 0; foreach ($a_pool as $vipent):
if ($vipent['type'] == "gateway") {
@@ -126,21 +126,21 @@ include("head.inc");
$lastchange = "$date[0] $date[1] $year $date[2]";
}
if(stristr($poolstatus, $monitorip)) {
- $online = "Online";
+ $online = gettext("Online");
$bgcolor = "lightgreen";
$change = $now - strtotime("$lastchange");
if($change < 300) {
$bgcolor = "khaki";
}
} else {
- $online = "Offline";
+ $online = gettext("Offline");
$bgcolor = "lightcoral";
}
PRINT "<tr><td bgcolor=\"$bgcolor\" > $online </td><td>";
if($lastchange <> "") {
- PRINT "Last change $lastchange";
+ PRINTF(gettext("Last change %s"),$lastchange);
} else {
- PRINT "No changes found in logfile";
+ PRINT(gettext("No changes found in logfile"));
}
PRINT "</td></tr>";
}
diff --git a/usr/local/www/status_lb_vs.php b/usr/local/www/status_lb_vs.php
index 5d74cf3..91e89dd 100755
--- a/usr/local/www/status_lb_vs.php
+++ b/usr/local/www/status_lb_vs.php
@@ -108,7 +108,7 @@ function parse_summary($summary, $rdrs_a) {
return $server_a;
}
-$pgtitle = array("Status","Load Balancer","Virtual Server");
+$pgtitle = array(gettext("Status"),gettext("Load Balancer"),gettext("Virtual Server"));
include("head.inc");
?>
@@ -119,8 +119,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Pools", false, "status_lb_pool.php");
- $tab_array[] = array("Virtual Servers", true, "status_lb_vs.php");
+ $tab_array[] = array(gettext("Pools"), false, "status_lb_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -129,11 +129,11 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Port</td>
- <td width="10%" class="listhdrr">Servers</td>
- <td width="30%" class="listhdrr">Status</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Port"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Servers"); ?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Status"); ?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
<?php $i = 0; foreach ($a_vs as $vsent): ?>
<tr>
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php
index ff2f0ad..4e0c520 100644
--- a/usr/local/www/status_openvpn.php
+++ b/usr/local/www/status_openvpn.php
@@ -43,7 +43,7 @@
##|*MATCH=status_openvpn.php*
##|-PRIV
-$pgtitle = array("Status", "OpenVPN");
+$pgtitle = array(gettext("Status"), gettext("OpenVPN"));
require("guiconfig.inc");
require_once("openvpn.inc");
@@ -56,7 +56,7 @@ if($_GET['action']) {
$retval = kill_client($port, $remipp);
echo htmlentities("|{$port}|{$remipp}|{$retval}|");
} else {
- echo "invalid input";
+ echo gettext("invalid input");
}
exit;
}
@@ -78,7 +78,7 @@ function kill_client($port, $remipp) {
/* parse header list line */
if (strpos($line, "INFO:"))
continue;
- if (strpos($line, "UCCESS")) {
+ if (strpos($line, "SUCCESS")) {
$killed = 0;
}
break;
@@ -132,19 +132,19 @@ include("head.inc"); ?>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" class="listtopic">
- Client connections for <?=$server['name'];?>
+ <?=gettext("Client connections for"); ?> <?=$server['name'];?>
</td>
</tr>
<tr>
<td>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">Common Name</td>
- <td class="listhdrr">Real Address</td>
- <td class="listhdrr">Virtual Address</td>
- <td class="listhdrr">Connected Since</td>
- <td class="listhdrr">Bytes Sent</td>
- <td class="listhdrr">Bytes Received</td>
+ <td class="listhdrr"><?=gettext("Common Name"); ?></td>
+ <td class="listhdrr"><?=gettext("Real Address"); ?></td>
+ <td class="listhdrr"><?=gettext("Virtual Address"); ?></td>
+ <td class="listhdrr"><?=gettext("Connected Since"); ?></td>
+ <td class="listhdrr"><?=gettext("Bytes Sent"); ?></td>
+ <td class="listhdrr"><?=gettext("Bytes Received"); ?></td>
</tr>
<?php foreach ($server['conns'] as $conn): ?>
@@ -171,7 +171,7 @@ include("head.inc"); ?>
<img src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' height='17' width='17' border='0'
onclick="killClient('<?php echo $server['port']; ?>', '<?php echo $conn['remote_host']; ?>');" style='cursor:pointer;'
name='<?php echo "i:{$server['port']}:{$conn['remote_host']}"; ?>'
- title='Kill client connection from <?php echo $conn['remote_host']; ?>' alt='' />
+ title='<?=gettext("Kill client connection from"); ?> <?php echo $conn['remote_host']; ?>' alt='' />
</td>
</tr>
@@ -193,19 +193,19 @@ include("head.inc"); ?>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" class="listtopic">
- OpenVPN client instances statistics
+ <?=gettext("OpenVPN client instances statistics"); ?>
</td>
</tr>
<tr>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">Name</td>
- <td class="listhdrr">Status</td>
- <td class="listhdrr">Connected Since</td>
- <td class="listhdrr">Virtual Addr</td>
- <td class="listhdrr">Remote Host</td>
- <td class="listhdrr">Bytes Sent</td>
- <td class="listhdrr">Bytes Received</td>
+ <td class="listhdrr"><?=gettext("Name"); ?></td>
+ <td class="listhdrr"><?=gettext("Status"); ?></td>
+ <td class="listhdrr"><?=gettext("Connected Since"); ?></td>
+ <td class="listhdrr"><?=gettext("Virtual Addr"); ?></td>
+ <td class="listhdrr"><?=gettext("Remote Host"); ?></td>
+ <td class="listhdrr"><?=gettext("Bytes Sent"); ?></td>
+ <td class="listhdrr"><?=gettext("Bytes Received"); ?></td>
</tr>
<?php foreach ($clients as $client): ?>
@@ -241,11 +241,11 @@ include("head.inc"); ?>
}
if ($DisplayNote) {
- echo "<br/><b>NOTE:</b> You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen";
+ echo "<br/><b>" . gettext("NOTE") . ":</b> " . gettext("You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen");
}
if ((empty($clients)) && (empty($servers))) {
- echo "No OpenVPN instance defined";
+ echo gettext("No OpenVPN instance defined");
}
?>
diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php
index 03eed60..ad1c066 100755
--- a/usr/local/www/status_queues.php
+++ b/usr/local/www/status_queues.php
@@ -99,7 +99,7 @@ foreach($pfctl_vsq_array as $pfctl) {
}
}
-$pgtitle = array("Status","Traffic shaper","Queues");
+$pgtitle = array(gettext("Status"),gettext("Traffic shaper"),gettext("Queues"));
include("head.inc");
?>
@@ -108,7 +108,7 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<?php
if(!is_array($config['shaper']['queue']) && count($config['shaper']['queue']) < 1) {
- echo "Traffic shaping is not configured.";
+ echo gettext("Traffic shaping is not configured.");
include("fend.inc");
exit;
}
@@ -136,8 +136,8 @@ if(!is_array($config['shaper']['queue']) && count($config['shaper']['queue']) <
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdr" colspan="1">Queue</td>
- <td class="listhdr" colspan="6">Statistics</td>
+ <td class="listhdr" colspan="1"><?=gettext("Queue"); ?></td>
+ <td class="listhdr" colspan="6"><?=gettext("Statistics"); ?></td>
</tr>
<?php $i = 0; foreach ($a_queues as $queue): ?>
<tr><td bgcolor="#DDDDDD" colspan="7">&nbsp;</td></tr>
@@ -156,7 +156,7 @@ if(!is_array($config['shaper']['queue']) && count($config['shaper']['queue']) <
echo "<tr><td bgcolor=\"#DDDDDD\" colspan=\"7\">";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
echo "<nobr>";
- echo "<input style='border: 0px solid white; background-color:#DDDDDD; color:#000000;' size='10' name='queue{$i}pps' id='queue{$i}pps' value='(Loading)' align='left'>";
+ echo "<input style='border: 0px solid white; background-color:#DDDDDD; color:#000000;' size='10' name='queue{$i}pps' id='queue{$i}pps' value='(" . gettext("Loading") . ")' align='left'>";
echo "<input style='border: 0px solid white; background-color:#DDDDDD; color:#000000;' size='10' name='queue{$i}bps' id='queue{$i}bps' value='' align='right'>";
echo "<input style='border: 0px solid white; background-color:#DDDDDD; color:#000000;' size='10' name='queue{$i}borrows' id='queue{$i}borrows' value='' align='right'>";
echo "<input style='border: 0px solid white; background-color:#DDDDDD; color:#000000;' size='10' name='queue{$i}suspends' id='queue{$i}suspends' value='' align='right'>";
@@ -170,9 +170,9 @@ if(!is_array($config['shaper']['queue']) && count($config['shaper']['queue']) <
<?php $i++; endforeach; $total_queues = $i; ?>
</table>
<p>
- <strong><span class="red">Note:</span></strong><strong><br></strong>
- Queue graphs take 5 seconds to sample data.<br>
- You can configure the Traffic Shaper <a href="/firewall_shaper_wizards.php">here</a>.
+ <strong><span class="red"><?=gettext("Note"); ?>:</span></strong><strong><br></strong>
+ <?=gettext("Queue graphs take 5 seconds to sample data"); ?>.<br>
+ <?=gettext("You can configure the Traffic Shaper"); ?> <a href="/firewall_shaper_wizards.php"><?=gettext("here"); ?></a>.
</p>
</form>
<?php include("fend.inc"); ?>
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index 97454c9..2360b71 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -197,7 +197,7 @@ $styles = array('inverse' => 'Inverse',
$graphs = array("day", "week", "month", "quarter", "year", "4year");
$periods = array("current" => "Current Period", "previous" => "Previous Period");
-$pgtitle = array("Status","RRD Graphs");
+$pgtitle = array(gettext("Status"),gettext("RRD Graphs"));
include("head.inc");
function get_dates($curperiod, $graph) {
@@ -269,35 +269,35 @@ function get_dates($curperiod, $graph) {
<?php
$tab_array = array();
if($curcat == "system") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("System", $tabactive, "status_rrd_graph.php?cat=system");
+ $tab_array[] = array(gettext("System"), $tabactive, "status_rrd_graph.php?cat=system");
if($curcat == "traffic") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Traffic", $tabactive, "status_rrd_graph.php?cat=traffic");
+ $tab_array[] = array(gettext("Traffic"), $tabactive, "status_rrd_graph.php?cat=traffic");
if($curcat == "packets") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Packets", $tabactive, "status_rrd_graph.php?cat=packets");
+ $tab_array[] = array(gettext("Packets"), $tabactive, "status_rrd_graph.php?cat=packets");
if($curcat == "quality") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Quality", $tabactive, "status_rrd_graph.php?cat=quality");
+ $tab_array[] = array(gettext("Quality"), $tabactive, "status_rrd_graph.php?cat=quality");
if($queues) {
if($curcat == "queues") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Queues", $tabactive, "status_rrd_graph.php?cat=queues");
+ $tab_array[] = array(gettext("Queues"), $tabactive, "status_rrd_graph.php?cat=queues");
if($curcat == "queuedrops") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("QueueDrops", $tabactive, "status_rrd_graph.php?cat=queuedrops");
+ $tab_array[] = array(gettext("QueueDrops"), $tabactive, "status_rrd_graph.php?cat=queuedrops");
}
if($wireless) {
if($curcat == "wireless") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Wireless", $tabactive, "status_rrd_graph.php?cat=wireless");
+ $tab_array[] = array(gettext("Wireless"), $tabactive, "status_rrd_graph.php?cat=wireless");
}
if($cellular) {
if($curcat == "cellular") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Cellular", $tabactive, "status_rrd_graph.php?cat=cellular");
+ $tab_array[] = array(gettext("Cellular"), $tabactive, "status_rrd_graph.php?cat=cellular");
}
if($vpnusers) {
if($curcat == "vpnusers") { $tabactive = True; } else { $tabactive = False; }
$tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpnusers");
}
if($curcat == "custom") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Custom", $tabactive, "status_rrd_graph.php?cat=custom");
+ $tab_array[] = array(gettext("Custom"), $tabactive, "status_rrd_graph.php?cat=custom");
if($curcat == "settings") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Settings", $tabactive, "status_rrd_graph_settings.php");
+ $tab_array[] = array(gettext("Settings"), $tabactive, "status_rrd_graph_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -311,7 +311,7 @@ function get_dates($curperiod, $graph) {
</tr>
<tr>
<td colspan="2" class="list">
- <?=gettext("Graphs:");?>
+ <?=gettext("Graphs");?>:
<select name="option" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
@@ -323,7 +323,7 @@ function get_dates($curperiod, $graph) {
echo "<option value=\"{$database}\"";
$prettyprint = ucwords(str_replace($search, $replace, $database));
if($curoption == $database) {
- echo " selected ";
+ echo " selected";
}
echo ">" . htmlspecialchars($prettyprint) . "</option>\n";
}
@@ -355,7 +355,7 @@ function get_dates($curperiod, $graph) {
$prettyprint = ucwords(str_replace($search, $replace, $friendly));
}
if($curoption == $optionc) {
- echo " selected ";
+ echo " selected";
}
echo ">" . htmlspecialchars($prettyprint) . "</option>\n";
}
@@ -363,7 +363,7 @@ function get_dates($curperiod, $graph) {
?>
</select>
- <?=gettext("Style:");?>
+ <?=gettext("Style");?>:
<select name="style" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
foreach ($styles as $style => $styled) {
@@ -377,7 +377,7 @@ function get_dates($curperiod, $graph) {
<?
if($curcat <> "custom") {
?>
- <?=gettext("Period:");?>
+ <?=gettext("Period");?>:
<select name="period" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
foreach ($periods as $period => $value) {
@@ -396,7 +396,7 @@ function get_dates($curperiod, $graph) {
<input type="text" name="start" class="formfldunknown" length="32" value="<?php echo $start;?>">
<?=gettext("End:");?>
<input type="text" name="end" class="formfldunknown" length="32" value="<?php echo $now;?>">
- <input type="submit" name="Submit" value="Go">
+ <input type="submit" name="Submit" value="<?=gettext("Go"); ?>">
<?
$curdatabase = $curoption;
$graph = "custom-$curdatabase";
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index c559d3d..bc974b1 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -37,7 +37,7 @@ require_once("filter.inc");
require_once("shaper.inc");
require_once("rrd.inc");
-$pgtitle = array("System","RRD Graphs","Image viewer");
+$pgtitle = array(gettext("System"),gettext("RRD Graphs"),gettext("Image viewer"));
if ($_GET['database']) {
$curdatabase = basename($_GET['database']);
@@ -189,7 +189,7 @@ $rrdcolors = "./themes/{$g['theme']}/rrdcolors.inc.php";
if(file_exists($rrdcolors)) {
include($rrdcolors);
} else {
- log_error("rrdcolors.inc.php for theme {$g['theme']} does not exist, using defaults!");
+ log_error(printf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"),$g['theme']));
$colortrafficup = array("666666", "CCCCCC");
$colortrafficdown = array("990000", "CC0000");
$colorpacketsup = array("666666", "CCCCCC");
@@ -910,7 +910,7 @@ elseif((strstr($curdatabase, "-cellular.rrd")) && (file_exists("$rrddbpath$curda
}
else {
$data = false;
- log_error("Sorry we do not have data to graph for $curdatabase");
+ log_error(printf(gettext("Sorry we do not have data to graph for %s"),$curdatabase));
}
/* check modification time to see if we need to generate image */
@@ -930,16 +930,16 @@ if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) {
usleep(500);
}
if(($graphcmdreturn <> 0) || (! $data)) {
- log_error("Failed to create graph with error code $graphcmdreturn, the error is: $graphcmdoutput");
+ log_error(printf(gettext("Failed to create graph with error code %s, the error is: %s"),$graphcmdreturn,$graphcmdoutput));
if(strstr($curdatabase, "queues")) {
- log_error("failed to create graph from $rrddbpath$curdatabase, removing database");
+ log_error(printf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase));
exec("/bin/rm -f $rrddbpath$curif$queues");
flush();
usleep(500);
enable_rrd_graphing();
}
if(strstr($curdatabase, "queuesdrop")) {
- log_error("failed to create graph from $rrddbpath$curdatabase, removing database");
+ log_error(printf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase));
exec("/bin/rm -f $rrddbpath$curdatabase");
flush();
usleep(500);
diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php
index b173e00..a12e22a 100755
--- a/usr/local/www/status_rrd_graph_settings.php
+++ b/usr/local/www/status_rrd_graph_settings.php
@@ -49,13 +49,13 @@ $pconfig['category'] = $config['rrd']['category'];
$pconfig['style'] = $config['rrd']['style'];
$curcat = "settings";
-$categories = array('system' => 'System',
- 'traffic' => 'Traffic',
- 'packets' => 'Packets',
- 'quality' => 'Quality',
- 'queues' => 'Queues');
-$styles = array('inverse' => 'Inverse',
- 'absolute' => 'Absolute');
+$categories = array('system' => gettext("System"),
+ 'traffic' => gettext("Traffic"),
+ 'packets' => gettext("Packets"),
+ 'quality' => gettext("Quality"),
+ 'queues' => gettext("Queues"));
+$styles = array('inverse' => gettext("Inverse"),
+ 'absolute' => gettext("Absolute"));
if ($_POST) {
@@ -98,7 +98,7 @@ foreach($databases as $database) {
}
}
-$pgtitle = array("Status","RRD Graphs");
+$pgtitle = array(gettext("Status"),gettext("RRD Graphs"));
include("head.inc");
?>
@@ -111,37 +111,63 @@ include("head.inc");
<tr>
<td>
<?php
+ $tab_array = array();
+ if($curcat == "system") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("System"), $tabactive, "status_rrd_graph.php?cat=system");
+ if($curcat == "traffic") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Traffic"), $tabactive, "status_rrd_graph.php?cat=traffic");
+ if($curcat == "packets") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Packets"), $tabactive, "status_rrd_graph.php?cat=packets");
+ if($curcat == "quality") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Quality"), $tabactive, "status_rrd_graph.php?cat=quality");
+ if($queues) {
+ if($curcat == "queues") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Queues"), $tabactive, "status_rrd_graph.php?cat=queues");
+ if($curcat == "queuedrops") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("QueueDrops"), $tabactive, "status_rrd_graph.php?cat=queuedrops");
+ }
+ if($wireless) {
+ if($curcat == "wireless") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Wireless"), $tabactive, "status_rrd_graph.php?cat=wireless");
+ }
+ if($cellular) {
+ if($curcat == "cellular") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Cellular"), $tabactive, "status_rrd_graph.php?cat=cellular");
+ }
+ if($curcat == "settings") { $tabactive = True; } else { $tabactive = False; }
+ $tab_array[] = array(gettext("Settings"), $tabactive, "status_rrd_graph_settings.php");
+ display_top_tabs($tab_array);
$tab_array = array();
if($curcat == "system") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("System", $tabactive, "status_rrd_graph.php?cat=system");
+ $tab_array[] = array(gettext("System"), $tabactive, "status_rrd_graph.php?cat=system");
if($curcat == "traffic") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Traffic", $tabactive, "status_rrd_graph.php?cat=traffic");
+ $tab_array[] = array(gettext("Traffic"), $tabactive, "status_rrd_graph.php?cat=traffic");
if($curcat == "packets") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Packets", $tabactive, "status_rrd_graph.php?cat=packets");
+ $tab_array[] = array(gettext("Packets"), $tabactive, "status_rrd_graph.php?cat=packets");
if($curcat == "quality") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Quality", $tabactive, "status_rrd_graph.php?cat=quality");
+ $tab_array[] = array(gettext("Quality"), $tabactive, "status_rrd_graph.php?cat=quality");
if($queues) {
if($curcat == "queues") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Queues", $tabactive, "status_rrd_graph.php?cat=queues");
+ $tab_array[] = array(gettext("Queues"), $tabactive, "status_rrd_graph.php?cat=queues");
if($curcat == "queuedrops") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("QueueDrops", $tabactive, "status_rrd_graph.php?cat=queuedrops");
+ $tab_array[] = array(gettext("QueueDrops"), $tabactive, "status_rrd_graph.php?cat=queuedrops");
}
if($wireless) {
if($curcat == "wireless") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Wireless", $tabactive, "status_rrd_graph.php?cat=wireless");
+ $tab_array[] = array(gettext("Wireless"), $tabactive, "status_rrd_graph.php?cat=wireless");
}
if($cellular) {
if($curcat == "cellular") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Cellular", $tabactive, "status_rrd_graph.php?cat=cellular");
+ $tab_array[] = array(gettext("Cellular"), $tabactive, "status_rrd_graph.php?cat=cellular");
}
if($vpnusers) {
if($curcat == "vpnusers") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpnusers");
+ $tab_array[] = array(gettext("VPN"), $tabactive, "status_rrd_graph.php?cat=vpnusers");
}
if($curcat == "custom") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Custom", $tabactive, "status_rrd_graph.php?cat=custom");
+ $tab_array[] = array(gettext("Custom"), $tabactive, "status_rrd_graph.php?cat=custom");
if($curcat == "settings") { $tabactive = True; } else { $tabactive = False; }
- $tab_array[] = array("Settings", $tabactive, "status_rrd_graph_settings.php");
+ $tab_array[] = array(gettext("Settings"), $tabactive, "status_rrd_graph_settings.php");
display_top_tabs($tab_array);
?>
@@ -152,14 +178,14 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
- <td width="22%" valign="top" class="vtable">RRD Graphs</td>
+ <td width="22%" valign="top" class="vtable"><?=gettext("RRD Graphs");?></td>
<td width="78%" class="vtable">
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
+ <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked" ?> onClick="enable_change(false)">
<b><?=gettext("Enables the RRD graphing backend.");?></b>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vtable">Default category</td>
+ <td width="22%" valign="top" class="vtable"><?=gettext("Default category");?></td>
<td width="78%" class="vtable">
<select name="category" id="category" class="formselect" style="z-index: -10;" >
<?php
@@ -174,7 +200,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vtable">Default style</td>
+ <td width="22%" valign="top" class="vtable"><?=gettext("Default style");?></td>
<td width="78%" class="vtable">
<select name="style" class="formselect" style="z-index: -10;" >
<?php
@@ -191,14 +217,14 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" height="53" valign="top">&nbsp;</td>
- <td width="78%"><strong><span class="red">Note:</span></strong><br>
- <?=gettext("Graphs will not be allowed to be recreated within a 1 minute interval, please
- take this into account after changing the style.");?>
+ <td width="78%"><strong><span class="red"><?=gettext("Note");?>:</span></strong><br>
+ <?=gettext("Graphs will not be allowed to be recreated within a 1 minute interval, please " .
+ "take this into account after changing the style.");?>
</td>
</tr>
</table>
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php
index 25d3de5..536a953 100755
--- a/usr/local/www/status_services.php
+++ b/usr/local/www/status_services.php
@@ -55,7 +55,7 @@ function get_pkg_descr($package_name) {
return $pkg['descr'];
}
}
- return "Not available.";
+ return gettext("Not available.");
}
if($_GET['mode'] == "restartservice" and $_GET['service']) {
@@ -100,7 +100,7 @@ if($_GET['mode'] == "restartservice" and $_GET['service']) {
restart_service($_GET['service']);
break;
}
- $savemsg = "{$_GET['service']} has been restarted.";
+ $savemsg = sprintf(gettext("%s has been restarted."),$_GET['service']);
sleep(5);
}
@@ -143,7 +143,7 @@ if($_GET['mode'] == "startservice" and $_GET['service']) {
start_service($_GET['service']);
break;
}
- $savemsg = "{$_GET['service']} has been started.";
+ $savemsg = sprintf(gettext("%s has been started."),$_GET['service']);
sleep(5);
}
@@ -197,14 +197,14 @@ if($_GET['mode'] == "stopservice" && $_GET['service']) {
stop_service($_GET['service']);
break;
}
- $savemsg = "{$_GET['service']} " . gettext("has been stopped.");
+ $savemsg = sprintf(gettext("%s has been stopped."),$_GET['service']);
sleep(5);
}
/* batch mode, allow other scripts to call this script */
if($_GET['batch']) exit;
-$pgtitle = array("Status","Services");
+$pgtitle = array(gettext("Status"),gettext("Services"));
include("head.inc");
?>
@@ -224,9 +224,9 @@ include("fbegin.inc");
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td class="listhdrr"><b><center>Service</center></b></td>
- <td class="listhdrr"><b><center>Description</center></b></td>
- <td class="listhdrr"><b><center>Status</center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("Service");?></center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("Description");?></center></b></td>
+ <td class="listhdrr"><b><center><?=gettext("Status");?></center></b></td>
</tr>
<?php
@@ -244,19 +244,19 @@ $services = $config['installedpackages']['service'];
*/
if(isset($config['dnsmasq']['enable'])) {
$pconfig['name'] = "dnsmasq";
- $pconfig['description'] = "DNS Forwarder";
+ $pconfig['description'] = gettext("DNS Forwarder");
$services[] = $pconfig;
unset($pconfig);
}
$pconfig['name'] = "ntpd";
-$pconfig['description'] = "NTP clock sync";
+$pconfig['description'] = gettext("NTP clock sync");
$services[] = $pconfig;
unset($pconfig);
if(isset($config['captiveportal']['enable'])) {
$pconfig['name'] = "lighttpd";
- $pconfig['description'] = "Captive Portal";
+ $pconfig['description'] = gettext("Captive Portal");
$services[] = $pconfig;
$pconfig = "";
unset($pconfig);
@@ -277,28 +277,28 @@ foreach($iflist as $if) {
if($show_dhcprelay == true) {
$pconfig['name'] = "dhcrelay";
- $pconfig['description'] = "DHCP Relay";
+ $pconfig['description'] = gettext("DHCP Relay");
$services[] = $pconfig;
unset($pconfig);
}
if(is_dhcp_server_enabled()) {
$pconfig['name'] = "dhcpd";
- $pconfig['description'] = "DHCP Service";
+ $pconfig['description'] = gettext("DHCP Service");
$services[] = $pconfig;
unset($pconfig);
}
if(isset($config['snmpd']['enable'])) {
$pconfig['name'] = "bsnmpd";
- $pconfig['description'] = "SNMP Service";
+ $pconfig['description'] = gettext("SNMP Service");
$services[] = $pconfig;
unset($pconfig);
}
if (count($config['igmpproxy']['igmpentry']) > 0) {
$pconfig['name'] = "igmpproxy";
- $pconfig['descritption'] = "IGMP proxy";
+ $pconfig['descritption'] = gettext("IGMP proxy");
$services[] = $pconfig;
unset($pconfig);
}
@@ -325,7 +325,7 @@ foreach (array('server', 'client') as $mode) {
$pconfig['name'] = "openvpn";
$pconfig['mode'] = $mode;
$pconfig['id'] = $id;
- $pconfig['description'] = "OpenVPN ".$mode.": ".htmlspecialchars($setting['description']);
+ $pconfig['description'] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']);
$services[] = $pconfig;
unset($pconfig);
}
@@ -347,10 +347,10 @@ if($services) {
}
if($running) {
echo '<td class="listr"><center>';
- echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_pass.gif\"> Running</td>";
+ echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_pass.gif\"> " . gettext("Running") . "</td>";
} else {
echo '<td class="listbg"><center>';
- echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_block.gif\"> <font color=\"white\">Stopped</td>";
+ echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_block.gif\"> <font color=\"white\">" . gettext("Stopped") . "</td>";
}
echo '<td valign="middle" class="list" nowrap>';
if($running) {
@@ -359,13 +359,13 @@ if($services) {
} else {
echo "<a href='status_services.php?mode=restartservice&service={$service['name']}'>";
}
- echo "<img title='Restart Service' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_restart.gif'></a> ";
+ echo "<img title='" . gettext("Restart Service") . "' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_restart.gif'></a> ";
if ($service['name'] == "openvpn") {
echo "<a href='status_services.php?mode=stopservice&service={$service['name']}&vpnmode={$service['mode']}&id={$service['id']}'>";
} else {
echo "<a href='status_services.php?mode=stopservice&service={$service['name']}'> ";
}
- echo "<img title='Stop Service' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_stop.gif'> ";
+ echo "<img title='" . gettext("Stop Service") . "' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_stop.gif'> ";
echo "</a>";
} else {
if ($service['name'] == "openvpn") {
@@ -374,13 +374,13 @@ if($services) {
echo "<a href='status_services.php?mode=startservice&service={$service['name']}'> ";
}
- echo "<img title='Start Service' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_start.gif'></a> ";
+ echo "<img title='" . gettext("Start Service") . "' border='0' src='./themes/".$g['theme']."/images/icons/icon_service_start.gif'></a> ";
}
echo '</td>';
echo '</tr>';
}
} else {
- echo "<tr><td colspan=\"3\"><center>No services found.</td></tr>";
+ echo "<tr><td colspan=\"3\"><center>" . gettext("No services found") . ".</td></tr>";
}
?>
diff --git a/usr/local/www/status_upnp.php b/usr/local/www/status_upnp.php
index e5908d3..7197a2c 100644
--- a/usr/local/www/status_upnp.php
+++ b/usr/local/www/status_upnp.php
@@ -45,7 +45,7 @@ require("guiconfig.inc");
if ($_POST) {
if ($_POST['clear'] == "Clear") {
upnp_action('restart');
- $savemsg = "Rules have been cleared and the daemon restarted";
+ $savemsg = gettext("Rules have been cleared and the daemon restarted");
}
}
@@ -55,7 +55,7 @@ exec("/sbin/pfctl -aminiupnpd -sn", $rdr_entries, $pf_ret);
$now = time();
$year = date("Y");
-$pgtitle = array("Status","UPnP &amp; NAT-PMP Status");
+$pgtitle = array(gettext("Status"),gettext("UPnP &amp; NAT-PMP Status"));
include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
@@ -74,7 +74,7 @@ if(!$config['installedpackages']['miniupnpd']['config'][0]['iface_array'] ||
<tr>
<td class="tabcont" >
<form action="status_upnp.php" method="post">
- <input type="submit" name="clear" id="clear" value="Clear" /> all currently connected sessions.
+ <input type="submit" name="clear" id="clear" value="<?=gettext("Clear");?>" /> <?=gettext("all currently connected sessions");?>.
</form>
</td>
</tr>
@@ -82,10 +82,10 @@ if(!$config['installedpackages']['miniupnpd']['config'][0]['iface_array'] ||
<td class="tabcont" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont">
<tr>
- <td width="10%" class="listhdrr"><?=gettext("Port")?></td>
- <td width="10%" class="listhdrr"><?=gettext("Protocol")?></td>
- <td width="20%" class="listhdrr"><?=gettext("Internal IP")?></td>
- <td width="60%" class="listhdr"><?=gettext("Description")?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Port");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Protocol");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Internal IP");?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description");?></td>
</tr>
<?php $i = 0; foreach ($rdr_entries as $rdr_entry) {
if (preg_match("/on (.*) inet proto (.*) from any to any port = (.*) label \"(.*)\" rtable [0-9] -> (.*) port (.*)/", $rdr_entry, $matches))
diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php
index 0ec7e6a..50d1811 100755
--- a/usr/local/www/status_wireless.php
+++ b/usr/local/www/status_wireless.php
@@ -38,7 +38,7 @@
require_once("guiconfig.inc");
-$pgtitle = array("Status","Wireless");
+$pgtitle = array(gettext("Status"),gettext("Wireless"));
include("head.inc");
$if = $_POST['if'];
@@ -74,7 +74,7 @@ foreach($ciflist as $interface => $ifdescr) {
$enabled = false;
if($if == $interface)
$enabled = true;
- $tab_array[] = array("Status ($ifdescr)", $enabled, "status_wireless.php?if={$interface}");
+ $tab_array[] = array(printf(gettext("Status (%s)"),$ifdescr), $enabled, "status_wireless.php?if={$interface}");
}
}
display_top_tabs($tab_array);
@@ -87,7 +87,7 @@ display_top_tabs($tab_array);
/* table header */
- print "<tr><td colspan=7><b>Nearby access points or ad-hoc peers.<br/></td></tr>\n";
+ printf(gettext("%s%s%sNearby access points or ad-hoc peers.%s%s%s%s"),'<tr>','<td colspan=7>','<b>','<br/>','</td>','</tr>','\n');
print "\n<tr>";
print "<tr bgcolor='#990000'>";
print "<td><b><font color='#ffffff'>SSID</td>";
@@ -133,8 +133,8 @@ display_top_tabs($tab_array);
print "</table><table class=\"tabcont\" colspan=\"3\" cellpadding=\"3\" width=\"100%\">";
/* table header */
- print "\n<tr>";
- print "<tr><td colspan=7><b>Associated or ad-hoc peers.<br/></td></tr>\n";
+ print "\n<tr>";
+ printf(gettext("%s%s%sAssociated or ad-hoc peers.%s%s%s%s"),'<tr>','<td colspan=7>','<b>','<br/>','</td>','</tr>','\n');
print "<tr bgcolor='#990000'>";
print "<td><b><font color='#ffffff'>ADDR</td>";
print "<td><b><font color='#ffffff'>AID</td>";
diff --git a/usr/local/www/upload_progress.php b/usr/local/www/upload_progress.php
index 8a27b64..344ae67 100644
--- a/usr/local/www/upload_progress.php
+++ b/usr/local/www/upload_progress.php
@@ -41,7 +41,7 @@ include("guiconfig.inc");
// sanitize the ID value
$id = $_SESSION['uploadid'];
if (!$id) {
- echo "Sorry, we could not find an uploadid code.";
+ echo gettext("Sorry, we could not find an uploadid code.");
exit;
}
@@ -54,7 +54,7 @@ if (!$info) {
<html>
<meta http-equiv="Refresh" CONTENT="1; url=upload_progress.php?uploadid={$id}">
<body>
- Could not locate progress {$id}. Trying again...
+ <?php printf(gettext("Could not locate progress %s. Trying again..."),$id);?>
</body>
</html>
EOF;
@@ -69,7 +69,7 @@ if ($info['bytes_uploaded'] >= $info['bytes_total']) {
&nbsp;<p>
<center>
<b>
- UPLOAD completed!
+ <?=gettext("UPLOAD completed!");?>
</b>
</center>
</body>
@@ -83,7 +83,7 @@ EOF1;
<html>
<head>
<meta http-equiv="Refresh" content="1; url=<?=$url?>">
- <title>Uploading Files... Please wait ...</title>
+ <title><?=gettext("Uploading Files"); ?>... <?=gettext("Please wait"); ?> ...</title>
<style type='text/css'>
td {font-size: 10pt }
</style>
@@ -92,7 +92,7 @@ EOF1;
<table height="100%" width="100%" cellPadding="4" cellSpacing="4" style="border:1px solid #990000;">
<tr>
<td>
- <font face="arial"><b><center>Uploading file...</b></center>
+ <font face="arial"><b><center><?=gettext("Uploading file");?>...</b></center>
<br>
<table width="100%" height="15" colspacing="0" cellpadding="0" cellspacing="0" border="0" align="top" nowrap>
<tr>
@@ -120,7 +120,7 @@ EOF1;
<td align="right">
<font face="arial">
<b>
- Uploaded:
+ <?=gettext("Uploaded");?>:
</td>
<td>
<font face="arial">
@@ -130,7 +130,7 @@ EOF1;
<td align="right">
<font face="arial">
<b>
- File Size:
+ <?=gettext("File Size");?>:
</td>
<td>
<font face="arial">
@@ -142,7 +142,7 @@ EOF1;
<td align="right">
<font face="arial">
<b>
- Completed:
+ <?=gettext("Completed");?>:
</td>
<td>
<font face="arial">
@@ -152,7 +152,7 @@ EOF1;
<td align="right">
<font face="arial">
<b>
- Estimated:
+ <?=gettext("Estimated");?>:
</td>
<td>
<font face="arial">
diff --git a/usr/local/www/uploadconfig.php b/usr/local/www/uploadconfig.php
index af58111..fe73939 100644
--- a/usr/local/www/uploadconfig.php
+++ b/usr/local/www/uploadconfig.php
@@ -45,19 +45,19 @@ header("Content-Type: text/plain");
if ($_POST['config']) {
$fd = @fopen("{$g['tmp_path']}/config.xml", "w");
if (!$fd) {
- echo "ERR Could not save configuration.\n";
+ echo gettext("ERR Could not save configuration.")."\n";
exit(0);
}
fwrite($fd, $_POST['config']);
fclose($fd);
if (config_install("{$g['tmp_path']}/config.xml") == 0) {
- echo "OK\n";
+ echo gettext("OK")."\n";
system_reboot();
} else {
- echo "ERR Could not install configuration.\n";
+ echo gettext("ERR Could not install configuration.")."\n";
}
} else {
- echo "ERR Invalid configuration received.\n";
+ echo gettext("ERR Invalid configuration received.")."\n";
}
exit(0);
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php
index 2c34085..9f2e97e 100755
--- a/usr/local/www/vpn_ipsec.php
+++ b/usr/local/www/vpn_ipsec.php
@@ -117,7 +117,7 @@ if ($_GET['act'] == "delph2")
}
}
-$pgtitle = array("VPN","IPsec");
+$pgtitle = array(gettext("VPN"),gettext("IPsec"));
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -132,16 +132,16 @@ include("head.inc");
if ($savemsg)
print_info_box($savemsg);
if ($pconfig['enable'] && is_subsystem_dirty('ipsec'))
- print_info_box_np("The IPsec tunnel configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php");
- $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php");
- $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php");
+ $tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
+ $tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+ $tab_array[2] = array(gettext("Pre-shared keys"), false, "vpn_ipsec_keys.php");
display_top_tabs($tab_array);
?>
</td>
@@ -158,7 +158,7 @@ include("head.inc");
<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked";?>>
</td>
<td>
- <strong>Enable IPsec</strong>
+ <strong><?=gettext("Enable IPsec"); ?></strong>
</td>
</tr>
</table>
@@ -166,7 +166,7 @@ include("head.inc");
</tr>
<tr>
<td>
- <input name="submit" type="submit" class="formbtn" value="Save">
+ <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
</td>
</tr>
</table>
@@ -201,7 +201,7 @@ include("head.inc");
if (!isset($ph1ent['mobile']))
echo $if."<br>".$ph1ent['remote-gateway'];
else
- echo $if."<br><strong>Mobile Client</strong>";
+ echo $if."<br><strong>" . gettext("Mobile Client") . "</strong>";
?>
<?=$spane;?>
</td>
@@ -216,9 +216,9 @@ include("head.inc");
<?php
if ($ph1ent['encryption-algorithm']['keylen']) {
if ($ph1ent['encryption-algorithm']['keylen']=="auto")
- echo " (auto)";
+ echo " (" . gettext("auto") . ")";
else
- echo " ({$ph1ent['encryption-algorithm']['keylen']} bits)";
+ echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
}
?>
<?=$spane;?>
@@ -238,12 +238,12 @@ include("head.inc");
<tr>
<td>
<a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit phase1 entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
<td>
- <a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('Do you really want to delete this phase1 and all associated phase2 entries?')">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete phase1 entry" width="17" height="17" border="0">
+ <a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -253,7 +253,7 @@ include("head.inc");
</td>
<td>
<a href="vpn_ipsec_phase1.php?dup=<?=$i;?>">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="copy phase1 entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -274,21 +274,21 @@ include("head.inc");
$phase2count++;
}
?>
- <input type="button" onClick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+"></input> - Show <?=$phase2count?> Phase-2 entries</a>
+ <input type="button" onClick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+"></input> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?></a>
</div>
<table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none">
<tr>
- <td class="listhdrr">Mode</td>
+ <td class="listhdrr"><?=gettext("Mode"); ?></td>
<?php if($ph2ent['mode'] == "tunnel"): ?>
- <td class="listhdrr">Local Subnet</td>
- <td class="listhdrr">Remote Subnet</td>
+ <td class="listhdrr"><?=gettext("Local Subnet"); ?></td>
+ <td class="listhdrr"><?=gettext("Remote Subnet"); ?></td>
<?php endif; ?>
- <td class="listhdrr">P2 Protocol</td>
- <td class="listhdrr">P2 Transforms</td>
- <td class="listhdrr">P2 Auth Methods</td>
+ <td class="listhdrr"><?=gettext("P2 Protocol"); ?></td>
+ <td class="listhdrr"><?=gettext("P2 Transforms"); ?></td>
+ <td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td>
<td class ="list">
<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&mobile=true";?>">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add phase2 entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -346,9 +346,9 @@ include("head.inc");
echo $p2_ealgos[$ph2ea['name']]['name'];
if ($ph2ea['keylen']) {
if ($ph2ea['keylen']=="auto")
- echo " (auto)";
+ echo " (" . gettext("auto") . ")";
else
- echo " ({$ph2ea['keylen']} bits)";
+ echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
}
}
?>
@@ -368,10 +368,10 @@ include("head.inc");
</td>
<td nowrap class="list">
<a href="vpn_ipsec_phase2.php?p2index=<?=$j;?>">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit phase2 entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0">
</a>
- <a href="vpn_ipsec.php?act=delph2&p2index=<?=$j;?>" onclick="return confirm('Do you really want to delete this phase2 entry?')">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete phase2 entry" width="17" height="17" border="0">
+ <a href="vpn_ipsec.php?act=delph2&p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -402,7 +402,7 @@ include("head.inc");
<td width="17"></td>
<td>
<a href="vpn_ipsec_phase1.php">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add phase1 entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -414,9 +414,9 @@ include("head.inc");
<p>
<span class="vexpl">
<span class="red">
- <strong>Note:<br></strong>
+ <strong><?=gettext("Note"); ?>:<br></strong>
</span>
- You can check your IPsec status at <a href="diag_ipsec.php">Status:IPsec</a>.
+ <?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.
</span>
</p>
</td>
@@ -446,11 +446,11 @@ function show_ipsec_header($ph1ent) {
$mobile = "&mobile=true";
echo <<<EOF
<tr>
- <td class="listhdrr">Remote Gateway</td>
- <td class="listhdrr">Mode</td>
- <td class="listhdrr">P1 Protocol</td>
- <td class="listhdrr">P1 Transforms</td>
- <td class="listhdrr">P1 Description</td>
+ <td class="listhdrr"><?=gettext("Remote Gateway"); ?></td>
+ <td class="listhdrr"><?=gettext("Mode"); ?></td>
+ <td class="listhdrr"><?=gettext("P1 Protocol"); ?></td>
+ <td class="listhdrr"><?=gettext("P1 Transforms"); ?></td>
+ <td class="listhdrr"><?=gettext("P1 Description"); ?></td>
<td class ="list">
</td>
</tr>
diff --git a/usr/local/www/vpn_ipsec_keys.php b/usr/local/www/vpn_ipsec_keys.php
index c446e05..5a5f914 100644
--- a/usr/local/www/vpn_ipsec_keys.php
+++ b/usr/local/www/vpn_ipsec_keys.php
@@ -61,14 +61,14 @@ foreach ($config['system']['user'] as $id => $user) {
if ($_GET['act'] == "del") {
if ($a_secret[$_GET['id']]) {
unset($a_secret[$_GET['id']]);
- write_config("Deleted IPsec Pre-Shared Key");
+ write_config(gettext("Deleted IPsec Pre-Shared Key"));
mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec_keys.php");
exit;
}
}
-$pgtitle = "VPN: IPsec: Keys";
+$pgtitle = gettext("VPN: IPsec: Keys");
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -83,16 +83,16 @@ include("head.inc");
if ($savemsg)
print_info_box($savemsg);
if (is_subsystem_dirty('ipsec'))
- print_info_box_np("The IPsec tunnel configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Tunnels", false, "vpn_ipsec.php");
- $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php");
- $tab_array[2] = array("Pre-shared keys", true, "vpn_ipsec_keys.php");
+ $tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
+ $tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+ $tab_array[2] = array(gettext("Pre-shared keys"), true, "vpn_ipsec_keys.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -101,13 +101,13 @@ if (is_subsystem_dirty('ipsec'))
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">Identifier</td>
- <td class="listhdr">Pre-shared key</td>
+ <td class="listhdrr"><?=gettext("Identifier"); ?></td>
+ <td class="listhdr"><?=gettext("Pre-shared key"); ?></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="20" heigth="17"></td>
- <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add key" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -120,7 +120,7 @@ if (is_subsystem_dirty('ipsec'))
<td class="listr gray">
<?=htmlspecialchars($secretent['pre-shared-key']);?>
</td>
- <td class="list" nowrap><a href="system_usermanager.php?act=edit&id=<?=$secretent['id'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit key" width="17" height="17" border="0"></a>
+ <td class="list" nowrap><a href="system_usermanager.php?act=edit&id=<?=$secretent['id'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" width="17" height="17" border="0"></a>
&nbsp;</td>
</tr>
<?php $i++; endforeach; ?>
@@ -133,8 +133,8 @@ if (is_subsystem_dirty('ipsec'))
<td class="listr">
<?=htmlspecialchars($secretent['pre-shared-key']);?>
</td>
- <td class="list" nowrap> <a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit key" width="17" height="17" border="0"></a>
- &nbsp;<a href="vpn_ipsec_keys.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this pre-shared key?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete key" width="17" height="17" border="0"></a></td>
+ <td class="list" nowrap> <a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="vpn_ipsec_keys.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this pre-shared key?"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete key"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -143,7 +143,7 @@ if (is_subsystem_dirty('ipsec'))
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="20" heigth="17"></td>
- <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add key" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/vpn_ipsec_keys_edit.php b/usr/local/www/vpn_ipsec_keys_edit.php
index ff1ef9a..41908ca 100644
--- a/usr/local/www/vpn_ipsec_keys_edit.php
+++ b/usr/local/www/vpn_ipsec_keys_edit.php
@@ -66,21 +66,21 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "ident psk");
- $reqdfieldsn = explode(",", "Identifier,Pre-shared key");
+ $reqdfieldsn = array(gettext("Identifier"),gettext("Pre-shared key"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (preg_match("/[^a-zA-Z0-9@\.\-]/", $_POST['ident']))
- $input_errors[] = "The identifier contains invalid characters.";
+ $input_errors[] = gettext("The identifier contains invalid characters.");
if (array_key_exists($_POST['ident'], $userids))
- $input_errors[] = "A user with this name already exists. Add the key to the user instead.";
+ $input_errors[] = gettext("A user with this name already exists. Add the key to the user instead.");
if (!$input_errors && !(isset($id) && $a_secret[$id])) {
/* make sure there are no dupes */
foreach ($a_secret as $secretent) {
if ($secretent['ident'] == $_POST['ident']) {
- $input_errors[] = "Another entry with the same identifier already exists.";
+ $input_errors[] = gettext("Another entry with the same identifier already exists.");
break;
}
}
@@ -97,10 +97,10 @@ if ($_POST) {
if (isset($id) && $a_secret[$id]) {
$a_secret[$id] = $secretent;
- $text = "Edited";
+ $text = gettext("Edited");
} else {
$a_secret[] = $secretent;
- $text = "Added";
+ $text = gettext("Added");
}
write_config("{$text} IPsec Pre-Shared Keys");
@@ -111,7 +111,7 @@ if ($_POST) {
}
}
-$pgtitle = "VPN: IPsec: Edit pre-shared key";
+$pgtitle = gettext("VPN: IPsec: Edit pre-shared key");
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -125,15 +125,15 @@ include("head.inc");
<form action="vpn_ipsec_keys_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td valign="top" class="vncellreq">Identifier</td>
+ <td valign="top" class="vncellreq"><?=gettext("Identifier"); ?></td>
<td class="vtable">
<?=$mandfldhtml;?><input name="ident" type="text" class="formfld unknown" id="ident" size="30" value="<?=$pconfig['ident'];?>">
<br>
-This can be either an IP address, fully qualified domain name or an e-mail address.
+<?=gettext("This can be either an IP address, fully qualified domain name or an e-mail address"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Pre-shared key</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Pre-shared key"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="psk" type="text" class="formfld unknown" id="psk" size="40" value="<?=htmlspecialchars($pconfig['psk']);?>">
</td>
@@ -141,7 +141,7 @@ This can be either an IP address, fully qualified domain name or an e-mail addre
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_secret[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 379cf15..ddfc7ee 100755
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -121,44 +121,44 @@ if ($_POST['submit']) {
/* input validation */
$reqdfields = explode(" ", "user_source group_source");
- $reqdfieldsn = explode(",", "User Authentication Source,Group Authentication Source");
+ $reqdfieldsn = array(gettext("User Authentication Source"),gettext("Group Authentication Source"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($pconfig['pool_enable'])
if (!is_ipaddr($pconfig['pool_address']))
- $input_errors[] = "A valid IP address for 'Virtual Address Pool Network' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'Virtual Address Pool Network' must be specified.");
if ($pconfig['dns_domain_enable'])
if (!is_domain($pconfig['dns_domain']))
- $input_errors[] = "A valid value for 'DNS Default Domain' must be specified.";
+ $input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified.");
if ($pconfig['dns_server_enable']) {
if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] &&
!$pconfig['dns_server3'] && !$pconfig['dns_server4'] )
- $input_errors[] = "At least one DNS server must be specified to enable the DNS Server option.";
+ $input_errors[] = gettext("At least one DNS server must be specified to enable the DNS Server option.");
if ($pconfig['dns_server1'] && !is_ipaddr($pconfig['dns_server1']))
- $input_errors[] = "A valid IP address for 'DNS Server #1' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'DNS Server #1' must be specified.");
if ($pconfig['dns_server2'] && !is_ipaddr($pconfig['dns_server2']))
- $input_errors[] = "A valid IP address for 'DNS Server #2' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'DNS Server #2' must be specified.");
if ($pconfig['dns_server3'] && !is_ipaddr($pconfig['dns_server3']))
- $input_errors[] = "A valid IP address for 'DNS Server #3' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'DNS Server #3' must be specified.");
if ($pconfig['dns_server4'] && !is_ipaddr($pconfig['dns_server4']))
- $input_errors[] = "A valid IP address for 'DNS Server #4' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'DNS Server #4' must be specified.");
}
if ($pconfig['wins_server_enable']) {
if (!$pconfig['wins_server1'] && !$pconfig['wins_server2'])
- $input_errors[] = "At least one WINS server must be specified to enable the DNS Server option.";
+ $input_errors[] = gettext("At least one WINS server must be specified to enable the DNS Server option.");
if ($pconfig['wins_server1'] && !is_ipaddr($pconfig['wins_server1']))
- $input_errors[] = "A valid IP address for 'WINS Server #1' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'WINS Server #1' must be specified.");
if ($pconfig['wins_server2'] && !is_ipaddr($pconfig['wins_server2']))
- $input_errors[] = "A valid IP address for 'WINS Server #2' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'WINS Server #2' must be specified.");
}
if ($pconfig['login_banner_enable'])
if (!strlen($pconfig['login_banner']))
- $input_errors[] = "A valid value for 'Login Banner' must be specified.";
+ $input_errors[] = gettext("A valid value for 'Login Banner' must be specified.");
if (!$input_errors) {
$client = array();
@@ -210,7 +210,7 @@ if ($_POST['submit']) {
}
}
-$pgtitle = array("VPN","IPsec","Mobile");
+$pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Mobile"));
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -293,12 +293,12 @@ function login_banner_change() {
if ($savemsg)
print_info_box($savemsg);
if (isset($config['ipsec']['enable']) && is_subsystem_dirty('ipsec'))
- print_info_box_np("The IPsec tunnel configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));
foreach ($a_phase1 as $ph1ent)
if (isset($ph1ent['mobile']))
$ph1found = true;
if ($pconfig['enable'] && !$ph1found)
- print_info_box_np("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found.<br>Please click Create to define one.","create","Create Phase1");
+ print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br>" . gettext("Please click Create to define one."),gettext("create"),gettext("Create Phase1"));
if ($input_errors)
print_input_errors($input_errors);
?>
@@ -308,9 +308,9 @@ function login_banner_change() {
<td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Tunnels", false, "vpn_ipsec.php");
- $tab_array[1] = array("Mobile clients", true, "vpn_ipsec_mobile.php");
- $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php");
+ $tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
+ $tab_array[1] = array(gettext("Mobile clients"), true, "vpn_ipsec_mobile.php");
+ $tab_array[2] = array(gettext("Pre-shared keys"), false, "vpn_ipsec_keys.php");
display_top_tabs($tab_array);
?>
</td>
@@ -320,7 +320,7 @@ function login_banner_change() {
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">IKE Extensions</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IKE Extensions"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -329,7 +329,7 @@ function login_banner_change() {
<input name="enable" type="checkbox" id="enable" value="yes" <?=$chk;?>>
</td>
<td>
- <strong>Enable IPsec Mobile Client Support</strong>
+ <strong><?=gettext("Enable IPsec Mobile Client Support"); ?></strong>
</td>
</tr>
</table>
@@ -340,24 +340,24 @@ function login_banner_change() {
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">
- Extended Authentication (Xauth)
+ <?=gettext("Extended Authentication (Xauth)"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">User Authentication</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("User Authentication"); ?></td>
<td width="78%" class="vtable">
- Source:&nbsp;&nbsp;
+ <?=gettext("Source"); ?>:&nbsp;&nbsp;
<select name="user_source" class="formselect" id="user_source">
- <option value="system">system</option>
+ <option value="system"><?=gettext("system"); ?></option>
</select>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Group Authentication</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Group Authentication"); ?></td>
<td width="78%" class="vtable">
- Source:&nbsp;&nbsp;
+ <?=gettext("Source"); ?>:&nbsp;&nbsp;
<select name="group_source" class="formselect" id="group_source">
- <option value="system">system</option>
+ <option value="system"><?=gettext("system"); ?></option>
</select>
</td>
</tr>
@@ -366,11 +366,11 @@ function login_banner_change() {
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">
- Client Configuration (mode-cfg)
+ <?=gettext("Client Configuration (mode-cfg)"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Virtual Address Pool</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Virtual Address Pool"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -379,14 +379,14 @@ function login_banner_change() {
<input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?> onClick="pool_change()">
</td>
<td>
- Provide a vitual IP address to clients<br>
+ <?=gettext("Provide a vitual IP address to clients"); ?><br>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- Network:&nbsp;
+ <?=gettext("Network"); ?>:&nbsp;
<input name="pool_address" type="text" class="formfld unknown" id="pool_address" size="20" value="<?=$pconfig['pool_address'];?>">
/
<select name="pool_netbits" class="formselect" id="pool_netbits">
@@ -402,7 +402,7 @@ function login_banner_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Network List</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Network List"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -411,14 +411,14 @@ function login_banner_change() {
<input name="net_list_enable" type="checkbox" id="net_list_enable" value="yes" <?=$chk;?>>
</td>
<td>
- Provide a list of accessible networks to clients<br>
+ <?=gettext("Provide a list of accessible networks to clients"); ?><br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Default Domain</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Default Domain"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -427,7 +427,7 @@ function login_banner_change() {
<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
</td>
<td>
- Provide a default domain name to clients<br>
+ <?=gettext("Provide a default domain name to clients"); ?><br>
</td>
</tr>
</table>
@@ -441,7 +441,7 @@ function login_banner_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -450,32 +450,32 @@ function login_banner_change() {
<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
</td>
<td>
- Provide a DNS server list to clients<br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=$pconfig['dns_server1'];?>">
</td>
</tr>
<tr>
<td>
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=$pconfig['dns_server2'];?>">
</td>
</tr>
<tr>
<td>
- Server #3:&nbsp;
+ <?=gettext("Server"); ?> #3:&nbsp;
<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=$pconfig['dns_server3'];?>">
</td>
</tr>
<tr>
<td>
- Server #4:&nbsp;
+ <?=gettext("Server"); ?> #4:&nbsp;
<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=$pconfig['dns_server4'];?>">
</td>
</tr>
@@ -483,7 +483,7 @@ function login_banner_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">WINS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -492,20 +492,20 @@ function login_banner_change() {
<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
</td>
<td>
- Provide a WINS server list to clients<br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>">
</td>
</tr>
<tr>
<td>
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>">
</td>
</tr>
@@ -513,7 +513,7 @@ function login_banner_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Phase2 PFS Group</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Phase2 PFS Group"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -522,14 +522,14 @@ function login_banner_change() {
<input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?=$chk;?> onClick="pfs_group_change()">
</td>
<td>
- Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )<br>
+ <?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?><br>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- Group:&nbsp;&nbsp;
+ <?=gettext("Group"); ?>:&nbsp;&nbsp;
<select name="pfs_group" class="formselect" id="pfs_group">
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname): ?>
<option value="<?=$keygroup;?>" <?php if ($pconfig['pfs_group'] == $keygroup) echo "selected"; ?>>
@@ -543,7 +543,7 @@ function login_banner_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Login Banner</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Login Banner"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0">
<tr>
@@ -552,7 +552,7 @@ function login_banner_change() {
<input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?=$chk;?> onClick="login_banner_change()">
</td>
<td>
- Provide a login banner to clients<br>
+ <?=gettext("Provide a login banner to clients"); ?><br>
</td>
</tr>
</table>
@@ -569,7 +569,7 @@ function login_banner_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="submit" type="submit" class="formbtn" value="Save">
+ <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
</td>
</tr>
</table>
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 71ea6d8..b72891c 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -139,23 +139,23 @@ if ($_POST) {
// Only require PSK here for normal PSK tunnels (not mobile) or xauth.
if ((($method == "pre_shared_key") && (!$pconfig['mobile']))||($method == "xauth_psk_server")) {
$reqdfields = explode(" ", "pskey");
- $reqdfieldsn = explode(",", "Pre-Shared Key");
+ $reqdfieldsn = array(gettext("Pre-Shared Key"));
} else {
$reqdfields = explode(" ", "certref");
- $reqdfieldsn = explode(",", "My Certificate");
+ $reqdfieldsn = array(gettext("My Certificate"));
}
if (!$pconfig['mobile']) {
$reqdfields[] = "remotegw";
- $reqdfieldsn[] = "Remote gateway";
+ $reqdfieldsn[] = gettext("Remote gateway");
}
do_input_validation($pconfig, $reqdfields, $reqdfieldsn, &$input_errors);
if (($pconfig['lifetime'] && !is_numeric($pconfig['lifetime'])))
- $input_errors[] = "The P1 lifetime must be an integer.";
+ $input_errors[] = gettext("The P1 lifetime must be an integer.");
if (($pconfig['remotegw'] && !is_ipaddr($pconfig['remotegw']) && !is_domain($pconfig['remotegw'])))
- $input_errors[] = "A valid remote gateway address or host name must be specified.";
+ $input_errors[] = gettext("A valid remote gateway address or host name must be specified.");
if (($pconfig['remotegw'] && is_ipaddr($pconfig['remotegw']) && !isset($pconfig['disabled']) )) {
$t = 0;
@@ -163,7 +163,7 @@ if ($_POST) {
if ($p1index <> $t) {
$tremotegw = $pconfig['remotegw'];
if (($ph1tmp['remote-gateway'] == $tremotegw) && !isset($ph1tmp['disabled'])) {
- $input_errors[] = "The remote gateway \"$tremotegw\" is already used by phase1 \"${ph1tmp['descr']}\".";
+ $input_errors[] = sprintf(gettext("The remote gateway \"%s\" is already used by phase1 \"${ph1tmp['descr']}\"."), $tremotegw);
}
}
$t++;
@@ -191,24 +191,24 @@ if ($_POST) {
$input_errors[] = gettext("Please enter a dynamic domain name for 'My Identifier'");
if ((($pconfig['myid_type'] == "address") && !is_ipaddr($pconfig['myid_data'])))
- $input_errors[] = "A valid IP address for 'My identifier' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'My identifier' must be specified.");
if ((($pconfig['myid_type'] == "fqdn") && !is_domain($pconfig['myid_data'])))
- $input_errors[] = "A valid domain name for 'My identifier' must be specified.";
+ $input_errors[] = gettext("A valid domain name for 'My identifier' must be specified.");
if ($pconfig['myid_type'] == "fqdn")
if (is_domain($pconfig['myid_data']) == false)
- $input_errors[] = "A valid FQDN for 'My identifier' must be specified.";
+ $input_errors[] = gettext("A valid FQDN for 'My identifier' must be specified.");
if ($pconfig['myid_type'] == "user_fqdn") {
$user_fqdn = explode("@",$pconfig['myid_data']);
if (is_domain($user_fqdn[1]) == false)
- $input_errors[] = "A valid User FQDN in the form of user@my.domain.com for 'My identifier' must be specified.";
+ $input_errors[] = gettext("A valid User FQDN in the form of user@my.domain.com for 'My identifier' must be specified.");
}
if ($pconfig['myid_type'] == "dyn_dns")
if (is_domain($pconfig['myid_data']) == false)
- $input_errors[] = "A valid Dynamic DNS address for 'My identifier' must be specified.";
+ $input_errors[] = gettext("A valid Dynamic DNS address for 'My identifier' must be specified.");
/* Peer identity */
@@ -230,28 +230,28 @@ if ($_POST) {
$input_errors[] = gettext("Please enter a user and fully qualified domain name for 'Peer Identifier'");
if ((($pconfig['peerid_type'] == "address") && !is_ipaddr($pconfig['peerid_data'])))
- $input_errors[] = "A valid IP address for 'Peer identifier' must be specified.";
+ $input_errors[] = gettext("A valid IP address for 'Peer identifier' must be specified.");
if ((($pconfig['peerid_type'] == "fqdn") && !is_domain($pconfig['peerid_data'])))
- $input_errors[] = "A valid domain name for 'Peer identifier' must be specified.";
+ $input_errors[] = gettext("A valid domain name for 'Peer identifier' must be specified.");
if ($pconfig['peerid_type'] == "fqdn")
if (is_domain($pconfig['peerid_data']) == false)
- $input_errors[] = "A valid FQDN for 'Peer identifier' must be specified.";
+ $input_errors[] = gettext("A valid FQDN for 'Peer identifier' must be specified.");
if ($pconfig['peerid_type'] == "user_fqdn") {
$user_fqdn = explode("@",$pconfig['peerid_data']);
if (is_domain($user_fqdn[1]) == false)
- $input_errors[] = "A valid User FQDN in the form of user@my.domain.com for 'Peer identifier' must be specified.";
+ $input_errors[] = gettext("A valid User FQDN in the form of user@my.domain.com for 'Peer identifier' must be specified.");
}
}
if ($pconfig['dpd_enable']) {
if (!is_numeric($pconfig['dpd_delay']))
- $input_errors[] = "A numeric value must be specified for DPD delay.";
+ $input_errors[] = gettext("A numeric value must be specified for DPD delay.");
if (!is_numeric($pconfig['dpd_maxfail']))
- $input_errors[] = "A numeric value must be specified for DPD retries.";
+ $input_errors[] = gettext("A numeric value must be specified for DPD retries.");
}
/* build our encryption algorithms array */
@@ -330,9 +330,9 @@ if ($_POST) {
}
if ($pconfig['mobile'])
- $pgtitle = array("VPN","IPsec","Edit Phase 1", "Mobile Client");
+ $pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Edit Phase 1"), gettext("Mobile Client"));
else
- $pgtitle = array("VPN","IPsec","Edit Phase 1");
+ $pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Edit Phase 1"));
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -457,9 +457,9 @@ function dpdchkbox_change() {
<td id="tabnav">
<?php
$tab_array = array();
- $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php");
- $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php");
- $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php");
+ $tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
+ $tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+ $tab_array[2] = array(gettext("Pre-shared keys"), false, "vpn_ipsec_keys.php");
display_top_tabs($tab_array);
?>
</td>
@@ -469,21 +469,21 @@ function dpdchkbox_change() {
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">General information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this phase1 entry</strong><br>
+ <strong><?=gettext("Disable this phase1 entry"); ?></strong><br>
<span class="vexpl">
- Set this option to disable this phase1 without
- removing it from the list.
+ <?=gettext("Set this option to disable this phase1 without " .
+ "removing it from the list"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -499,31 +499,31 @@ function dpdchkbox_change() {
<?php endforeach; ?>
</select>
<br>
- <span class="vexpl">Select the interface for the local endpoint of this phase1 entry.</span>
+ <span class="vexpl"><?=gettext("Select the interface for the local endpoint of this phase1 entry"); ?>.</span>
</td>
</tr>
<?php if (!$pconfig['mobile']): ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Remote gateway</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote gateway"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="remotegw" type="text" class="formfld unknown" id="remotegw" size="20" value="<?=$pconfig['remotegw'];?>">
<br>
- Enter the public IP address or host name of the remote gateway
+ <?=gettext("Enter the public IP address or host name of the remote gateway"); ?>
</td>
</tr>
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
<br>
<span class="vexpl">
- You may enter a description here
- for your reference (not parsed).
+ <?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.
</span>
</td>
</tr>
@@ -532,11 +532,11 @@ function dpdchkbox_change() {
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">
- Phase 1 proposal (Authentication)
+ <?=gettext("Phase 1 proposal (Authentication)"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Authentication method</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication method"); ?></td>
<td width="78%" class="vtable">
<select name="authentication_method" class="formselect" onChange="methodsel_change()">
<?php
@@ -551,27 +551,27 @@ function dpdchkbox_change() {
</select>
<br>
<span class="vexpl">
- Must match the setting chosen on the remote side.
+ <?=gettext("Must match the setting chosen on the remote side"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Negotiation mode</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Negotiation mode"); ?></td>
<td width="78%" class="vtable">
<select name="mode" class="formselect">
<?php
- $modes = explode(" ", "main aggressive");
+ $modes = array(gettext("main"),gettext("aggressive"));
foreach ($modes as $mode):
?>
<option value="<?=$mode;?>" <?php if ($mode == $pconfig['mode']) echo "selected"; ?>>
<?=htmlspecialchars($mode);?>
</option>
<?php endforeach; ?>
- </select> <br> <span class="vexpl">Aggressive is more flexible, but less secure.</span>
+ </select> <br> <span class="vexpl"><?=gettext("Aggressive is more flexible, but less secure"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">My identifier</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("My identifier"); ?></td>
<td width="78%" class="vtable">
<select name="myid_type" class="formselect" onChange="myidsel_change()">
<?php foreach ($my_identifier_list as $id_type => $id_params): ?>
@@ -584,7 +584,7 @@ function dpdchkbox_change() {
</td>
</tr>
<tr id="opt_peerid">
- <td width="22%" valign="top" class="vncellreq">Peer identifier</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Peer identifier"); ?></td>
<td width="78%" class="vtable">
<select name="peerid_type" class="formselect" onChange="peeridsel_change()">
<?php
@@ -599,23 +599,23 @@ function dpdchkbox_change() {
</select>
<input name="peerid_data" type="text" class="formfld unknown" id="peerid_data" size="30" value="<?=$pconfig['peerid_data'];?>">
<?php if ($pconfig['mobile']) { ?>
- <br/><br/>NOTE: This is known as the "group" setting on some VPN client implementations.
+ <br/><br/><?=gettext("NOTE: This is known as the \"group\" setting on some VPN client implementations"); ?>.
<?php } ?>
</td>
</tr>
<tr id="opt_psk">
- <td width="22%" valign="top" class="vncellreq">Pre-Shared Key</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Pre-Shared Key"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?>
<input name="pskey" type="text" class="formfld unknown" id="pskey" size="40" value="<?=htmlspecialchars($pconfig['pskey']);?>">
<span class="vexpl">
<br>
- Input your pre-shared key string.
+ <?=gettext("Input your pre-shared key string"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Encryption algorithm</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithm"); ?></td>
<td width="78%" class="vtable">
<select name="ealgo" class="formselect" onChange="ealgosel_change()">
<?php
@@ -634,7 +634,7 @@ function dpdchkbox_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hash algorithm</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hash algorithm"); ?></td>
<td width="78%" class="vtable">
<select name="halgo" class="formselect">
<?php foreach ($p1_halgos as $algo => $algoname): ?>
@@ -645,12 +645,12 @@ function dpdchkbox_change() {
</select>
<br>
<span class="vexpl">
- Must match the setting chosen on the remote side.
+ <?=gettext("Must match the setting chosen on the remote side"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">DH key group</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("DH key group"); ?></td>
<td width="78%" class="vtable">
<select name="dhgroup" class="formselect">
<?php $keygroups = explode(" ", "1 2 5"); foreach ($keygroups as $keygroup): ?>
@@ -661,21 +661,21 @@ function dpdchkbox_change() {
</select>
<br>
<span class="vexpl">
- <em>1 = 768 bit, 2 = 1024 bit, 5 = 1536 bit</em>
+ <em><?=gettext("1 = 768 bit, 2 = 1024 bit, 5 = 1536 bit"); ?></em>
<br>
- Must match the setting chosen on the remote side.
+ <?=gettext("Must match the setting chosen on the remote side"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Lifetime</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Lifetime"); ?></td>
<td width="78%" class="vtable">
<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="20" value="<?=$pconfig['lifetime'];?>">
- seconds
+ <?=gettext("seconds"); ?>
</td>
</tr>
<tr id="opt_cert">
- <td width="22%" valign="top" class="vncellreq">My Certificate</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("My Certificate"); ?></td>
<td width="78%" class="vtable">
<select name='certref' class="formselect">
<?php
@@ -689,7 +689,7 @@ function dpdchkbox_change() {
</select>
<br>
<span class="vexpl">
- Select a certificate previously configured in the Certificate Manager.
+ <?=gettext("Select a certificate previously configured in the Certificate Manager"); ?>.
</span>
</td>
</tr>
@@ -697,40 +697,40 @@ function dpdchkbox_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced Options</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced Options"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NAT Traversal</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NAT Traversal"); ?></td>
<td width="78%" class="vtable">
<select name="nat_traversal" class="formselect">
- <option value="off" <?php if ($pconfig['nat_traversal'] == "off") echo "selected"; ?>>Disable</option>
- <option value="on" <?php if ($pconfig['nat_traversal'] == "on") echo "selected"; ?>>Enable</option>
- <option value="force" <?php if ($pconfig['nat_traversal'] == "force") echo "selected"; ?>>Force</option>
+ <option value="off" <?php if ($pconfig['nat_traversal'] == "off") echo "selected"; ?>><?=gettext("Disable"); ?></option>
+ <option value="on" <?php if ($pconfig['nat_traversal'] == "on") echo "selected"; ?>><?=gettext("Enable"); ?></option>
+ <option value="force" <?php if ($pconfig['nat_traversal'] == "force") echo "selected"; ?>><?=gettext("Force"); ?></option>
</select>
<br/>
<span class="vexpl">
- Set this option to enable the use of NAT-T (i.e. the encapsulation of ESP in UDP packets) if needed,
- which can help with clients that are behind restrictive firewalls.
+ <?=gettext("Set this option to enable the use of NAT-T (i.e. the encapsulation of ESP in UDP packets) if needed, " .
+ "which can help with clients that are behind restrictive firewalls"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dead Peer Detection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dead Peer Detection"); ?></td>
<td width="78%" class="vtable">
<input name="dpd_enable" type="checkbox" id="dpd_enable" value="yes" <?php if (isset($pconfig['dpd_enable'])) echo "checked"; ?> onClick="dpdchkbox_change()">
- Enable DPD<br>
+ <?=gettext("Enable DPD"); ?><br>
<div id="opt_dpd">
<br>
<input name="dpd_delay" type="text" class="formfld unknown" id="dpd_delay" size="5" value="<?=$pconfig['dpd_delay'];?>">
- seconds<br>
+ <?=gettext("seconds"); ?><br>
<span class="vexpl">
- Delay between requesting peer acknowledgement.
+ <?=gettext("Delay between requesting peer acknowledgement"); ?>.
</span><br>
<br>
<input name="dpd_maxfail" type="text" class="formfld unknown" id="dpd_maxfail" size="5" value="<?=$pconfig['dpd_maxfail'];?>">
- retries<br>
+ <?=gettext("retries"); ?><br>
<span class="vexpl">
- Number of consecutive failures allowed before disconnect.
+ <?=gettext("Number of consecutive failures allowed before disconnect"); ?>.
</span>
<br>
</div>
@@ -746,7 +746,7 @@ function dpdchkbox_change() {
<input name="mobile" type="hidden" value="true">
<?php endif; ?>
<input name="ikeid" type="hidden" value="<?=$pconfig['ikeid'];?>">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
</td>
</tr>
</table>
diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php
index e00535e..ba69dcf 100644
--- a/usr/local/www/vpn_ipsec_phase2.php
+++ b/usr/local/www/vpn_ipsec_phase2.php
@@ -106,14 +106,14 @@ if ($_POST) {
$pconfig = $_POST;
if (!isset( $_POST['ikeid']))
- $input_errors[] = "A valid ikeid must be specified.";
+ $input_errors[] = gettext("A valid ikeid must be specified.");
/* input validation */
$reqdfields = explode(" ", "localid_type halgos");
- $reqdfieldsn = explode(",", "Local network type,P2 Hash Algorithms");
+ $reqdfieldsn = array(gettext("Local network type"),gettext("P2 Hash Algorithms"));
if (!isset($pconfig['mobile'])){
$reqdfields[] = "remoteid_type";
- $reqdfieldsn[] = "Remote network type";
+ $reqdfieldsn[] = gettext("Remote network type");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -123,20 +123,20 @@ if ($_POST) {
switch ($pconfig['localid_type']) {
case "network":
if (($pconfig['localid_netbits'] != 0 && !$pconfig['localid_netbits']) || !is_numeric($pconfig['localid_netbits']))
- $input_errors[] = "A valid local network bit count must be specified.";
+ $input_errors[] = gettext("A valid local network bit count must be specified.");
case "address":
if (!$pconfig['localid_address'] || !is_ipaddr($pconfig['localid_address']))
- $input_errors[] = "A valid local network IP address must be specified.";
+ $input_errors[] = gettext("A valid local network IP address must be specified.");
break;
}
switch ($pconfig['remoteid_type']) {
case "network":
if (($pconfig['remoteid_netbits'] != 0 && !$pconfig['remoteid_netbits']) || !is_numeric($pconfig['remoteid_netbits']))
- $input_errors[] = "A valid remote network bit count must be specified.";
+ $input_errors[] = gettext("A valid remote network bit count must be specified.");
case "address":
if (!$pconfig['remoteid_address'] || !is_ipaddr($pconfig['remoteid_address']))
- $input_errors[] = "A valid remote network IP address must be specified.";
+ $input_errors[] = gettext("A valid remote network IP address must be specified.");
break;
}
}
@@ -146,10 +146,10 @@ if ($_POST) {
$ealgos = pconfig_to_ealgos($pconfig);
if (!count($ealgos)) {
- $input_errors[] = "At least one encryption algorithm must be selected.";
+ $input_errors[] = gettext("At least one encryption algorithm must be selected.");
}
if (($_POST['lifetime'] && !is_numeric($_POST['lifetime']))) {
- $input_errors[] = "The P2 lifetime must be an integer.";
+ $input_errors[] = gettext("The P2 lifetime must be an integer.");
}
if (!$input_errors) {
@@ -196,9 +196,9 @@ if ($_POST) {
}
if ($pconfig['mobile'])
- $pgtitle = array("VPN","IPsec","Edit Phase 2", "Mobile Client");
+ $pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Edit Phase 2"), gettext("Mobile Client"));
else
- $pgtitle = array("VPN","IPsec","Edit Phase 2");
+ $pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Edit Phase 2"));
$statusurl = "diag_ipsec.php";
$logurl = "diag_logs_ipsec.php";
@@ -314,9 +314,9 @@ function change_protocol() {
<td id="tabnav">
<?php
$tab_array = array();
- $tab_array[0] = array("Tunnels", true, "vpn_ipsec.php");
- $tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php");
- $tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php");
+ $tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
+ $tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+ $tab_array[2] = array(gettext("Pre-shared keys"), false, "vpn_ipsec_keys.php");
display_top_tabs($tab_array);
?>
</td>
@@ -326,18 +326,18 @@ function change_protocol() {
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this phase2 entry</strong>
+ <strong><?=gettext("Disable this phase2 entry"); ?></strong>
<br>
- <span class="vexpl">Set this option to disable this phase2 entry without
- removing it from the list.
+ <span class="vexpl"><?=gettext("Set this option to disable this phase2 entry without " .
+ "removing it from the list"); ?>.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Mode</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Mode"); ?></td>
<td width="78%" class="vtable">
<select name="mode" class="formselect" onChange="change_mode()">
<?php
@@ -352,23 +352,23 @@ function change_protocol() {
</td>
</tr>
<tr id="opt_localid">
- <td width="22%" valign="top" class="vncellreq">Local Network</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Local Network"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td></td>
<td>
<select name="localid_type" class="formselect" onChange="typesel_change_local()">
- <option value="address" <?php if ($pconfig['localid_type'] == "address") echo "selected";?>>Address</option>
- <option value="network" <?php if ($pconfig['localid_type'] == "network") echo "selected";?>>Network</option>
- <option value="lan" <?php if ($pconfig['localid_type'] == "lan" ) echo "selected";?>>LAN subnet</option>
- <option value="none" <?php if ($pconfig['localid_type'] == "none" ) echo "selected";?>>None</option>
+ <option value="address" <?php if ($pconfig['localid_type'] == "address") echo "selected";?>><?=gettext("Address"); ?></option>
+ <option value="network" <?php if ($pconfig['localid_type'] == "network") echo "selected";?>><?=gettext("Network"); ?></option>
+ <option value="lan" <?php if ($pconfig['localid_type'] == "lan" ) echo "selected";?>><?=gettext("LAN subnet"); ?></option>
+ <option value="none" <?php if ($pconfig['localid_type'] == "none" ) echo "selected";?>><?=gettext("None"); ?></option>
</select>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
<td><?=$mandfldhtmlspc;?></td>
<td>
<input name="localid_address" type="text" class="formfld unknown" id="localid_address" size="20" value="<?=$pconfig['localid_address'];?>">
@@ -389,21 +389,21 @@ function change_protocol() {
<?php if (!isset($pconfig['mobile'])): ?>
<tr id="opt_remoteid">
- <td width="22%" valign="top" class="vncellreq">Remote Network</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote Network"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td></td>
<td>
<select name="remoteid_type" class="formselect" onChange="typesel_change_remote()">
- <option value="address" <?php if ($pconfig['remoteid_type'] == "address") echo "selected"; ?>>Address</option>
- <option value="network" <?php if ($pconfig['remoteid_type'] == "network") echo "selected"; ?>>Network</option>
+ <option value="address" <?php if ($pconfig['remoteid_type'] == "address") echo "selected"; ?>><?=gettext("Address"); ?></option>
+ <option value="network" <?php if ($pconfig['remoteid_type'] == "network") echo "selected"; ?>><?=gettext("Network"); ?></option>
</select>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td><?=$mandfldhtmlspc;?></td>
<td>
<input name="remoteid_address" type="text" class="formfld unknown" id="remoteid_address" size="20" value="<?=$pconfig['remoteid_address'];?>">
@@ -425,13 +425,13 @@ function change_protocol() {
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
<br>
<span class="vexpl">
- You may enter a description here
- for your reference (not parsed).
+ <?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.
</span>
</td>
</tr>
@@ -440,11 +440,11 @@ function change_protocol() {
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">
- Phase 2 proposal (SA/Key Exchange)
+ <?=gettext("Phase 2 proposal (SA/Key Exchange)"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable">
<select name="proto" class="formselect" onChange="change_protocol()">
<?php foreach ($p2_protos as $proto => $protoname): ?>
@@ -455,12 +455,12 @@ function change_protocol() {
</select>
<br>
<span class="vexpl">
- ESP is encryption, AH is authentication only
+ <?=gettext("ESP is encryption, AH is authentication only"); ?>
</span>
</td>
</tr>
<tr id="opt_enc">
- <td width="22%" valign="top" class="vncellreq">Encryption algorithms</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithms"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<?php
@@ -480,7 +480,7 @@ function change_protocol() {
<?php if(is_array($algodata['keysel'])): ?>
&nbsp;&nbsp;
<select name="keylen_<?=$algo;?>" class="formselect">
- <option value="auto">auto</option>
+ <option value="auto"><?=gettext("auto"); ?></option>
<?php
$key_hi = $algodata['keysel']['hi'];
$key_lo = $algodata['keysel']['lo'];
@@ -491,7 +491,7 @@ function change_protocol() {
if ($keylen == $pconfig["keylen_".$algo])
$selected = " selected";
?>
- <option value="<?=$keylen;?>"<?=$selected;?>><?=$keylen;?> bits</option>
+ <option value="<?=$keylen;?>"<?=$selected;?>><?=$keylen;?> <?=gettext("bits"); ?></option>
<?php endfor; ?>
</select>
<?php endif; ?>
@@ -502,13 +502,13 @@ function change_protocol() {
</table>
<br>
- Hint: use 3DES for best compatibility or if you have a hardware
- crypto accelerator card. Blowfish is usually the fastest in
- software encryption.
+ <?=gettext("Hint: use 3DES for best compatibility or if you have a hardware " .
+ "crypto accelerator card. Blowfish is usually the fastest in " .
+ "software encryption"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hash algorithms</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hash algorithms"); ?></td>
<td width="78%" class="vtable">
<?php foreach ($p2_halgos as $algo => $algoname): ?>
<input type="checkbox" name="halgos[]" value="<?=$algo;?>" <?php if (in_array($algo, $pconfig['halgos'])) echo "checked"; ?>>
@@ -518,7 +518,7 @@ function change_protocol() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">PFS key group</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("PFS key group"); ?></td>
<td width="78%" class="vtable">
<?php if (!isset($pconfig['mobile']) || !isset($a_client['pfs_group'])): ?>
<select name="pfsgroup" class="formselect">
@@ -531,7 +531,7 @@ function change_protocol() {
<br>
<span class="vexpl">
<em>
- 1 = 768 bit, 2 = 1024 bit, 5 = 1536 bit
+ <?=gettext("1 = 768 bit, 2 = 1024 bit, 5 = 1536 bit"); ?>
</em>
</span>
@@ -542,28 +542,28 @@ function change_protocol() {
</select>
<input name="pfsgroup" type="hidden" value="<?=$pconfig['pfsgroup'];?>">
<br>
- <span class="vexpl"><em>Set globally in mobile client options</em></span>
+ <span class="vexpl"><em><?=gettext("Set globally in mobile client options"); ?></em></span>
<?php endif; ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Lifetime</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Lifetime"); ?></td>
<td width="78%" class="vtable">
<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="20" value="<?=$pconfig['lifetime'];?>">
- seconds
+ <?=gettext("seconds"); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced Options</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced Options"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Automatically ping host</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Automatically ping host"); ?></td>
<td width="78%" class="vtable">
<input name="pinghost" type="text" class="formfld unknown" id="pinghost" size="20" value="<?=$pconfig['pinghost'];?>">
- IP address
+ <?=gettext("IP address"); ?>
</td>
</tr>
<tr>
@@ -576,7 +576,7 @@ function change_protocol() {
<input name="mobile" type="hidden" value="true">
<input name="remoteid_type" type="hidden" value="mobile">
<?php endif; ?>
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<input name="ikeid" type="hidden" value="<?=$pconfig['ikeid'];?>">
</td>
</tr>
diff --git a/usr/local/www/vpn_l2tp.php b/usr/local/www/vpn_l2tp.php
index 2b61209..2e941c0 100644
--- a/usr/local/www/vpn_l2tp.php
+++ b/usr/local/www/vpn_l2tp.php
@@ -67,12 +67,12 @@ if ($_POST) {
/* input validation */
if ($_POST['mode'] == "server") {
$reqdfields = explode(" ", "localip remoteip");
- $reqdfieldsn = explode(",", "Server address,Remote start address");
+ $reqdfieldsn = array(gettext("Server address"),gettext("Remote start address"));
if ($_POST['radiusenable']) {
$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
$reqdfieldsn = array_merge($reqdfieldsn,
- explode(",", "RADIUS server address,RADIUS shared secret"));
+ array(gettext("RADIUS server address"),gettext("RADIUS shared secret")));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -266,13 +266,13 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="off"
<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\"";?> />
- Off</td>
+ <?=gettext("Off"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?> />
- Enable l2tp server</td>
+ <?=gettext("Enable l2tp server"); ?></td>
</tr>
<tr>
@@ -308,7 +308,7 @@ function enable_change(enable_over) {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet netmask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet netmask"); ?></td>
<td width="78%" class="vtable">
<select id="l2tp_subnet" name="l2tp_subnet">
<?php
@@ -321,11 +321,11 @@ function enable_change(enable_over) {
}
?>
</select>
- <br>Hint: 24 is 255.255.255.0
+ <br><?=gettext("Hint"); ?>: 24 <?=gettext("is"); ?> 255.255.255.0
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Number of L2TP users</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Number of L2TP users"); ?></td>
<td width="78%" class="vtable">
<select id="n_l2tp_units" name="n_l2tp_units">
<?php
@@ -338,7 +338,7 @@ function enable_change(enable_over) {
}
?>
</select>
- <br>Hint: 10 is ten L2TP clients
+ <br><?=gettext("Hint"); ?>: 10 <?=gettext("is ten L2TP clients"); ?>
</td>
</tr>
<tr>
@@ -353,15 +353,15 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Encyrption type");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><select name="paporchap" id="paporchap">
- <option value='chap'<?php if($pconfig['paporchap'] == "chap") echo " SELECTED"; ?>>CHAP</option>
- <option value='pap'<?php if($pconfig['paporchap'] == "pap") echo " SELECTED"; ?>>PAP</option>
+ <option value='chap'<?php if($pconfig['paporchap'] == "chap") echo " SELECTED"; ?>><?=gettext("CHAP"); ?></option>
+ <option value='pap'<?php if($pconfig['paporchap'] == "pap") echo " SELECTED"; ?>><?=gettext("PAP"); ?></option>
</select>
<br />
<?=gettext("Specifies which protocol to use for authentication.");?><br />
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
<td width="78%" class="vtable">
<input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked=\"checked\""; ?> />
<strong> <?=gettext("Use a RADIUS server for authentication");?><br /></strong>
@@ -396,7 +396,7 @@ function enable_change(enable_over) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" />
+ <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" />
</td>
</tr>
<tr>
diff --git a/usr/local/www/vpn_l2tp_users.php b/usr/local/www/vpn_l2tp_users.php
index 3cba0a2..4156583 100644
--- a/usr/local/www/vpn_l2tp_users.php
+++ b/usr/local/www/vpn_l2tp_users.php
@@ -83,7 +83,7 @@ include("head.inc");
<?php if (isset($config['l2tp']['radius']['enable']))
print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); ?>
<?php if (file_exists($d_l2tpuserdirty_path)): ?><p>
-<?php print_info_box_np(gettext("The l2tp user list has been modified.<br />You must apply the changes in order for them to take effect.<br /><b>Warning: this will terminate all current l2tp sessions!</b>"));?><br />
+<?php print_info_box_np(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>");?><br />
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
@@ -112,12 +112,12 @@ include("head.inc");
<?=htmlspecialchars($secretent['ip']);?>&nbsp;
</td>
<td class="list" nowrap> <a href="vpn_l2tp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit user" width="17" height="17" border="0" alt="" /></a>
- &nbsp;<a href="vpn_l2tp_users.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this user?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete user" width="17" height="17" border="0" alt="" /></a></td>
+ &nbsp;<a href="vpn_l2tp_users.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this user?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" width="17" height="17" border="0" alt="" /></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<td class="list" colspan="2"></td>
- <td class="list"> <a href="vpn_l2tp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add user" width="17" height="17" border="0" alt="" /></a></td>
+ <td class="list"> <a href="vpn_l2tp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" width="17" height="17" border="0" alt="" /></a></td>
</tr>
</table>
</div>
diff --git a/usr/local/www/vpn_l2tp_users_edit.php b/usr/local/www/vpn_l2tp_users_edit.php
index f88d821..31a33b7 100644
--- a/usr/local/www/vpn_l2tp_users_edit.php
+++ b/usr/local/www/vpn_l2tp_users_edit.php
@@ -75,10 +75,10 @@ if ($_POST) {
/* input validation */
if (isset($id) && ($a_secret[$id])) {
$reqdfields = explode(" ", "usernamefld");
- $reqdfieldsn = explode(",", "Username");
+ $reqdfieldsn = array(gettext("Username"));
} else {
$reqdfields = explode(" ", "usernamefld passwordfld");
- $reqdfieldsn = explode(",", "Username,Password");
+ $reqdfieldsn = array(gettext("Username"),gettext("Password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index a52a739..34710fc 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -37,7 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
-$pgtitle = array("OpenVPN", "Client");
+$pgtitle = array(gettext("OpenVPN"), gettext("Client"));
$statusurl = "status_openvpn.php";
$logurl = "diag_logs_openvpn.php";
@@ -145,7 +145,7 @@ if ($_POST) {
$portused = openvpn_port_used($pconfig['protocol'], $pconfig['local_port']);
if (($portused != $vpnid) && ($portused != 0))
- $input_errors[] = "The specified 'Local port' is in use. Please select another value";
+ $input_errors[] = gettext("The specified 'Local port' is in use. Please select another value");
}
if ($result = openvpn_validate_host($pconfig['server_addr'], 'Server host or address'))
@@ -164,7 +164,7 @@ if ($_POST) {
if ($pconfig['proxy_authtype'] != "none") {
if (empty($pconfig['proxy_user']) || empty($pconfig['proxy_passwd']))
- $input_errors[] = "User name and password are required for proxy with authentication.";
+ $input_errors[] = gettext("User name and password are required for proxy with authentication.");
}
}
@@ -181,21 +181,21 @@ if ($_POST) {
if (!$tls_mode && !$pconfig['autokey_enable'])
if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") ||
!strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----"))
- $input_errors[] = "The field 'Shared Key' does not appear to be valid";
+ $input_errors[] = gettext("The field 'Shared Key' does not appear to be valid");
if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable'])
if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") ||
!strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----"))
- $input_errors[] = "The field 'TLS Authentication Key' does not appear to be valid";
+ $input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid");
/* If we are not in shared key mode, then we need the CA/Cert. */
if ($pconfig['mode'] != "p2p_shared_key") {
$reqdfields = explode(" ", "caref certref");
- $reqdfieldsn = explode(",", "Certificate Authority,Certificate");;
+ $reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate"));
} elseif (!$pconfig['autokey_enable']) {
/* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */
$reqdfields = array('shared_key');
- $reqdfieldsn = array('Shared key');
+ $reqdfieldsn = array(gettext('Shared key'));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -360,10 +360,10 @@ function autotls_change() {
<form action="vpn_openvpn_client.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">General information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -374,12 +374,12 @@ function autotls_change() {
<td>
&nbsp;
<span class="vexpl">
- <strong>Disable this client</strong><br>
+ <strong><?=gettext("Disable this client"); ?></strong><br>
</span>
</td>
</tr>
</table>
- Set this option to disable this client without removing it from the list.
+ <?=gettext("Set this option to disable this client without removing it from the list"); ?>.
</td>
</tr>
<tr>
@@ -428,7 +428,7 @@ function autotls_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -457,7 +457,7 @@ function autotls_change() {
<td width="78%" class="vtable">
<input name="local_port" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['local_port']);?>"/>
<br/>
- Set this option if you would like to bind to a specific port.
+ <?=gettext("Set this option if you would like to bind to a specific port"); ?>.
</td>
</tr>
<tr>
@@ -491,14 +491,14 @@ function autotls_change() {
<tr>
<td align="right" width="25%">
<span class="vexpl">
- &nbsp;Authentication method :&nbsp;
+ &nbsp;<?=gettext("Authentication method"); ?> :&nbsp;
</span>
</td>
<td>
<select name="proxy_authtype" id="proxy_authtype" class="formfld select" onChange="useproxy_changed()">
- <option value="none" <?php if ($pconfig['proxy_authtype'] == "none") echo "selected"; ?>>none</option>
- <option value="basic" <?php if ($pconfig['proxy_authtype'] == "basic") echo "selected"; ?>>basic</option>
- <option value="ntlm" <?php if ($pconfig['proxy_authtype'] == "ntlm") echo "selected"; ?>>ntlm</option>
+ <option value="none" <?php if ($pconfig['proxy_authtype'] == "none") echo "selected"; ?>><?=gettext("none"); ?></option>
+ <option value="basic" <?php if ($pconfig['proxy_authtype'] == "basic") echo "selected"; ?>><?=gettext("basic"); ?></option>
+ <option value="ntlm" <?php if ($pconfig['proxy_authtype'] == "ntlm") echo "selected"; ?>><?=gettext("ntlm"); ?></option>
</select>
</td>
</tr>
@@ -508,7 +508,7 @@ function autotls_change() {
<tr>
<td align="right" width="25%">
<span class="vexpl">
- &nbsp;Username :&nbsp;
+ &nbsp;<?=gettext("Username"); ?> :&nbsp;
</span>
</td>
<td>
@@ -518,7 +518,7 @@ function autotls_change() {
<tr>
<td align="right" width="25%">
<span class="vexpl">
- &nbsp;Password :&nbsp;
+ &nbsp;<?=gettext("Password"); ?> :&nbsp;
</span>
</td>
<td>
@@ -529,7 +529,7 @@ function autotls_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Server host name resolution</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Server host name resolution"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -539,32 +539,32 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Infinitely resolve server
+ <?=gettext("Infinitely resolve server"); ?>
</span>
</td>
</tr>
</table>
- Continuously attempt to resolve the server host
- name. Useful when communicating with a server
- that is not permanently connected to the Internet.
+ <?=gettext("Continuously attempt to resolve the server host " .
+ "name. Useful when communicating with a server " .
+ "that is not permanently connected to the Internet"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
<br>
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Cryptographic Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Settings"); ?></td>
</tr>
<tr id="tls">
- <td width="22%" valign="top" class="vncellreq">TLS Authentication</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("TLS Authentication"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -574,7 +574,7 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Enable authentication of TLS packets.
+ <?=gettext("Enable authentication of TLS packets"); ?>.
</span>
</td>
</tr>
@@ -588,7 +588,7 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Automatically generate a shared TLS authentication key.
+ <?=gettext("Automatically generate a shared TLS authentication key"); ?>.
</span>
</td>
</tr>
@@ -599,14 +599,14 @@ function autotls_change() {
<td>
<textarea name="tls" cols="65" rows="7" class="formpre"><?=htmlspecialchars($pconfig['tls']);?></textarea>
<br/>
- Paste your shared key here.
+ <?=gettext("Paste your shared key here"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr id="tls_ca">
- <td width="22%" valign="top" class="vncellreq">Peer Certificate Authority</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Peer Certificate Authority"); ?></td>
<td width="78%" class="vtable">
<select name='caref' class="formselect">
<?php
@@ -621,7 +621,7 @@ function autotls_change() {
</td>
</tr>
<tr id="tls_cert">
- <td width="22%" valign="top" class="vncellreq">Client Certificate</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Client Certificate"); ?></td>
<td width="78%" class="vtable">
<select name='certref' class="formselect">
<?php
@@ -636,7 +636,7 @@ function autotls_change() {
</td>
</tr>
<tr id="psk">
- <td width="22%" valign="top" class="vncellreq">Shared Key</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Shared Key"); ?></td>
<td width="78%" class="vtable">
<?php if (!$pconfig['shared_key']): ?>
<table border="0" cellpadding="2" cellspacing="0">
@@ -647,7 +647,7 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Automatically generate a shared key.
+ <?=gettext("Automatically generate a shared key"); ?>.
</span>
</td>
</tr>
@@ -658,14 +658,14 @@ function autotls_change() {
<td>
<textarea name="shared_key" cols="65" rows="7" class="formpre"><?=htmlspecialchars($pconfig['shared_key']);?></textarea>
<br/>
- Paste your shared key here.
+ <?=gettext("Paste your shared key here"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Encryption algorithm</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithm"); ?></td>
<td width="78%" class="vtable">
<select name="crypto" class="formselect">
<?php
@@ -686,34 +686,34 @@ function autotls_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Tunnel Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Tunnel Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Tunnel Network</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Tunnel Network"); ?></td>
<td width="78%" class="vtable">
<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
<br>
- This is the virtual network used for private
- communications between this client and the
- server expressed using CIDR (eg. 10.0.8.0/24).
- The first network address is assumed to be the
- server address and the second network address
- will be assigned to the client virtual
- interface.
+ <?=gettext("This is the virtual network used for private " .
+ "communications between this client and the " .
+ "server expressed using CIDR (eg. 10.0.8.0/24). " .
+ "The first network address is assumed to be the " .
+ "server address and the second network address " .
+ "will be assigned to the client virtual " .
+ "interface"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Remote Network</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Remote Network"); ?></td>
<td width="78%" class="vtable">
<input name="remote_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['remote_network']);?>">
<br>
- This is a network that will be routed through
- the tunnel, so that a site-to-site VPN can be
- established without manually changing the
- routing tables. Expressed as a CIDR range. If
- this is a site-to-site VPN, enter here the
- remote LAN here. You may leave this blank to
- only communicate with other clients.
+ <?=gettext("This is a network that will be routed through " .
+ "the tunnel, so that a site-to-site VPN can be " .
+ "established without manually changing the " .
+ "routing tables. Expressed as a CIDR range. If " .
+ "this is a site-to-site VPN, enter here the " .
+ "remote LAN here. You may leave this blank to " .
+ "only communicate with other clients"); ?>.
</td>
</tr>
<tr>
@@ -721,14 +721,14 @@ function autotls_change() {
<td width="78%" class="vtable">
<input name="use_shaper" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['use_shaper']);?>"/>
<br/>
- Maximum outgoing bandwidth for this tunnel.
- Leave empty for no limit. The input value has
- to be something between 100 bytes/sec and 100
- Mbytes/sec (entered as bytes per second).
+ <?=gettext("Maximum outgoing bandwidth for this tunnel. " .
+ "Leave empty for no limit. The input value has " .
+ "to be something between 100 bytes/sec and 100 " .
+ "Mbytes/sec (entered as bytes per second)"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Compression</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Compression"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -738,7 +738,7 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Compress tunnel packets using the LZO algorithm.
+ <?=gettext("Compress tunnel packets using the LZO algorithm"); ?>.
</span>
</td>
</tr>
@@ -746,7 +746,7 @@ function autotls_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Type-of-Service</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Type-of-Service"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -756,7 +756,7 @@ function autotls_change() {
</td>
<td>
<span class="vexpl">
- Set the TOS IP header value of tunnel packets to match the encapsulated packet value.
+ <?=gettext("Set the TOS IP header value of tunnel packets to match the encapsulated packet value"); ?>.
</span>
</td>
</tr>
@@ -767,17 +767,17 @@ function autotls_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br/>
- Enter any additional options you would like to add to the OpenVPN client configuration here, separated by a semicolon<br/>
- EXAMPLE: route 10.0.0.0 255.255.255.0;
+ <?=gettext("Enter any additional options you would like to add to the OpenVPN client configuration here, separated by a semicolon"); ?><br/>
+ <?=gettext("EXAMPLE: route 10.0.0.0 255.255.255.0;"); ?>
</td>
</tr>
</table>
@@ -786,7 +786,7 @@ function autotls_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="Save">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<input name="act" type="hidden" value="<?=$act;?>">
<?php if (isset($id) && $a_client[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
@@ -800,10 +800,10 @@ function autotls_change() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Disabled</td>
- <td width="10%" class="listhdrr">Protocol</td>
- <td width="30%" class="listhdrr">Server</td>
- <td width="40%" class="listhdrr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Disabled"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Protocol"); ?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Server"); ?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -829,11 +829,11 @@ function autotls_change() {
</td>
<td valign="middle" nowrap class="list">
<a href="vpn_openvpn_client.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="edit client" width="17" height="17" border="0">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit client"); ?>" width="17" height="17" border="0">
</a>
&nbsp;
- <a href="vpn_openvpn_client.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this client?')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="delete client" width="17" height="17" border="0">
+ <a href="vpn_openvpn_client.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete client"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -844,7 +844,7 @@ function autotls_change() {
<tr>
<td class="list" colspan="4"></td>
<td class="list">
- <a href="vpn_openvpn_client.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="add client" width="17" height="17" border="0">
+ <a href="vpn_openvpn_client.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add client"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php
index 751c54a..2426131 100644
--- a/usr/local/www/vpn_openvpn_csc.php
+++ b/usr/local/www/vpn_openvpn_csc.php
@@ -37,7 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
-$pgtitle = array("OpenVPN", "Client Specific Override");
+$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override"));
$statusurl = "status_openvpn.php";
$logurl = "diag_logs_openvpn.php";
@@ -128,36 +128,36 @@ if ($_POST) {
if ($pconfig['dns_server_enable']) {
if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1'])))
- $input_errors[] = "The field 'DNS Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address");
if (!empty($pconfig['dns_server2']) && !is_ipaddr(trim($pconfig['dns_server2'])))
- $input_errors[] = "The field 'DNS Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #2' must contain a valid IP address");
if (!empty($pconfig['dns_server3']) && !is_ipaddr(trim($pconfig['dns_server3'])))
- $input_errors[] = "The field 'DNS Server #3' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #3' must contain a valid IP address");
if (!empty($pconfig['dns_server4']) && !is_ipaddr(trim($pconfig['dns_server4'])))
- $input_errors[] = "The field 'DNS Server #4' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #4' must contain a valid IP address");
}
if ($pconfig['ntp_server_enable']) {
if (!empty($pconfig['ntp_server1']) && !is_ipaddr(trim($pconfig['ntp_server1'])))
- $input_errors[] = "The field 'NTP Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #1' must contain a valid IP address");
if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2'])))
- $input_errors[] = "The field 'NTP Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address");
if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3'])))
- $input_errors[] = "The field 'NTP Server #3' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address");
if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4'])))
- $input_errors[] = "The field 'NTP Server #4' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address");
}
if ($pconfig['netbios_enable']) {
if ($pconfig['wins_server_enable']) {
if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1'])))
- $input_errors[] = "The field 'WINS Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'WINS Server #1' must contain a valid IP address");
if (!empty($pconfig['wins_server2']) && !is_ipaddr(trim($pconfig['wins_server2'])))
- $input_errors[] = "The field 'WINS Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'WINS Server #2' must contain a valid IP address");
}
if ($pconfig['nbdd_server_enable'])
if (!empty($pconfig['nbdd_server1']) && !is_ipaddr(trim($pconfig['nbdd_server1'])))
- $input_errors[] = "The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address");
}
$reqdfields[] = 'common_name';
@@ -308,10 +308,10 @@ function netbios_change() {
<form action="vpn_openvpn_csc.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">General information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -322,32 +322,32 @@ function netbios_change() {
<td>
&nbsp;
<span class="vexpl">
- <strong>Disable this override</strong><br>
+ <strong><?=gettext("Disable this override"); ?></strong><br>
</span>
</td>
</tr>
</table>
- Set this option to disable this client-specific override without removing it from the list.
+ <?=gettext("Set this option to disable this client-specific override without removing it from the list"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Common name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Common name"); ?></td>
<td width="78%" class="vtable">
<input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>">
<br>
- Enter the client's X.509 common name here.
+ <?=gettext("Enter the client's X.509 common name here"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
<br>
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Connection blocking</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Connection blocking"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -357,38 +357,38 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Block this client connection based on its common name.
+ <?=gettext("Block this client connection based on its common name"); ?>.
</span>
</td>
</tr>
</table>
- Don't use this option to permanently disable a
- client due to a compromised key or password.
- Use a CRL (certificate revocation list) instead.
+ <?=gettext("Don't use this option to permanently disable a " .
+ "client due to a compromised key or password. " .
+ "Use a CRL (certificate revocation list) instead"); ?>.
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Tunnel Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Tunnel Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Tunnel Network</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Tunnel Network"); ?></td>
<td width="78%" class="vtable">
<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
<br>
- This is the virtual network used for private
- communications between this client and the
- server expressed using CIDR (eg. 10.0.8.0/24).
- The first network address is assumed to be the
- server address and the second network address
- will be assigned to the client virtual
- interface.
+ <?=gettext("This is the virtual network used for private " .
+ "communications between this client and the " .
+ "server expressed using CIDR (eg. 10.0.8.0/24). " .
+ "The first network address is assumed to be the " .
+ "server address and the second network address " .
+ "will be assigned to the client virtual " .
+ "interface"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Redirect Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Redirect Gateway"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -398,7 +398,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Force all client generated traffic through the tunnel.
+ <?=gettext("Force all client generated traffic through the tunnel"); ?>.
</span>
</td>
</tr>
@@ -409,10 +409,10 @@ function netbios_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Client Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Client Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Server Definitions</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Server Definitions"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -422,7 +422,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Prevent this client from receiving any server-defined client settings.
+ <?=gettext("Prevent this client from receiving any server-defined client settings"); ?>.
</span>
</td>
</tr>
@@ -430,7 +430,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Default Domain</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Default Domain"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -440,7 +440,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a default domain name to clients<br>
+ <?=gettext("Provide a default domain name to clients"); ?><br>
</span>
</td>
</tr>
@@ -455,7 +455,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -465,7 +465,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a DNS server list to clients<br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -474,7 +474,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=$pconfig['dns_server1'];?>">
</td>
@@ -482,7 +482,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=$pconfig['dns_server2'];?>">
</td>
@@ -490,7 +490,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #3:&nbsp;
+ <?=gettext("Server"); ?> #3:&nbsp;
</span>
<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=$pconfig['dns_server3'];?>">
</td>
@@ -498,7 +498,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #4:&nbsp;
+ <?=gettext("Server"); ?> #4:&nbsp;
</span>
<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=$pconfig['dns_server4'];?>">
</td>
@@ -507,7 +507,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NTP Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NTP Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -517,7 +517,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a NTP server list to clients<br>
+ <?=gettext("Provide a NTP server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -526,7 +526,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>">
</td>
@@ -534,7 +534,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>">
</td>
@@ -543,7 +543,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NetBIOS Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NetBIOS Options"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -553,19 +553,19 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Enable NetBIOS over TCP/IP<br>
+ <?=gettext("Enable NetBIOS over TCP/IP"); ?><br>
</span>
</td>
</tr>
</table>
- If this option is not set, all NetBIOS-over-TCP/IP options (includeing WINS) will be disabled.
+ <?=gettext("If this option is not set, all NetBIOS-over-TCP/IP options (includeing WINS) will be disabled"); ?>.
<br/>
<table border="0" cellpadding="2" cellspacing="0" id="netbios_data">
<tr>
<td>
<br/>
<span class="vexpl">
- Node Type:&nbsp;
+ <?=gettext("Node Type"); ?>:&nbsp;
</span>
<select name='netbios_ntype' class="formselect">
<?php
@@ -578,10 +578,10 @@ function netbios_change() {
<?php endforeach; ?>
</select>
<br/>
- Possible options: b-node (broadcasts), p-node
- (point-to-point name queries to a WINS server),
- m-node (broadcast then query name server), and
- h-node (query name server, then broadcast).
+ <?=gettext("Possible options: b-node (broadcasts), p-node " .
+ "(point-to-point name queries to a WINS server), " .
+ "m-node (broadcast then query name server), and " .
+ "h-node (query name server, then broadcast)"); ?>.
</td>
</tr>
<tr>
@@ -592,18 +592,18 @@ function netbios_change() {
</span>
<input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>">
<br/>
- A NetBIOS Scope ID provides an extended naming
- service for NetBIOS over TCP/IP. The NetBIOS
- scope ID isolates NetBIOS traffic on a single
- network to only those nodes with the same
- NetBIOS scope ID.
+ <?=gettext("A NetBIOS Scope ID provides an extended naming " .
+ "service for NetBIOS over TCP/IP. The NetBIOS " .
+ "scope ID isolates NetBIOS traffic on a single " .
+ "network to only those nodes with the same " .
+ "NetBIOS scope ID"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr id="wins_opts">
- <td width="22%" valign="top" class="vncell">WINS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -613,7 +613,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a WINS server list to clients<br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -622,7 +622,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>">
</td>
@@ -630,7 +630,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>">
</td>
@@ -639,14 +639,14 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br/>
- Enter any additional options you would like to add for this client specific override, separated by a semicolon<br/>
- EXAMPLE: push "route 10.0.0.0 255.255.255.0";
+ <?=gettext("Enter any additional options you would like to add for this client specific override, separated by a semicolon"); ?><br/>
+ <?=gettext("EXAMPLE: push \"route 10.0.0.0 255.255.255.0\""); ?>;
</td>
</tr>
</table>
@@ -655,7 +655,7 @@ function netbios_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="Save">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<input name="act" type="hidden" value="<?=$act;?>">
<?php if (isset($id) && $a_csc[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
@@ -669,9 +669,9 @@ function netbios_change() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Disabled</td>
- <td width="40%" class="listhdrr">Common Name</td>
- <td width="40%" class="listhdrr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Disabled"); ?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Common Name"); ?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -693,11 +693,11 @@ function netbios_change() {
</td>
<td valign="middle" nowrap class="list">
<a href="vpn_openvpn_csc.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="edit csc" width="17" height="17" border="0">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit csc"); ?>" width="17" height="17" border="0">
</a>
&nbsp;
- <a href="vpn_openvpn_csc.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this csc?')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="delete csc" width="17" height="17" border="0">
+ <a href="vpn_openvpn_csc.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this csc?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete csc"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -708,7 +708,7 @@ function netbios_change() {
<tr>
<td class="list" colspan="3"></td>
<td class="list">
- <a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="add csc" width="17" height="17" border="0">
+ <a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add csc"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index 4b9a29a..c082b2e 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -37,7 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
-$pgtitle = array("OpenVPN", "Server");
+$pgtitle = array(gettext("OpenVPN"), gettext("Server"));
$statusurl = "status_openvpn.php";
$logurl = "diag_logs_openvpn.php";
@@ -175,7 +175,7 @@ if ($_POST) {
if (!empty($pconfig['authmode'])) {
foreach ($pconfig['authmode'] as $pauthmode) {
if ($pauthmode != "Local Database" && $pconfig['mode'] == "server_tls_user")
- $input_errors[] = "Only 'Local authentication database' is allowed with " . $openvpn_server_modes[$pconfig['mode']];
+ $input_errors[] = gettext("Only 'Local authentication database' is allowed with") . " " . $openvpn_server_modes[$pconfig['mode']];
}
}
@@ -194,7 +194,7 @@ if ($_POST) {
$portused = openvpn_port_used($pconfig['protocol'], $pconfig['local_port']);
if (($portused != $vpnid) && ($portused != 0))
- $input_errors[] = "The specified 'Local port' is in use. Please select another value";
+ $input_errors[] = gettext("The specified 'Local port' is in use. Please select another value");
if ($pconfig['autokey_enable'])
$pconfig['shared_key'] = openvpn_create_key();
@@ -202,62 +202,62 @@ if ($_POST) {
if (!$tls_mode && !$pconfig['autokey_enable'])
if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") ||
!strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----"))
- $input_errors[] = "The field 'Shared Key' does not appear to be valid";
+ $input_errors[] = gettext("The field 'Shared Key' does not appear to be valid");
if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable'])
if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") ||
!strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----"))
- $input_errors[] = "The field 'TLS Authentication Key' does not appear to be valid";
+ $input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid");
if ($pconfig['dns_server_enable']) {
if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1'])))
- $input_errors[] = "The field 'DNS Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address");
if (!empty($pconfig['dns_server2']) && !is_ipaddr(trim($pconfig['dns_server2'])))
- $input_errors[] = "The field 'DNS Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #2' must contain a valid IP address");
if (!empty($pconfig['dns_server3']) && !is_ipaddr(trim($pconfig['dns_server3'])))
- $input_errors[] = "The field 'DNS Server #3' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #3' must contain a valid IP address");
if (!empty($pconfig['dns_server4']) && !is_ipaddr(trim($pconfig['dns_server4'])))
- $input_errors[] = "The field 'DNS Server #4' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'DNS Server #4' must contain a valid IP address");
}
if ($pconfig['ntp_server_enable']) {
if (!empty($pconfig['ntp_server1']) && !is_ipaddr(trim($pconfig['ntp_server1'])))
- $input_errors[] = "The field 'NTP Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #1' must contain a valid IP address");
if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2'])))
- $input_errors[] = "The field 'NTP Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address");
if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3'])))
- $input_errors[] = "The field 'NTP Server #3' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address");
if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4'])))
- $input_errors[] = "The field 'NTP Server #4' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address");
}
if ($pconfig['netbios_enable']) {
if ($pconfig['wins_server_enable']) {
if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1'])))
- $input_errors[] = "The field 'WINS Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'WINS Server #1' must contain a valid IP address");
if (!empty($pconfig['wins_server2']) && !is_ipaddr(trim($pconfig['wins_server2'])))
- $input_errors[] = "The field 'WINS Server #2' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'WINS Server #2' must contain a valid IP address");
}
if ($pconfig['nbdd_server_enable'])
if (!empty($pconfig['nbdd_server1']) && !is_ipaddr(trim($pconfig['nbdd_server1'])))
- $input_errors[] = "The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address";
+ $input_errors[] = gettext("The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address");
}
if ($pconfig['maxclients'] && !is_numeric($pconfig['maxclients']))
- $input_errors[] = "The field 'Concurrent connections' must be numeric.";
+ $input_errors[] = gettext("The field 'Concurrent connections' must be numeric.");
/* If we are not in shared key mode, then we need the CA/Cert. */
if ($pconfig['mode'] != "p2p_shared_key") {
$reqdfields = explode(" ", "caref certref");
- $reqdfieldsn = explode(",", "Certificate Authority,Certificate");;
+ $reqdfieldsn = array(gettext("Certificate Authority"),gettext("Certificate"));;
} elseif (!$pconfig['autokey_enable']) {
/* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */
$reqdfields = array('shared_key');
- $reqdfieldsn = array('Shared key');
+ $reqdfieldsn = array(gettext('Shared key'));
}
$reqdfields[] = 'tunnel_network';
- $reqdfieldsn[] = 'Tunnel network';
+ $reqdfieldsn[] = gettext('Tunnel network');
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -534,10 +534,10 @@ function netbios_change() {
<form action="vpn_openvpn_server.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">General information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -548,12 +548,12 @@ function netbios_change() {
<td>
&nbsp;
<span class="vexpl">
- <strong>Disable this server</strong><br>
+ <strong><?=gettext("Disable this server"); ?></strong><br>
</span>
</td>
</tr>
</table>
- Set this option to disable this server without removing it from the list.
+ <?=gettext("Set this option to disable this server without removing it from the list"); ?>.
</td>
</tr>
<tr>
@@ -604,7 +604,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -635,21 +635,21 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
<br>
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Cryptographic Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Settings"); ?></td>
</tr>
<tr id="tls">
- <td width="22%" valign="top" class="vncellreq">TLS Authentication</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("TLS Authentication"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -659,7 +659,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Enable authentication of TLS packets.
+ <?=gettext("Enable authentication of TLS packets"); ?>.
</span>
</td>
</tr>
@@ -673,7 +673,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Automatically generate a shared TLS authentication key.
+ <?=gettext("Automatically generate a shared TLS authentication key"); ?>.
</span>
</td>
</tr>
@@ -684,14 +684,14 @@ function netbios_change() {
<td>
<textarea name="tls" cols="65" rows="7" class="formpre"><?=htmlspecialchars($pconfig['tls']);?></textarea>
<br/>
- Paste your shared key here.
+ <?=gettext("Paste your shared key here"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr id="tls_ca">
- <td width="22%" valign="top" class="vncellreq">Peer Certificate Authority</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Peer Certificate Authority"); ?></td>
<td width="78%" class="vtable">
<select name='caref' class="formselect">
<?php
@@ -706,7 +706,7 @@ function netbios_change() {
</td>
</tr>
<tr id="tls_cert">
- <td width="22%" valign="top" class="vncellreq">Server Certificate</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server Certificate"); ?></td>
<td width="78%" class="vtable">
<select name='certref' class="formselect">
<?php
@@ -723,7 +723,7 @@ function netbios_change() {
</td>
</tr>
<tr id="tls_dh">
- <td width="22%" valign="top" class="vncellreq">DH Parameters Length</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("DH Parameters Length"); ?></td>
<td width="78%" class="vtable">
<select name="dh_length" class="formselect">
<?php
@@ -736,12 +736,12 @@ function netbios_change() {
<?php endforeach; ?>
</select>
<span class="vexpl">
- bits
+ <?=gettext("bits"); ?>
</span>
</td>
</tr>
<tr id="psk">
- <td width="22%" valign="top" class="vncellreq">Shared Key</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Shared Key"); ?></td>
<td width="78%" class="vtable">
<?php if (!$pconfig['shared_key']): ?>
<table border="0" cellpadding="2" cellspacing="0">
@@ -752,7 +752,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Automatically generate a shared key.
+ <?=gettext("Automatically generate a shared key"); ?>.
</span>
</td>
</tr>
@@ -763,14 +763,14 @@ function netbios_change() {
<td>
<textarea name="shared_key" cols="65" rows="7" class="formpre"><?=htmlspecialchars($pconfig['shared_key']);?></textarea>
<br/>
- Paste your shared key here.
+ <?=gettext("Paste your shared key here"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Encryption algorithm</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithm"); ?></td>
<td width="78%" class="vtable">
<select name="crypto" class="formselect">
<?php
@@ -791,24 +791,24 @@ function netbios_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Tunnel Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Tunnel Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Tunnel Network</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Tunnel Network"); ?></td>
<td width="78%" class="vtable">
<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
<br>
- This is the virtual network used for private
- communications between this server and client
- hosts expressed using CIDR (eg. 10.0.8.0/24).
- The first network address will be assigned to
- the server virtual interface. The remaining
- network addresses can optionally be assigned
- to connecting clients. (see Address Pool)
+ <?=gettext("This is the virtual network used for private " .
+ "communications between this server and client " .
+ "hosts expressed using CIDR (eg. 10.0.8.0/24). " .
+ "The first network address will be assigned to " .
+ "the server virtual interface. The remaining " .
+ "network addresses can optionally be assigned " .
+ "to connecting clients. (see Address Pool)"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Redirect Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Redirect Gateway"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -818,7 +818,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Force all client generated traffic through the tunnel.
+ <?=gettext("Force all client generated traffic through the tunnel"); ?>.
</span>
</td>
</tr>
@@ -826,30 +826,30 @@ function netbios_change() {
</td>
</tr>
<tr id="local_opts">
- <td width="22%" valign="top" class="vncell">Local Network</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Local Network"); ?></td>
<td width="78%" class="vtable">
<input name="local_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['local_network']);?>">
<br>
- This is the network that will be accessible
- from the remote endpoint. Expressed as a CIDR
- range. You may leave this blank if you don't
- want to add a route to the local network
- through this tunnel on the remote machine.
- This is generally set to your LAN network.
+ <?=gettext("This is the network that will be accessible " .
+ "from the remote endpoint. Expressed as a CIDR " .
+ "range. You may leave this blank if you don't " .
+ "want to add a route to the local network " .
+ "through this tunnel on the remote machine. " .
+ "This is generally set to your LAN network"); ?>.
</td>
</tr>
<tr id="remote_opts">
- <td width="22%" valign="top" class="vncell">Remote Network</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Remote Network"); ?></td>
<td width="78%" class="vtable">
<input name="remote_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['remote_network']);?>">
<br>
- This is a network that will be routed through
- the tunnel, so that a site-to-site VPN can be
- established without manually changing the
- routing tables. Expressed as a CIDR range. If
- this is a site-to-site VPN, enter here the
- remote LAN here. You may leave this blank if
- you don't want a site-to-site VPN.
+ <?=gettext("This is a network that will be routed through " .
+ "the tunnel, so that a site-to-site VPN can be " .
+ "established without manually changing the " .
+ "routing tables. Expressed as a CIDR range. If " .
+ "this is a site-to-site VPN, enter here the " .
+ "remote LAN here. You may leave this blank if " .
+ "you don't want a site-to-site VPN"); ?>.
</td>
</tr>
<tr>
@@ -857,11 +857,11 @@ function netbios_change() {
<td width="78%" class="vtable">
<input name="maxclients" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['maxclients']);?>"/>
<br/>
- Specify the maximum number of clients allowed to concurrently connect to this server.
+ <?=gettext("Specify the maximum number of clients allowed to concurrently connect to this server"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Compression</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Compression"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -871,7 +871,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Compress tunnel packets using the LZO algorithm.
+ <?=gettext("Compress tunnel packets using the LZO algorithm"); ?>.
</span>
</td>
</tr>
@@ -879,7 +879,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Type-of-Service</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Type-of-Service"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -889,7 +889,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Set the TOS IP header value of tunnel packets to match the encapsulated packet value.
+ <?=gettext("Set the TOS IP header value of tunnel packets to match the encapsulated packet value"); ?>.
</span>
</td>
</tr>
@@ -897,7 +897,7 @@ function netbios_change() {
</td>
</tr>
<tr id="inter_client_communication">
- <td width="22%" valign="top" class="vncell">Inter-client communication</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Inter-client communication"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -907,7 +907,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Allow communication between clients connected to this server
+ <?=gettext("Allow communication between clients connected to this server"); ?>
</span>
</td>
</tr>
@@ -921,10 +921,10 @@ function netbios_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Client Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Client Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dynamic IP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dynamic IP"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -934,7 +934,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Allow connected clients to retain their connections if their IP address changes.<br>
+ <?=gettext("Allow connected clients to retain their connections if their IP address changes"); ?>.<br>
</span>
</td>
</tr>
@@ -942,7 +942,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Address Pool</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Address Pool"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -952,7 +952,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a virtual adapter IP address to clients (see Tunnel Network)<br>
+ <?=gettext("Provide a virtual adapter IP address to clients (see Tunnel Network)"); ?><br>
</span>
</td>
</tr>
@@ -960,7 +960,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Default Domain</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Default Domain"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -970,7 +970,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a default domain name to clients<br>
+ <?=gettext("Provide a default domain name to clients"); ?><br>
</span>
</td>
</tr>
@@ -985,7 +985,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -995,7 +995,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a DNS server list to clients<br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -1004,7 +1004,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=$pconfig['dns_server1'];?>">
</td>
@@ -1012,7 +1012,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=$pconfig['dns_server2'];?>">
</td>
@@ -1020,7 +1020,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #3:&nbsp;
+ <?=gettext("Server"); ?> #3:&nbsp;
</span>
<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=$pconfig['dns_server3'];?>">
</td>
@@ -1028,7 +1028,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #4:&nbsp;
+ <?=gettext("Server"); ?> #4:&nbsp;
</span>
<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=$pconfig['dns_server4'];?>">
</td>
@@ -1037,7 +1037,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NTP Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NTP Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -1047,7 +1047,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a NTP server list to clients<br>
+ <?=gettext("Provide a NTP server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -1056,7 +1056,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>">
</td>
@@ -1064,7 +1064,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>">
</td>
@@ -1073,7 +1073,7 @@ function netbios_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NetBIOS Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NetBIOS Options"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -1083,19 +1083,19 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Enable NetBIOS over TCP/IP<br>
+ <?=gettext("Enable NetBIOS over TCP/IP"); ?><br>
</span>
</td>
</tr>
</table>
- If this option is not set, all NetBIOS-over-TCP/IP options (including WINS) will be disabled.
+ <?=gettext("If this option is not set, all NetBIOS-over-TCP/IP options (including WINS) will be disabled"); ?>.
<br/>
<table border="0" cellpadding="2" cellspacing="0" id="netbios_data">
<tr>
<td>
<br/>
<span class="vexpl">
- Node Type:&nbsp;
+ <?=gettext("Node Type"); ?>:&nbsp;
</span>
<select name='netbios_ntype' class="formselect">
<?php
@@ -1108,32 +1108,32 @@ function netbios_change() {
<?php endforeach; ?>
</select>
<br/>
- Possible options: b-node (broadcasts), p-node
- (point-to-point name queries to a WINS server),
- m-node (broadcast then query name server), and
- h-node (query name server, then broadcast).
+ <?=gettext("Possible options: b-node (broadcasts), p-node " .
+ "(point-to-point name queries to a WINS server), " .
+ "m-node (broadcast then query name server), and " .
+ "h-node (query name server, then broadcast)"); ?>.
</td>
</tr>
<tr>
<td>
<br/>
<span class="vexpl">
- Scope ID:&nbsp;
+ <?=gettext("Scope ID"); ?>:&nbsp;
</span>
<input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>">
<br/>
- A NetBIOS Scope ID provides an extended naming
- service for NetBIOS over TCP/IP. The NetBIOS
- scope ID isolates NetBIOS traffic on a single
- network to only those nodes with the same
- NetBIOS scope ID.
+ <?=gettext("A NetBIOS Scope ID provides an extended naming " .
+ "service for NetBIOS over TCP/IP. The NetBIOS " .
+ "scope ID isolates NetBIOS traffic on a single " .
+ "network to only those nodes with the same " .
+ "NetBIOS scope ID"); ?>.
</td>
</tr>
</table>
</td>
</tr>
<tr id="wins_opts">
- <td width="22%" valign="top" class="vncell">WINS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
@@ -1143,7 +1143,7 @@ function netbios_change() {
</td>
<td>
<span class="vexpl">
- Provide a WINS server list to clients<br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br>
</span>
</td>
</tr>
@@ -1152,7 +1152,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #1:&nbsp;
+ <?=gettext("Server"); ?> #1:&nbsp;
</span>
<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>">
</td>
@@ -1160,7 +1160,7 @@ function netbios_change() {
<tr>
<td>
<span class="vexpl">
- Server #2:&nbsp;
+ <?=gettext("Server"); ?> #2:&nbsp;
</span>
<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>">
</td>
@@ -1175,17 +1175,17 @@ function netbios_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br/>
- Enter any additional options you would like to add to the OpenVPN server configuration here, separated by a semicolon<br/>
- EXAMPLE: push "route 10.0.0.0 255.255.255.0";
+ <?=gettext("Enter any additional options you would like to add to the OpenVPN server configuration here, separated by a semicolon"); ?><br/>
+ <?=gettext("EXAMPLE: push \"route 10.0.0.0 255.255.255.0\""); ?>;
</td>
</tr>
</table>
@@ -1199,7 +1199,7 @@ function netbios_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="Save">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<input name="act" type="hidden" value="<?=$act;?>">
<?php if (isset($id) && $a_server[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
@@ -1213,10 +1213,10 @@ function netbios_change() {
<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Disabled</td>
- <td width="10%" class="listhdrr">Protocol / Port</td>
- <td width="30%" class="listhdrr">Tunnel Network</td>
- <td width="40%" class="listhdrr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Disabled"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Protocol / Port"); ?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Tunnel Network"); ?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -1241,11 +1241,11 @@ function netbios_change() {
</td>
<td valign="middle" nowrap class="list">
<a href="vpn_openvpn_server.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="edit server" width="17" height="17" border="0">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server"); ?>" width="17" height="17" border="0">
</a>
&nbsp;
- <a href="vpn_openvpn_server.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this server?')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="delete server" width="17" height="17" border="0">
+ <a href="vpn_openvpn_server.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this server?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -1256,7 +1256,7 @@ function netbios_change() {
<tr>
<td class="list" colspan="4"></td>
<td class="list">
- <a href="vpn_openvpn_server.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="add server" width="17" height="17" border="0">
+ <a href="vpn_openvpn_server.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server"); ?>" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -1296,4 +1296,4 @@ function set_checked($var,& $chk) {
$chk = '';
}
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php
index 931d15d..81c8c4c 100755
--- a/usr/local/www/vpn_pppoe.php
+++ b/usr/local/www/vpn_pppoe.php
@@ -76,24 +76,24 @@ if ($_POST) {
/* input validation */
if ($_POST['mode'] == "server") {
$reqdfields = explode(" ", "localip remoteip");
- $reqdfieldsn = explode(",", "Server address,Remote start address");
+ $reqdfieldsn = array(gettext("Server address"),gettext("Remote start address"));
if ($_POST['radiusenable']) {
$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
$reqdfieldsn = array_merge($reqdfieldsn,
- explode(",", "RADIUS server address,RADIUS shared secret"));
+ array(gettext("RADIUS server address"),gettext("RADIUS shared secret")));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) {
- $input_errors[] = "A valid server address must be specified.";
+ $input_errors[] = gettext("A valid server address must be specified.");
}
if (($_POST['pppoe_subnet'] && !is_ipaddr($_POST['remoteip']))) {
- $input_errors[] = "A valid remote start address must be specified.";
+ $input_errors[] = gettext("A valid remote start address must be specified.");
}
if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
- $input_errors[] = "A valid RADIUS server address must be specified.";
+ $input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
if (!$input_errors) {
@@ -103,10 +103,10 @@ if ($_POST) {
if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
(ip2ulong($_POST['localip']) <= $subnet_end)) {
- $input_errors[] = "The specified server address lies in the remote subnet.";
+ $input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip("lan")) {
- $input_errors[] = "The specified server address is equal to the LAN interface address.";
+ $input_errors[] = gettext("The specified server address is equal to the LAN interface address.");
}
}
} else {
@@ -176,7 +176,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","PPPoE Server");
+$pgtitle = array(gettext("Services"),gettext("PPPoE Server"));
include("head.inc");
?>
@@ -272,8 +272,8 @@ function enable_change(enable_over) {
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Configuration", true, "vpn_pppoe.php");
- $tab_array[1] = array("Users", false, "vpn_pppoe_users.php");
+ $tab_array[0] = array(gettext("Configuration"), true, "vpn_pppoe.php");
+ $tab_array[1] = array(gettext("Users"), false, "vpn_pppoe_users.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -286,17 +286,17 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="off"
<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
- Off</td>
+ <?=gettext("Off"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
- Enable PPPoE server</td>
+ <?=gettext("Enable PPPoE server"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><b>Interface</b></td>
+ <td width="22%" valign="top" class="vncell"><b><?=gettext("Interface"); ?></b></td>
<td width="78%" valign="top" class="vtable">
<select name="interface" class="formselect" id="interface">
@@ -314,7 +314,7 @@ function enable_change(enable_over) {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet netmask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet netmask"); ?></td>
<td width="78%" class="vtable">
<select id="pppoe_subnet" name="pppoe_subnet">
<?php
@@ -327,11 +327,11 @@ function enable_change(enable_over) {
}
?>
</select>
- <br>Hint: 24 is 255.255.255.0
+ <br><?=gettext("Hint"); ?>: 24 <?=gettext("is"); ?> 255.255.255.0
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">No. PPPoE users</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("No. PPPoE users"); ?></td>
<td width="78%" class="vtable">
<select id="n_pppoe_units" name="n_pppoe_units">
<?php
@@ -344,104 +344,104 @@ function enable_change(enable_over) {
}
?>
</select>
- <br>Hint: 10 is TEN pppoe clients
+ <br><?=gettext("Hint: 10 is TEN pppoe clients"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Server address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>">
<br>
- Enter the IP address the PPPoE server should use on its side
- for all clients.</td>
+ <?=gettext("Enter the IP address the PPPoE server should use on its side " .
+ "for all clients"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Remote address range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address range"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
<br>
- Specify the starting address for the client IP address subnet.<br>
+ <?=gettext("Specify the starting address for the client IP address subnet"); ?>.<br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">DNS servers</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("DNS servers"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="pppoe_dns1" type="text" class="formfld unknown" id="pppoe_dns1" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns1']);?>">
<br>
<input name="pppoe_dns2" type="text" class="formfld unknown" id="pppoe_dns2" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns2']);?>">
<br>
- If entered they will be given to all PPPoE clients, else LAN DNS and one WAN DNS will go to all clients<br>
+ <?=gettext("If entered they will be given to all PPPoE clients, else LAN DNS and one WAN DNS will go to all clients"); ?><br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
<td width="78%" class="vtable">
<input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
- <strong>Use a RADIUS server for authentication<br>
- </strong>When set, all users will be authenticated using
- the RADIUS server specified below. The local user database
- will not be used.<br>
+ <strong><?=gettext("Use a RADIUS server for authentication"); ?><br>
+ </strong><?=gettext("When set, all users will be authenticated using " .
+ "the RADIUS server specified below. The local user database " .
+ "will not be used"); ?>.<br>
<br>
<input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
- <strong>Enable RADIUS accounting <br>
+ <strong><?=gettext("Enable RADIUS accounting"); ?> <br>
<br>
- </strong>Sends accounting packets to the RADIUS server.<br>
+ </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br>
<input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
- <strong>Use Backup Radius Server</strong><br>
- When set, if primary server fails all requests will be sent via backup server</td>
+ <strong><?=gettext("Use Backup Radius Server"); ?></strong><br>
+ <?=gettext("When set, if primary server fails all requests will be sent via backup server"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">NAS IP Address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("NAS IP Address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="radius_nasip" type="text" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
- <br>radius server NAS ip Address<br>
+ <br><?=gettext("radius server NAS ip Address"); ?><br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">RADIUS Accounting Update</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("RADIUS Accounting Update"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="radius_acct_update" type="text" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
- <br>Radius accounting update period in seconds
+ <br><?=gettext("Radius accounting update period in seconds"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS issued IPs</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS issued IPs"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
- <br>Issue IP Addresses via RADIUS server.</td>
+ <br><?=gettext("Issue IP Addresses via RADIUS server"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS server Primary</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS server Primary"); ?></td>
<td width="78%" class="vtable">
<input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
<input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
<input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
- <br>Enter the IP address and port of the RADIUS server. Format ip auth_port acct_port<br>
- <br> standard port 1812 and 1813 accounting</td>
+ <br><?=gettext("Enter the IP address and port of the RADIUS server. Format ip auth_port acct_port"); ?><br>
+ <br> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS primary shared secret</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS primary shared secret"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
- <br>Enter the shared secret that will be used to authenticate
- to the RADIUS server.</td>
+ <br><?=gettext("Enter the shared secret that will be used to authenticate " .
+ "to the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS server Secondary</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS server Secondary"); ?></td>
<td width="78%" class="vtable">
<input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
<input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
<input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
- <br>Enter the IP address and port of the BACKUP RADIUS server. Format ip auth_port acct_port<br>
- <br> standard port 1812 and 1813 accounting</td>
+ <br><?=gettext("Enter the IP address and port of the BACKUP RADIUS server. Format ip auth_port acct_port"); ?><br>
+ <br> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS secondary shared secret</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS secondary shared secret"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
<br>
- Enter the shared secret that will be used to authenticate
- to the RADIUS server.</td>
+ <?=gettext("Enter the shared secret that will be used to authenticate " .
+ "to the RADIUS server"); ?>.</td>
</tr>
<tr>
<td height="16" colspan="2" valign="top"></td>
@@ -449,14 +449,14 @@ function enable_change(enable_over) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>don't forget to add a firewall rule to permit
- traffic from PPPoE clients!</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("don't forget to add a firewall rule to permit " .
+ "traffic from PPPoE clients"); ?>!</span></td>
</tr>
</table>
</div>
diff --git a/usr/local/www/vpn_pppoe_users.php b/usr/local/www/vpn_pppoe_users.php
index a10589a7..f9395e5 100755
--- a/usr/local/www/vpn_pppoe_users.php
+++ b/usr/local/www/vpn_pppoe_users.php
@@ -68,7 +68,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","PPPoE Server","Users");
+$pgtitle = array(gettext("Services"),gettext("PPPoE Server"),gettext("Users"));
include("head.inc");
?>
@@ -78,16 +78,16 @@ include("head.inc");
<form action="vpn_pppoe_users.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (isset($config['pppoe']['radius']['enable']))
- print_info_box("Warning: RADIUS is enabled. The local user database will not be used."); ?>
+ print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); ?>
<?php if (is_subsystem_dirty('pppoeusers')): ?><p>
-<?php print_info_box_np("The PPPoE user list has been modified.<br>You must apply the changes in order for them to take effect.<br><b>Warning: this will terminate all current PPPoE sessions!</b>");?><br>
+<?php print_info_box_np(gettext("The PPPoE user list has been modified") . ".<br>" . gettext("You must apply the changes in order for them to take effect") . ".<br><b>" . gettext("Warning: this will terminate all current PPPoE sessions") . "!</b>");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Configuration", false, "vpn_pppoe.php");
- $tab_array[1] = array("Users", true, "vpn_pppoe_users.php");
+ $tab_array[0] = array(gettext("Configuration"), false, "vpn_pppoe.php");
+ $tab_array[1] = array(gettext("Users"), true, "vpn_pppoe_users.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
@@ -95,13 +95,13 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td class="listhdrr">Username</td>
- <td class="listhdr">IP address</td>
+ <td class="listhdrr"><?=gettext("Username"); ?></td>
+ <td class="listhdr"><?=gettext("IP address"); ?></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="vpn_pppoe_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add user" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_pppoe_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -115,8 +115,8 @@ include("head.inc");
<?php if($secretent['ip'] == "") $secretent['ip'] = "Dynamic"; ?>
<?=htmlspecialchars($secretent['ip']);?>&nbsp;
</td>
- <td class="list" nowrap> <a href="vpn_pppoe_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit user" width="17" height="17" border="0"></a>
- &nbsp;<a href="vpn_pppoe_users.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this user?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete user" width="17" height="17" border="0"></a></td>
+ <td class="list" nowrap> <a href="vpn_pppoe_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="vpn_pppoe_users.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this user?"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -125,7 +125,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="vpn_pppoe_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add user" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_pppoe_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/vpn_pppoe_users_edit.php b/usr/local/www/vpn_pppoe_users_edit.php
index 450a593..6c15d35 100755
--- a/usr/local/www/vpn_pppoe_users_edit.php
+++ b/usr/local/www/vpn_pppoe_users_edit.php
@@ -73,32 +73,32 @@ if ($_POST) {
/* input validation */
if (isset($id) && ($a_secret[$id])) {
$reqdfields = explode(" ", "username");
- $reqdfieldsn = explode(",", "Username");
+ $reqdfieldsn = array(gettext("Username"));
} else {
$reqdfields = explode(" ", "username password");
- $reqdfieldsn = explode(",", "Username,Password");
+ $reqdfieldsn = array(gettext("Username"),gettext("Password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (preg_match("/[^a-zA-Z0-9\.\-\@_]/", $_POST['username']))
- $input_errors[] = "The username contains invalid characters.";
+ $input_errors[] = gettext("The username contains invalid characters.");
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['password']))
- $input_errors[] = "The password contains invalid characters.";
+ $input_errors[] = gettext("The password contains invalid characters.");
if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) {
- $input_errors[] = "The passwords do not match.";
+ $input_errors[] = gettext("The passwords do not match.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "The IP address entered is not valid.";
+ $input_errors[] = gettext("The IP address entered is not valid.");
}
if (!$input_errors && !(isset($id) && $a_secret[$id])) {
/* make sure there are no dupes */
foreach ($a_secret as $secretent) {
if ($secretent['name'] == $_POST['username']) {
- $input_errors[] = "Another entry with the same username already exists.";
+ $input_errors[] = gettext("Another entry with the same username already exists.");
break;
}
}
@@ -130,7 +130,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","PPPoE Server","User","Edit");
+$pgtitle = array(gettext("Services"),gettext("PPPoE Server"),gettext("User"),gettext("Edit"));
include("head.inc");
?>
@@ -141,29 +141,29 @@ include("head.inc");
<div id="mainarea">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
</td>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20">
<br><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20">
- &nbsp;(confirmation)<?php if (isset($id) && $a_secret[$id]): ?><br>
- <span class="vexpl">If you want to change the users' password,
- enter it here twice.</span><?php endif; ?></td>
+ &nbsp;(<?=gettext("confirmation"); ?>)<?php if (isset($id) && $a_secret[$id]): ?><br>
+ <span class="vexpl"><?=gettext("If you want to change the users' password, " .
+ "enter it here twice"); ?>.</span><?php endif; ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP address"); ?></td>
<td width="78%" class="vtable">
<input name="ip" type="text" class="formfld unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br><span class="vexpl">If you want the user to be assigned a specific IP address, enter it here.</span></td>
+ <br><span class="vexpl"><?=gettext("If you want the user to be assigned a specific IP address, enter it here"); ?>.</span></td>
</tr>
<tr>
<td class="vncell" width="22%" valign="top">&nbsp;</td>
<td class="vncell" width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_secret[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php
index 9a7b108..236c923 100755
--- a/usr/local/www/vpn_pptp.php
+++ b/usr/local/www/vpn_pptp.php
@@ -78,24 +78,24 @@ if ($_POST) {
/* input validation */
if ($_POST['mode'] == "server") {
$reqdfields = explode(" ", "localip remoteip");
- $reqdfieldsn = explode(",", "Server address,Remote start address");
+ $reqdfieldsn = array(gettext("Server address"),gettext("Remote start address"));
if ($_POST['radiusenable']) {
$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
$reqdfieldsn = array_merge($reqdfieldsn,
- explode(",", "RADIUS server address,RADIUS shared secret"));
+ array(gettext("RADIUS server address"),gettext("RADIUS shared secret")));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) {
- $input_errors[] = "A valid server address must be specified.";
+ $input_errors[] = gettext("A valid server address must be specified.");
}
if (!is_ipaddr($_POST['remoteip'])) {
- $input_errors[] = "A valid remote start address must be specified.";
+ $input_errors[] = gettext("A valid remote start address must be specified.");
}
if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
- $input_errors[] = "A valid RADIUS server address must be specified.";
+ $input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
if (!$input_errors) {
@@ -104,21 +104,21 @@ if ($_POST) {
if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
(ip2ulong($_POST['localip']) <= $subnet_end)) {
- $input_errors[] = "The specified server address lies in the remote subnet.";
+ $input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
// TODO: Should this check be for any local IP address?
if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) {
- $input_errors[] = "The specified server address is equal to the LAN interface address.";
+ $input_errors[] = gettext("The specified server address is equal to the LAN interface address.");
}
}
} else if ($_POST['mode'] == "redir") {
$reqdfields = explode(" ", "redir");
- $reqdfieldsn = explode(",", "PPTP redirection target address");
+ $reqdfieldsn = array(gettext("PPTP redirection target address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) {
- $input_errors[] = "A valid target address must be specified.";
+ $input_errors[] = gettext("A valid target address must be specified.");
}
} else {
unset($config['pptpd']['mode']);
@@ -187,7 +187,7 @@ if ($_POST) {
}
}
-$pgtitle = array("VPN","VPN PPTP");
+$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"));
include("head.inc");
?>
@@ -290,8 +290,8 @@ function enable_change(enable_over) {
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Configuration", true, "vpn_pptp.php");
- $tab_array[1] = array("Users", false, "vpn_pptp_users.php");
+ $tab_array[0] = array(gettext("Configuration"), true, "vpn_pptp.php");
+ $tab_array[1] = array(gettext("Users"), false, "vpn_pptp_users.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -304,27 +304,28 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="off"
<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
- Off</td>
+ <?=gettext("Off"); ?></td>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
- <input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked"; ?>>
- Redirect incoming PPTP connections to:</td>
- <tr>
- <td width="22%" valign="top" class="vncellreq">PPTP redirection</td>
+
+ <input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked" ?>>
+ <?=gettext("Redirect incoming PPTP connections to");?>:</td>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("PPTP redirection");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>">
<br>
- Enter the IP address of a host which will accept incoming
- PPTP connections.</td>
+ <?=gettext("Enter the IP address of a host which will accept incoming " .
+ "PPTP connections"); ?>.</td>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
- Enable PPTP server</td>
+ <?=gettext("Enable PPTP server"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">No. PPTP users</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("No. PPTP users"); ?></td>
<td width="78%" class="vtable">
<select id="n_pptp_units" name="n_pptp_units">
<?php
@@ -338,108 +339,108 @@ function enable_change(enable_over) {
}
?>
</select>
- <br>Hint: 10 is TEN pptp clients
+ <br><?=gettext("Hint: 10 is TEN pptp clients"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Server address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>">
<br>
- Enter the IP address the PPTP server should use on its side
- for all clients.</td>
+ <?=gettext("Enter the IP address the PPTP server should use on its side " .
+ "for all clients"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Remote address
- range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address " .
+ "range"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
<br>
- Specify the starting address for the client IP subnet.<br>
+ <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">PPTP DNS Servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("PPTP DNS Servers"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
<br>
<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
<br>
- primary and secondary DNS servers assigned to PPTP clients<br>
+ <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">WINS Server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS Server"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
<td width="78%" class="vtable">
<input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
- <strong>Use a RADIUS server for authentication</strong><br>
- When set, all users will be authenticated using
- the RADIUS server specified below. The local user database
- will not be used.<br>
+ <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br>
+ <?=gettext("When set, all users will be authenticated using " .
+ "the RADIUS server specified below. The local user database " .
+ "will not be used"); ?>.<br>
<br>
<input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
- <strong>Enable RADIUS accounting <br>
- </strong>Sends accounting packets to the RADIUS server.<br>
+ <strong><?=gettext("Enable RADIUS accounting"); ?> <br>
+ </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br>
<br>
<input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
- <strong>Secondary RADIUS server for failover authentication</strong><br>
- When set, all requests will go to the secondary server when primary fails<br>
+ <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br>
+ <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br>
<br>
<input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
- <strong>RADIUS issued IPs</strong>
- <br>Issue IP addresses via RADIUS server.
+ <strong><?=gettext("RADIUS issued IPs"); ?></strong>
+ <br><?=gettext("Issue IP addresses via RADIUS server"); ?>.
</td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS NAS IP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS NAS IP"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS Accounting Update</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Accounting Update"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS Server </td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Server"); ?> </td>
<td width="78%" class="vtable">
<input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
<input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
<input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
<br>
- Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server.</td>
+ <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">RADIUS shared secret</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS shared secret"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
<br>
- Enter the shared secret that will be used to authenticate
- to the RADIUS server.</td>
+ <?=gettext("Enter the shared secret that will be used to authenticate " .
+ "to the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Secondary RADIUS server </td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS server"); ?> </td>
<td width="78%" class="vtable">
<input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
<input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
<input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
<br>
- Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server.</td>
+ <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Secondary RADIUS shared secret</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS shared secret"); ?></td>
<td width="78%" valign="top" class="vtable">
<input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
<br>
- Enter the shared secret that will be used to authenticate
- to the secondary RADIUS server.</td>
+ <?=gettext("Enter the shared secret that will be used to authenticate " .
+ "to the secondary RADIUS server"); ?>.</td>
</tr>
<tr>
<td height="16" colspan="2" valign="top"></td>
@@ -448,24 +449,24 @@ function enable_change(enable_over) {
<td width="22%" valign="middle">&nbsp;</td>
<td width="78%" class="vtable">
<input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>>
- <strong>Require 128-bit encryption</strong><br>
- When set, only 128-bit encryption will be accepted. Otherwise
- 40-bit and 56-bit encryption will be accepted as well. Note that
- encryption will always be forced on PPTP connections (i.e.
- unencrypted connections will not be accepted).</td>
+ <strong><?=gettext("Require 128-bit encryption"); ?></strong><br>
+ <?=gettext("When set, only 128-bit encryption will be accepted. Otherwise " .
+ "40-bit and 56-bit encryption will be accepted as well. Note that " .
+ "encryption will always be forced on PPTP connections (i.e. " .
+ "unencrypted connections will not be accepted)"); ?>.</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>don't forget to <a href="firewall_rules.php?if=pptp">add a firewall rule</a> to permit
- traffic from PPTP clients!</span></td>
- </tr>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?=gettext("don't forget to ");?><a href="firewall_rules.php?if=pptp"><?=gettext("add a firewall rule"); ?></a> <?=gettext("to permit ".
+ "traffic from PPTP clients");?>!</span></td>
+ </tr>
</table>
</div>
</td>
diff --git a/usr/local/www/vpn_pptp_users.php b/usr/local/www/vpn_pptp_users.php
index 8d74aec..dbdb0ce 100755
--- a/usr/local/www/vpn_pptp_users.php
+++ b/usr/local/www/vpn_pptp_users.php
@@ -68,7 +68,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("VPN","VPN PPTP","Users");
+$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"),gettext("Users"));
include("head.inc");
?>
@@ -78,16 +78,16 @@ include("head.inc");
<form action="vpn_pptp_users.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (isset($config['pptpd']['radius']['enable']))
- print_info_box("Warning: RADIUS is enabled. The local user database will not be used."); ?>
+ print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); ?>
<?php if (is_subsystem_dirty('pptpusers')): ?><p>
-<?php print_info_box_np("The PPTP user list has been modified.<br>You must apply the changes in order for them to take effect.<br><b>Warning: this will terminate all current PPTP sessions!</b>");?><br>
+<?php print_info_box_np(gettext("The PPTP user list has been modified").".<br>".gettext("You must apply the changes in order for them to take effect").".<br><b>".gettext("Warning: this will terminate all current PPTP sessions")."!</b>");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Configuration", false, "vpn_pptp.php");
- $tab_array[1] = array("Users", true, "vpn_pptp_users.php");
+ $tab_array[0] = array(gettext("Configuration"), false, "vpn_pptp.php");
+ $tab_array[1] = array(gettext("Users"), true, "vpn_pptp_users.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
@@ -95,13 +95,13 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td class="listhdrr">Username</td>
- <td class="listhdr">IP address</td>
+ <td class="listhdrr"><?=gettext("Username");?></td>
+ <td class="listhdr"><?=gettext("IP address");?></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add user" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -114,8 +114,8 @@ include("head.inc");
<td class="listr">
<?=htmlspecialchars($secretent['ip']);?>&nbsp;
</td>
- <td class="list" nowrap> <a href="vpn_pptp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit user" width="17" height="17" border="0"></a>
- &nbsp;<a href="vpn_pptp_users.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this user?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete user" width="17" height="17" border="0"></a></td>
+ <td class="list" nowrap> <a href="vpn_pptp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit user");?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="vpn_pptp_users.php?act=del&id=<?=$i;?>" onclick="return confirm(<?=gettext('Do you really want to delete this user?');?>)"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete user");?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -124,7 +124,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add user" width="17" height="17" border="0"></a></td>
+ <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/vpn_pptp_users_edit.php b/usr/local/www/vpn_pptp_users_edit.php
index 86202aa..9494c76 100755
--- a/usr/local/www/vpn_pptp_users_edit.php
+++ b/usr/local/www/vpn_pptp_users_edit.php
@@ -73,32 +73,32 @@ if ($_POST) {
/* input validation */
if (isset($id) && ($a_secret[$id])) {
$reqdfields = explode(" ", "username");
- $reqdfieldsn = explode(",", "Username");
+ $reqdfieldsn = array(gettext("Username"));
} else {
$reqdfields = explode(" ", "username password");
- $reqdfieldsn = explode(",", "Username,Password");
+ $reqdfieldsn = array(gettext("Username"),gettext("Password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['username']))
- $input_errors[] = "The username contains invalid characters.";
+ $input_errors[] = gettext("The username contains invalid characters.");
if (preg_match("/[[:cntrl:]\"]/", $_POST['password']))
- $input_errors[] = "The password contains invalid characters.";
+ $input_errors[] = gettext("The password contains invalid characters.");
if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) {
- $input_errors[] = "The passwords do not match.";
+ $input_errors[] = gettext("The passwords do not match.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "The IP address entered is not valid.";
+ $input_errors[] = gettext("The IP address entered is not valid.");
}
if (!$input_errors && !(isset($id) && $a_secret[$id])) {
/* make sure there are no dupes */
foreach ($a_secret as $secretent) {
if ($secretent['name'] == $_POST['username']) {
- $input_errors[] = "Another entry with the same username already exists.";
+ $input_errors[] = gettext("Another entry with the same username already exists.");
break;
}
}
@@ -129,7 +129,7 @@ if ($_POST) {
}
}
-$pgtitle = array("VPN","VPN PPTP","User","Edit");
+$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"),gettext("User"),gettext("Edit"));
include("head.inc");
?>
@@ -140,29 +140,29 @@ include("head.inc");
<div id="mainarea">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
</td>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20">
<br><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20">
- &nbsp;(confirmation)<?php if (isset($id) && $a_secret[$id]): ?><br>
- <span class="vexpl">If you want to change the users' password,
- enter it here twice.</span><?php endif; ?></td>
+ &nbsp;(<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]): ?><br>
+ <span class="vexpl"><?=gettext("If you want to change the users' password, ".
+ "enter it here twice.");?></span><?php endif; ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<input name="ip" type="text" class="formfld unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br><span class="vexpl">If you want the user to be assigned a specific IP address, enter it here.</span></td>
+ <br><span class="vexpl"><?=gettext("If you want the user to be assigned a specific IP address, enter it here.");?></span></td>
</tr>
<tr>
<td class="vncell" width="22%" valign="top">&nbsp;</td>
<td class="vncell" width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
<?php if (isset($id) && $a_secret[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 540236c..0f2c319 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -62,19 +62,19 @@ if($_POST['xml'])
if(empty($xml)) {
$xml = "not_defined";
- print_info_box_np("ERROR: Could not open " . $xml . ".");
+ print_info_box_np(gettext("ERROR: Could not open") . " " . $xml . ".");
die;
} else {
if (file_exists("{$g['www_path']}/wizards/{$xml}"))
$pkg = parse_xml_config_pkg("{$g['www_path']}/wizards/" . $xml, "pfsensewizard");
else {
- print_info_box_np("ERROR: Could not open " . $xml . ".");
+ print_info_box_np(gettext("ERROR: Could not open") . " " . $xml . ".");
die;
}
}
if (!is_array($pkg)) {
- print_info_box_np("ERROR: Could not parse {$g['www_path']}/wizards/{$xml} file.");
+ print_info_box_np(printf(gettext("ERROR: Could not parse %s/wizards/%s file."),$g['www_path'],$xml));
die;
}
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 591001c..a1b9ec5 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -55,7 +55,7 @@ if($config['installedpackages']['carpsettings']) {
if($synchronizetoip) {
if($synchronizetoip == $_SERVER['REMOTE_ADDR']) {
- log_error("Disallowing CARP sync loop.");
+ log_error(gettext("Disallowing CARP sync loop."));
die;
}
}
@@ -64,7 +64,7 @@ $xmlrpc_g = array(
"return" => array(
"true" => new XML_RPC_Response(new XML_RPC_Value(true, $XML_RPC_Boolean)),
"false" => new XML_RPC_Response(new XML_RPC_Value(false, $XML_RPC_Boolean)),
- "authfail" => new XML_RPC_Response(new XML_RPC_Value("Authentication failed", $XML_RPC_String))
+ "authfail" => new XML_RPC_Response(new XML_RPC_Value(gettext("Authentication failed"), $XML_RPC_String))
)
);
@@ -76,7 +76,7 @@ $XML_RPC_erruser = 200;
/* EXPOSED FUNCTIONS */
-$exec_php_doc = 'XMLRPC wrapper for eval(). This method must be called with two parameters: a string containing the local system\'s password followed by the PHP code to evaluate.';
+$exec_php_doc = gettext("XMLRPC wrapper for eval(). This method must be called with two parameters: a string containing the local system\'s password followed by the PHP code to evaluate.");
$exec_php_sig = array(
array(
$XML_RPC_Boolean, // First signature element is return value.
@@ -100,7 +100,7 @@ function exec_php_xmlrpc($raw_params) {
/*****************************/
-$exec_shell_doc = 'XMLRPC wrapper for mwexec(). This method must be called with two parameters: a string containing the local system\'s password followed by an shell command to execute.';
+$exec_shell_doc = gettext("XMLRPC wrapper for mwexec(). This method must be called with two parameters: a string containing the local system\'s password followed by an shell command to execute.");
$exec_shell_sig = array(
array(
$XML_RPC_Boolean, // First signature element is return value.
@@ -124,7 +124,7 @@ function exec_shell_xmlrpc($raw_params) {
/*****************************/
-$backup_config_section_doc = 'XMLRPC wrapper for backup_config_section. This method must be called with two parameters: a string containing the local system\'s password followed by an array containing the keys to be backed up.';
+$backup_config_section_doc = gettext("XMLRPC wrapper for backup_config_section. This method must be called with two parameters: a string containing the local system\'s password followed by an array containing the keys to be backed up.");
$backup_config_section_sig = array(
array(
$XML_RPC_Struct, // First signature element is return value.
@@ -143,7 +143,7 @@ function backup_config_section_xmlrpc($raw_params) {
/*****************************/
-$restore_config_section_doc = 'XMLRPC wrapper for restore_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.';
+$restore_config_section_doc = gettext("XMLRPC wrapper for restore_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.");
$restore_config_section_sig = array(
array(
$XML_RPC_Boolean,
@@ -158,7 +158,7 @@ function restore_config_section_xmlrpc($raw_params) {
if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail'];
$config = array_merge($config, $params[0]);
$mergedkeys = implode(",", array_keys($params[0]));
- write_config("Merged in config ({$mergedkeys} sections) from XMLRPC client.");
+ write_config(printf(gettext("Merged in config (%s sections) from XMLRPC client."),$mergedkeys));
return $xmlrpc_g['return']['true'];
}
@@ -166,7 +166,7 @@ function restore_config_section_xmlrpc($raw_params) {
/*****************************/
-$merge_config_section_doc = 'XMLRPC wrapper for merging package sections. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.';
+$merge_config_section_doc = gettext("XMLRPC wrapper for merging package sections. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.");
$merge_config_section_sig = array(
array(
$XML_RPC_Boolean,
@@ -181,7 +181,7 @@ function merge_installedpackages_section_xmlrpc($raw_params) {
if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail'];
$config['installedpackages'] = array_merge($config['installedpackages'], $params[0]);
$mergedkeys = implode(",", array_keys($params[0]));
- write_config("Merged in config ({$mergedkeys} sections) from XMLRPC client.");
+ write_config(printf(gettext("Merged in config (%s sections) from XMLRPC client."),$mergedkeys));
return $xmlrpc_g['return']['true'];
}
@@ -189,7 +189,7 @@ function merge_installedpackages_section_xmlrpc($raw_params) {
/*****************************/
-$merge_config_section_doc = 'XMLRPC wrapper for merge_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.';
+$merge_config_section_doc = gettext("XMLRPC wrapper for merge_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.");
$merge_config_section_sig = array(
array(
$XML_RPC_Boolean,
@@ -210,7 +210,7 @@ function merge_config_section_xmlrpc($raw_params) {
/*****************************/
-$filter_configure_doc = 'Basic XMLRPC wrapper for filter_configure. This method must be called with one paramater: a string containing the local system\'s password. This function returns true upon completion.';
+$filter_configure_doc = gettext("Basic XMLRPC wrapper for filter_configure. This method must be called with one paramater: a string containing the local system\'s password. This function returns true upon completion.");
$filter_configure_sig = array(
array(
$XML_RPC_Boolean,
@@ -234,7 +234,7 @@ function filter_configure_xmlrpc($raw_params) {
/*****************************/
-$carp_configure_doc = 'Basic XMLRPC wrapper for configuring CARP interfaces.';
+$carp_configure_doc = gettext("Basic XMLRPC wrapper for configuring CARP interfaces.");
$carp_configure_sig = array(
array(
$XML_RPC_Boolean,
@@ -253,7 +253,7 @@ function interfaces_carp_configure_xmlrpc($raw_params) {
/*****************************/
-$check_firmware_version_doc = 'Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion.';
+$check_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion.");
$check_firmware_version_sig = array(
array(
$XML_RPC_String,
@@ -270,7 +270,7 @@ function check_firmware_version_xmlrpc($raw_params) {
/*****************************/
-$reboot_doc = 'Basic XMLRPC wrapper for rc.reboot.';
+$reboot_doc = gettext("Basic XMLRPC wrapper for rc.reboot.");
$reboot_sig = array(array($XML_RPC_Boolean, $XML_RPC_String));
function reboot_xmlrpc($raw_params) {
@@ -345,4 +345,4 @@ $server = new XML_RPC_Server(
)
);
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud