summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/pkg_edit.php4
-rwxr-xr-xusr/local/www/pkg_mgr.php38
-rwxr-xr-xusr/local/www/pkg_mgr_install.php42
-rwxr-xr-xusr/local/www/pkg_mgr_installed.php38
-rw-r--r--usr/local/www/pkg_mgr_settings.php20
-rwxr-xr-xusr/local/www/system.php81
-rw-r--r--usr/local/www/system_advanced_admin.php106
-rw-r--r--usr/local/www/system_advanced_firewall.php126
-rw-r--r--usr/local/www/system_advanced_misc.php124
-rw-r--r--usr/local/www/system_advanced_network.php69
-rw-r--r--usr/local/www/system_advanced_notifications.php62
-rw-r--r--usr/local/www/system_advanced_sysctl.php42
-rw-r--r--usr/local/www/system_authservers.php105
-rw-r--r--usr/local/www/system_camanager.php90
-rw-r--r--usr/local/www/system_certmanager.php164
-rwxr-xr-xusr/local/www/system_firmware.php102
-rwxr-xr-xusr/local/www/system_firmware_auto.php54
-rwxr-xr-xusr/local/www/system_firmware_check.php34
-rwxr-xr-xusr/local/www/system_firmware_settings.php30
-rwxr-xr-xusr/local/www/system_gateway_groups.php27
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php58
-rwxr-xr-xusr/local/www/system_gateways.php30
-rwxr-xr-xusr/local/www/system_gateways_edit.php57
-rwxr-xr-xusr/local/www/system_gateways_settings.php42
-rw-r--r--usr/local/www/system_groupmanager.php48
-rw-r--r--usr/local/www/system_groupmanager_addprivs.php6
-rwxr-xr-xusr/local/www/system_routes.php36
-rwxr-xr-xusr/local/www/system_routes_edit.php54
-rw-r--r--usr/local/www/system_usermanager.php85
-rw-r--r--usr/local/www/system_usermanager_addcert.php29
-rw-r--r--usr/local/www/system_usermanager_addprivs.php4
-rwxr-xr-xusr/local/www/system_usermanager_settings.php11
-rw-r--r--usr/local/www/system_usermanager_settings_ldapacpicker.php8
-rwxr-xr-xusr/local/www/system_usermanager_settings_test.php20
34 files changed, 941 insertions, 905 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 65e1e41..eeadc2e 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -245,7 +245,7 @@ if ($_POST) {
}
if($pkg['title'] <> "") {
- $edit = ($only_edit ? '' : ': Edit');
+ $edit = ($only_edit ? '' : ": " . gettext("Edit"));
$title = $pkg['title'] . $edit;
}
else
@@ -851,4 +851,4 @@ function parse_package_templates() {
}
}
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php
index 42ac121..1445dcf 100755
--- a/usr/local/www/pkg_mgr.php
+++ b/usr/local/www/pkg_mgr.php
@@ -44,7 +44,7 @@ require_once("globals.inc");
require_once("guiconfig.inc");
require_once("pkg-utils.inc");
-$pkg_info = get_pkg_info('all', array('noembedded', 'name', 'category', 'website', 'version', 'status', 'descr', 'maintainer', 'required_version', 'maximum_version', 'pkginfolink'));
+$pkg_info = get_pkg_info('all', array("noembedded", "name", "category", "website", "version", "status", "descr", "maintainer", "required_version", "maximum_version", "pkginfolink"));
if($pkg_info) {
$fout = fopen("{$g['tmp_path']}/pkg_info.cache", "w");
fwrite($fout, serialize($pkg_info));
@@ -54,10 +54,10 @@ if($pkg_info) {
$using_cache = true;
$xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
if(file_exists("{$g['tmp_path']}/pkg_info.cache")) {
- $savemsg = "Unable to retrieve package info from {$xmlrpc_base_url}. Cached data will be used.";
+ $savemsg = sprintf(gettext("Unable to retrieve package info from %s. Cached data will be used."), $xmlrpc_base_url);
$pkg_info = unserialize(@file_get_contents("{$g['tmp_path']}/pkg_info.cache"));
} else {
- $savemsg = "Unable to communicate with {$xmlrpc_base_url}. Please verify DNS and interface configuration, and that {$g['product_name']} has functional Internet connectivity.";
+ $savemsg = sprintf(gettext("Unable to communicate with %s. Please verify DNS and interface configuration, and that %s has functional Internet connectivity."), $xmlrpc_base_url, $g['product_name']);
}
}
@@ -65,7 +65,7 @@ if (! empty($_GET))
if (isset($_GET['ver']))
$requested_version = htmlspecialchars($_GET['ver']);
-$pgtitle = array("System","Package Manager");
+$pgtitle = array(gettext("System"),gettext("Package Manager"));
include("head.inc");
?>
@@ -88,10 +88,10 @@ include("head.inc");
$testing_version = substr($version, $hyphen + 1, strlen($version) - $hyphen);
$tab_array = array();
- $tab_array[] = array("{$version} packages", $requested_version <> "" ? false : true, "pkg_mgr.php");
+ $tab_array[] = array($version . gettext("packages"), $requested_version <> "" ? false : true, "pkg_mgr.php");
// $tab_array[] = array("Packages for any platform", $requested_version == "none" ? true : false, "pkg_mgr.php?ver=none");
// $tab_array[] = array("Packages with a different version", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other");
- $tab_array[] = array("Installed Packages", false, "pkg_mgr_installed.php");
+ $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
display_top_tabs($tab_array);
?>
</td>
@@ -101,16 +101,16 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Package Name</td>
- <td width="25%" class="listhdrr">Category</td>
+ <td width="10%" class="listhdrr"><?=gettext("Package Name"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Category"); ?></td>
<!-- <td width="10%" class="listhdrr">Size</td> -->
- <td width="5%" class="listhdrr">Status</td>
- <td width="5%" class="listhdrr">Package Info</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="5%" class="listhdrr"><?=gettext("Status"); ?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Package Info"); ?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
<?php
if(!$pkg_info) {
- echo "<tr><td colspan=\"5\"><center>There are currently no packages available for installation.</td></tr>";
+ echo "<tr><td colspan=\"5\"><center>" . gettext("There are currently no packages available for installation.") . "</td></tr>";
} else {
$installed_pfsense_version = rtrim(file_get_contents("/etc/version"));
$dash = strpos($installed_pfsense_version, "-");
@@ -181,13 +181,13 @@ include("head.inc");
</td>
-->
<td class="listr">
- <?= $index['status'] ?>
+ <?=$index['status'] ?>
<br/>
- <?= $index['version'] ?>
+ <?=$index['version'] ?>
<br/>
- platform: <?= $index['required_version'] ?>
+ <?=gettext("platform") .": ". $index['required_version'] ?>
<br/>
- <?= $index['maximum_version']; ?>
+ <?=$index['maximum_version'] ?>
</td>
<td class="listr">
<?php
@@ -195,7 +195,7 @@ include("head.inc");
$pkginfolink = $index['pkginfolink'];
echo "<a target='_new' href='$pkginfolink'>Package Info</a>";
} else {
- echo "No info, check the <a href='http://forum.pfsense.org/index.php/board,15.0.html'>forum</a>";
+ echo gettext("No info, check the") . "<a href='http://forum.pfsense.org/index.php/board,15.0.html'>" . gettext("forum") . "</a>";
}
?>
</td>
@@ -203,13 +203,13 @@ include("head.inc");
<?= $index['descr'] ?>
</td>
<td valign="middle" class="list" nowrap>
- <a onclick="return confirm('Do you really want to install this package?')" href="pkg_mgr_install.php?id=<?=$index['name'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a>
+ <a onclick="return confirm('<?=gettext("Do you really want to install this package?"); ?>')" href="pkg_mgr_install.php?id=<?=$index['name'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a>
</td>
</tr>
<?php
}
} else {
- echo '<tr><td colspan="5"><center>There are currently no packages available for installation.</center></td></tr>';
+ echo "<tr><td colspan='5'><center>" . gettext("There are currently no packages available for installation.") . "</center></td></tr>";
}
}
?>
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index c22cc8a..e82440c 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -54,7 +54,7 @@ $sendto = "output";
$todo = array();
-$pgtitle = array("System","Package Manager","Install Package");
+$pgtitle = array(gettext("System"),gettext("Package Manager"),gettext("Install Package"));
include("head.inc");
?>
@@ -69,11 +69,11 @@ include("head.inc");
<?php
$version = file_get_contents("/etc/version");
$tab_array = array();
- $tab_array[] = array("{$version} packages", false, "pkg_mgr.php");
+ $tab_array[] = array("{$version} " . gettext("packages"), false, "pkg_mgr.php");
// $tab_array[] = array("Packages for any platform", false, "pkg_mgr.php?ver=none");
// $tab_array[] = array("Packages for a different platform", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other");
- $tab_array[] = array("Installed packages", false, "pkg_mgr_installed.php");
- $tab_array[] = array("Package Installer", true, "");
+ $tab_array[] = array(gettext("Installed packages"), false, "pkg_mgr_installed.php");
+ $tab_array[] = array(gettext("Package Installer"), true, "");
display_top_tabs($tab_array);
?>
</td>
@@ -98,7 +98,7 @@ include("head.inc");
</table>
<br>
<!-- status box -->
- <textarea cols="60" rows="1" name="status" id="status" wrap="hard">Beginning package installation.</textarea>
+ <textarea cols="60" rows="1" name="status" id="status" wrap="hard"><?=gettext("Beginning package installation.");?></textarea>
<!-- command output box -->
<textarea cols="60" rows="25" name="output" id="output" wrap="hard"></textarea>
</center>
@@ -121,7 +121,7 @@ Rounded("div#mainareapkg","bl br","#FFF","#eeeeee","smooth");
ob_flush();
// Write out configuration to creatae a backup prior to pkg install
-write_config("Creating restore point before package installation.");
+write_config(gettext("Creating restore point before package installation."));
/* mount rw fs */
conf_mount_rw();
@@ -130,8 +130,8 @@ switch($_GET['mode']) {
case "delete":
$id = get_pkg_id($_GET['pkg']);
uninstall_package_from_name($_GET['pkg']);
- update_status("Package deleted.");
- $static_output .= "\nPackage deleted.";
+ update_status(gettext("Package deleted."));
+ $static_output .= "\n" . gettext("Package deleted.");
update_output_window($static_output);
filter_configure();
break;
@@ -145,8 +145,8 @@ switch($_GET['mode']) {
$id = get_pkg_id(htmlspecialchars($_GET['pkg']));
delete_package_xml(htmlspecialchars($_GET['pkg']));
install_package(htmlspecialchars($_GET['pkg']));
- update_status("Package reinstalled.");
- $static_output .= "\n\nPackage reinstalled.";
+ update_status(gettext("Package reinstalled."));
+ $static_output .= "\n\n" . gettext("Package reinstalled.");
start_service(htmlspecialchars($_GET['pkg']));
update_output_window($static_output);
filter_configure();
@@ -154,7 +154,7 @@ switch($_GET['mode']) {
case "reinstallxml":
delete_package_xml(htmlspecialchars($_GET['pkg']));
install_package(htmlspecialchars($_GET['pkg']));
- $static_output .= "\n\nPackage reinstalled.";
+ $static_output .= "\n\n" . gettext("Package reinstalled.");
start_service(htmlspecialchars($_GET['pkg']));
update_output_window($static_output);
filter_configure();
@@ -164,10 +164,10 @@ switch($_GET['mode']) {
if(file_exists("/tmp/{$_GET['pkg']}.info")) {
$filename = escapeshellcmd("/tmp/" . $_GET['pkg'] . ".info");
$status = file_get_contents($filename);
- update_status($_GET['pkg'] . " installation completed.");
+ update_status($_GET['pkg'] . " " . gettext("installation completed."));
update_output_window($status);
} else {
- update_output_window("Could not find {$_GET['pkg']}.");
+ update_output_window(gettext("Could not find") . " " . $_GET['pkg'] . ".");
}
break;
case "reinstallall":
@@ -187,8 +187,8 @@ switch($_GET['mode']) {
$pkg_id++;
}
}
- update_status("All packages reinstalled.");
- $static_output .= "\n\nAll packages reinstalled.";
+ update_status(gettext("All packages reinstalled."));
+ $static_output .= "\n\n" . gettext("All packages reinstalled.");
start_service(htmlspecialchars($_GET['pkg']));
update_output_window($static_output);
filter_configure();
@@ -196,19 +196,19 @@ switch($_GET['mode']) {
default:
$status = install_package(htmlspecialchars($_GET['id']));
if($status == -1) {
- update_status("Installation of " . htmlspecialchars($_GET['id']) . " FAILED!");
- $static_output .= "\n\nInstallation halted.";
+ update_status(gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("FAILED!"));
+ $static_output .= "\n\n" . gettext("Installation halted.");
update_output_window($static_output);
} else {
$filename = escapeshellcmd("/tmp/" . $_GET['id'] . ".info");
$fd = fopen($filename, "w");
- $status_a = "Installation of " . htmlspecialchars($_GET['id']) . " completed.";
+ $status_a = gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("completed.");
update_status($status_a);
$status = get_after_install_info($_GET['id']);
if($status)
- $static_output .= "\nInstallation completed.\n\n{$_GET['id']} setup instructions:\n\n{$status}";
+ $static_output .= "\n" . gettext("Installation completed.") . "\n\n{$_GET['id']} " . gettext("setup instructions") . ":\n\n{$status}";
else
- $static_output .= "\nInstallation completed. Please check to make sure that the package is configured from the respective menu then start the package.";
+ $static_output .= "\n" . gettext("Installation completed. Please check to make sure that the package is configured from the respective menu then start the package.");
fwrite($fd, $status_a . "\n\n". $static_output);
fclose($fd);
echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
@@ -228,4 +228,4 @@ if($fd_log)
/* read only fs */
conf_mount_ro();
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php
index 703cb2f..5db007f 100755
--- a/usr/local/www/pkg_mgr_installed.php
+++ b/usr/local/www/pkg_mgr_installed.php
@@ -47,7 +47,7 @@ if(is_array($config['installedpackages']['package'])) {
$currentvers = get_pkg_info($tocheck, array('version', 'xmlver', 'pkginfolink'));
}
-$pgtitle = array("System","Package Manager");
+$pgtitle = array(gettext("System"),gettext("Package Manager"));
include("head.inc");
?>
@@ -60,10 +60,10 @@ include("head.inc");
<?php
$version = file_get_contents("/etc/version");
$tab_array = array();
- $tab_array[] = array("{$version} packages", false, "pkg_mgr.php");
+ $tab_array[] = array("{$version} " . gettext("packages"), false, "pkg_mgr.php");
// $tab_array[] = array("Packages for any platform", false, "pkg_mgr.php?ver=none");
// $tab_array[] = array("Packages for a different platform", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other");
- $tab_array[] = array("Installed packages", true, "pkg_mgr_installed.php");
+ $tab_array[] = array(gettext("Installed packages"), true, "pkg_mgr_installed.php");
display_top_tabs($tab_array);
?>
</td>
@@ -73,11 +73,11 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Package Name</td>
- <td width="20%" class="listhdrr">Category</td>
- <td width="10%" class="listhdrr">Package Info</td>
- <td width="15%" class="listhdrr">Package Version</td>
- <td width="45%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Package Name"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Category"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Package Info"); ?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Package Version"); ?></td>
+ <td width="45%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
<?php
if(is_array($config['installedpackages']['package'])):
@@ -99,14 +99,14 @@ include("head.inc");
// we're running a newer version of the package
if(strcmp($pkg['version'], $latest_package) > 0) {
$tdclass = "listbggrey";
- $pkgver = "Available: {$latest_package}<br/>";
- $pkgver .= "Installed: {$pkg['version']}";
+ $pkgver = gettext("Available") .": ". $latest_package . "<br/>";
+ $pkgver .= gettext("Installed") .": ". $pkg['version'];
}
// we're running an older version of the package
if(strcmp($pkg['version'], $latest_package) < 0) {
$tdclass = "listbg";
- $pkgver = "<font color='#ffffff'>Available: {$latest_package}<br/>";
- $pkgver .= "Installed: {$pkg['version']}";
+ $pkgver = "<font color='#ffffff'>" . gettext("Available") .": ". $latest_package . "<br/>";
+ $pkgver .= gettext("Installed") .": ". $pkg['version'];
}
// we're running the current version
if(!strcmp($pkg['version'], $latest_package)) {
@@ -132,9 +132,9 @@ include("head.inc");
<?php
if($currentvers[$pkg['name']]['pkginfolink']) {
$pkginfolink = $currentvers[$pkg['name']]['pkginfolink'];
- echo "<a target='_new' href='$pkginfolink'>Package Info</a>";
+ echo "<a target='_new' href='$pkginfolink'>" . gettext("Package Info") . "</a>";
} else {
- echo "No info, check the <a href='http://forum.pfsense.org/index.php/board,15.0.html'>forum</a>";
+ echo gettext("No info, check the") . "<a href='http://forum.pfsense.org/index.php/board,15.0.html'>" . gettext("forum") . "</a>";
}
?>
</td>
@@ -145,15 +145,15 @@ include("head.inc");
<?=$pkg['descr'];?>
</td>
<td valign="middle" class="list" nowrap>
- <a onclick="return confirm('Do you really want to remove this package?')" href="pkg_mgr_install.php?mode=delete&pkg=<?= $pkg['name']; ?>">
- <img title="Remove this package." src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
+ <a onclick="return confirm('<?=gettext("Do you really want to remove this package?"); ?>')" href="pkg_mgr_install.php?mode=delete&pkg=<?= $pkg['name']; ?>">
+ <img title="<?=gettext("Remove this package."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
</a>
<br>
<a href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?= $pkg['name']; ?>">
- <img title="Reinstall this package." src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0">
+ <img title="<?=gettext("Reinstall this package."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0">
</a>
<a href="pkg_mgr_install.php?mode=reinstallxml&pkg=<?= $pkg['name']; ?>">
- <img title="Reinstall this package's GUI components." src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_xml.gif" width="17" height="17" border="0">
+ <img title="<?=gettext("Reinstall this package's GUI components."); ?>" src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_xml.gif" width="17" height="17" border="0">
</a>
</td>
</tr>
@@ -163,7 +163,7 @@ include("head.inc");
?>
<tr>
<td colspan="5" align="center">
- There are no packages currently installed.
+ <?=gettext("There are no packages currently installed."); ?>
</td>
</tr>
<?php endif; ?>
diff --git a/usr/local/www/pkg_mgr_settings.php b/usr/local/www/pkg_mgr_settings.php
index 56e4e6d..650a4ab 100644
--- a/usr/local/www/pkg_mgr_settings.php
+++ b/usr/local/www/pkg_mgr_settings.php
@@ -59,7 +59,7 @@ if ($_POST) {
$curcfg = $config['system']['altpkgrepo'];
-$pgtitle = array("System","Package Settings");
+$pgtitle = array(gettext("System"),gettext("Package Settings"));
include("head.inc");
?>
<script language="JavaScript">
@@ -89,9 +89,9 @@ function enable_altpkgrepourl(enable_over) {
<?php
$version = file_get_contents("/etc/version");
$tab_array = array();
- $tab_array[] = array("{$version} packages", false, "pkg_mgr.php");
- $tab_array[] = array("Installed Packages", false, "pkg_mgr_installed.php");
- $tab_array[] = array("Package Settings", true, "pkg_mgr_settings.php");
+ $tab_array[] = array("{$version} " . gettext("packages"), false, "pkg_mgr.php");
+ $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
+ $tab_array[] = array(gettext("Package Settings"), true, "pkg_mgr_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -99,17 +99,17 @@ function enable_altpkgrepourl(enable_over) {
<tr><td><div id=mainarea>
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Package Repository URL</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Package Repository URL");?></td>
</tr>
<tr>
- <td valign="top" class="vncell">Package Repository URL</td>
+ <td valign="top" class="vncell"><?=gettext("Package Repository URL");?></td>
<td class="vtable">
- <input name="alturlenable" type="checkbox" id="alturlenable" value="yes" onClick="enable_altpkgrepourl()" <?php if(isset($curcfg['enable'])) echo "checked"; ?>> Use a different URL server for packages other than <?php echo $g['product_website']; ?><br>
+ <input name="alturlenable" type="checkbox" id="alturlenable" value="yes" onClick="enable_altpkgrepourl()" <?php if(isset($curcfg['enable'])) echo "checked"; ?>> <?=gettext("Use a different URL server for packages other than");?> <?php echo $g['product_website']; ?><br>
<table>
- <tr><td>Base URL:</td><td><input name="pkgrepourl" type="input" class="formfld url" id="pkgrepourl" size="64" value="<?php if($curcfg['xmlrpcbaseurl']) echo $curcfg['xmlrpcbaseurl']; else echo $g['']; ?>"></td></tr>
+ <tr><td><?=gettext("Base URL");?>:</td><td><input name="pkgrepourl" type="input" class="formfld url" id="pkgrepourl" size="64" value="<?php if($curcfg['xmlrpcbaseurl']) echo $curcfg['xmlrpcbaseurl']; else echo $g['']; ?>"></td></tr>
</table>
<span class="vexpl">
- This is where <?php echo $g['product_name'] ?> will check for packages when the <a href="pkg_mgr.php">System: Packages</a> page is viewed.
+ <?=sprintf(gettext("This is where %s will check for packages when the"),$g['product_name']);?>, <a href="pkg_mgr.php"><?=gettext("System: Packages");?></a> <?=gettext("page is viewed");?>.
</span>
</td>
</tr>
@@ -117,7 +117,7 @@ function enable_altpkgrepourl(enable_over) {
<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></div></td></tr></table>
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index fc47d86..f63b9eb 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -67,7 +67,7 @@ if (!$pconfig['timezone'])
if (!$pconfig['timeservers'])
$pconfig['timeservers'] = "pool.ntp.org";
-$changedesc = "System: ";
+$changedesc = gettext("System") . ": ";
$changecount = 0;
function is_timezone($elt) {
@@ -106,25 +106,25 @@ if ($_POST) {
/* input validation */
$reqdfields = split(" ", "hostname domain");
- $reqdfieldsn = split(",", "Hostname,Domain");
+ $reqdfieldsn = array(gettext("Hostname"),gettext("Domain"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($_POST['hostname'] && !is_hostname($_POST['hostname'])) {
- $input_errors[] = "The hostname may only contain the characters a-z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname may only contain the characters a-z, 0-9 and '-'.");
}
if ($_POST['domain'] && !is_domain($_POST['domain'])) {
- $input_errors[] = "The domain may only contain the characters a-z, 0-9, '-' and '.'.";
+ $input_errors[] = gettext("The domain may only contain the characters a-z, 0-9, '-' and '.'.");
}
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 server.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS server.");
}
if (($_POST['dns3'] && !is_ipaddr($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddr($_POST['dns4']))) {
- $input_errors[] = "A valid IP address must be specified for the primary/secondary DNS server.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS server.");
}
if ($_POST['webguiport'] && (!is_numericint($_POST['webguiport']) ||
($_POST['webguiport'] < 1) || ($_POST['webguiport'] > 65535))) {
- $input_errors[] = "A valid TCP/IP port must be specified for the webConfigurator port.";
+ $input_errors[] = gettext("A valid TCP/IP port must be specified for the webConfigurator port.");
}
$direct_networks_list = explode(" ", filter_get_direct_networks_list());
@@ -135,7 +135,7 @@ if ($_POST) {
if(interface_has_gateway($_POST[$dnsgwitem])) {
foreach($direct_networks_list as $direct_network) {
if(ip_in_subnet($_POST[$dnsitem], $direct_network)) {
- $input_errors[] = "You can not assign a gateway to DNS '{$_POST[$dnsitem]}' server which is on a directly connected network.";
+ $input_errors[] = gettext("You can not assign a gateway to DNS '{$_POST[$dnsitem]}' server which is on a directly connected network.");
}
}
}
@@ -144,11 +144,11 @@ if ($_POST) {
$t = (int)$_POST['timeupdateinterval'];
if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) {
- $input_errors[] = "The time update interval must be either 0 (disabled) or between 6 and 1440.";
+ $input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440.");
}
foreach (explode(' ', $_POST['timeservers']) as $ts) {
if (!is_domain($ts)) {
- $input_errors[] = "A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.";
+ $input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
}
}
@@ -224,7 +224,7 @@ if ($_POST) {
}
}
-$pgtitle = array("System","General Setup");
+$pgtitle = array(gettext("System"),gettext("General Setup"));
include("head.inc");
?>
@@ -244,39 +244,39 @@ include("head.inc");
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">System</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("System"); ?></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="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>">
<br/>
<span class="vexpl">
- name of the firewall host, without domain part
+ <?=gettext("name of the firewall host, without domain part"); ?>
<br/>
- e.g. <em>firewall</em>
+ <?=gettext("e.g."); ?> <em>firewall</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 unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
<br/>
<span class="vexpl">
- Do not use "local" as a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS.
+ <?=gettext("Do not use 'local' as a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS."); ?>
<br/>
- e.g. <em>mycorp.com, home, office, private, etc.</em>
+ <?=gettext("e.g."); ?> <em><?=gettext("mycorp.com, home, office, private, etc."); ?></em>
</span>
</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">
<p>
<table>
<tr>
- <td><b>DNS Server</b></td>
+ <td><b><?=gettext("DNS Server"); ?></b></td>
<?php if ($multiwan): ?>
- <td><b>Use gateway</b></td>
+ <td><b><?=gettext("Use gateway"); ?></b></td>
<?php endif; ?>
</tr>
<?php
@@ -319,33 +319,32 @@ include("head.inc");
</table>
<br>
<span class="vexpl">
- IP addresses; these are also used for the DHCP
- service, DNS forwarder and for PPTP VPN clients.
+ <?=gettext("IP addresses: these are also used for the DHCP " .
+ "service, DNS forwarder and for PPTP VPN clients."); ?>
<br/>
<?php if($multiwan): ?>
<br/>
- In addition, select the gateway for each DNS server.
- You should have a unique DNS server per gateway.
+ <?=gettext("In addition, select the gateway for each DNS server. " .
+ "You should have a unique DNS server per gateway."); ?>
<br/>
<?php endif; ?>
<br/>
<input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked"; ?>>
<strong>
- Allow DNS server list to be overridden by DHCP/PPP
- on WAN
+ <?=gettext("Allow DNS server list to be overridden by DHCP/PPP on WAN"); ?>
</strong>
<br/>
- If this option is set, <?=$g['product_name'];?> will
- use DNS servers assigned by a DHCP/PPP server on WAN
- for its own purposes (including the DNS forwarder).
- However, they will not be assigned to DHCP and PPTP
- VPN clients.
+ <?php sprintf(gettext("If this option is set, '%s' will " .
+ "use DNS servers assigned by a DHCP/PPP server on WAN " .
+ "for its own purposes (including the DNS forwarder). " .
+ "However, they will not be assigned to DHCP and PPTP " .
+ "VPN clients."), $g['product_name']); ?>
</span>
</p>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Time zone</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Time zone"); ?></td>
<td width="78%" class="vtable">
<select name="timezone" id="timezone">
<?php foreach ($timezonelist as $value): ?>
@@ -357,7 +356,7 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- Select the location closest to you
+ <?=gettext("Select the location closest to you"); ?>
</span>
</td>
</tr>
@@ -375,14 +374,14 @@ include("head.inc");
</tr>
-->
<tr>
- <td width="22%" valign="top" class="vncell">NTP time server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NTP time server"); ?></td>
<td width="78%" class="vtable">
<input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>">
<br/>
<span class="vexpl">
- Use a space to separate multiple hosts (only one
- required). Remember to set up at least one DNS server
- if you enter a host name here!
+ <?=gettext("Use a space to separate multiple hosts (only one " .
+ "required). Remember to set up at least one DNS server " .
+ "if you enter a host name here!"); ?>
</span>
</td>
</tr>
@@ -391,7 +390,7 @@ include("head.inc");
</tr>
<?php if (! $g['disablethemeselection']): ?>
<tr>
- <td colspan="2" valign="top" class="listtopic">Theme</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Theme"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">&nbsp;</td>
@@ -415,7 +414,7 @@ include("head.inc");
<?php endforeach; ?>
</select>
<strong>
- This will change the look and feel of
+ <?=gettext("This will change the look and feel of"); ?>
<?=$g['product_name'];?>.
</strong>
</td>
@@ -427,7 +426,7 @@ include("head.inc");
<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/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index 954b625..2dd53cb 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -76,11 +76,11 @@ if ($_POST) {
/* input validation */
if ($_POST['webguiport'])
if(!is_port($_POST['webguiport']))
- $input_errors[] = "You must specify a valid webConfigurator port number";
+ $input_errors[] = gettext("You must specify a valid webConfigurator port number");
if ($_POST['sshport'])
if(!is_port($_POST['sshport']))
- $input_errors[] = "You must specify a valid port number";
+ $input_errors[] = gettext("You must specify a valid port number");
if($_POST['sshdkeyonly'] == "yes")
$config['system']['ssh']['sshdkeyonly'] = "enabled";
@@ -157,7 +157,7 @@ if ($_POST) {
$savemsg = get_std_save_message($retval);
if ($restart_webgui)
- $savemsg .= "<br />One moment...redirecting to {$url} in 20 seconds.";
+ $savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url);
conf_mount_rw();
setup_serial_port();
@@ -165,7 +165,7 @@ if ($_POST) {
}
}
-$pgtitle = array("System","Advanced: Admin Access");
+$pgtitle = array(gettext("System"),gettext("Advanced: Admin Access"));
include("head.inc");
?>
@@ -197,12 +197,12 @@ function prot_change() {
<td>
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", true, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", false, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -212,18 +212,18 @@ function prot_change() {
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong>NOTE:&nbsp</strong>
+ <strong><?=gettext("NOTE"); ?>:&nbsp</strong>
</span>
- The options on this page are intended for use by advanced users only.
+ <?=gettext("The options on this page are intended for use by advanced users only."); ?>
<br/>
</span>
<br/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">webConfigurator</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("webConfigurator"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Protocol</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable">
<?php
if ($pconfig['webguiproto'] == "http")
@@ -240,14 +240,14 @@ function prot_change() {
HTTPS
<?php if (!$certs_available): ?>
<br/>
- No Certificates have been defined. You must
- <a href="system_certmanager.php">Create or Import</a>
- a Certificate before SSL can be enabled.
+ <?=gettext("No Certificates have been defined. You must"); ?>
+ <a href="system_certmanager.php"><?=gettext("Create or Import"); ?></a>
+ <?=gettext("a Certificate before SSL can be enabled."); ?>
<?php endif; ?>
</td>
</tr>
<tr id="ssl_opts">
- <td width="22%" valign="top" class="vncell">SSL Certificate</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("SSL Certificate"); ?></td>
<td width="78%" class="vtable">
<select name="ssl-certref" id="ssl-certref" class="formselect">
<?php
@@ -262,19 +262,19 @@ function prot_change() {
</td>
</tr>
<tr>
- <td valign="top" class="vncell">TCP port</td>
+ <td valign="top" class="vncell"><?=gettext("TCP port"); ?></td>
<td class="vtable">
<input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>">
<br>
<span class="vexpl">
- Enter a custom port number for the webConfigurator
- above if you want to override the default (80 for HTTP, 443
- for HTTPS). Changes will take effect immediately after save.
+ <?=gettext("Enter a custom port number for the webConfigurator " .
+ "above if you want to override the default (80 for HTTP, 443 " .
+ "for HTTPS). Changes will take effect immediately after save."); ?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Anti-lockout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Anti-lockout"); ?></td>
<td width="78%" class="vtable">
<?php
if($config['interfaces']['lan'])
@@ -283,47 +283,47 @@ function prot_change() {
$lockout_interface = "WAN";
?>
<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> />
- <strong>Disable webConfigurator anti-lockout rule</strong>
+ <strong><?=gettext("Disable webConfigurator anti-lockout rule"); ?></strong>
<br/>
- When this is unchecked, access to the webConfigurator on the <?=$lockout_interface;?>
- interface is always permitted, regardless of the user-defined firewall
- rule set. Check this box to disable this automatically added rule, so access
- to the webConfigurator is controlled by the user-defined firewall rules
- (ensure you have a firewall rule in place that allows you in, or you will
- lock yourself out!). <em> Hint: the &quot;Set interface(s) IP address&quot;
- option in the console menu resets this setting as well. </em>
+ <?php sprintf(gettext("When this is unchecked, access to the webConfigurator " .
+ "on the %s interface is always permitted, regardless of the user-defined firewall " .
+ "rule set. Check this box to disable this automatically added rule, so access " .
+ "to the webConfigurator is controlled by the user-defined firewall rules " .
+ "(ensure you have a firewall rule in place that allows you in, or you will " .
+ "lock yourself out!)"), $lockout_interface); ?>
+ <em> <?=gettext("Hint: the &quot;Set interface(s) IP address&quot; option in the console menu resets this setting as well."); ?> </em>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Secure Shell</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Secure Shell"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Secure Shell Server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Secure Shell Server"); ?></td>
<td width="78%" class="vtable">
<input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> />
- <strong>Enable Secure Shell</strong>
+ <strong><?=gettext("Enable Secure Shell"); ?></strong>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication Method</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication Method"); ?></td>
<td width="78%" class="vtable">
<input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if ($pconfig['sshdkeyonly']) echo "checked"; ?> />
- <strong>Disable Password login for Secure Shell (rsa key only)</strong>
+ <strong><?=gettext("Disable Password login for Secure Shell (rsa key only)"); ?></strong>
<br/>
- When enabled, authorized keys need to be configured for each
- <a href="system_usermanager.php">user</a>
- that has been granted secure shell access.
+ <?=gettext("When enabled, authorized keys need to be configured for each"); ?>
+ <a href="system_usermanager.php"><?=gettext("user"); ?></a>
+ <?=gettext("that has been granted secure shell access."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">SSH port</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("SSH port"); ?></td>
<td width="78%" class="vtable">
<input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" />
<br/>
- <span class="vexpl">Note: Leave this blank for the default of 22</span>
+ <span class="vexpl"><?=gettext("Note: Leave this blank for the default of 22"); ?></span>
</td>
</tr>
<tr>
@@ -331,15 +331,15 @@ function prot_change() {
</tr>
<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
<tr>
- <td colspan="2" valign="top" class="listtopic">Serial Communcations</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communcations"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Serial Terminal</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
<td width="78%" class="vtable">
<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> />
- <strong>This will enable the first serial port with 9600/8/N/1</strong>
+ <strong><?=gettext("This will enable the first serial port with 9600/8/N/1"); ?></strong>
<br>
- <span class="vexpl">Note: This will disable the internal video card/keyboard</span>
+ <span class="vexpl"><?=gettext("Note: This will disable the internal video card/keyboard"); ?></span>
</td>
</tr>
<tr>
@@ -347,15 +347,15 @@ function prot_change() {
</tr>
<?php endif; ?>
<tr>
- <td colspan="2" valign="top" class="listtopic">Console Options</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Console Options"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Console menu</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Console menu"); ?></td>
<td width="78%" class="vtable">
<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?> />
- <strong>Password protect the console menu</strong>
+ <strong><?=gettext("Password protect the console menu"); ?></strong>
<br/>
- <span class="vexpl">Changes to this option will take effect after a reboot.</span>
+ <span class="vexpl"><?=gettext("Changes to this option will take effect after a reboot."); ?></span>
</td>
</tr>
<tr>
@@ -363,7 +363,7 @@ function prot_change() {
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td>
+ <td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
@@ -392,17 +392,17 @@ function prot_change() {
if ($restart_sshd) {
mwexec("/usr/bin/killall sshd");
- log_error("secure shell configuration has changed. Stopping sshd.");
+ log_error(gettext("secure shell configuration has changed. Stopping sshd."));
if ($config['system']['enablesshd']) {
- log_error("secure shell configuration has changed. Restarting sshd.");
+ log_error(gettext("secure shell configuration has changed. Restarting sshd."));
touch("{$g['tmp_path']}/start_sshd");
}
}
if ($restart_webgui) {
ob_flush();
flush();
- log_error("webConfigurator configuration has changed. Restarting webConfigurator.");
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
touch("{$g['tmp_path']}/restart_webgui");
}
diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php
index e3d2e1e..7ed4383 100644
--- a/usr/local/www/system_advanced_firewall.php
+++ b/usr/local/www/system_advanced_firewall.php
@@ -68,13 +68,13 @@ if ($_POST) {
/* input validation */
if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) {
- $input_errors[] = "The Firewall Maximum States value must be an integer.";
+ $input_errors[] = gettext("The Firewall Maximum States value must be an integer.");
}
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
- $input_errors[] = "The TCP idle timeout must be an integer.";
+ $input_errors[] = gettext("The TCP idle timeout must be an integer.");
}
if ($_POST['reflectiontimeout'] && !is_numericint($_POST['reflectiontimeout'])) {
- $input_errors[] = "The Reflection timeout must be an integer.";
+ $input_errors[] = gettext("The Reflection timeout must be an integer.");
}
ob_flush();
@@ -145,7 +145,7 @@ if ($_POST) {
}
}
-$pgtitle = array("System","Advanced: Firewall and NAT");
+$pgtitle = array(gettext("System"),gettext("Advanced: Firewall and NAT"));
include("head.inc");
?>
@@ -157,10 +157,10 @@ include("head.inc");
<!--
var descs=new Array(5);
-descs[0]="as the name says, it's the normal optimization algorithm";
-descs[1]="used for high latency links, such as satellite links. Expires idle connections later than default";
-descs[2]="expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate connections";
-descs[3]="tries to avoid dropping any legitimate connections at the expense of increased memory usage and CPU utilization.";
+descs[0]="<?=gettext("as the name says, it's the normal optimization algorithm");?>";
+descs[1]="<?=gettext("used for high latency links, such as satellite links. Expires idle connections later than default");?>";
+descs[2]="<?=gettext("expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate connections");?>";
+descs[3]="<?=gettext("tries to avoid dropping any legitimate connections at the expense of increased memory usage and CPU utilization.");?>";
function update_description(itemnum) {
document.forms[0].info.value=descs[itemnum];
@@ -182,12 +182,12 @@ function update_description(itemnum) {
<td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", false, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", true, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", false, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), true, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</ul>
@@ -198,46 +198,46 @@ function update_description(itemnum) {
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong>NOTE:&nbsp</strong>
+ <strong><?=gettext("NOTE");?>:&nbsp</strong>
</span>
- The options on this page are intended for use by advanced users only.
+ <?=gettext("The options on this page are intended for use by advanced users only.");?>
<br/>
</span>
<br/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Firewall Advanced</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Firewall Advanced");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP Do-Not-Fragment compatibility</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP Do-Not-Fragment compatibility");?></td>
<td width="78%" class="vtable">
<input name="scrubnodf" type="checkbox" id="scrubnodf" value="yes" <?php if (isset($config['system']['scrubnodf'])) echo "checked"; ?> />
- <strong>Clear invalid DF bits instead of dropping the packets</strong><br/>
- This allows for communications with hosts that generate fragmented
- packets with the don't fragment (DF) bit set. Linux NFS is known to
- do this. This will cause the filter to not drop such packets but
- instead clear the don't fragment bit.
+ <strong><?=gettext("Clear invalid DF bits instead of dropping the packets");?></strong><br/>
+ <?=gettext("This allows for communications with hosts that generate fragmented " .
+ "packets with the don't fragment (DF) bit set. Linux NFS is known to " .
+ "do this. This will cause the filter to not drop such packets but " .
+ "instead clear the don't fragment bit.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP Random id generation</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP Random id generation");?></td>
<td width="78%" class="vtable">
<input name="scrubrnid" type="checkbox" id="scrubnodf" value="yes" <?php if (isset($config['system']['scrubrnid'])) echo "checked"; ?> />
- <strong>Insert a stronger id into IP header of packets passing through the filter.</strong><br/>
- Replaces the IP identification field of packets with random values to
- compensate for operating systems that use predicatable values.
- This option only applies to packets that are not fragmented after the
- optional packet reassembly.
+ <strong><?=gettext("Insert a stronger id into IP header of packets passing through the filter.");?></strong><br/>
+ <?=gettext("Replaces the IP identification field of packets with random values to " .
+ "compensate for operating systems that use predicatable values. " .
+ "This option only applies to packets that are not fragmented after the " .
+ "optional packet reassembly.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Firewall Optimization Options");?></td>
<td width="78%" class="vtable">
<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
- <option value="normal"<?php if($config['system']['optimization']=="normal") echo " selected"; ?>>normal</option>
- <option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " selected"; ?>>high-latency</option>
- <option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " selected"; ?>>aggressive</option>
- <option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " selected"; ?>>conservative</option>
+ <option value="normal"<?php if($config['system']['optimization']=="normal") echo " selected"; ?>><?=gettext("normal");?></option>
+ <option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " selected"; ?>><?=gettext("high-latency");?></option>
+ <option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " selected"; ?>><?=gettext("aggressive");?></option>
+ <option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " selected"; ?>><?=gettext("conservative");?></option>
</select>
<br/>
<textarea readonly="yes" cols="60" rows="1" id="info" name="info"style="padding:5px; border:1px dashed #990000; background-color: #ffffff; color: #000000; font-size: 8pt;"></textarea>
@@ -245,48 +245,48 @@ function update_description(itemnum) {
update_description(document.forms[0].optimization.selectedIndex);
</script>
<br/>
- Select the type of state table optimization to use
+ <?=gettext("Select the type of state table optimization to use");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable Firewall</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable Firewall");?></td>
<td width="78%" class="vtable">
<input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> />
- <strong>Disable all packet filtering.</strong>
+ <strong><?=gettext("Disable all packet filtering.");?></strong>
<br/>
- <span class="vexpl">Note: This converts <?= $g['product_name'] ?> into a routing only platform!<br>
- Note: This will turn off NAT!
+ <span class="vexpl"><?php printf(gettext("Note: This converts %s into a routing only platform!"), $g['product_name']);?><br>
+ <?=gettext("Note: This will turn off NAT!");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable Firewall Scrub</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable Firewall Scrub");?></td>
<td width="78%" class="vtable">
<input name="disablescrub" type="checkbox" id="disablescrub" value="yes" <?php if (isset($config['system']['disablescrub'])) echo "checked"; ?> />
- <strong>Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.</strong>
+ <strong><?=gettext("Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.");?></strong>
<br/>
- Click <a href='http://www.openbsd.org/faq/pf/scrub.html' target='_new'>here</a> for more information.
+ <?=gettext("Click")?> <a href='http://www.openbsd.org/faq/pf/scrub.html' target='_new'><?=gettext("here");?></a> <?=gettext("for more information.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Firewall Maximum States");?></td>
<td width="78%" class="vtable">
<input name="maximumstates" type="text" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" />
<br/>
- <strong>Maximum number of connections to hold in the firewall state table.</strong>
+ <strong><?=gettext("Maximum number of connections to hold in the firewall state table.");?></strong>
<br/>
- <span class="vexpl">Note: Leave this blank for the default. On your system the default size is: <?= pfsense_default_state_size() ?></span>
+ <span class="vexpl"><?=gettext("Note: Leave this blank for the default. On your system the default size is");?>: <?= pfsense_default_state_size() ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Static route filtering</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Static route filtering");?></td>
<td width="78%" class="vtable">
<input name="bypassstaticroutes" type="checkbox" id="bypassstaticroutes" value="yes" <?php if ($pconfig['bypassstaticroutes']) echo "checked"; ?> />
- <strong>Bypass firewall rules for traffic on the same interface</strong>
+ <strong><?=gettext("Bypass firewall rules for traffic on the same interface");?></strong>
<br/>
- This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and
- leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where
- multiple subnets are connected to the same interface.
+ <?=gettext("This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and " .
+ "leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where " .
+ "multiple subnets are connected to the same interface.");?>
<br/>
</td>
</tr>
@@ -295,34 +295,34 @@ function update_description(itemnum) {
</tr>
<?php if(count($config['interfaces']) > 1): ?>
<tr>
- <td colspan="2" valign="top" class="listtopic">Network Address Translation</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable NAT Reflection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable NAT Reflection");?></td>
<td width="78%" class="vtable">
<input name="disablenatreflection" type="checkbox" id="disablenatreflection" value="yes" <?php if (isset($config['system']['disablenatreflection'])) echo "checked"; ?> />
- <strong>Disables the automatic creation of NAT redirect rules for access to your public IP addresses from within your internal networks. Note: Reflection is only enabled for port forward entries and is skipped for ranges larger than 500 ports.</strong>
+ <strong><?=gettext("Disables the automatic creation of NAT redirect rules for access to your public IP addresses from within your internal networks. Note: Reflection is only enabled for port forward entries and is skipped for ranges larger than 500 ports.");?></strong>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Reflection Timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Reflection Timeout");?></td>
<td width="78%" class="vtable">
<input name="reflectiontimeout" id="reflectiontimeout" value="<?php echo $config['system']['reflectiontimeout']; ?>" /><br/>
- <strong>Enter value for Reflection timeout in seconds.</strong>
+ <strong><?=gettext("Enter value for Reflection timeout in seconds.");?></strong>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">TFTP Proxy</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("TFTP Proxy");?></td>
<td width="78%" class="vtable">
<select name="tftpinterface[]" multiple="true" class="formselect" size="3">
<?php
- $ifdescs = get_configured_interface_with_descr();
- foreach ($ifdescs as $ifent => $ifdesc):
+ $ifdescs = get_configured_interface_with_descr();
+ foreach ($ifdescs as $ifent => $ifdesc):
?>
- <option value="<?=$ifent;?>" <?php if (stristr($pconfig['tftpinterface'], $ifent)) echo "selected"; ?>><?=gettext($ifdesc);?></option>
-<?php endforeach; ?>
- </select>
- <strong>Choose the interfaces where you want TFTP proxy helper to be enabled.</strong>
+ <option value="<?=$ifent;?>" <?php if (stristr($pconfig['tftpinterface'], $ifent)) echo "selected"; ?>><?=gettext($ifdesc);?></option>
+<?php endforeach; ?>
+ </select>
+ <strong><?=gettext("Choose the interfaces where you want TFTP proxy helper to be enabled.");?></strong>
</td>
</tr>
<tr>
@@ -331,7 +331,7 @@ function update_description(itemnum) {
<?php endif; ?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td>
+ <td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php
index 6bd5d3a..41f0979 100644
--- a/usr/local/www/system_advanced_misc.php
+++ b/usr/local/www/system_advanced_misc.php
@@ -101,16 +101,16 @@ if ($_POST) {
$retval = 0;
$retval = filter_configure();
if(stristr($retval, "error") <> true)
- $savemsg = get_std_save_message($retval);
+ $savemsg = get_std_save_message(gettext($retval));
else
- $savemsg = $retval;
+ $savemsg = gettext($retval);
activate_powerd();
load_glxsb();
}
}
-$pgtitle = array("System","Advanced: Miscellaneous");
+$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
include("head.inc");
?>
@@ -129,12 +129,12 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", false, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", false, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", true, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -144,107 +144,107 @@ include("head.inc");
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong>NOTE:&nbsp</strong>
+ <strong><?=gettext("NOTE"); ?>:&nbsp</strong>
</span>
- The options on this page are intended for use by advanced users only.
+ <?=gettext("The options on this page are intended for use by advanced users only."); ?>
<br/>
</span>
<br/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Load Balancing</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Load Balancing</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
<td width="78%" class="vtable">
<input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> />
- <strong>Use sticky connections</strong><br/>
- Successive connections will be redirected to the servers
- in a round-robin manner with connections from the same
- source being sent to the same web server. This "sticky
- connection" will exist as long as there are states that
- refer to this connection. Once the states expire, so will
- the sticky connection. Further connections from that host
- will be redirected to the next web server in the round
- robin.
+ <strong><?=gettext("Use sticky connections"); ?></strong><br/>
+ <?=gettext("Successive connections will be redirected to the servers " .
+ "in a round-robin manner with connections from the same " .
+ "source being sent to the same web server. This 'sticky " .
+ "connection' will exist as long as there are states that " .
+ "refer to this connection. Once the states expire, so will " .
+ "the sticky connection. Further connections from that host " .
+ "will be redirected to the next web server in the round " .
+ "robin."); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Power savings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">PowerD</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
<td width="78%" class="vtable">
<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked"; ?> />
- <strong>Use PowerD</strong><br/>
+ <strong><?=gettext("Use PowerD"); ?></strong><br/>
<br />
- The powerd utility monitors the system state and sets various power control
- options accordingly. It offers three modes (maximum, minimum, and
- adaptive) that can be individually selected while on AC power or batteries.
- The modes maximum, minimum, and adaptive may be abbreviated max,
- min, adp. Maximum mode chooses the highest performance values. Minimum
- mode selects the lowest performance values to get the most power savings.
- Adaptive mode attempts to strike a balance by degrading performance when
- the system appears idle and increasing it when the system is busy. It
- offers a good balance between a small performance loss for greatly
- increased power savings. The default mode for pfSense is adaptive.
+ <?=gettext("The powerd utility monitors the system state and sets various power control " .
+ "options accordingly. It offers three modes (maximum, minimum, and " .
+ "adaptive) that can be individually selected while on AC power or batteries. " .
+ "The modes maximum, minimum, and adaptive may be abbreviated max, " .
+ "min, adp. Maximum mode chooses the highest performance values. Minimum " .
+ "mode selects the lowest performance values to get the most power savings. " .
+ "Adaptive mode attempts to strike a balance by degrading performance when " .
+ "the system appears idle and increasing it when the system is busy. It " .
+ "offers a good balance between a small performance loss for greatly " .
+ "increased power savings. The default mode for pfSense is adaptive."); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">glxsb Crypto Acceleration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("glxsb Crypto Acceleration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">glxsb</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("glxsb"); ?></td>
<td width="78%" class="vtable">
<input name="glxsb_enable" type="checkbox" id="glxsb_enable" value="yes" <?php if ($pconfig['glxsb_enable']) echo "checked"; ?> />
- <strong>Use glxsb</strong><br/>
+ <strong><?=gettext("Use glxsb"); ?></strong><br/>
<br />
- The AMD Geode LX Security Block will accelerate some cryptographic functions
- on systems which have the chip. Do not enable this option if you have a
- Hifn cryptographic acceleration card, as this will take precedence and the
- Hifn card will not be used. Acceleration should be automatic for IPsec
- when using Rijndael (AES). OpenVPN should be set for AES-128-CBC.
+ <?=gettext("The AMD Geode LX Security Block will accelerate some cryptographic functions " .
+ "on systems which have the chip. Do not enable this option if you have a " .
+ "Hifn cryptographic acceleration card, as this will take precedence and the " .
+ "Hifn card will not be used. Acceleration should be automatic for IPsec " .
+ "when using Rijndael (AES). OpenVPN should be set for AES-128-CBC."); ?>
<br/><br/>
- If you do not have a glxsb chip in your system, this option will have no
- effect. To unload the module, uncheck this option and then reboot.
+ <?=gettext("If you do not have a glxsb chip in your system, this option will have no " .
+ "effect. To unload the module, uncheck this option and then reboot."); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">IP Security</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Security Assocications</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Security Assocications"); ?></td>
<td width="78%" class="vtable">
<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
- <strong>Prefer older IPsec SAs</strong>
+ <strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
<br />
- By default, if several SAs match, the newest one is
- preferred if it's at least 30 seconds old. Select this
- option to always prefer old SAs over new ones.
+ <?=gettext("By default, if several SAs match, the newest one is " .
+ "preferred if it's at least 30 seconds old. Select this " .
+ "option to always prefer old SAs over new ones."); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Schedules</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Schedule States</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
<td width="78%" class="vtable">
<input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked"; ?> />
<br />
- By default schedules clear the states of existing connections when expiry time has come.
- This option allows to override this setting by not clearing states for existing connections.
+ <?=gettext("By default schedules clear the states of existing connections when expiry time has come. ".
+ "This option allows to override this setting by not clearing states for existing connections."); ?>
</td>
</tr>
<tr>
@@ -252,27 +252,27 @@ include("head.inc");
</tr>
<?php if($g['platform'] == "pfSenseDISABLED"): ?>
<tr>
- <td colspan="2" valign="top" class="listtopic">Hardware Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hard disk standby time </td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
<td width="78%" class="vtable">
<select name="harddiskstandby" class="formselect">
<?php
## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
$sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242");
?>
- <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
+ <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>><?=gettext("Always on"); ?></option>
<?php
foreach ($sbvals as $sbval):
list($min,$val) = explode(",", $sbval);
?>
- <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
+ <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> <?=gettext("minutes"); ?></option>
<?php endforeach; ?>
</select>
<br/>
- Puts the hard disk into standby mode when the selected amount of time after the last
- access has elapsed. <em>Do not set this for CF cards.</em>
+ <?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
+ "access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
</td>
</tr>
<tr>
@@ -283,7 +283,7 @@ include("head.inc");
<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/system_advanced_network.php b/usr/local/www/system_advanced_network.php
index b6ba121..d744a47 100644
--- a/usr/local/www/system_advanced_network.php
+++ b/usr/local/www/system_advanced_network.php
@@ -63,7 +63,7 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr']))
- $input_errors[] = "You must specify an IP address to NAT IPv6 packets.";
+ $input_errors[] = gettext("You must specify an IP address to NAT IPv6 packets.");
ob_flush();
flush();
@@ -125,13 +125,13 @@ if ($_POST) {
$retval = filter_configure();
if(stristr($retval, "error") <> true)
- $savemsg = get_std_save_message($retval);
+ $savemsg = get_std_save_message(gettext($retval));
else
- $savemsg = $retval;
+ $savemsg = gettext($retval);
}
}
-$pgtitle = array("System","Advanced: Networking");
+$pgtitle = array(gettext("System"),gettext("Advanced: Networking"));
include("head.inc");
?>
@@ -165,12 +165,12 @@ function enable_change(enable_over) {
<td>
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", false, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", true, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), true, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -180,36 +180,36 @@ function enable_change(enable_over) {
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong>NOTE:&nbsp</strong>
+ <strong><?=gettext("NOTE"); ?>:&nbsp</strong>
</span>
- The options on this page are intended for use by advanced users only.
+ <?=gettext("The options on this page are intended for use by advanced users only."); ?>
<br/>
</span>
<br/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">IPv6 Options</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("IPv6 Options"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Allow IPv6</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Allow IPv6"); ?></td>
<td width="78%" class="vtable">
<input name="ipv6allow" type="checkbox" id="ipv6allow" value="yes" <?php if ($pconfig['ipv6allow']) echo "checked"; ?> onclick="enable_change(false)" />
- <strong>Allow IPv6</strong><br/>
- All IPv6 will be blocked unless this box is checked.<br/>
+ <strong><?=gettext("Allow IPv6"); ?></strong><br/>
+ <?=gettext("All IPv6 will be blocked unless this box is checked."); ?><br/>
<br/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IPv6 over IPv4 Tunneling</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IPv6 over IPv4 Tunneling"); ?></td>
<td width="78%" class="vtable">
<input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)" />
- <strong>Enable IPv4 NAT encapsulation of IPv6 packets</strong><br/>
- This provides an RFC 2893 compatibility mechanism
- that can be used to tunneling IPv6 packets over IPv4
- routing infrastructures. If enabled, don't forget to
- add a firewall rule to permit IPv6 packets.<br/>
+ <strong><?=gettext("Enable IPv4 NAT encapsulation of IPv6 packets"); ?></strong><br/>
+ <?=gettext("This provides an RFC 2893 compatibility mechanism ".
+ "that can be used to tunneling IPv6 packets over IPv4 ".
+ "routing infrastructures. If enabled, don't forget to ".
+ "add a firewall rule to permit IPv6 packets."); ?><br/>
<br/>
- IP address :&nbsp;
+ <?=gettext("IP address"); ?>&nbsp;:&nbsp;
<input name="ipv6nat_ipaddr" type="text" class="formfld unknown" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>" />
</td>
</tr>
@@ -217,31 +217,30 @@ function enable_change(enable_over) {
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Network Interfaces</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Network Interfaces"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Device polling</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Device polling"); ?></td>
<td width="78%" class="vtable">
<input name="polling_enable" type="checkbox" id="polling_enable" value="yes" <?php if ($pconfig['polling_enable']) echo "checked"; ?>>
- <strong>Enable device polling</strong><br>
- Device polling is a technique that lets the system periodically poll network devices for new data instead of relying on interrupts. This prevents your webConfigurator, SSH, etc. from being inaccessible due to interrupt floods when under extreme load. Generally this is not recommended.
- Not all NICs support polling; see the <?= $g['product_name'] ?> homepage for a list of supported cards.
+ <strong><?=gettext("Enable device polling"); ?></strong><br>
+ <?php printf(gettext("Device polling is a technique that lets the system periodically poll network devices for new data instead of relying on interrupts. This prevents your webConfigurator, SSH, etc. from being inaccessible due to interrupt floods when under extreme load. Generally this is not recommended. Not all NICs support polling; see the %s homepage for a list of supported cards."), $g['product_name']); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hardware Checksum Offloading</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hardware Checksum Offloading"); ?></td>
<td width="78%" class="vtable">
<input name="disablechecksumoffloading" type="checkbox" id="disablechecksumoffloading" value="yes" <?php if (isset($config['system']['disablechecksumoffloading'])) echo "checked"; ?> />
- <strong>Disable hardware checksum offload</strong><br>
- Checking this option will disable hardware checksum offloading. Checksum offloading is broken in some hardware, particularly some Realtek cards. Rarely, drivers may have problems with checksum offloading and some specific NICs.
+ <strong><?=gettext("Disable hardware checksum offload"); ?></strong><br>
+ <?=gettext("Checking this option will disable hardware checksum offloading. Checksum offloading is broken in some hardware, particularly some Realtek cards. Rarely, drivers may have problems with checksum offloading and some specific NICs."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">ARP Handling</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("ARP Handling"); ?></td>
<td width="78%" class="vtable">
<input name="sharednet" type="checkbox" id="sharednet" value="yes" <?php if (isset($pconfig['sharednet'])) echo "checked"; ?> />
- <strong>Suppress ARP messages</strong><br>
- This option will suppress ARP log messages when multiple interfaces reside on the same broadcast domain</strong>
+ <strong><?=gettext("Suppress ARP messages"); ?></strong><br>
+ <?=gettext("This option will suppress ARP log messages when multiple interfaces reside on the same broadcast domain"); ?></strong>
</td>
</tr>
<?php
@@ -272,7 +271,7 @@ function enable_change(enable_over) {
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td>
+ <td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
</tr>
</table>
</div>
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index 6b8b121..80fecce 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -86,7 +86,7 @@ if ($_POST) {
$savemsg = get_std_save_message($retval);
}
- if ($_POST['Submit'] == "Save") {
+ if ($_POST['Submit'] == gettext("Save")) {
$tunableent = array();
// Growl
@@ -108,20 +108,20 @@ if ($_POST) {
if($config['notifications']['growl']['ipaddress'] &&
$config['notifications']['growl']['password'] = $_POST['password']) {
register_via_growl();
- notify_via_growl("This is a test message form pfSense. It is safe to ignore this message.");
+ notify_via_growl(gettext("This is a test message form pfSense. It is safe to ignore this message."));
}
// Send test message via smtp
if(file_exists("/var/db/notices_lastmsg.txt"))
unlink("/var/db/notices_lastmsg.txt");
- $savemsg = notify_via_smtp("This is a test message form pfSense. It is safe to ignore this message.");
+ $savemsg = notify_via_smtp(gettext("This is a test message form pfSense. It is safe to ignore this message."));
pfSenseHeader("system_advanced_notifications.php");
exit;
}
}
-$pgtitle = array("System","Advanced: Notifications");
+$pgtitle = array(gettext("System"),gettext("Advanced: Notifications"));
include("head.inc");
?>
@@ -141,12 +141,12 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", false, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", false, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", true, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), true, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -158,34 +158,34 @@ include("head.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<!-- GROWL -->
<tr>
- <td colspan="2" valign="top" class="listtopic">Growl</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Growl"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Registration Name</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Registration Name"); ?></td>
<td width="78%" class="vtable">
<input name='name' value='<?php echo $pconfig['name']; ?>'><br/>
- Enter the name to register with the Growl server (default: PHP-Growl).
+ <?=gettext("Enter the name to register with the Growl server (default: PHP-Growl)."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Notification Name</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Notification Name"); ?></td>
<td width="78%" class="vtable">
<input name='notification_name' value='<?php echo $pconfig['notification_name']; ?>'><br/>
- Enter a name for the Growl notifications (default: pfSense growl alert).
+ <?=gettext("Enter a name for the Growl notifications (default: pfSense growl alert)."); ?>
</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='ipaddress' value='<?php echo $pconfig['ipaddress']; ?>'><br/>
- This is the IP address that you would like to send growl notifications to.
+ <?=gettext("This is the IP address that you would like to send growl notifications to."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Password</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<input name='password' type='password' value='<?php echo $pconfig['password']; ?>'><br/>
- Enter the password of the remote growl notification device.
+ <?=gettext("Enter the password of the remote growl notification device."); ?>
</td>
</tr>
<tr>
@@ -193,41 +193,41 @@ include("head.inc");
</tr>
<!-- SMTP -->
<tr>
- <td colspan="2" valign="top" class="listtopic">SMTP E-Mail</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("SMTP E-Mail"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP Address of E-Mail server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP Address of E-Mail server"); ?></td>
<td width="78%" class="vtable">
<input name='smtpipaddress' value='<?php echo $pconfig['smtpipaddress']; ?>'><br/>
- This is the IP address of the SMTP E-Mail server that will be used to send notifications to.
+ <?=gettext("This is the IP address of the SMTP E-Mail server that will be used to send notifications to."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">From e-mail address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("From e-mail address"); ?></td>
<td width="78%" class="vtable">
<input name='smtpfromaddress' type='input' value='<?php echo $pconfig['smtpfromaddress']; ?>'><br/>
- This is the e-mail address that will appear in the from field.
+ <?=gettext("This is the e-mail address that will appear in the from field."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Notification E-Mail address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Notification E-Mail address"); ?></td>
<td width="78%" class="vtable">
<input name='smtpnotifyemailaddress' type='input' value='<?php echo $pconfig['smtpnotifyemailaddress']; ?>'><br/>
- Enter the e-mail address that you would like email notifications sent to.
+ <?=gettext("Enter the e-mail address that you would like email notifications sent to."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Notification E-Mail auth username (optional)</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Notification E-Mail auth username (optional)"); ?></td>
<td width="78%" class="vtable">
<input name='smtpusername' type='input' value='<?php echo $pconfig['smtpusername']; ?>'><br/>
- Enter the e-mail address username for SMTP authentication.
+ <?=gettext("Enter the e-mail address username for SMTP authentication."); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Notification E-Mail auth password</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Notification E-Mail auth password"); ?></td>
<td width="78%" class="vtable">
<input name='smtppassword' type='password' value='<?php echo $pconfig['smtppassword']; ?>'><br/>
- Enter the e-mail address password for SMTP authentication.
+ <?=gettext("Enter the e-mail address password for SMTP authentication."); ?>
</td>
</tr>
<tr>
@@ -236,7 +236,7 @@ include("head.inc");
</td>
<td>
<br/>
- <input type='submit' id='Submit' name='Submit' value='Save'></form>
+ <input type='submit' id='Submit' name='Submit' value='<?=gettext("Save"); ?>'></form>
</td>
</tr>
</table>
diff --git a/usr/local/www/system_advanced_sysctl.php b/usr/local/www/system_advanced_sysctl.php
index 0215d0e..c00871f 100644
--- a/usr/local/www/system_advanced_sysctl.php
+++ b/usr/local/www/system_advanced_sysctl.php
@@ -101,7 +101,7 @@ if ($_POST) {
clear_subsystem_dirty('sysctl');
}
- if ($_POST['Submit'] == "Save") {
+ if ($_POST['Submit'] == gettext("Save")) {
$tunableent = array();
$tunableent['tunable'] = $_POST['tunable'];
@@ -124,7 +124,7 @@ if ($_POST) {
include("head.inc");
-$pgtitle = array("System","Advanced: Miscellaneous");
+$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
include("head.inc");
?>
@@ -138,7 +138,7 @@ include("head.inc");
if ($savemsg)
print_info_box($savemsg);
if (is_subsystem_dirty('sysctl') && ($act != "edit" ))
- print_info_box_np("The firewall tunables have changed. You must apply the configuration to take affect.");
+ print_info_box_np(gettext("The firewall tunables have changed. You must apply the configuration to take affect."));
?>
</form>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -146,12 +146,12 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array("Admin Access", false, "system_advanced_admin.php");
- $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php");
- $tab_array[] = array("Networking", false, "system_advanced_network.php");
- $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php");
- $tab_array[] = array("System Tunables", true, "system_advanced_sysctl.php");
- $tab_array[] = array("Notifications", false, "system_advanced_notifications.php");
+ $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
+ $tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
+ $tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
+ $tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
+ $tab_array[] = array(gettext("System Tunables"), true, "system_advanced_sysctl.php");
+ $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
</td>
@@ -162,17 +162,17 @@ include("head.inc");
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong>NOTE:&nbsp</strong>
+ <strong><?=gettext("NOTE"); ?>:&nbsp</strong>
</span>
- The options on this page are intended for use by advanced users only.
+ <?=gettext("The options on this page are intended for use by advanced users only."); ?>
<br/>
</span>
<br/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Tunable Name</td>
- <td width="60%" class="listhdrr">Description</td>
- <td width="20%" class="listhdrr">Value</td>
+ <td width="20%" class="listhdrr"><?=gettext("Tunable Name"); ?></td>
+ <td width="60%" class="listhdrr"><?=gettext("Description"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Value"); ?></td>
</tr>
<?php $i = 0; foreach ($config['sysctl']['item'] as $tunable): ?>
<tr>
@@ -198,7 +198,7 @@ include("head.inc");
</a>
</td>
<td valign="middle">
- <a href="system_advanced_sysctl.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')">
+ <a href="system_advanced_sysctl.php?act=del&amp;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" alt="" />
</a>
</td>
@@ -233,22 +233,22 @@ include("head.inc");
<form action="system_advanced_sysctl.php" method="post" name="iform" id="iform">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit system tunable</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit system tunable"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Tunable</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Tunable"); ?></td>
<td width="78%" class="vtable">
<input size="65" name="tunable" value="<?php echo $pconfig['tunable']; ?>">
</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">
<textarea rows="7" cols="50" name="desc"><?php echo $pconfig['desc']; ?></textarea>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Value</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Value"); ?></td>
<td width="78%" class="vtable">
<input size="65" name="value" value="<?php echo $pconfig['value']; ?>">
</td>
@@ -256,8 +256,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" />
- <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" onclick="history.back()" />
+ <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_tunable[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index ca47289..984f0ab 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -41,7 +41,7 @@
require("guiconfig.inc");
require_once("auth.inc");
-$pgtitle = array("System", "Authentication Servers");
+$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -141,40 +141,52 @@ if ($_POST) {
$reqdfields = explode(" ", "name type ldap_host ldap_port ".
"ldap_urltype ldap_protver ldap_scope ldap_basedn ".
"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers");
- $reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
- "Port value,Transport,Protocol version,Search level,".
- "Search Base DN,User naming Attribute,".
- "Group naming Attribute,Group member attribute,Authentication container");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Type"),
+ gettext("Hostname or IP"),
+ gettext("Port value"),
+ gettext("Transport"),
+ gettext("Protocol version"),
+ gettext("Search level"),
+ gettext("Search Base DN"),
+ gettext("User naming Attribute"),
+ gettext("Group naming Attribute"),
+ gettext("Group member attribute"),
+ gettext("Authentication container"));
if (!$pconfig['ldap_anon']) {
$reqdfields[] = "ldap_binddn";
$reqdfields[] = "ldap_bindpw";
- $reqdfieldsn[] = "Bind user DN";
- $reqdfieldsn[] = "Bind Password";
+ $reqdfieldsn[] = gettext("Bind user DN");
+ $reqdfieldsn[] = gettext("Bind Password");
}
}
if ($pconfig['type'] == "radius") {
$reqdfields = explode(" ", "name type radius_host radius_srvcs");
- $reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
- "Services");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Type"),
+ gettext("Hostname or IP"),
+ gettext("Services"));
if ($pconfig['radisu_srvcs'] == "both" ||
$pconfig['radisu_srvcs'] == "auth") {
$reqdfields[] = "radius_auth_port";
- $reqdfieldsn[] = "Authentication port value";
+ $reqdfieldsn[] = gettext("Authentication port value");
}
if ($pconfig['radisu_srvcs'] == "both" ||
$pconfig['radisu_srvcs'] == "acct") {
$reqdfields[] = "radius_acct_port";
- $reqdfieldsn[] = "Accounting port value";
+ $reqdfieldsn[] = gettext("Accounting port value");
}
if (!isset($id)) {
$reqdfields[] = "radius_secret";
- $reqdfieldsn[] = "Shared Secret";
+ $reqdfieldsn[] = gettext("Shared Secret");
}
}
@@ -184,7 +196,7 @@ if ($_POST) {
$input_errors[] = gettext("The host name contains invalid characters.");
if (auth_get_authserver($pconfig['name']) && !isset($id))
- $input_errors[] = "A authentication server with the same name already exists.";
+ $input_errors[] = gettext("An authentication server with the same name already exists.");
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -350,13 +362,13 @@ function select_clicked() {
document.getElementById("ldap_scope").value == '' ||
document.getElementById("ldap_basedn").value == '' ||
document.getElementById("ldapauthcontainers").value == '') {
- alert("Please fill the required values.");
+ alert("<?=gettext("Please fill the required values.");?>");
return;
}
if (!document.getElementById("ldap_anon").checked) {
if (document.getElementById("ldap_binddn").value == '' ||
document.getElementById("ldap_bindpw").value == '') {
- alert("Please fill the bind username/password.");
+ alert("<?=gettext("Please fill the bind username/password.");?>");
return;
}
}
@@ -373,7 +385,7 @@ function select_clicked() {
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
if (oWin==null || typeof(oWin)=="undefined")
- alert('Popup blocker detected. Action aborted.');
+ alert("<?=gettext('Popup blocker detected. Action aborted.');?>");
}
//-->
</script>
@@ -442,7 +454,7 @@ function select_clicked() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">LDAP Server Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("LDAP Server Settings");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
@@ -491,7 +503,7 @@ function select_clicked() {
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
- <td>Level: &nbsp;</td>
+ <td><?=gettext("Level");?>: &nbsp;</td>
<td>
<select name='ldap_scope' id='ldap_scope' class="formselect">
<?php
@@ -506,7 +518,7 @@ function select_clicked() {
</td>
</tr>
<tr>
- <td>Base DN: &nbsp;</td>
+ <td><?=gettext("Base DN");?>: &nbsp;</td>
<td>
<input name="ldap_basedn" type="text" class="formfld unknown" id="ldap_basedn" size="40" value="<?=htmlspecialchars($pconfig['ldap_basedn']);?>"/>
</td>
@@ -516,23 +528,22 @@ function select_clicked() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication containers");?></td>
- <td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td>Containers: &nbsp;</td>
- <td>
- <input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
- <input type="button" onClick="select_clicked();" value="Select">
- <br />NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.
- <br />EXAMPLE: CN=Users;DC=example
- <br />EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication containers");?></td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><?=gettext("Containers");?>: &nbsp;</td>
+ <td>
+ <input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
+ <input type="button" onClick="select_clicked();" value="<?=gettext("Select");?>">
+ <br /><?=gettext("NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.");?>
+ <br /><?=gettext("EXAMPLE: CN=Users;DC=example");?>
+ <br /><?=gettext("EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com ");?>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Bind credentials");?></td>
<td width="78%" class="vtable">
@@ -542,7 +553,7 @@ function select_clicked() {
<input name="ldap_anon" type="checkbox" id="ldap_anon" value="yes" <?php if ($pconfig['ldap_anon']) echo "checked"; ?> onClick="ldap_bindchange()">
</td>
<td>
- Use anonymous binds to resolve distinguished names
+ <?=gettext("Use anonymous binds to resolve distinguished names");?>
</td>
</tr>
</table>
@@ -551,13 +562,13 @@ function select_clicked() {
<td colspan="2"></td>
</tr>
<tr>
- <td>User DN: &nbsp;</td>
+ <td><?=gettext("User DN");?>: &nbsp;</td>
<td>
<input name="ldap_binddn" type="text" class="formfld unknown" id="ldap_binddn" size="40" value="<?=htmlspecialchars($pconfig['ldap_binddn']);?>"/><br/>
</td>
</tr>
<tr>
- <td>Password: &nbsp;</td>
+ <td><?=gettext("Password");?>: &nbsp;</td>
<td>
<input name="ldap_bindpw" type="password" class="formfld pwd" id="ldap_bindpw" size="20" value="<?=htmlspecialchars($pconfig['ldap_bindpw']);?>"/><br/>
</td>
@@ -607,7 +618,7 @@ function select_clicked() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Radius Server Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Radius Server Settings");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
@@ -654,7 +665,7 @@ function select_clicked() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<?php if (isset($id) && $a_server[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif;?>
@@ -667,9 +678,9 @@ function select_clicked() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Server Name</td>
- <td width="25%" class="listhdrr">Type</td>
- <td width="35%" class="listhdrr">Host Name</td>
+ <td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -686,11 +697,11 @@ function select_clicked() {
<td valign="middle" nowrap class="list">
<?php if ($i < (count($a_server) - 1)): ?>
<a href="system_authservers.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="edit server" alt="edit server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
</a>
&nbsp;
<a href="system_authservers.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="delete server" alt="delete server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
</a>
<?php endif; ?>
</td>
@@ -702,7 +713,7 @@ function select_clicked() {
<td class="list" colspan="3"></td>
<td class="list">
<a href="system_authservers.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add server" alt="add server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php
index 19f338d..8c0417c 100644
--- a/usr/local/www/system_camanager.php
+++ b/usr/local/www/system_camanager.php
@@ -41,12 +41,12 @@ require("guiconfig.inc");
require_once("certs.inc");
$ca_methods = array(
- "existing" => "Import an existing Certificate Authority",
- "internal" => "Create an internal Certificate Authority");
+ "existing" => gettext("Import an existing Certificate Authority"),
+ "internal" => gettext("Create an internal Certificate Authority"));
$ca_keylens = array( "512", "1024", "2048", "4096");
-$pgtitle = array("System", "Certificate Authority Manager");
+$pgtitle = array(gettext("System"), gettext("Certificate Authority Manager"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -118,20 +118,24 @@ if ($_POST) {
/* input validation */
if ($pconfig['method'] == "existing") {
$reqdfields = explode(" ", "name cert");
- $reqdfieldsn = explode(",", "Descriptive name,Certificate data");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Certificate data"));
}
if ($pconfig['method'] == "internal") {
$reqdfields = explode(" ",
"name keylen lifetime dn_country dn_state dn_city ".
"dn_organization dn_email dn_commonname");
- $reqdfieldsn = explode(",",
- "Descriptive name,Key length,Lifetime,".
- "Distinguished name Country Code,".
- "Distinguished name State or Province,".
- "Distinguished name City,".
- "Distinguished name Organization,".
- "Distinguished name Email Address,".
- "Distinguished name Common Name");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Key length"),
+ gettext("Lifetime"),
+ gettext("Distinguished name Country Code"),
+ gettext("Distinguished name State or Province"),
+ gettext("Distinguished name City"),
+ gettext("Distinguished name Organization"),
+ gettext("Distinguished name Email Address"),
+ gettext("Distinguished name Common Name"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -226,7 +230,7 @@ function method_change() {
<td id="mainarea">
<div class="tabcont">
- <?php if ($act == "new" || $act == "save" || $input_errors): ?>
+ <?php if ($act == "new" || $act == gettext("save") || $input_errors): ?>
<form action="system_camanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
@@ -260,15 +264,15 @@ function method_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Existing Certificate Authority</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Existing Certificate Authority");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Certificate data</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Certificate data");?></td>
<td width="78%" class="vtable">
<textarea name="cert" id="cert" cols="65" rows="7" class="formfld_cert"><?=$pconfig['cert'];?></textarea>
<br>
- Paste a certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a certificate in X.509 PEM format here.");?></td>
</td>
</tr>
</table>
@@ -278,7 +282,7 @@ function method_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Internal Certificate Authority</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate Authority");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Key length");?></td>
@@ -293,14 +297,14 @@ function method_change() {
<option value="<?=$len;?>"<?=$selected;?>><?=$len;?></option>
<?php endforeach; ?>
</select>
- bits
+ <?=gettext(bits);?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
<td width="78%" class="vtable">
<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="5" value="<?=htmlspecialchars($pconfig['lifetime']);?>"/>
- days
+ <?=gettext(days);?>
</td>
</tr>
<tr>
@@ -308,64 +312,64 @@ function method_change() {
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
- <td align="right">Country Code : &nbsp;</td>
+ <td align="right"><?=gettext("Country Code");?> : &nbsp;</td>
<td align="left">
<input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- US
- <em>( two letters )</em>
+ <?=gettext("US");?>
+ <em><?=gettext("( two letters )");?></em>
</td>
</tr>
<tr>
- <td align="right">State or Province : &nbsp;</td>
+ <td align="right"><?=gettext("State or Province");?> : &nbsp;</td>
<td align="left">
<input name="dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_state']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- Texas
+ <?=gettext("Texas");?>
</td>
</tr>
<tr>
- <td align="right">City : &nbsp;</td>
+ <td align="right"><?=gettext("City");?> : &nbsp;</td>
<td align="left">
<input name="dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_city']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- Austin
+ <?=gettext("Austin");?>
</td>
</tr>
<tr>
- <td align="right">Organization : &nbsp;</td>
+ <td align="right"><?=gettext("Organization");?> : &nbsp;</td>
<td align="left">
<input name="dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_organization']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- My Company Inc.
+ <?=gettext("My Company Inc.");?>
</td>
</tr>
<tr>
- <td align="right">Email Address : &nbsp;</td>
+ <td align="right"><?=gettext("Email Address");?> : &nbsp;</td>
<td align="left">
<input name="dn_email" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_email']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- admin@mycompany.com
+ <?=gettext("admin@mycompany.com");?>
</td>
</tr>
<tr>
- <td align="right">Common Name : &nbsp;</td>
+ <td align="right"><?=gettext("Common Name");?> : &nbsp;</td>
<td align="left">
<input name="dn_commonname" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_commonname']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- internal-ca
+ <?=gettext("internal-ca");?>
</td>
</tr>
</table>
@@ -377,7 +381,7 @@ function method_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
<?php if (isset($id) && $a_ca[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif;?>
@@ -390,11 +394,11 @@ function method_change() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Internal</td>
- <td width="10%" class="listhdrr">Issuer</td>
- <td width="10%" class="listhdrr">Certificates</td>
- <td width="40%" class="listhdrr">Distinguished Name</td>
+ <td width="20%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Internal");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Issuer");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Certificates");?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -404,9 +408,9 @@ function method_change() {
$subj = cert_get_subject($ca['crt']);
$issuer = cert_get_issuer($ca['crt']);
if($subj == $issuer)
- $issuer_name = "<em>self-signed</em>";
+ $issuer_name = "<em>" . gettext("self-signed") . "</em>";
else
- $issuer_name = "<em>external</em>";
+ $issuer_name = "<em>" . gettext("external") . "</em>";
$subj = htmlspecialchars($subj);
$issuer = htmlspecialchars($issuer);
$certcount = 0;
@@ -451,10 +455,10 @@ function method_change() {
<td class="listr"><?=$subj;?>&nbsp;</td>
<td valign="middle" nowrap class="list">
<a href="system_camanager.php?act=exp&id=<?=$i;?>")">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="export ca" alt="export ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export ca");?>" alt="<?=gettext("export ca");?>" width="17" height="17" border="0" />
</a>
<a href="system_camanager.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate Authority and all associated Certificates?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="delete ca" alt="delete ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete ca");?>" alt="<?=gettext("delete ca"); ?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
@@ -466,7 +470,7 @@ function method_change() {
<td class="list" colspan="5"></td>
<td class="list">
<a href="system_camanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add or import ca" alt="add ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add or import ca");?>" alt="<?=gettext("add ca");?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 03458e9..683bdeb 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -41,13 +41,13 @@ require("guiconfig.inc");
require_once("certs.inc");
$cert_methods = array(
- "existing" => "Import an existing Certificate",
- "internal" => "Create an internal Certificate",
- "external" => "Create a Certificate Signing Request");
+ "existing" => gettext("Import an existing Certificate"),
+ "internal" => gettext("Create an internal Certificate"),
+ "external" => gettext("Create a Certificate Signing Request"));
$cert_keylens = array( "512", "1024", "2048", "4096");
-$pgtitle = array("System", "Certificate Manager");
+$pgtitle = array(gettext("System"), gettext("Certificate Manager"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -141,7 +141,7 @@ if ($act == "csr") {
if ($_POST) {
- if ($_POST['save'] == "Save") {
+ if ($_POST['save'] == gettext("Save")) {
unset($input_errors);
$pconfig = $_POST;
@@ -150,36 +150,42 @@ if ($_POST) {
if ($pconfig['method'] == "existing") {
$reqdfields = explode(" ",
"name cert key");
- $reqdfieldsn = explode(",",
- "Descriptive name,Certificate data,Key data");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Certificate data"),
+ gettext("Key data"));
}
if ($pconfig['method'] == "internal") {
$reqdfields = explode(" ",
"name caref keylen lifetime dn_country dn_state dn_city ".
"dn_organization dn_email dn_commonname");
- $reqdfieldsn = explode(",",
- "Descriptive name,Certificate authority,Key length,Lifetime,".
- "Distinguished name Country Code,".
- "Distinguished name State or Province,".
- "Distinguished name City,".
- "Distinguished name Organization,".
- "Distinguished name Email Address,".
- "Distinguished name Common Name");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Certificate authority"),
+ gettext("Key length"),
+ gettext("Lifetime"),
+ gettext("Distinguished name Country Code"),
+ gettext("Distinguished name State or Province"),
+ gettext("Distinguished name City"),
+ gettext("Distinguished name Organization"),
+ gettext("Distinguished name Email Address"),
+ gettext("Distinguished name Common Name"));
}
if ($pconfig['method'] == "external") {
$reqdfields = explode(" ",
"name csr_keylen csr_dn_country csr_dn_state csr_dn_city ".
"csr_dn_organization csr_dn_email csr_dn_commonname");
- $reqdfieldsn = explode(",",
- "Descriptive name,Key length,".
- "Distinguished name Country Code,".
- "Distinguished name State or Province,".
- "Distinguished name City,".
- "Distinguished name Organization,".
- "Distinguished name Email Address,".
- "Distinguished name Common Name");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Key length"),
+ gettext("Distinguished name Country Code"),
+ gettext("Distinguished name State or Province"),
+ gettext("Distinguished name City"),
+ gettext("Distinguished name Organization"),
+ gettext("Distinguished name Email Address"),
+ gettext("Distinguished name Common Name"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -239,13 +245,15 @@ if ($_POST) {
}
}
- if ($_POST['save'] == "Update") {
+ if ($_POST['save'] == gettext("Update")) {
unset($input_errors);
$pconfig = $_POST;
/* input validation */
$reqdfields = explode(" ", "name cert");
- $reqdfieldsn = explode(",", "Descriptive name,Final Certificate data");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Final Certificate data"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -254,7 +262,7 @@ if ($_POST) {
$subj_cert = cert_get_subject($pconfig['cert'], false);
if (strcmp($subj_csr,$subj_cert))
- $input_errors[] = gettext("The certificate subject '{$subj_cert}' does not match the signing request subject.");
+ $input_errors[] = sprintf(gettext("The certificate subject '%s' does not match the signing request subject."),$subj_cert);
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -368,7 +376,7 @@ function internalca_change() {
<td id="mainarea">
<div class="tabcont">
- <?php if ($act == "new" || (($_POST['save'] == "Save") && $input_errors)): ?>
+ <?php if ($act == "new" || (($_POST['save'] == gettext("Save")) && $input_errors)): ?>
<form action="system_certmanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
@@ -402,23 +410,23 @@ function internalca_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Existing Certificate</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Existing Certificate");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Certificate data</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Certificate data");?></td>
<td width="78%" class="vtable">
<textarea name="cert" id="cert" cols="65" rows="7" class="formfld_cert"><?=$pconfig['cert'];?></textarea>
<br>
- Paste a certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a certificate in X.509 PEM format here.");?></td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Private key data</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Private key data");?></td>
<td width="78%" class="vtable">
<textarea name="key" id="key" cols="65" rows="7" class="formfld_cert"><?=$pconfig['key'];?></textarea>
<br>
- Paste a private key in X.509 PEM format here.</td>
+ <?=gettext("Paste a private key in X.509 PEM format here.");?></td>
</td>
</tr>
</table>
@@ -428,16 +436,16 @@ function internalca_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Internal Certificate</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate");?></td>
</tr>
<?php if (!$internal_ca_count): ?>
<tr>
<td colspan="2" align="center" class="vtable">
- No internal Certificate Authorities have been defined. You must
- <a href="system_camanager.php?act=new&method=internal">create</a>
- an internal CA before creating an internal certificate.
+ <?=gettext("No internal Certificate Authorities have been defined. You must");?>
+ <a href="system_camanager.php?act=new&method=internal"><?=gettext("create");?></a>
+ <?=gettext("an internal CA before creating an internal certificate.");?>
</td>
</tr>
@@ -473,14 +481,14 @@ function internalca_change() {
<option value="<?=$len;?>"<?=$selected;?>><?=$len;?></option>
<?php endforeach; ?>
</select>
- bits
+ <?=gettext("bits");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
<td width="78%" class="vtable">
<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="5" value="<?=htmlspecialchars($pconfig['lifetime']);?>"/>
- days
+ <?=gettext("days");?>
</td>
</tr>
<tr>
@@ -488,47 +496,47 @@ function internalca_change() {
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
- <td align="right">Country Code : &nbsp;</td>
+ <td align="right"><?=gettext("Country Code");?> : &nbsp;</td>
<td align="left">
<input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>" readonly/>
</td>
</tr>
<tr>
- <td align="right">State or Province : &nbsp;</td>
+ <td align="right"><?=gettext("State or Province");?> : &nbsp;</td>
<td align="left">
<input name="dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_state']);?>" readonly/>
</td>
</tr>
<tr>
- <td align="right">City : &nbsp;</td>
+ <td align="right"><?=gettext("City");?> : &nbsp;</td>
<td align="left">
<input name="dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_city']);?>" readonly/>
</td>
</tr>
<tr>
- <td align="right">Organization : &nbsp;</td>
+ <td align="right"><?=gettext("Organization");?> : &nbsp;</td>
<td align="left">
<input name="dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_organization']);?>" readonly/>
</td>
</tr>
<tr>
- <td align="right">Email Address : &nbsp;</td>
+ <td align="right"><?=gettext("Email Address");?> : &nbsp;</td>
<td align="left">
<input name="dn_email" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_email']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- webadmin@mycompany.com
+ <?=gettext("webadmin@mycompany.com");?>
</td>
</tr>
<tr>
- <td align="right">Common Name : &nbsp;</td>
+ <td align="right"><?=gettext("Common Name");?> : &nbsp;</td>
<td align="left">
<input name="dn_commonname" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_commonname']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- www.example.com
+ <?=gettext("www.example.com");?>
</td>
</tr>
</table>
@@ -544,7 +552,7 @@ function internalca_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">External Signing Request</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("External Signing Request");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Key length");?></td>
@@ -567,7 +575,7 @@ function internalca_change() {
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
- <td align="right">Country Code : &nbsp;</td>
+ <td align="right"><?=gettext("Country Code");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_country" type="text" class="formfld unknown" size="2" value="<?=htmlspecialchars($pconfig['csr_dn_country']);?>" />
&nbsp;
@@ -575,57 +583,57 @@ function internalca_change() {
&nbsp;
US
&nbsp;
- <em>( two letters )</em>
+ <em><?=gettext("( two letters )");?></em>
</td>
</tr>
<tr>
- <td align="right">State or Province : &nbsp;</td>
+ <td align="right"><?=gettext("State or Province");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['csr_dn_state']);?>" />
&nbsp;
<em>ex:</em>
&nbsp;
- Texas
+ <?=gettext("Texas");?>
</td>
</tr>
<tr>
- <td align="right">City : &nbsp;</td>
+ <td align="right"><?=gettext("City");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['csr_dn_city']);?>" />
&nbsp;
<em>ex:</em>
&nbsp;
- Austin
+ <?=gettext("Austin");?>
</td>
</tr>
<tr>
- <td align="right">Organization : &nbsp;</td>
+ <td align="right"><?=gettext("Organization");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['csr_dn_organization']);?>" />
&nbsp;
<em>ex:</em>
&nbsp;
- My Company Inc.
+ <?=gettext("My Company Inc.");?>
</td>
</tr>
<tr>
- <td align="right">Email Address : &nbsp;</td>
+ <td align="right"><?=gettext("Email Address");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_email" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['csr_dn_email']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- webadmin@mycompany.com
+ <?=gettext("webadmin@mycompany.com");?>
</td>
</tr>
<tr>
- <td align="right">Common Name : &nbsp;</td>
+ <td align="right"><?=gettext("Common Name");?> : &nbsp;</td>
<td align="left">
<input name="csr_dn_commonname" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['csr_dn_commonname']);?>"/>
&nbsp;
<em>ex:</em>
&nbsp;
- www.example.com
+ <?=gettext("www.example.com");?>
</td>
</tr>
</table>
@@ -637,7 +645,7 @@ function internalca_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<?php if (isset($id) && $a_cert[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif;?>
@@ -646,7 +654,7 @@ function internalca_change() {
</table>
</form>
- <?php elseif ($act == "csr" || (($_POST['save'] == "Update") && $input_errors)):?>
+ <?php elseif ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors)):?>
<form action="system_certmanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
@@ -660,29 +668,29 @@ function internalca_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Complete Signing Request</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Complete Signing Request");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Signing Request data</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Signing Request data");?></td>
<td width="78%" class="vtable">
<textarea name="csr" id="csr" cols="65" rows="7" class="formfld_cert" readonly><?=$pconfig['csr'];?></textarea>
<br>
- Copy the certificate signing data from here and forward it to your certificate authority for signing.</td>
+ <?=gettext("Copy the certificate signing data from here and forward it to your certificate authority for signing.");?></td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Final Certificate data</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Final Certificate data");?></td>
<td width="78%" class="vtable">
<textarea name="cert" id="cert" cols="65" rows="7" class="formfld_cert"><?=$pconfig['cert'];?></textarea>
<br>
- Paste the certificate received from your cerificate authority here.</td>
+ <?=gettext("Paste the certificate received from your cerificate authority here.");?></td>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Update" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Update");?>" />
<?php if (isset($id) && $a_cert[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<input name="act" type="hidden" value="csr" />
@@ -696,9 +704,9 @@ function internalca_change() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Name</td>
- <td width="20%" class="listhdrr">Issuer</td>
- <td width="40%" class="listhdrr">Distinguished Name</td>
+ <td width="20%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Issuer");?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -710,15 +718,15 @@ function internalca_change() {
$subj = cert_get_subject($cert['crt']);
$issuer = cert_get_issuer($cert['crt']);
if($subj==$issuer)
- $caname = "<em>self-signed</em>";
+ $caname = "<em>" . gettext("self-signed") . "</em>";
else
- $caname = "<em>external</em>";
+ $caname = "<em>" . gettext("external"). "</em>";
$subj = htmlspecialchars($subj);
}
if ($cert['csr']) {
$subj = htmlspecialchars(csr_get_subject($cert['csr']));
- $caname = "<em>external - signature pending</em>";
+ $caname = "<em>" . gettext("external - signature pending") . "</em>";
}
$ca = lookup_ca($cert['caref']);
@@ -747,18 +755,18 @@ function internalca_change() {
<td class="listr"><?=$subj;?>&nbsp;</td>
<td valign="middle" nowrap class="list">
<a href="system_certmanager.php?act=exp&id=<?=$i;?>")">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="export cert" alt="export ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export cert");?>" alt="<?=gettext("export ca");?>" width="17" height="17" border="0" />
</a>
<a href="system_certmanager.php?act=key&id=<?=$i;?>")">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="export key" alt="export ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export key");?>" alt="<?=gettext("export ca");?>" width="17" height="17" border="0" />
</a>
<a href="system_certmanager.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="delete cert" alt="delete cert" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete cert");?>" alt="<?=gettext("delete cert");?>" width="17" height="17" border="0" />
</a>
<?php if ($cert['csr']): ?>
&nbsp;
<a href="system_certmanager.php?act=csr&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="update csr" alt="update csr" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("update csr");?>" alt="<?=gettext("update csr");?>" width="17" height="17" border="0" />
</a>
<?php endif; ?>
</td>
@@ -771,7 +779,7 @@ function internalca_change() {
<td class="list" colspan="3"></td>
<td class="list">
<a href="system_certmanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add or import ca" alt="add ca" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add or import ca");?>" alt="<?=gettext("add ca");?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index ed40a97..58c1caa 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -76,32 +76,32 @@ function file_is_for_platform($filename, $ul_name) {
function file_upload_error_message($error_code) {
switch ($error_code) {
case UPLOAD_ERR_INI_SIZE:
- return 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
+ return gettext('The uploaded file exceeds the upload_max_filesize directive in php.ini');
case UPLOAD_ERR_FORM_SIZE:
- return 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
+ return gettext('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form');
case UPLOAD_ERR_PARTIAL:
- return 'The uploaded file was only partially uploaded';
+ return gettext('The uploaded file was only partially uploaded');
case UPLOAD_ERR_NO_FILE:
- return 'No file was uploaded';
+ return gettext('No file was uploaded');
case UPLOAD_ERR_NO_TMP_DIR:
- return 'Missing a temporary folder';
+ return gettext('Missing a temporary folder');
case UPLOAD_ERR_CANT_WRITE:
- return 'Failed to write file to disk';
+ return gettext('Failed to write file to disk');
case UPLOAD_ERR_EXTENSION:
- return 'File upload stopped by extension';
+ return gettext('File upload stopped by extension');
default:
- return 'Unknown upload error';
+ return gettext('Unknown upload error');
}
}
/* if upgrade in progress, alert user */
if(is_subsystem_dirty('firmwarelock')) {
- $pgtitle = array("System","Firmware","Manual Update");
+ $pgtitle = array(gettext("System"),gettext("Firmware"),gettext("Manual Update"));
include("head.inc");
echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
include("fbegin.inc");
echo "<div>\n";
- print_info_box("An upgrade is currently in progress.<p>The firewall will reboot when the operation is complete.<p><center><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif'>");
+ print_info_box(gettext("An upgrade is currently in progress.<p>The firewall will reboot when the operation is complete.") . "<p><center><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif'>");
echo "</div>\n";
include("fend.inc");
echo "</body>";
@@ -122,11 +122,11 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
unset($input_errors);
unset($sig_warning);
- if (stristr($_POST['Submit'], "Enable"))
+ if (stristr($_POST['Submit'], gettext("Enable")))
$mode = "enable";
- else if (stristr($_POST['Submit'], "Disable"))
+ else if (stristr($_POST['Submit'], gettext("Disable")))
$mode = "disable";
- else if (stristr($_POST['Submit'], "Upgrade") || $_POST['sig_override'])
+ else if (stristr($_POST['Submit'], gettext("Upgrade")) || $_POST['sig_override'])
$mode = "upgrade";
else if ($_POST['sig_no']) {
if(file_exists("{$g['upload_path']}/firmware.tgz"))
@@ -145,10 +145,10 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
/* verify firmware image(s) */
if (file_is_for_platform($_FILES['ulfile']['tmp_name'], $_FILES['ulfile']['name']) == false && !$_POST['sig_override'])
- $input_errors[] = "The uploaded image file is not for this platform ({$g['platform']}).";
+ $input_errors[] = gettext("The uploaded image file is not for this platform") . " ({$g['platform']})";
else if (!file_exists($_FILES['ulfile']['tmp_name'])) {
/* probably out of memory for the MFS */
- $input_errors[] = "Image upload failed (out of memory?)";
+ $input_errors[] = gettext("Image upload failed (out of memory?)");
mwexec("/etc/rc.firmware disable");
clear_subsystem_dirty('firmware');
} else {
@@ -159,14 +159,14 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
$sigchk = verify_digital_signature("{$g['upload_path']}/firmware.tgz");
if ($sigchk == 1)
- $sig_warning = "The digital signature on this image is invalid.";
+ $sig_warning = gettext("The digital signature on this image is invalid.");
else if ($sigchk == 2 && !isset($config['system']['firmware']['allowinvalidsig']))
- $sig_warning = "This image is not digitally signed.";
+ $sig_warning = gettext("This image is not digitally signed.");
else if (($sigchk >= 3))
- $sig_warning = "There has been an error verifying the signature on this image.";
+ $sig_warning = gettext("There has been an error verifying the signature on this image.");
if (!verify_gzip_file("{$g['upload_path']}/firmware.tgz")) {
- $input_errors[] = "The image file is corrupt.";
+ $input_errors[] = gettext("The image file is corrupt.");
unlink("{$g['upload_path']}/firmware.tgz");
}
}
@@ -179,7 +179,7 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
if (file_exists("{$g['upload_path']}/firmware.tgz")) {
/* fire up the update script in the background */
mark_subsystem_dirty('firmwarelock');
- $savemsg = "The firmware is now being updated. The firewall will reboot automatically.";
+ $savemsg = gettext("The firmware is now being updated. The firewall will reboot automatically.");
if(stristr($_FILES['ulfile']['name'],"nanobsd") or $_POST['isnano'] == "yes")
mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz");
else if(stristr($_FILES['ulfile']['name'],"bdiff"))
@@ -187,14 +187,14 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
else
mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['upload_path']}/firmware.tgz");
} else {
- $savemsg = "Firmware image missing or other error, please try again {$errortext}.";
+ $savemsg = sprintf(gettext("Firmware image missing or other error, please try again %s."),$errortext);
}
}
}
}
}
-$pgtitle = array("Diagnostics","Firmware");
+$pgtitle = array(gettext("Diagnostics"),gettext("Firmware"));
include("head.inc");
?>
@@ -211,17 +211,17 @@ include("head.inc");
<?php if ($fwinfo <> "") print_info_box($fwinfo); ?>
<?php if ($sig_warning && !$input_errors): ?>
<?php
- $sig_warning = "<strong>" . $sig_warning . "</strong><br>This means that the image you uploaded " .
+ $sig_warning = "<strong>" . $sig_warning . "</strong><br>" . gettext("This means that the image you uploaded " .
"is not an official/supported image and may lead to unexpected behavior or security " .
"compromises. Only install images that come from sources that you trust, and make sure ".
- "that the image has not been tampered with.<br><br>".
- "Do you want to install this image anyway (on your own risk)?";
+ "that the image has not been tampered with.") . "<br><br>".
+ gettext("Do you want to install this image anyway (on your own risk)?");
print_info_box($sig_warning);
if(stristr($_FILES['ulfile']['name'],"nanobsd"))
echo "<input type='hidden' name='isnano' id='isnano' value='yes'>\n";
?>
-<input name="sig_override" type="submit" class="formbtn" id="sig_override" value=" Yes ">
-<input name="sig_no" type="submit" class="formbtn" id="sig_no" value=" No ">
+<input name="sig_override" type="submit" class="formbtn" id="sig_override" value=" <?=gettext("Yes");?> ">
+<input name="sig_no" type="submit" class="formbtn" id="sig_no" value=" <?=gettext("No"); ?> ">
<?php else: ?>
<?php if (!is_subsystem_dirty('firmwarelock')): ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -229,9 +229,9 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Manual Update", true, "system_firmware.php");
- $tab_array[1] = array("Auto Update", false, "system_firmware_check.php");
- $tab_array[2] = array("Updater Settings", false, "system_firmware_settings.php");
+ $tab_array[0] = array(gettext("Manual Update"), true, "system_firmware.php");
+ $tab_array[1] = array(gettext("Auto Update"), false, "system_firmware_check.php");
+ $tab_array[2] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -241,42 +241,42 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" class="listtopic">Invoke <?=$g['product_name']?> Manual Upgrade</td>
+ <td colspan="2" class="listtopic"><?=gettext("Invoke") ." ". $g['product_name'] ." ". gettext("Manual Upgrade"); ?></td>
</tr>
<tr>
<td width="22%" valign="baseline" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
<p>
- Click &quot;Enable firmware
- upload&quot; below, then choose the image file (<?=$g['firmware_update_text'];?>)
- to be uploaded.
+ <?php printf(gettext('Click "Enable firmware '.
+ 'upload" below, then choose the image file (%s) '.
+ 'to be uploaded.'),$g['firmware_update_text']);?>
<br>
- Click &quot;Upgrade firmware&quot; to start the upgrade process.
+ <?=gettext('Click "Upgrade firmware" to start the upgrade process.');?>
</p>
<?php if (!is_subsystem_dirty('rebootreq')): ?>
<?php if (!is_subsystem_dirty('firmware')): ?>
- <input name="Submit" type="submit" class="formbtn" value="Enable firmware upload">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Enable firmware upload");?>">
<?php else: ?>
- <input name="Submit" type="submit" class="formbtn" value="Disable firmware upload">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Disable firmware upload");?>">
<br><br>
- <strong>Firmware image file: </strong>&nbsp;
+ <strong><?=gettext("Firmware image file");?>: </strong>&nbsp;
<input name="ulfile" type="file" class="formfld">
<br><br>
<?php if ($g['platform'] == "nanobsd"): ?>
- <b>NOTE: You must upload a .img.gz image, not an uncompressed image!</b>
+ <b><?=gettext("NOTE: You must upload a .img.gz image, not an uncompressed image!");?></b>
<?php else: ?>
- <b>NOTE: You must upload a .tgz image, not an uncompressed image!</b>
+ <b><?=gettext("NOTE: You must upload a .tgz image, not an uncompressed image!");?></b>
<?php endif; ?>
<br><br>
<?php
if(!file_exists("/boot/kernel/pfsense_kernel.txt")) {
if($g['platform'] == "pfSense") {
- echo "Please select kernel type: ";
+ echo gettext("Please select kernel type") , ": ";
echo "<select name='kerneltype'>";
- echo "<option value='SMP'>Multiprocessor kernel</option>";
- echo "<option value='single'>Uniprocessor kernel</option>";
- echo "<option value='wrap'>Embedded kernel</option>";
- echo "<option value='Developers'>Developers kernel</option>";
+ echo "<option value='SMP'>" . gettext("Multiprocessor kernel") . "</option>";
+ echo "<option value='single'>". gettext("Uniprocessor kernel") . "</option>";
+ echo "<option value='wrap'>" . gettext("Embedded kernel") . "</option>";
+ echo "<option value='Developers'>" . gettext("Developers kernel") . "</option>";
echo "</select>";
echo "<br><br>";
}
@@ -287,19 +287,19 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
<input name="Submit" type="submit" class="formbtn" value="Upgrade firmware" onClick="window.open('upload_progress.php?upload_id=<?=$upload_id?>','UploadMeter','width=370,height=115', true); return true;">
*/
?>
- <input name="Submit" type="submit" class="formbtn" value="Upgrade firmware">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Upgrade firmware");?>">
<?php endif; else: ?>
- <strong>You must reboot the system before you can upgrade the firmware.</strong>
+ <strong><?=gettext("You must reboot the system before you can upgrade the firmware.");?></strong>
<?php endif; ?>
</td>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Warning:<br>
- </strong></span>DO NOT abort the firmware upgrade once it
- has started. The firewall will reboot automatically after
- storing the new firmware. The configuration will be maintained.</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Warning");?>:<br>
+ </strong></span><?=gettext("DO NOT abort the firmware upgrade once it " .
+ "has started. The firewall will reboot automatically after " .
+ "storing the new firmware. The configuration will be maintained.");?></span></td>
</table>
</div>
</tr>
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index 6a9a609..57e1bf6 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -51,7 +51,7 @@ if(isset($curcfg['alturl']['enable']))
else
$updater_url = $g['update_url'];
-$pgtitle = array("Diagnostics","Firmware","Auto Update");
+$pgtitle = array(gettext("Diagnostics"),gettext("Firmware"),gettext("Auto Update"));
include("head.inc");
?>
@@ -70,9 +70,9 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Manual Update", false, "system_firmware.php");
- $tab_array[1] = array("Auto Update", true, "system_firmware_check.php");
- $tab_array[2] = array("Updater Settings", false, "system_firmware_settings.php");
+ $tab_array[0] = array(gettext("Manual Update"), false, "system_firmware.php");
+ $tab_array[1] = array(gettext("Auto Update"), true, "system_firmware_check.php");
+ $tab_array[2] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -104,7 +104,7 @@ include("head.inc");
</table>
<br>
<!-- status box -->
- <textarea cols="60" rows="1" name="status" id="status" wrap="hard">Beginning firmware upgrade.</textarea>
+ <textarea cols="60" rows="1" name="status" id="status" wrap="hard"><?=gettext("Beginning firmware upgrade"); ?>.</textarea>
<!-- command output box -->
<textarea cols="60" rows="25" name="output" id="output" wrap="hard"></textarea>
</center>
@@ -122,11 +122,11 @@ include("head.inc");
<?php
-update_status("Downloading current version information...");
+update_status(gettext("Downloading current version information") . "...");
download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
$latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version"));
if(!$latest_version) {
- update_output_window("Unable to check for updates.");
+ update_output_window(gettext("Unable to check for updates."));
require("fend.inc");
exit;
} else {
@@ -135,20 +135,20 @@ if(!$latest_version) {
$latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version"));
$latest_version_pfsense = strtotime($latest_version);
if(!$latest_version) {
- update_output_window("Unable to check for updates.");
+ update_output_window(gettext("Unable to check for updates."));
require("fend.inc");
exit;
} else {
$needs_system_upgrade = false;
if($current_installed_pfsense_version < $latest_version_pfsense) {
- update_status("Downloading updates ...");
+ update_status(gettext("Downloading updates") . "...");
conf_mount_rw();
$status = download_file_with_progress_bar("{$updater_url}/latest.tgz", "{$g['upload_path']}/latest.tgz", "read_body_firmware");
$status = download_file_with_progress_bar("{$updater_url}/latest.tgz.sha256", "{$g['upload_path']}/latest.tgz.sha256");
conf_mount_ro();
- update_output_window("{$g['product_name']} download complete.");
+ update_output_window("{$g['product_name']} " . gettext("download complete."));
} else {
- update_output_window("You are on the latest version.");
+ update_output_window(gettext("You are on the latest version."));
require("fend.inc");
exit;
}
@@ -176,28 +176,28 @@ if(!isset($curcfg['alturl']['enable']))
$exitstatus = 0;
if ($sigchk == 1) {
- $sig_warning = "The digital signature on this image is invalid.";
+ $sig_warning = gettext("The digital signature on this image is invalid.");
$exitstatus = 1;
} else if ($sigchk == 2) {
- $sig_warning = "This image is not digitally signed.";
+ $sig_warning = gettext("This image is not digitally signed.");
if (!isset($config['system']['firmware']['allowinvalidsig']))
$exitstatus = 1;
} else if (($sigchk >= 3)) {
- $sig_warning = "There has been an error verifying the signature on this image.";
+ $sig_warning = gettext("There has been an error verifying the signature on this image.");
$exitstatus = 1;
}
if ($exitstatus) {
update_status($sig_warning);
- update_output_window("Update cannot continue");
+ update_output_window(gettext("Update cannot continue"));
require("fend.inc");
exit;
} else if ($sigchk == 2)
- update_output_window("\nrImage has no signature but the system configured to allow unsigned images.\n");
+ update_output_window("\n" . gettext("Image has no signature but the system configured to allow unsigned images.") . "\n");
if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) {
- update_status("The image file is corrupt.");
- update_output_window("Update cannot continue");
+ update_status(gettext("The image file is corrupt."));
+ update_output_window(gettext("Update cannot continue"));
if (file_exists("{$g['upload_path']}/latest.tgz")) {
conf_mount_rw();
unlink("{$g['upload_path']}/latest.tgz");
@@ -208,10 +208,10 @@ if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) {
}
if($downloaded_latest_tgz_sha256 <> $upgrade_latest_tgz_sha256) {
- update_status("Downloading complete but sha256 does not match.");
- update_output_window("Auto upgrade aborted. \n\nDownloaded SHA256: $downloaded_latest_tgz_sha256 \n\nNeeded SHA256: $upgrade_latest_tgz_sha256");
+ update_status(gettext("Downloading complete but sha256 does not match."));
+ update_output_window(gettext("Auto upgrade aborted.") . " \n\n" . gettext("Downloaded SHA256") . ": " . $downloaded_latest_tgz_sha256 . "\n\n" . gettext("Needed SHA256") . ": " . $upgrade_latest_tgz_sha256);
} else {
- update_output_window("{$g['product_name']} is now upgrading.\\n\\nThe firewall will reboot once the operation is completed.");
+ update_output_window($g['product_name'] . " " . gettext("is now upgrading.") . "\\n\\n" . gettext("The firewall will reboot once the operation is completed."));
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';\n</script>";
mwexec_bg("/usr/bin/nohup {$external_upgrade_helper_text}");
}
@@ -229,13 +229,13 @@ function read_body_firmware($ch, $string) {
$a = $file_size;
$b = $downloaded;
$c = $downloadProgress;
- $text = " Auto Update Download Status\\n";
+ $text = " " . gettext("Auto Update Download Status") . "\\n";
$text .= "----------------------------------------------------\\n";
- $text .= " Current Version : {$current_installed_pfsense_version}\\n";
- $text .= " Latest Version : {$latest_version}\\n";
- $text .= " File size : {$a}\\n";
- $text .= " Downloaded : {$b}\\n";
- $text .= " Percent : {$c}%\\n";
+ $text .= " " . gettext("Current Version") . " : {$current_installed_pfsense_version}\\n";
+ $text .= " " . gettext("Latest Version") . " : {$latest_version}\\n";
+ $text .= " " . gettext("File size") . " : {$a}\\n";
+ $text .= " " . gettext("Downloaded") . " : {$b}\\n";
+ $text .= " " . gettext("Percent") . " : {$c}%\\n";
$text .= "----------------------------------------------------\\n";
$counter++;
if($counter > 150) {
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php
index 8d342ae..9eabe26 100755
--- a/usr/local/www/system_firmware_check.php
+++ b/usr/local/www/system_firmware_check.php
@@ -46,7 +46,7 @@ require("guiconfig.inc");
require_once("pfsense-utils.inc");
$curcfg = $config['system']['firmware'];
-$pgtitle=array("System", "Firmware", "Auto Update");
+$pgtitle=array(gettext("System"), gettext("Firmware"), gettext("Auto Update"));
include("head.inc");
?>
@@ -65,9 +65,9 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Manual Update", false, "system_firmware.php");
- $tab_array[1] = array("Auto Update", true, "system_firmware_check.php");
- $tab_array[2] = array("Updater Settings", false, "system_firmware_settings.php");
+ $tab_array[0] = array(gettext("Manual Update"), false, "system_firmware.php");
+ $tab_array[1] = array(gettext("Auto Update"), true, "system_firmware_check.php");
+ $tab_array[2] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -101,7 +101,7 @@ include("head.inc");
</textarea>
</center>
<p>
- <center><input id='invokeupgrade' style='visibility:hidden' type="submit" value="Invoke Auto Upgrade">
+ <center><input id='invokeupgrade' style='visibility:hidden' type="submit" value="<?=gettext("Invoke Auto Upgrade"); ?>">
</td>
</tr>
</table>
@@ -119,18 +119,18 @@ if(isset($curcfg['alturl']['enable']))
else
$updater_url = $g['update_url'];
$needs_system_upgrade = false;
-$static_text .= "Downloading new version information...";
+$static_text .= gettext("Downloading new version information...");
download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
$remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
-$static_text .= "done.\\n";
+$static_text .= gettext("done") . "\\n";
if (!$remote_version) {
- $static_text .= "Unable to check for updates.\\n";
+ $static_text .= gettext("Unable to check for updates.") . "\\n";
if(isset($curcfg['alturl']['enable']))
- $static_text .= "Could not contact custom update server.\\n";
+ $static_text .= gettext("Could not contact custom update server.") . "\\n";
else
- $static_text .= "Could not contact {$g['product_name']} update server {$updater_url}.\\n";
+ $static_text .= sprintf(gettext("Could not contact %s update server %s%s"), $g['product_name'], $updater_url, "\\n");
} else {
- $static_text .= "Obtaining current version information...";
+ $static_text .= gettext("Obtaining current version information...");
update_output_window($static_text);
$current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));
@@ -142,7 +142,7 @@ if (!$remote_version) {
if (pfs_version_compare($current_installed_buildtime, $current_installed_version, $remote_version) == -1) {
$needs_system_upgrade = true;
} else {
- $static_text .= "\\nYou are on the latest version.\\n";
+ $static_text .= "\\n" . gettext("You are on the latest version.") . "\\n";
}
}
@@ -153,11 +153,11 @@ if ($needs_system_upgrade == false) {
}
echo "\n<script>$('invokeupgrade').style.visibility = 'visible';</script>";
-$txt = "A new version is now available \\n\\n";
-$txt .= "Current version: {$current_installed_version}\\n";
-$txt .= " Built On: {$current_installed_buildtime}\\n";
-$txt .= " New version: {$remote_version}\\n\\n";
-$txt .= " Update source: {$updater_url}\\n";
+$txt = gettext("A new version is now available") . "\\n\\n";
+$txt .= gettext("Current version") .": ". $current_installed_version . "\\n";
+$txt .= " " . gettext("Built On") .": ". $current_installed_buildtime . "\\n";
+$txt .= " " . gettext("New version") .": ". $remote_version . "\\n\\n";
+$txt .= " " . gettext("Update source") .": ". $updater_url . "\\n";
update_output_window($txt);
?>
</form>
diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php
index 8fa06ec..12cf3f8 100755
--- a/usr/local/www/system_firmware_settings.php
+++ b/usr/local/www/system_firmware_settings.php
@@ -63,7 +63,7 @@ if ($_POST) {
$curcfg = $config['system']['firmware'];
-$pgtitle = array("System","Firmware","Settings");
+$pgtitle = array(gettext("System"),gettext("Firmware"),gettext("Settings"));
include("head.inc");
exec("/usr/bin/fetch -q -o /tmp/manifest \"{$g['update_manifest']}\"");
@@ -99,9 +99,9 @@ function enable_altfirmwareurl(enable_over) {
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Manual Update", false, "system_firmware.php");
- $tab_array[1] = array("Auto Update", false, "system_firmware_check.php");
- $tab_array[2] = array("Updater Settings", true, "system_firmware_settings.php");
+ $tab_array[0] = array(gettext("Manual Update"), false, "system_firmware.php");
+ $tab_array[1] = array(gettext("Auto Update"), false, "system_firmware_check.php");
+ $tab_array[2] = array(gettext("Updater Settings"), true, "system_firmware_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -109,11 +109,11 @@ function enable_altfirmwareurl(enable_over) {
<tr><td><div id=mainarea>
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Firmware Branch</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Firmware Branch"); ?></td>
</tr>
<?php if(is_array($preset_urls_split)): ?>
<tr>
- <td valign="top" class="vncell">Default Auto Update URLs</td>
+ <td valign="top" class="vncell"><?=gettext("Default Auto Update URLs"); ?></td>
<td class="vtable">
<select name='preseturls' id='preseturls' onChange="firmwareurl.value = preseturls.value; document.iform.firmwareurl.disabled = 0; alturlenable.checked=true; new Effect.Highlight(this.parentNode, { startcolor: '#ffff99', endcolor: '#fffffff' });">
<option></option>
@@ -129,16 +129,16 @@ function enable_altfirmwareurl(enable_over) {
</tr>
<?php endif; ?>
<tr>
- <td valign="top" class="vncell">Firmware Auto Update URL</td>
+ <td valign="top" class="vncell"><?=gettext("Firmware Auto Update URL"); ?></td>
<td class="vtable">
- <input name="alturlenable" type="checkbox" id="alturlenable" value="yes" onClick="enable_altfirmwareurl()" <?php if(isset($curcfg['alturl']['enable'])) echo "checked"; ?>> Use a different URL server for firmware upgrades other than <?php echo $g['product_website']; ?><br>
+ <input name="alturlenable" type="checkbox" id="alturlenable" value="yes" onClick="enable_altfirmwareurl()" <?php if(isset($curcfg['alturl']['enable'])) echo "checked"; ?>> <?=gettext("Use a different URL server for firmware upgrades other than") . $g['product_website']; ?><br>
<table>
- <tr><td>Base URL:</td><td><input name="firmwareurl" type="input" class="formfld url" id="firmwareurl" size="64" value="<?php if($curcfg['alturl']['firmwareurl']) echo $curcfg['alturl']['firmwareurl']; else echo $g['']; ?>"></td></tr>
+ <tr><td><?=gettext("Base URL"); ?>:</td><td><input name="firmwareurl" type="input" class="formfld url" id="firmwareurl" size="64" value="<?php if($curcfg['alturl']['firmwareurl']) echo $curcfg['alturl']['firmwareurl']; else echo $g['']; ?>"></td></tr>
</table>
<span class="vexpl">
- This is where <?php echo $g['product_name'] ?> will check for newer firmware versions when the <a href="system_firmware_check.php">System: Firmware: Auto Update</a> page is viewed.
+ <?=gettext("This is where"); ?> <?php echo $g['product_name'] ?> <?=gettext("will check for newer firmware versions when the"); ?> <a href="system_firmware_check.php"><?=gettext("System: Firmware: Auto Update"); ?></a> <?=gettext("page is viewed."); ?>
<p/>
- <b>NOTE:</b> When a custom URL is enabled the system will not verify the digital signature from <?php echo $g['product_website'] ?>.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("When a custom URL is enabled the system will not verify the digital signature from"); ?> <?php echo $g['product_website'] ?>.
</span>
</td>
</tr>
@@ -146,21 +146,21 @@ function enable_altfirmwareurl(enable_over) {
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Updates</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Updates"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Not signed images.</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Not signed images."); ?></td>
<td width="78%" class="vtable">
<input name="allowinvalidsig" type="checkbox" id="allowinvalidsig" value="yes" <?php if (isset($curcfg['allowinvalidsig'])) echo "checked"; ?> />
<br />
- Allow to update the system with auto-updater and images with no signature.
+ <?=gettext("Allow to update the system with auto-updater and images with no signature."); ?>
</td>
</tr>
<script>enable_altfirmwareurl();</script>
<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></div></td></tr></table>
diff --git a/usr/local/www/system_gateway_groups.php b/usr/local/www/system_gateway_groups.php
index a7c5e2b..1c4a95e 100755
--- a/usr/local/www/system_gateway_groups.php
+++ b/usr/local/www/system_gateway_groups.php
@@ -49,7 +49,7 @@ if (!is_array($config['gateways']['gateway_group']))
$a_gateway_groups = &$config['gateways']['gateway_group'];
$a_gateways = &$config['gateways']['gateway_item'];
-$changedesc = "Gateway Groups: ";
+$changedesc = gettext("Gateway Groups") . ": ";
if ($_POST) {
@@ -72,7 +72,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_gateway_groups[$_GET['id']]) {
- $changedesc .= "removed gateway group {$_GET['id']}";
+ $changedesc .= gettext("removed gateway group") . " {$_GET['id']}";
foreach ($config['filter']['rule'] as $idx => $rule) {
if ($rule['gateway'] == $a_gateway_groups[$_GET['id']]['name'])
unset($config['filter']['rule'][$idx]['gateway']);
@@ -85,7 +85,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("System","Gateway Groups");
+$pgtitle = array(gettext("System"),gettext("Gateway Groups"));
include("head.inc");
?>
@@ -96,18 +96,17 @@ include("head.inc");
<input type="hidden" name="y1" value="1">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('staticroutes')): ?><p>
-<?php print_info_box_np("The gateway configuration has been changed.<br>You must apply the changes in order for them to take
-effect.");?><br>
+<?php print_info_box_np(sprintf(gettext("The gateway configuration has been changed.%sYou must apply the changes in order for them to take effect."), "<br>"));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Gateways", false, "system_gateways.php");
- $tab_array[1] = array("Routes", false, "system_routes.php");
- $tab_array[2] = array("Groups", true, "system_gateway_groups.php");
- $tab_array[3] = array("Settings", false, "system_gateways_settings.php");
+ $tab_array[0] = array(gettext("Gateways"), false, "system_gateways.php");
+ $tab_array[1] = array(gettext("Routes"), false, "system_routes.php");
+ $tab_array[2] = array(gettext("Groups"), true, "system_gateway_groups.php");
+ $tab_array[3] = array(gettext("Settings"), false, "system_gateways_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -116,10 +115,10 @@ effect.");?><br>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Group Name</td>
- <td width="15%" class="listhdrr">Gateways</td>
- <td width="20%" class="listhdrr">Priority</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Group Name");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Gateways");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Priority");?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -160,7 +159,7 @@ effect.");?><br>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td><a href="system_gateway_groups_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- <td><a href="system_gateway_groups.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this gateway group?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td><a href="system_gateway_groups.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this gateway group?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td width="17"></td>
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 5e5ee11..533abd5 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -47,10 +47,10 @@ if (!is_array($config['gateways']['gateway_group']))
$a_gateway_groups = &$config['gateways']['gateway_group'];
$a_gateways = return_gateways_array();
-$categories = array('down' => 'Member Down',
- 'downloss' => 'Packet Loss',
- 'downlatency' => 'High Latency',
- 'downlosslatency' => 'Packet Loss or High Latency');
+$categories = array('down' => gettext("Member Down"),
+ 'downloss' => gettext("Packet Loss"),
+ 'downlatency' => gettext("High Latency"),
+ 'downlosslatency' => gettext("Packet Loss or High Latency"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -82,10 +82,10 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (! isset($_POST['name'])) {
- $input_errors[] = "A valid gateway group name must be specified.";
+ $input_errors[] = gettext("A valid gateway group name must be specified.");
}
if (! is_validaliasname($_POST['name'])) {
- $input_errors[] = "The gateway name must not contain invalid characters.";
+ $input_errors[] = gettext("The gateway name must not contain invalid characters.");
}
if (isset($_POST['name'])) {
@@ -96,7 +96,7 @@ if ($_POST) {
continue;
if ($gateway_group['name'] == $_POST['name']) {
- $input_errors[] = "A gateway group with this name \"{$_POST['name']}\" already exists.";
+ $input_errors[] = sprintf(gettext('A gateway group with this name "%s" already exists.'), $_POST['name']);
break;
}
}
@@ -113,7 +113,7 @@ if ($_POST) {
}
if(count($pconfig['item']) == 0) {
- $input_errors[] = "No gateway(s) have been selected to be used in this group";
+ $input_errors[] = gettext("No gateway(s) have been selected to be used in this group");
}
if (!$input_errors) {
@@ -137,7 +137,7 @@ if ($_POST) {
}
}
-$pgtitle = array("System","Gateways","Edit gateway");
+$pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway"));
include("head.inc");
?>
@@ -148,16 +148,16 @@ include("head.inc");
<form action="system_gateway_groups_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 gateway entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit gateway entry"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Group Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Group Name"); ?></td>
<td width="78%" class="vtable">
<input name="name" type="text" class="formfld unknown" id="name" size="20" value="<?=htmlspecialchars($pconfig['name']);?>">
- <br> <span class="vexpl">Group Name</span></td>
+ <br> <span class="vexpl"><?=gettext("Group Name"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Gateway Priority</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway Priority"); ?></td>
<td width="78%" class="vtable">
<?php
foreach($a_gateways as $gwname => $gateway) {
@@ -172,28 +172,29 @@ include("head.inc");
$selected[0] = "selected";
}
}
+<<<<<<< HEAD
echo "<select name='{$gwname}' class='formfldselect' id='{$gwname}'>";
- echo "<option value='0' $selected[0] >Never</option>";
- echo "<option value='1' $selected[1] >Tier 1</option>";
- echo "<option value='2' $selected[2] >Tier 2</option>";
- echo "<option value='3' $selected[3] >Tier 3</option>";
- echo "<option value='4' $selected[4] >Tier 4</option>";
- echo "<option value='5' $selected[5] >Tier 5</option>";
+ echo "<option value='0' $selected[0] >" . gettext("Never") . "</option>";
+ echo "<option value='1' $selected[1] >" . gettext("Tier 1") . "</option>";
+ echo "<option value='2' $selected[2] >" . gettext("Tier 2") . "</option>";
+ echo "<option value='3' $selected[3] >" . gettext("Tier 3") . "</option>";
+ echo "<option value='4' $selected[4] >" . gettext("Tier 4") . "</option>";
+ echo "<option value='5' $selected[5] >" . gettext("Tier 5") . "</option>";
echo "</select> <strong>{$gateway['name']} - {$gateway['descr']}</strong><br />";
}
?>
<br/><span class="vexpl">
- <strong>Link Priority</strong> <br />
- The priority selected here defines in what order failover and balancing of links will be done.
- Multiple links of the same priority will balance connections until all links in the priority will be exhausted.
- If all links in a priority level are exhausted we will use the next available link(s) in the next priority level.
+ <strong><?=gettext("Link Priority"); ?></strong> <br />
+ <?=gettext("The priority selected here defines in what order failover and balancing of links will be done. " .
+ "Multiple links of the same priority will balance connections until all links in the priority will be exhausted. " .
+ "If all links in a priority level are exhausted we will use the next available link(s) in the next priority level.") ?>
</span><br />
</td>
</tr>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Trigger Level</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Trigger Level"); ?></td>
<td width="78%" class="vtable">
<select name='trigger' class='formfldselect' id='trigger'>
<?php
@@ -204,20 +205,19 @@ include("head.inc");
}
?>
</select>
- <br> <span class="vexpl">When to trigger exclusion of a member</span></td>
+ <br> <span class="vexpl"><?=gettext("When to trigger exclusion of a member"); ?></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 name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel"); ?>" class="formbtn" onclick="history.back()">
<a href="system_gateway_groups.php"><input type="button" value="Cancel" class="formbtn" ></a>
<?php if (isset($id) && $a_gateway_groups[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php
index c324569..f064023 100755
--- a/usr/local/www/system_gateways.php
+++ b/usr/local/www/system_gateways.php
@@ -117,7 +117,7 @@ if ($_GET['act'] == "del") {
}
-$pgtitle = array("System","Gateways");
+$pgtitle = array(gettext("System"),gettext("Gateways"));
include("head.inc");
?>
@@ -129,18 +129,17 @@ include("head.inc");
<input type="hidden" name="y1" value="1">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('staticroutes')): ?><p>
-<?php print_info_box_np("The gateway 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 gateway 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>
<?php
$tab_array = array();
- $tab_array[0] = array("Gateways", true, "system_gateways.php");
- $tab_array[1] = array("Routes", false, "system_routes.php");
- $tab_array[2] = array("Groups", false, "system_gateway_groups.php");
- $tab_array[3] = array("Settings", false, "system_gateways_settings.php");
+ $tab_array[0] = array(gettext("Gateways"), true, "system_gateways.php");
+ $tab_array[1] = array(gettext("Routes"), false, "system_routes.php");
+ $tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php");
+ $tab_array[3] = array(gettext("Settings"), false, "system_gateways_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -149,11 +148,11 @@ effect.");?><br>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Name</td>
- <td width="15%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Gateway</td>
- <td width="20%" class="listhdrr">Monitor IP</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Gateway"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Monitor IP"); ?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -215,8 +214,11 @@ effect.");?><br>
<td><a href="system_gateways_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
<?php
if ($gateway['attribute'] != "system") : ?>
- <td><a href="system_gateways.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this
-gateway?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td>
+ <a href="system_gateways.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this gateway?"); ?>')">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
+ </a>
+ </td>
<?php else : ?>
<td width='17'></td>
<?php endif; ?>
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index aab9204..6f6211a 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -91,7 +91,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name");
- $reqdfieldsn = explode(",", "Name");
+ $reqdfieldsn = array(gettext("Name"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -99,11 +99,11 @@ if ($_POST) {
$input_errors[] = "A valid gateway name must be specified.";
}
if (! is_validaliasname($_POST['name'])) {
- $input_errors[] = "The gateway name must not contain invalid characters.";
+ $input_errors[] = gettext("The gateway name must not contain invalid characters.");
}
/* skip system gateways which have been automatically added */
if (($_POST['gateway'] && (!is_ipaddr($_POST['gateway'])) && ($_POST['attribute'] != "system")) && ($_POST['gateway'] != "dynamic")) {
- $input_errors[] = "A valid gateway IP address must be specified.";
+ $input_errors[] = gettext("A valid gateway IP address must be specified.");
}
if ($_POST['gateway'] && (is_ipaddr($_POST['gateway'])) && ($pconfig['attribute'] != "system") && !$_REQUEST['isAjax']) {
@@ -111,12 +111,12 @@ if ($_POST) {
if (is_ipaddr($parent_ip)) {
$parent_sn = get_interface_subnet($_POST['interface']);
if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) {
- $input_errors[] = "The gateway address {$_POST['gateway']} does not lie within the chosen interface's subnet.";
+ $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']);
}
}
}
if (($_POST['monitor'] <> "") && !is_ipaddr($_POST['monitor']) && $_POST['monitor'] != "dynamic") {
- $input_errors[] = "A valid monitor IP address must be specified.";
+ $input_errors[] = gettext("A valid monitor IP address must be specified.");
}
if (isset($_POST['name'])) {
@@ -127,19 +127,19 @@ if ($_POST) {
}
if($_POST['name'] <> "") {
if (($gateway['name'] <> "") && ($_POST['name'] == $gateway['name']) && ($gateway['attribute'] != "system")) {
- $input_errors[] = "The gateway name \"{$_POST['name']}\" already exists.";
+ $input_errors[] = sprintf(gettext('The gateway name "%s" already exists.'), $_POST['name']);
break;
}
}
if(is_ipaddr($_POST['gateway'])) {
if (($gateway['gateway'] <> "") && ($_POST['gateway'] == $gateway['gateway']) && ($gateway['attribute'] != "system")) {
- $input_errors[] = "The gateway IP address \"{$_POST['gateway']}\" already exists.";
+ $input_errors[] = sprintf(gettext('The gateway IP address "%s" already exists.'), $_POST['gateway']);
break;
}
}
if(is_ipaddr($_POST['monitor'])) {
if (($gateway['monitor'] <> "") && ($_POST['monitor'] == $gateway['monitor']) && ($gateway['attribute'] != "system")) {
- $input_errors[] = "The monitor IP address \"{$_POST['monitor']}\" is already in use. You must choose a different monitor IP.";
+ $input_errors[] = sprintf(gettext('The monitor IP address "%s" is already in use. You must choose a different monitor IP.'), $_POST['monitor']);
break;
}
}
@@ -222,7 +222,7 @@ if ($_POST) {
}
-$pgtitle = array("System","Gateways","Edit gateway");
+$pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway"));
include("head.inc");
?>
@@ -252,10 +252,10 @@ function enable_change(obj) {
?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit gateway</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit gateway"); ?></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 if ($pconfig['dynamic'] == true && $pconfig['attribute'] == "system") echo "disabled"; ?>>
<?php
@@ -270,34 +270,34 @@ function enable_change(obj) {
echo "<option value=\"bgpd\"";
if ($pconfig['interface'] == "bgpd")
echo " selected";
- echo ">Use BGPD</option>";
+ echo ">" . gettext("Use BGPD") . "</option>";
}
?>
</select> <br>
- <span class="vexpl">Choose which interface this gateway applies to.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this gateway applies to."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable">
<input name="name" type="text" class="formfld unknown" id="name" size="20" value="<?=htmlspecialchars($pconfig['name']);?>">
- <br> <span class="vexpl">Gateway name</span></td>
+ <br> <span class="vexpl"><?=gettext("Gateway name"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Gateway</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td>
<td width="78%" class="vtable">
<input name="gateway" type="text" class="formfld host" id="gateway" size="40" value="<?php echo $pconfig['gateway']; ?>" <?php if ($pconfig['dynamic'] == true && $pconfig['attribute'] == "system") echo "disabled"; ?>>
- <br> <span class="vexpl">Gateway IP address</span></td>
+ <br> <span class="vexpl"><?=gettext("Gateway IP address"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Default Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Default Gateway"); ?></td>
<td width="78%" class="vtable">
<input name="defaultgw" type="checkbox" id="defaultgw" value="yes" <?php if ($pconfig['defaultgw'] == true) echo "checked"; ?> onclick="enable_change(this)" />
- <strong>Default Gateway</strong><br />
- This will select the above gateway as the default gateway
+ <strong><?=gettext("Default Gateway"); ?></strong><br />
+ <?=gettext("This will select the above gateway as the default gateway"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Monitor IP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Monitor IP"); ?></td>
<td width="78%" class="vtable">
<?php
if(is_numeric($pconfig['attribute']) && ($pconfig['gateway'] == dynamic) && ($pconfig['monitor'] == "")) {
@@ -307,10 +307,10 @@ function enable_change(obj) {
}
?>
<input name="monitor" type="text" id="monitor" value="<?php echo $monitor; ?>" />
- <strong>Alternative monitor IP</strong> <br />
- Enter an alternative address here to be used to monitor the link. This is used for the
- quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond
- to ICMP echo requests (pings).</strong>
+ <strong><?=gettext("Alternative monitor IP"); ?></strong> <br />
+ <?gettext("Enter an alternative address here to be used to monitor the link. This is used for the " .
+ "quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond " .
+ "to ICMP echo requests (pings)"); ?>.</strong>
<br />
</td>
</tr>
@@ -331,16 +331,15 @@ function enable_change(obj) {
</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 type="button" value="Cancel" class="formbtn" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel");?>" class="formbtn" onclick="history.back()">
<?php if (isset($id) && $a_gateways[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/system_gateways_settings.php b/usr/local/www/system_gateways_settings.php
index 7983956..65640b0 100755
--- a/usr/local/www/system_gateways_settings.php
+++ b/usr/local/www/system_gateways_settings.php
@@ -45,7 +45,7 @@ if (!is_array($config['gateways']['settings']))
$a_settings = &$config['gateways']['settings'];
-$changedesc = "Gateways: ";
+$changedesc = gettext("Gateways") . ": ";
$input_errors = array();
if (empty($a_settings)) {
@@ -68,35 +68,35 @@ if ($_POST) {
/* input validation */
if($_POST['latencylow']) {
if (! is_numeric($_POST['latencylow'])) {
- $input_errors[] = "The low latency watermark needs to be a numeric value.";
+ $input_errors[] = gettext("The low latency watermark needs to be a numeric value.");
}
}
if($_POST['latencyhigh']) {
if (! is_numeric($_POST['latencyhigh'])) {
- $input_errors[] = "The high latency watermark needs to be a numeric value.";
+ $input_errors[] = gettext("The high latency watermark needs to be a numeric value.");
}
}
if($_POST['losslow']) {
if (! is_numeric($_POST['losslow'])) {
- $input_errors[] = "The low loss watermark needs to be a numeric value.";
+ $input_errors[] = gettext("The low loss watermark needs to be a numeric value.");
}
}
if($_POST['losshigh']) {
if (! is_numeric($_POST['losshigh'])) {
- $input_errors[] = "The high loss watermark needs to be a numeric value.";
+ $input_errors[] = gettext("The high loss watermark needs to be a numeric value.");
}
}
if(($_POST['latencylow']) && ($_POST['latencyhigh'])){
if(($_POST['latencylow'] > $_POST['latencyhigh'])) {
- $input_errors[] = "The High latency watermark needs to be higher then the low latency watermark";
+ $input_errors[] = gettext("The High latency watermark needs to be higher then the low latency watermark");
}
}
if(($_POST['losslow']) && ($_POST['losshigh'])){
if($_POST['losslow'] > $_POST['losshigh']) {
- $input_errors[] = "The High packet loss watermark needs to be higher then the low packet loss watermark";
+ $input_errors[] = gettext("The High packet loss watermark needs to be higher then the low packet loss watermark");
}
}
@@ -119,7 +119,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Gateways","Settings");
+$pgtitle = array(gettext("Gateways"),gettext("Settings"));
include("head.inc");
?>
@@ -133,10 +133,10 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Gateways", false, "system_gateways.php");
- $tab_array[1] = array("Routes", false, "system_routes.php");
- $tab_array[2] = array("Groups", false, "system_gateway_groups.php");
- $tab_array[3] = array("Settings", true, "system_gateways_settings.php");
+ $tab_array[0] = array(gettext("Gateways"), false, "system_gateways.php");
+ $tab_array[1] = array(gettext("Routes"), false, "system_routes.php");
+ $tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php");
+ $tab_array[3] = array(gettext("Settings"), true, "system_gateways_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -146,33 +146,33 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
- <td width="22%" valign="top" class="vncellreq">Latency thresholds</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Latency thresholds");?></td>
<td width="78%" class="vtable">
- From
+ <?=gettext("From");?>
<input name="latencylow" type="text" class="formfld unknown" id="latencylow" size="2"
value="<?=htmlspecialchars($pconfig['latencylow']);?>">
- To
+ <?=gettext("To");?>
<input name="latencyhigh" type="text" class="formfld unknown" id="latencyhigh" size="2"
value="<?=htmlspecialchars($pconfig['latencyhigh']);?>">
- <br> <span class="vexpl">These define the low and high water marks for latency in milliseconds.</span></td>
+ <br> <span class="vexpl"><?=gettext("These define the low and high water marks for latency in milliseconds.");?></span></td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Packet Loss thresholds</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Packet Loss thresholds");?></td>
<td width="78%" class="vtable">
- From
+ <?=gettext("From");?>
<input name="losslow" type="text" class="formfld unknown" id="losslow" size="2"
value="<?=htmlspecialchars($pconfig['losslow']);?>">
- To
+ <?=gettext("To");?>
<input name="losshigh" type="text" class="formfld unknown" id="losshigh" size="2"
value="<?=htmlspecialchars($pconfig['losshigh']);?>">
- <br> <span class="vexpl">These define the low and high water marks for packet loss in %.</span></td>
+ <br> <span class="vexpl"><?=gettext("These define the low and high water marks for packet loss in %.");?></span></td>
</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>
</table>
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php
index 74ead6d..579a735 100644
--- a/usr/local/www/system_groupmanager.php
+++ b/usr/local/www/system_groupmanager.php
@@ -46,7 +46,7 @@
require("guiconfig.inc");
-$pgtitle = array("System", "Group manager");
+$pgtitle = array(gettext("System"), gettext("Group manager"));
if (!is_array($config['system']['group']))
$config['system']['group'] = array();
@@ -112,18 +112,18 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "groupname");
- $reqdfieldsn = explode(",", "Group Name");
+ $reqdfieldsn = array(gettext("Group Name"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (preg_match("/[^a-zA-Z0-9\.\-_ ]/", $_POST['groupname']))
- $input_errors[] = "The group name contains invalid characters.";
+ $input_errors[] = gettext("The group name contains invalid characters.");
if (!$input_errors && !(isset($id) && $a_group[$id])) {
/* make sure there are no dupes */
foreach ($a_group as $group) {
if ($group['name'] == $_POST['groupname']) {
- $input_errors[] = "Another entry with the same group name already exists.";
+ $input_errors[] = gettext("Another entry with the same group name already exists.");
break;
}
}
@@ -252,17 +252,17 @@ function presubmit() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Group name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Group name");?></td>
<td width="78%" class="vtable">
<input name="groupname" type="text" class="formfld group" id="groupname" size="20" value="<?=htmlspecialchars($pconfig['name']);?>" <?=$ro;?>>
</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" id="description" size="20" value="<?=htmlspecialchars($pconfig['description']);?>">
<br>
- Group description, for your own information only
+ <?=gettext("Group description, for your own information only");?>
</td>
</tr>
@@ -274,7 +274,7 @@ function presubmit() {
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" width="50%">
- <strong>Not Members</strong><br/>
+ <strong><?=gettext("Not Members");?></strong><br/>
<br/>
<select size="10" style="width: 75%" name="notmembers[]" class="formselect" id="notmembers" onChange="clear_selected('members')" multiple>
<?php
@@ -292,15 +292,15 @@ function presubmit() {
<td>
<br/>
<a href="javascript:move_selected('notmembers','members')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_right.gif" title="Add Members" alt="Add Members" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_right.gif" title="<?=gettext("Add Members");?>" alt="<?=gettext("Add Members");?>" width="17" height="17" border="0" />
</a>
<br/><br/>
<a href="javascript:move_selected('members','notmembers')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_left.gif" title="Remove Members" alt="Remove Members" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_left.gif" title="<?=gettext("Remove Members");?>" alt="<?=gettext("Remove Members");?>" width="17" height="17" border="0" />
</a>
</td>
<td align="center" width="50%">
- <strong>Members</strong><br/>
+ <strong><?=gettext("Members");?></strong><br/>
<br/>
<select size="10" style="width: 75%" name="members[]" class="formselect" id="members" onChange="clear_selected('notmembers')" multiple>
<?php
@@ -373,7 +373,7 @@ function presubmit() {
<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");?>">
<?php if (isset($id) && $a_group[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<input name="gid" type="hidden" value="<?=$pconfig['gid'];?>">
@@ -387,9 +387,9 @@ function presubmit() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Group name</td>
- <td width="25%" class="listhdrr">Description</td>
- <td width="30%" class="listhdrr">Member Count</td>
+ <td width="25%" class="listhdrr"><?=gettext("Group name");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Description");?></td>
+ <td width="30%" class="listhdrr"><?=gettext("Member Count");?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -406,7 +406,7 @@ function presubmit() {
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="center">
- <img src="<?=$grpimg;?>" alt="User" title="User" border="0" height="16" width="16" />
+ <img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
</td>
</td>
<td align="left" valign="middle">
@@ -423,12 +423,12 @@ function presubmit() {
</td>
<td valign="middle" nowrap class="list">
<a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="edit group" width="17" height="17" border="0">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
</a>
&nbsp;
<?php if($group['scope'] != "system"): ?>
- <a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this group?')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="delete group" width="17" height="17" border="0">
+ <a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group"); ?>" width="17" height="17" border="0">
</a>
<?php endif; ?>
</td>
@@ -440,17 +440,17 @@ function presubmit() {
<tr>
<td class="list" colspan="3"></td>
<td class="list">
- <a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="add group" width="17" height="17" border="0">
+ <a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0">
</a>
</td>
</tr>
<tr>
<td colspan="3">
<p>
- <?=gettext("Additional webConfigurator groups can be added here.");?>
- <?=gettext("Group permissions can be assigned which are inherited by users who are members of the group.");?>
- <?=gettext("An icon that appears grey indicates that it is a system defined object.");?>
- <?=gettext("Some system object properties can be modified but they cannot be deleted.");?>
+ <?=gettext("Additional webConfigurator groups can be added here.
+ Group permissions can be assigned which are inherited by users who are members of the group.
+ An icon that appears grey indicates that it is a system defined object.
+ Some system object properties can be modified but they cannot be deleted.");?>
</p>
</td>
</tr>
diff --git a/usr/local/www/system_groupmanager_addprivs.php b/usr/local/www/system_groupmanager_addprivs.php
index 9bec9f0..63642b6 100644
--- a/usr/local/www/system_groupmanager_addprivs.php
+++ b/usr/local/www/system_groupmanager_addprivs.php
@@ -53,7 +53,7 @@ function admin_groups_sort() {
require("guiconfig.inc");
-$pgtitle = array("System","Group manager","Add privileges");
+$pgtitle = array(gettext("System"),gettext("Group manager"),gettext("Add privileges"));
$groupid = $_GET['groupid'];
if (isset($_POST['groupid']))
@@ -76,7 +76,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "sysprivs");
- $reqdfieldsn = explode(",", "Selected priveleges");
+ $reqdfieldsn = array(gettext("Selected priveleges"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -213,7 +213,7 @@ function update_description() {
<tr height="60">
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" valign="top" class="vtable" id="pdesc">
- <em>Select a privilege from the list above for a description</em>
+ <em><?=gettext("Select a privilege from the list above for a description");?></em>
</td>
</tr>
<tr>
diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php
index 8786577..f6c55e6 100755
--- a/usr/local/www/system_routes.php
+++ b/usr/local/www/system_routes.php
@@ -49,7 +49,7 @@ if (!is_array($config['staticroutes']['route']))
$a_routes = &$config['staticroutes']['route'];
$a_gateways = return_gateways_array(true);
-$changedesc = "Static Routes: ";
+$changedesc = gettext("Static Routes") . ": ";
if ($_POST) {
@@ -71,14 +71,14 @@ if ($_POST) {
if ($_POST['enablefastrouting'] == "") {
/* Only update config if something changed */
if (isset($config['staticroutes']['enablefastrouting'])) {
- $changedesc .= " disable fast routing";
+ $changedesc .= " " . gettext("disable fast routing");
unset($config['staticroutes']['enablefastrouting']);
write_config($changedesc);
}
} else {
/* Only update config if something changed */
if (!isset($config['staticroutes']['enablefastrouting'])) {
- $changedesc .= " enable fast routing";
+ $changedesc .= " " . gettext("enable fast routing");
$config['staticroutes']['enablefastrouting'] = "enabled";
write_config($changedesc);
}
@@ -88,7 +88,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_routes[$_GET['id']]) {
- $changedesc .= "removed route to " . $a_routes[$_GET['id']['route']];
+ $changedesc .= gettext("removed route to") . " " . $a_routes[$_GET['id']['route']];
mwexec("/sbin/route delete " . escapeshellarg($a_routes[$_GET['id']]['network']));
unset($a_routes[$_GET['id']]);
write_config($changedesc);
@@ -98,7 +98,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("System","Static Routes");
+$pgtitle = array(gettext("System"),gettext("Static Routes"));
include("head.inc");
?>
@@ -109,15 +109,15 @@ include("head.inc");
<input type="hidden" name="y1" value="1">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('staticroutes')): ?><p>
-<?php print_info_box_np("The static route configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(sprintf(gettext("The static route configuration has been changed.%sYou must apply the changes in order for them to take effect."), "<br>"));?><br>
<?php endif; ?>
<?php if($config['system']['disablefilter'] <> "") :?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td width="2%"><input type="checkbox" name="enablefastrouting" id="enablefastrouting" <?php if($config['staticroutes']['enablefastrouting'] == "enabled") echo " checked"; ?>></td><td><b>Enable fast routing</td></tr>
+ <tr><td width="2%"><input type="checkbox" name="enablefastrouting" id="enablefastrouting" <?php if($config['staticroutes']['enablefastrouting'] == "enabled") echo " checked"; ?>></td><td><b><?=gettext("Enable fast routing");?></td></tr>
- <tr><td colspan=2><hr><input type="submit" value="Save"></td></tr>
+ <tr><td colspan=2><hr><input type="submit" value="<?=gettext("Save"); ?>"></td></tr>
</table><br>
<?php endif; ?>
@@ -126,10 +126,10 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Gateways", false, "system_gateways.php");
- $tab_array[1] = array("Routes", true, "system_routes.php");
- $tab_array[2] = array("Groups", false, "system_gateway_groups.php");
- $tab_array[3] = array("Settings", false, "system_gateways_settings.php");
+ $tab_array[0] = array(gettext("Gateways"), false, "system_gateways.php");
+ $tab_array[1] = array(gettext("Routes"), true, "system_routes.php");
+ $tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php");
+ $tab_array[3] = array(gettext("Settings"), false, "system_gateways_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -138,10 +138,10 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Network</td>
- <td width="20%" class="listhdrr">Gateway</td>
- <td width="15%" class="listhdrr">Interface</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Network");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Gateway");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -173,7 +173,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td><a href="system_routes_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- <td><a href="system_routes.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this route?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td><a href="system_routes.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this route?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td width="17"></td>
@@ -200,7 +200,7 @@ include("head.inc");
</tr>
</table>
</form>
- <p><b>Note:</b> Do not enter static routes for networks assigned on any interface of this firewall. Static routes are only used for networks reachable via a different router, and not reachable via your default gateway.</p>
+ <p><b><?=gettext("Note");?>:</b> <?=gettext("Do not enter static routes for networks assigned on any interface of this firewall. Static routes are only used for networks reachable via a different router, and not reachable via your default gateway.");?></p>
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index a779009..313e7e1 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -86,19 +86,22 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "network network_subnet gateway");
- $reqdfieldsn = explode(",", "Destination network,Destination network bit count,Gateway");
+ $reqdfieldsn = explode(",",
+ gettext("Destination network") . "," .
+ gettext("Destination network bit count") . "," .
+ gettext("Gateway"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['network'] && !is_ipaddr($_POST['network']))) {
- $input_errors[] = "A valid destination network must be specified.";
+ $input_errors[] = gettext("A valid destination network must be specified.");
}
if (($_POST['network_subnet'] && !is_numeric($_POST['network_subnet']))) {
- $input_errors[] = "A valid destination network bit count must be specified.";
+ $input_errors[] = gettext("A valid destination network bit count must be specified.");
}
if ($_POST['gateway']) {
if (!isset($a_gateways[$_POST['gateway']]))
- $input_errors[] = "A valid gateway must be specified.";
+ $input_errors[] = gettext("A valid gateway must be specified.");
}
/* check for overlaps */
@@ -108,7 +111,7 @@ if ($_POST) {
continue;
if ($route['network'] == $osn) {
- $input_errors[] = "A route to this destination network already exists.";
+ $input_errors[] = gettext("A route to this destination network already exists.");
break;
}
}
@@ -134,7 +137,7 @@ if ($_POST) {
}
}
-$pgtitle = array("System","Static Routes","Edit route");
+$pgtitle = array(gettext("System"),gettext("Static Routes"),gettext("Edit route"));
include("head.inc");
?>
@@ -145,10 +148,10 @@ include("head.inc");
<form action="system_routes_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 route entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit route entry"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination network</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination network"); ?></td>
<td width="78%" class="vtable">
<input name="network" type="text" class="formfld unknown" id="network" size="20" value="<?=htmlspecialchars($pconfig['network']);?>">
/
@@ -159,10 +162,10 @@ include("head.inc");
</option>
<?php endfor; ?>
</select>
- <br> <span class="vexpl">Destination network for this static route</span></td>
+ <br> <span class="vexpl"><?=gettext("Destination network for this static route"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Gateway</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td>
<td width="78%" class="vtable">
<select name="gateway" id="gateway" class="formselect">
<?php
@@ -181,7 +184,7 @@ include("head.inc");
?>
</select> <br />
<div id='addgwbox'>
- Choose which gateway this route applies to or <a OnClick="show_add_gateway();" href="#">add a new one</a>.
+ <?=gettext("Choose which gateway this route applies to or"); ?> <a OnClick="show_add_gateway();" href="#"><?=gettext("add a new one");?></a>.
</div>
<div id='notebox'>
</div>
@@ -193,14 +196,14 @@ include("head.inc");
<table bgcolor="#990000" cellpadding="1" cellspacing="1">
<tr><td>&nbsp;</td>
<tr>
- <td colspan="2"><center><b><font color="white">Add new gateway:</b></center></td>
+ <td colspan="2"><center><b><font color="white"><?=gettext("Add new gateway"); ?>:</b></center></td>
</tr>
<tr><td>&nbsp;</td>
<tr>
- <td width="45%" align="right"><font color="white">Default gateway:</td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
+ <td width="45%" align="right"><font color="white"><?=gettext("Default gateway"); ?>:</td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
</tr>
<tr>
- <td width="45%" align="right"><font color="white">Interface:</td>
+ <td width="45%" align="right"><font color="white"><?=gettext("Interface"); ?>:</td>
<td><select name="addinterfacegw" id="addinterfacegw">
<?php $gwifs = get_configured_interface_with_descr();
foreach($gwifs as $fif => $dif)
@@ -209,13 +212,13 @@ include("head.inc");
</select></td>
</tr>
<tr>
- <td align="right"><font color="white">Gateway Name:</td><td><input id="name" name="name" value="GW"></td>
+ <td align="right"><font color="white"><?=gettext("Gateway Name"); ?>:</td><td><input id="name" name="name" value="GW"></td>
</tr>
<tr>
- <td align="right"><font color="white">Gateway IP:</td><td><input id="gatewayip" name="gatewayip"></td>
+ <td align="right"><font color="white"><?=gettext("Gateway IP"); ?>:</td><td><input id="gatewayip" name="gatewayip"></td>
</tr>
<tr>
- <td align="right"><font color="white">Description:</td><td><input id="gatewaydescr" name="gatewaydescr"></td>
+ <td align="right"><font color="white"><?=gettext("Description"); ?>:</td><td><input id="gatewaydescr" name="gatewaydescr"></td>
</tr>
<tr><td>&nbsp;</td>
<tr>
@@ -223,8 +226,8 @@ include("head.inc");
<center>
<div id='savebuttondiv'>
<input type="hidden" name="addrtype" id="addrtype" value="IPv4" />
- <input id="gwsave" type="Button" value="Save Gateway" onClick='hide_add_gatewaysave();'>
- <input id="gwcancel" type="Button" value="Cancel" onClick='hide_add_gateway();'>
+ <input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'>
+ <input id="gwcancel" type="Button" value="<?=gettext("Cancel"); ?>" onClick='hide_add_gateway();'>
</div>
</center>
</td>
@@ -236,16 +239,15 @@ include("head.inc");
</div>
</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 id="save" name="Submit" type="submit" class="formbtn" value="Save"> <input id="cancel" type="button" value="Cancel" class="formbtn" onclick="history.back()">
+ <input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input id="cancel" type="button" value="<?=gettext("Cancel"); ?>" class="formbtn" onclick="history.back()">
<?php if (isset($id) && $a_routes[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -277,7 +279,7 @@ include("head.inc");
}
function hide_add_gatewaysave() {
document.getElementById("addgateway").style.display = 'none';
- $('status').innerHTML = '<img src="/themes/metallic/images/misc/loader.gif"> One moment please...';
+ $('status').innerHTML = '<img src="/themes/metallic/images/misc/loader.gif"> <?=gettext("One moment please..."); ?>';
var iface = $('addinterfacegw').getValue();
name = $('name').getValue();
var descr = $('gatewaydescr').getValue();
@@ -302,10 +304,10 @@ include("head.inc");
optn.value = value;
selectbox.options.add(optn);
selectbox.selectedIndex = (selectbox.options.length-1);
- $('notebox').innerHTML="<p/><strong>NOTE:</strong> You can manage Gateways <a target='_new' href='system_gateways.php'>here</a>.";
+ $('notebox').innerHTML="<p/><strong>NOTE:</strong> <?=gettext("You can manage Gateways"); ?> <a target='_new' href='system_gateways.php'>here</a>.";
}
function report_failure() {
- alert("Sorry, we could not create your gateway at this time.");
+ alert("<?=gettext("Sorry, we could not create your gateway at this time"); ?>.");
hide_add_gateway();
}
function save_callback(transport) {
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index c98f1cb..1224f6a 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -52,7 +52,7 @@ require("guiconfig.inc");
if (isAllowedPage("system_usermanager")) {
// start admin user code
- $pgtitle = array("System","User Manager");
+ $pgtitle = array(gettext("System"),gettext("User Manager"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -180,15 +180,22 @@ if (isAllowedPage("system_usermanager")) {
/* input validation */
if (isset($id) && ($a_user[$id])) {
$reqdfields = explode(" ", "usernamefld");
- $reqdfieldsn = explode(",", "Username");
+ $reqdfieldsn = array(gettext("Username"));
} else {
if (empty($_POST['name'])) {
$reqdfields = explode(" ", "usernamefld passwordfld1");
- $reqdfieldsn = explode(",", "Username,Password");
+ $reqdfieldsn = array(
+ gettext("Username"),
+ gettext("Password"));
} else {
$reqdfields = explode(" ", "usernamefld passwordfld1 name caref keylen lifetime");
- $reqdfieldsn = explode(",", "Username,Password,Descriptive name,Certificate authority,Key length,Lifetime");
-
+ $reqdfieldsn = array(
+ gettext("Username"),
+ gettext("Password"),
+ gettext("Descriptive name"),
+ gettext("Certificate authority"),
+ gettext("Key length"),
+ gettext("Lifetime"));
}
}
@@ -228,14 +235,14 @@ if (isAllowedPage("system_usermanager")) {
$_POST['expires'] = date("m/d/Y",$expdate);
}
} else {
- $input_errors[] = "Invalid expiration date format; use MM/DD/YYYY instead.";
+ $input_errors[] = gettext("Invalid expiration date format; use MM/DD/YYYY instead.");
}
}
if (!empty($_POST['name'])) {
$ca = lookup_ca($_POST['caref']);
if (!$ca)
- $input_errors[] = "Invalid internal Certificate Authority\n";
+ $input_errors[] = gettext("Invalid internal Certificate Authority") . "\n";
}
/* if this is an AJAX caller then handle via JSON */
@@ -463,14 +470,14 @@ function sshkeyClicked(obj) {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Expiration date</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Expiration date"); ?></td>
<td width="78%" class="vtable">
<input name="expires" type="text" class="formfld unknown" id="expires" size="10" value="<?=$pconfig['expires'];?>">
<a href="javascript:NewCal('expires','mmddyyyy')">
- <img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_cal.gif" width="16" height="16" border="0" alt="Pick a date">
+ <img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_cal.gif" width="16" height="16" border="0" alt="<?=gettext("Pick a date");?>">
</a>
<br>
- <span class="vexpl">Leave blank if the account shouldn't expire, otherwise enter the expiration date in the following format: mm/dd/yyyy</span></td>
+ <span class="vexpl"><?=gettext("Leave blank if the account shouldn't expire, otherwise enter the expiration date in the following format: mm/dd/yyyy"); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Group Memberships");?></td>
@@ -478,7 +485,7 @@ function sshkeyClicked(obj) {
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" width="50%">
- <strong>Not Member Of</strong><br/>
+ <strong><?=gettext("Not Member Of"); ?></strong><br/>
<br/>
<select size="10" style="width: 75%" name="notgroups[]" class="formselect" id="notgroups" onChange="clear_selected('groups')" multiple>
<?php
@@ -498,15 +505,15 @@ function sshkeyClicked(obj) {
<td>
<br/>
<a href="javascript:move_selected('notgroups','groups')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_right.gif" title="Add Groups" alt="Add Groups" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_right.gif" title="<?=gettext("Add Groups"); ?>" alt="<?=gettext("Add Groups"); ?>" width="17" height="17" border="0" />
</a>
<br/><br/>
<a href="javascript:move_selected('groups','notgroups')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_left.gif" title="Remove Groups" alt="Remove Groups" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_left.gif" title="<?=gettext("Remove Groups"); ?>" alt="<?=gettext("Remove Groups"); ?>" width="17" height="17" border="0" />
</a>
</td>
<td align="center" width="50%">
- <strong>Member Of</strong><br/>
+ <strong><?=gettext("Member Of"); ?></strong><br/>
<br/>
<select size="10" style="width: 75%" name="groups[]" class="formselect" id="groups" onChange="clear_selected('nogroups')" multiple>
<?php
@@ -611,13 +618,13 @@ function sshkeyClicked(obj) {
</td>
<td valign="middle" nowrap class="list">
<a href="system_usermanager.php?act=expckey&id=<?=$id;?>&certid=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="export private key" alt="export private key" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export private key"); ?>" alt="<?=gettext("export private key"); ?>" width="17" height="17" border="0" />
</a>
<a href="system_usermanager.php?act=expcert&id=<?=$id;?>&certid=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="export cert" alt="export cert" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export cert"); ?>" alt="<?=gettext("export cert"); ?>" width="17" height="17" border="0" />
</a>
<a href="system_usermanager.php?act=delcert&id=<?=$id?>&certid=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this certificate?");?>')">
- <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete cert" />
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="<?=gettext("delete cert");?>" />
</a>
</td>
</tr>
@@ -650,7 +657,7 @@ function sshkeyClicked(obj) {
<tr id="usercertchck" name="usercertchck" >
<td width="22%" valign="top" class="vncell"><?=gettext("Certificate");?></td>
<td width="78%" class="vtable">
- <input type="checkbox" onClick="javascript:usercertClicked(this)"> Click to create a user certificate.
+ <input type="checkbox" onClick="javascript:usercertClicked(this)"> <?=gettext("Click to create a user certificate."); ?>
</td>
</tr>
@@ -710,7 +717,7 @@ function sshkeyClicked(obj) {
<tr id="sshkeychck" name="sshkeychck" >
<td width="22%" valign="top" class="vncell"><?=gettext("Authorized keys");?></td>
<td width="78%" class="vtable">
- <input type="checkbox" onClick="javascript:sshkeyClicked(this)"> Click to paste an authorized key.
+ <input type="checkbox" onClick="javascript:sshkeyClicked(this)"> <?=gettext("Click to paste an authorized key."); ?>
</td>
</tr>
<tr id="sshkey" name="sshkey" style="display:none">
@@ -724,7 +731,7 @@ function sshkeyClicked(obj) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<?php if (isset($id) && $a_user[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif;?>
@@ -737,10 +744,10 @@ function sshkeyClicked(obj) {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Username</td>
- <td width="25%" class="listhdrr">Full name</td>
- <td width="5%" class="listhdrr">Disabled</td>
- <td width="25%" class="listhdrr">Groups</td>
+ <td width="25%" class="listhdrr"><?=gettext("Username"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Full name"); ?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Disabled"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Groups"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -758,7 +765,7 @@ function sshkeyClicked(obj) {
else
$usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
?>
- <img src="<?=$usrimg;?>" alt="User" title="User" border="0" height="16" width="16" />
+ <img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
</td>
<td align="left" valign="middle">
<?=htmlspecialchars($userent['name']);?>
@@ -774,12 +781,12 @@ function sshkeyClicked(obj) {
</td>
<td valign="middle" nowrap class="list">
<a href="system_usermanager.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="edit user" alt="edit user" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
</a>
<?php if($userent['scope'] != "system"): ?>
&nbsp;
<a href="system_usermanager.php?act=deluser&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" alt="delete user" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
</a>
<?php endif; ?>
</td>
@@ -792,17 +799,17 @@ function sshkeyClicked(obj) {
<td class="list" colspan="4"></td>
<td class="list">
<a href="system_usermanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add user" alt="add user" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
<tr>
<td colspan="4">
<p>
- <?=gettext("Additional webConfigurator users can be added here.");?>
- <?=gettext("User permissions can be assigned directly or inherited from group memberships.");?>
- <?=gettext("An icon that appears grey indicates that it is a system defined object.");?>
- <?=gettext("Some system object properties can be modified but they cannot be deleted.");?>
+ <?=gettext("Additional webConfigurator users can be added here.
+ User permissions can be assigned directly or inherited from group memberships.
+ An icon that appears grey indicates that it is a system defined object.
+ Some system object properties can be modified but they cannot be deleted."); ?>
</p>
</td>
</tr>
@@ -825,26 +832,26 @@ function sshkeyClicked(obj) {
// start normal user code
- $pgtitle = array("System","User Password");
+ $pgtitle = array(gettext("System"),gettext("User Password"));
if (isset($_POST['save'])) {
unset($input_errors);
/* input validation */
$reqdfields = explode(" ", "passwordfld1");
- $reqdfieldsn = explode(",", "Password");
+ $reqdfieldsn = array(gettext("Password"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($_POST['passwordfld1'] != $_POST['passwordfld2'])
- $input_errors[] = "The passwords do not match.";
+ $input_errors[] = gettext("The passwords do not match.");
if (!$input_errors) {
// all values are okay --> saving changes
$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['password'] = crypt(trim($_POST['passwordfld1']));
write_config();
- $savemsg = "Password successfully changed<br />";
+ $savemsg = gettext("Password successfully changed") . "<br />";
}
}
@@ -865,7 +872,7 @@ function sshkeyClicked(obj) {
print_info_box($savemsg);
if($islocal == false) {
- echo "Sorry, you cannot change the password for a LDAP user.";
+ echo gettext("Sorry, you cannot change the password for a LDAP user.");
include("fend.inc");
exit;
}
@@ -875,10 +882,10 @@ function sshkeyClicked(obj) {
<form action="system_usermanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=$HTTP_SERVER_VARS['AUTH_USER']?>'s Password</td>
+ <td colspan="2" valign="top" class="listtopic"><?=$HTTP_SERVER_VARS['AUTH_USER']?>'s <?=gettext("Password"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell" rowspan="2">Password</td>
+ <td width="22%" valign="top" class="vncell" rowspan="2"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<input name="passwordfld1" type="password" class="formfld pwd" id="passwordfld1" size="20" />
</td>
diff --git a/usr/local/www/system_usermanager_addcert.php b/usr/local/www/system_usermanager_addcert.php
index 29af55a..d48e4ad 100644
--- a/usr/local/www/system_usermanager_addcert.php
+++ b/usr/local/www/system_usermanager_addcert.php
@@ -42,7 +42,7 @@ require("certs.inc");
$cert_keylens = array( "512", "1024", "2048", "4096");
-$pgtitle = array("System", "User Manager: Add Certificate");
+$pgtitle = array(gettext("System"), gettext("User Manager: Add Certificate"));
$userid = $_GET['userid'];
if (isset($_POST['userid']))
@@ -78,22 +78,27 @@ if ($_POST) {
if ($pconfig['method'] == "existing") {
$reqdfields = explode(" ",
"name cert key");
- $reqdfieldsn = explode(",",
- "Descriptive name,Certificate data,Key data");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Certificate data"),
+ gettext("Key data"));
}
if ($pconfig['method'] == "internal") {
$reqdfields = explode(" ",
"name caref keylen lifetime");
- $reqdfieldsn = explode(",",
- "Descriptive name,Certificate authority,Key length,Lifetime");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Certificate authority"),
+ gettext("Key length"),
+ gettext("Lifetime"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$ca = lookup_ca($pconfig['caref']);
if (!$ca)
- $input_errors[] = "Invalid internal Certificate Authority\n";
+ $input_errors[] = sprintf(gettext("Invalid internal Certificate Authority%s"),"\n");
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -197,9 +202,9 @@ function internalca_change() {
<tr>
<td colspan="2" align="center" class="vtable">
- No internal Certificate Authorities have been defined. You must
- <a href="system_camanager.php?act=new&method=internal">create</a>
- an internal CA before creating an internal certificate.
+ <?=gettext("No internal Certificate Authorities have been defined. You must");?>
+ <a href="system_camanager.php?act=new&method=internal"><?=gettext("create");?></a>
+ <?=gettext("an internal CA before creating an internal certificate.");?>
</td>
</tr>
@@ -241,14 +246,14 @@ function internalca_change() {
<option value="<?=$len;?>"<?=$selected;?>><?=$len;?></option>
<?php endforeach; ?>
</select>
- bits
+ <?=gettext("bits");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
<td width="78%" class="vtable">
<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="5" value="<?=htmlspecialchars($pconfig['lifetime']);?>"/>
- days
+ <?=gettext("days");?>
</td>
</tr>
@@ -258,7 +263,7 @@ function internalca_change() {
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<?php if ($internal_ca_count): ?>
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<input id="cancelbutton" class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" />
<?php endif; ?>
<?php if (isset($userid) && $a_user[$userid]): ?>
diff --git a/usr/local/www/system_usermanager_addprivs.php b/usr/local/www/system_usermanager_addprivs.php
index 8f13c55..1a3ef2c 100644
--- a/usr/local/www/system_usermanager_addprivs.php
+++ b/usr/local/www/system_usermanager_addprivs.php
@@ -81,7 +81,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "sysprivs");
- $reqdfieldsn = explode(",", "Selected priveleges");
+ $reqdfieldsn = array(gettext("Selected priveleges"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -195,7 +195,7 @@ function update_description() {
<tr height="60">
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" valign="top" class="vtable" id="pdesc">
- <em>Select a privilege from the list above for a description</em>
+ <em><?=gettext("Select a privilege from the list above for a description"); ?></em>
</td>
</tr>
<tr>
diff --git a/usr/local/www/system_usermanager_settings.php b/usr/local/www/system_usermanager_settings.php
index c961dd4..274a359 100755
--- a/usr/local/www/system_usermanager_settings.php
+++ b/usr/local/www/system_usermanager_settings.php
@@ -51,7 +51,7 @@ $pconfig['authmode'] = &$config['system']['webgui']['authmode'];
$pconfig['backend'] = &$config['system']['webgui']['backend'];
// Page title for main admin
-$pgtitle = array("System","User manager settings");
+$pgtitle = array(gettext("System"),gettext("User manager settings"));
if ($_POST) {
unset($input_errors);
@@ -93,7 +93,7 @@ include("head.inc");
echo "<script language='javascript'>\n";
echo "myRef = window.open('system_usermanager_settings_test.php?authserver={$pconfig['authmode']}','mywin', ";
echo "'left=20,top=20,width=700,height=550,toolbar=1,resizable=0');\n";
- echo "if (myRef==null || typeof(myRef)=='undefined') aleart('Popup blocker detected. Action aborted.');\n";
+ echo "if (myRef==null || typeof(myRef)=='undefined') alert('" . gettext("Popup blocker detected. Action aborted.") ."');\n";
echo "</script>\n";
}
?>
@@ -121,15 +121,16 @@ if(!$pconfig['backend'])
<form id="iform" name="iform" action="system_usermanager_settings.php" method="post">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
- <td width="22%" valign="top" class="vncell">Session Timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Session Timeout"); ?></td>
<td width="78%" class="vtable">
<input name="session_timeout" id="session_timeout" type="text" size="8" value="<?=htmlspecialchars($pconfig['session_timeout']);?>" />
<br />
- <?=gettext("Time in minutes to expire idle management sessions. The default is 4 hours (240 minutes). <br/> Enter 0 to never expire sessions. NOTE: This is a security risk!");?><br />
+ <?=gettext("Time in minutes to expire idle management sessions. The default is 4 hours (240 minutes).");?><br/>
+ <?=gettext("Enter 0 to never expire sessions. NOTE: This is a security risk!");?><br />
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication Server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td>
<td width="78%" class="vtable">
<select name='authmode' id='authmode' class="formselect" >
<?php
diff --git a/usr/local/www/system_usermanager_settings_ldapacpicker.php b/usr/local/www/system_usermanager_settings_ldapacpicker.php
index 40212b1..5e76fce 100644
--- a/usr/local/www/system_usermanager_settings_ldapacpicker.php
+++ b/usr/local/www/system_usermanager_settings_ldapacpicker.php
@@ -93,10 +93,10 @@ function post_choices() {
<body link="#000000" vlink="#000000" alink="#000000" >
<form method="post" action="system_usermanager_settings_ldapacpicker.php">
<?php if (empty($ous)): ?>
- <p>Sorry, we could not connect to the LDAP server. Please try later.</p>
- <input type='button' value='Close' onClick="window.close();">
+ <p><?=gettext("Sorry, we could not connect to the LDAP server. Please try later.");?></p>
+ <input type='button' value='<?=gettext("Close"); ?>' onClick="window.close();">
<?php else: ?>
- <b>Please select which containers to Authenticate against:</b>
+ <b><?=gettext("Please select which containers to Authenticate against");?>:</b>
<p/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -120,7 +120,7 @@ function post_choices() {
<p/>
- <input type='button' value='Save' onClick="post_choices();">
+ <input type='button' value='<?=gettext("Save");?>' onClick="post_choices();">
<?php endif; ?>
</form>
</body>
diff --git a/usr/local/www/system_usermanager_settings_test.php b/usr/local/www/system_usermanager_settings_test.php
index 34fb172..4a437b7 100755
--- a/usr/local/www/system_usermanager_settings_test.php
+++ b/usr/local/www/system_usermanager_settings_test.php
@@ -73,50 +73,50 @@ $authcfg = auth_get_authserver($authserver);
<?php
if (!$authcfg) {
- echo "Could not find settings for {$authserver}<p/>";
+ printf(gettext("Could not find settings for %s%s"), $authserver, "<p/>");
} else {
- echo "Testing pfSense LDAP settings... One moment please...<p/>";
+ echo gettext("Testing pfSense LDAP settings... One moment please...") . "<p/>";
echo "<table width='100%'>";
- echo "<tr><td>Attempting connection to {$ldapserver}</td><td>";
+ echo "<tr><td>" . gettext("Attempting connection to") . " " . $ldapserver . "</td><td>";
if(ldap_test_connection($authcfg)) {
echo "<td><font color=green>OK</td></tr>";
- echo "<tr><td>Attempting bind to {$ldapserver}</td><td>";
+ echo "<tr><td>" . gettext("Attempting bind to") . " " . $ldapserver . "</td><td>";
if(ldap_test_bind($authcfg)) {
echo "<td><font color=green>OK</td></tr>";
- echo "<tr><td>Attempting to fetch Organizational Units from {$ldapserver}</td><td>";
+ echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . $ldapserver . "</td><td>";
$ous = ldap_get_user_ous(true, $authcfg);
if(count($ous)>1) {
echo "<td><font color=green>OK</td></tr>";
echo "</table>";
if(is_array($ous)) {
- echo "Organization units found:<p/>";
+ echo gettext("Organization units found") . ":<p/>";
echo "<table width='100%'>";
foreach($ous as $ou) {
echo "<tr><td>" . $ou . "</td></tr>";
}
}
} else
- echo "<td><font color=red>failed</td></tr>";
+ echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
echo "</table><p/>";
} else {
- echo "<td><font color=red>failed</td></tr>";
+ echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
echo "</table><p/>";
}
} else {
- echo "<td><font color=red>failed</td></tr>";
+ echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
echo "</table><p/>";
}
}
?>
<p/>
- <input type="Button" value="Close" onClick='Javascript:window.close();'>
+ <input type="Button" value="<?=gettext("Close"); ?>" onClick='Javascript:window.close();'>
</form>
</body>
OpenPOWER on IntegriCloud