From deeda874288ff1629c4f2f82dc7d18d2c80da4a7 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Tue, 27 Jul 2010 15:50:08 -0300 Subject: [PATCH] Implement gettext() calls on vpn_openvpn_csc.php --- usr/local/www/vpn_openvpn_csc.php | 158 +++++++++++++++--------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php index 751c54ae3b..2426131161 100644 --- a/usr/local/www/vpn_openvpn_csc.php +++ b/usr/local/www/vpn_openvpn_csc.php @@ -37,7 +37,7 @@ require("guiconfig.inc"); require_once("openvpn.inc"); -$pgtitle = array("OpenVPN", "Client Specific Override"); +$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override")); $statusurl = "status_openvpn.php"; $logurl = "diag_logs_openvpn.php"; @@ -128,36 +128,36 @@ if ($_POST) { if ($pconfig['dns_server_enable']) { if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1']))) - $input_errors[] = "The field 'DNS Server #1' must contain a valid IP address"; + $input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address"); if (!empty($pconfig['dns_server2']) && !is_ipaddr(trim($pconfig['dns_server2']))) - $input_errors[] = "The field 'DNS Server #2' must contain a valid IP address"; + $input_errors[] = gettext("The field 'DNS Server #2' must contain a valid IP address"); if (!empty($pconfig['dns_server3']) && !is_ipaddr(trim($pconfig['dns_server3']))) - $input_errors[] = "The field 'DNS Server #3' must contain a valid IP address"; + $input_errors[] = gettext("The field 'DNS Server #3' must contain a valid IP address"); if (!empty($pconfig['dns_server4']) && !is_ipaddr(trim($pconfig['dns_server4']))) - $input_errors[] = "The field 'DNS Server #4' must contain a valid IP address"; + $input_errors[] = gettext("The field 'DNS Server #4' must contain a valid IP address"); } if ($pconfig['ntp_server_enable']) { if (!empty($pconfig['ntp_server1']) && !is_ipaddr(trim($pconfig['ntp_server1']))) - $input_errors[] = "The field 'NTP Server #1' must contain a valid IP address"; + $input_errors[] = gettext("The field 'NTP Server #1' must contain a valid IP address"); if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2']))) - $input_errors[] = "The field 'NTP Server #2' must contain a valid IP address"; + $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address"); if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3']))) - $input_errors[] = "The field 'NTP Server #3' must contain a valid IP address"; + $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address"); if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4']))) - $input_errors[] = "The field 'NTP Server #4' must contain a valid IP address"; + $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address"); } if ($pconfig['netbios_enable']) { if ($pconfig['wins_server_enable']) { if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1']))) - $input_errors[] = "The field 'WINS Server #1' must contain a valid IP address"; + $input_errors[] = gettext("The field 'WINS Server #1' must contain a valid IP address"); if (!empty($pconfig['wins_server2']) && !is_ipaddr(trim($pconfig['wins_server2']))) - $input_errors[] = "The field 'WINS Server #2' must contain a valid IP address"; + $input_errors[] = gettext("The field 'WINS Server #2' must contain a valid IP address"); } if ($pconfig['nbdd_server_enable']) if (!empty($pconfig['nbdd_server1']) && !is_ipaddr(trim($pconfig['nbdd_server1']))) - $input_errors[] = "The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address"; + $input_errors[] = gettext("The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address"); } $reqdfields[] = 'common_name'; @@ -308,10 +308,10 @@ function netbios_change() {
- + - + - + - + - + - + - + - +
General information
Disabled @@ -322,32 +322,32 @@ function netbios_change() {
  - Disable this override
+
- Set this option to disable this client-specific override without removing it from the list. + .
Common name
- Enter the client's X.509 common name here. + .
Description
- You may enter a description here for your reference (not parsed). + .
Connection blocking @@ -357,38 +357,38 @@ function netbios_change() {
- Block this client connection based on its common name. + .
- Don't use this option to permanently disable a - client due to a compromised key or password. - Use a CRL (certificate revocation list) instead. + .
Tunnel Settings
Tunnel Network
- This is the virtual network used for private - communications between this client and the - server expressed using CIDR (eg. 10.0.8.0/24). - The first network address is assumed to be the - server address and the second network address - will be assigned to the client virtual - interface. + .
Redirect Gateway @@ -398,7 +398,7 @@ function netbios_change() { @@ -409,10 +409,10 @@ function netbios_change() { - + - +
- Force all client generated traffic through the tunnel. + .
Client Settings
Server Definitions @@ -422,7 +422,7 @@ function netbios_change() { @@ -430,7 +430,7 @@ function netbios_change() { - +
- Prevent this client from receiving any server-defined client settings. + .
DNS Default Domain @@ -440,7 +440,7 @@ function netbios_change() { @@ -455,7 +455,7 @@ function netbios_change() { - +
- Provide a default domain name to clients
+
DNS Servers @@ -465,7 +465,7 @@ function netbios_change() { @@ -474,7 +474,7 @@ function netbios_change() { @@ -482,7 +482,7 @@ function netbios_change() { @@ -490,7 +490,7 @@ function netbios_change() { @@ -498,7 +498,7 @@ function netbios_change() { @@ -507,7 +507,7 @@ function netbios_change() { - +
- Provide a DNS server list to clients
+
- Server #1:  + #1: 
- Server #2:  + #2: 
- Server #3:  + #3: 
- Server #4:  + #4: 
NTP Servers @@ -517,7 +517,7 @@ function netbios_change() { @@ -526,7 +526,7 @@ function netbios_change() { @@ -534,7 +534,7 @@ function netbios_change() { @@ -543,7 +543,7 @@ function netbios_change() { - + - +
- Provide a NTP server list to clients
+
- Server #1:  + #1: 
- Server #2:  + #2: 
NetBIOS Options @@ -553,19 +553,19 @@ function netbios_change() {
- Enable NetBIOS over TCP/IP
+
- If this option is not set, all NetBIOS-over-TCP/IP options (includeing WINS) will be disabled. + .
@@ -592,18 +592,18 @@ function netbios_change() {
- A NetBIOS Scope ID provides an extended naming - service for NetBIOS over TCP/IP. The NetBIOS - scope ID isolates NetBIOS traffic on a single - network to only those nodes with the same - NetBIOS scope ID. + .

- Node Type:  +
- Possible options: b-node (broadcasts), p-node - (point-to-point name queries to a WINS server), - m-node (broadcast then query name server), and - h-node (query name server, then broadcast). + .
WINS Servers @@ -613,7 +613,7 @@ function netbios_change() { @@ -622,7 +622,7 @@ function netbios_change() { @@ -630,7 +630,7 @@ function netbios_change() { @@ -639,14 +639,14 @@ function netbios_change() { - +
- Provide a WINS server list to clients
+
- Server #1:  + #1: 
- Server #2:  + #2: 
Advanced

- Enter any additional options you would like to add for this client specific override, separated by a semicolon
- EXAMPLE: push "route 10.0.0.0 255.255.255.0"; +
+ ;
@@ -655,7 +655,7 @@ function netbios_change() {
  - + "> @@ -669,9 +669,9 @@ function netbios_change() { - - - + + + @@ -708,7 +708,7 @@ function netbios_change() {
DisabledCommon NameDescription
- + " width="17" height="17" border="0">   - - + ')"> + " width="17" height="17" border="0">
- + " width="17" height="17" border="0">