From 1eacdc8a8733849da8152eb4ffe54886ed4890d1 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Mon, 26 Apr 2010 16:10:53 -0300 Subject: [PATCH] Implement gettext() --- usr/local/www/system_advanced_admin.php | 77 ++++++++++++----------- usr/local/www/system_advanced_misc.php | 76 +++++++++++----------- usr/local/www/system_advanced_network.php | 50 +++++++-------- 3 files changed, 102 insertions(+), 101 deletions(-) diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index 954b6254ea..3800a9e548 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,8 @@ if ($_POST) { $savemsg = get_std_save_message($retval); if ($restart_webgui) - $savemsg .= "
One moment...redirecting to {$url} in 20 seconds."; + #$savemsg .= sprintf("
" . gettext("One moment...redirecting to %s in 20 seconds."),{$url}); + $savemsg .= "
" . gettext("One moment...redirecting to {$url} in 20 seconds."); conf_mount_rw(); setup_serial_port(); @@ -212,18 +213,18 @@ function prot_change() {
- NOTE:  + - The options on this page are intended for use by advanced users only. +

- + - + - + - + @@ -283,47 +284,47 @@ function prot_change() { $lockout_interface = "WAN"; ?> /> - Disable webConfigurator anti-lockout rule +
- When this is unchecked, access to the webConfigurator on the + Hint: the "Set interface(s) IP address" - option in the console menu resets this setting as well. + (ensure you have a firewall rule in place that allows you in, or you will"); ?> + . - + - + - + @@ -331,15 +332,15 @@ function prot_change() { - + - + @@ -347,15 +348,15 @@ function prot_change() { - + - + @@ -392,17 +393,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_misc.php b/usr/local/www/system_advanced_misc.php index 6bd5d3a7b9..e6c237ef35 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -101,9 +101,9 @@ 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(); @@ -144,44 +144,44 @@ include("head.inc");
- NOTE:  +   - The options on this page are intended for use by advanced users only. +

webConfigurator
Protocol
- No Certificates have been defined. You must - Create or Import - a Certificate before SSL can be enabled. + + +
SSL Certificate
TCP port
- Enter a custom port number for the webConfigurator +
 
Secure Shell
Secure Shell Server /> - Enable Secure Shell +
Authentication Method /> - Disable Password login for Secure Shell (rsa key only) +
- When enabled, authorized keys need to be configured for each + user - that has been granted secure shell access. +
SSH port
- Note: Leave this blank for the default of 22 +
Serial Communcations
Serial Terminal /> - This will enable the first serial port with 9600/8/N/1 +
- Note: This will disable the internal video card/keyboard +
Console Options
Console menu /> - Password protect the console menu +
- Changes to this option will take effect after a reboot. +
- + - + - + - + - + - + - + - + - + - + @@ -252,27 +252,27 @@ include("head.inc"); - + - + diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php index b6ba12146d..32f496b74a 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,9 +125,9 @@ 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); } } @@ -180,36 +180,36 @@ function enable_change(enable_over) {
- NOTE:  +   - The options on this page are intended for use by advanced users only. +

Load Balancing
Load Balancing /> - Use sticky connections
- Successive connections will be redirected to the servers +
+
 
Power savings
PowerD /> - Use PowerD
+

- The powerd utility monitors the system state and sets various power control +
 
glxsb Crypto Acceleration
glxsb /> - Use glxsb
+

- The AMD Geode LX Security Block will accelerate some cryptographic functions +

- 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. +
 
IP Security
Security Assocications /> - Prefer older IPsec SAs +
- By default, if several SAs match, the newest one is +
 
Schedules
Schedule States />
- 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. +
Hardware Settings
Hard disk standby time
- Puts the hard disk into standby mode when the selected amount of time after the last - access has elapsed. Do not set this for CF cards. +
- + - + - + @@ -217,31 +217,31 @@ function enable_change(enable_over) { - + - + - + - +
IPv6 Options
Allow IPv6 onclick="enable_change(false)" /> - Allow IPv6
- All IPv6 will be blocked unless this box is checked.
+
+

IPv6 over IPv4 Tunneling onclick="enable_change(false)" /> - Enable IPv4 NAT encapsulation of IPv6 packets
- This provides an RFC 2893 compatibility mechanism +
+ + add a firewall rule to permit IPv6 packets."); ?>

- IP address :  +  
 
Network Interfaces
Device polling > - Enable device polling
- 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 homepage for a list of supported cards. +
+
Hardware Checksum Offloading /> - Disable hardware checksum offload
- 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. +
+
ARP Handling /> - Suppress ARP messages
- This option will suppress ARP log messages when multiple interfaces reside on the same broadcast domain +
+