summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/PEAR.inc34
-rw-r--r--etc/inc/array_intersect_key.inc8
-rw-r--r--etc/inc/auth.inc68
-rw-r--r--etc/inc/authgui.inc14
-rw-r--r--etc/inc/captiveportal.inc4
-rw-r--r--etc/inc/cmd_chain.inc8
-rw-r--r--etc/inc/config.console.inc62
-rw-r--r--etc/inc/config.inc21
-rw-r--r--etc/inc/config.lib.inc74
-rw-r--r--etc/inc/easyrule.inc44
-rw-r--r--etc/inc/filter.inc99
-rw-r--r--etc/inc/filter_log.inc4
-rw-r--r--etc/inc/gwlb.inc12
-rw-r--r--etc/inc/interfaces.inc147
-rw-r--r--etc/inc/ipsec.inc30
-rw-r--r--etc/inc/meta.inc14
-rw-r--r--etc/inc/notices.inc10
-rw-r--r--etc/inc/openvpn.inc22
-rw-r--r--etc/inc/pfsense-utils.inc48
-rw-r--r--etc/inc/pkg-utils.inc156
-rw-r--r--etc/inc/priv.defs.inc812
-rw-r--r--etc/inc/radius.inc10
-rw-r--r--etc/inc/rrd.inc16
-rw-r--r--etc/inc/services.inc46
-rw-r--r--etc/inc/shaper.inc421
-rw-r--r--etc/inc/smtp.inc96
-rw-r--r--etc/inc/system.inc73
-rw-r--r--etc/inc/upgrade_config.inc94
-rw-r--r--etc/inc/util.inc8
-rw-r--r--etc/inc/voucher.inc14
-rw-r--r--etc/inc/vpn.inc62
-rw-r--r--etc/inc/xmlparse.inc8
-rw-r--r--etc/inc/xmlparse_attr.inc10
-rw-r--r--etc/inc/xmlreader.inc2
-rw-r--r--etc/inc/xmlrpc_client.inc53
-rw-r--r--etc/inc/xmlrpc_server.inc12
-rw-r--r--etc/inc/zeromq.inc2
-rwxr-xr-xetc/rc.filter_synchronize2
-rwxr-xr-xetc/rc.initial.firmware_update2
-rwxr-xr-xetc/rc.php_ini_setup2
-rwxr-xr-x[-rw-r--r--]etc/rc.stop_packages0
41 files changed, 1327 insertions, 1297 deletions
diff --git a/etc/inc/PEAR.inc b/etc/inc/PEAR.inc
index 68d30fa..ae7120a 100644
--- a/etc/inc/PEAR.inc
+++ b/etc/inc/PEAR.inc
@@ -158,7 +158,7 @@ class PEAR
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
- print "PEAR constructor called, class=$classname\n";
+ printf(gettext("PEAR constructor called, class=%s\n"), $classname);
}
if ($error_class !== null) {
$this->_error_class = $error_class;
@@ -195,7 +195,7 @@ class PEAR
*/
function _PEAR() {
if ($this->_debug) {
- printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
+ printf(gettext("PEAR destructor called, class=%s\n"), strtolower(get_class($this)));
}
}
@@ -334,12 +334,12 @@ class PEAR
if (is_callable($options)) {
$setoptions = $options;
} else {
- trigger_error("invalid error callback", E_USER_WARNING);
+ trigger_error(gettext("invalid error callback"), E_USER_WARNING);
}
break;
default:
- trigger_error("invalid error mode", E_USER_WARNING);
+ trigger_error(gettext("invalid error mode"), E_USER_WARNING);
break;
}
}
@@ -442,17 +442,17 @@ class PEAR
$deleted = false;
}
}
- return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
+ return $deleted ? true : PEAR::raiseError(gettext("The expected error you submitted does not exist")); // IMPROVE ME
} elseif (!empty($error_code)) {
// $error_code comes alone, trying to unset it
if ($this->_checkDelExpect($error_code)) {
return true;
} else {
- return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
+ return PEAR::raiseError(gettext("The expected error you submitted does not exist")); // IMPROVE ME
}
} else {
// $error_code is empty
- return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
+ return PEAR::raiseError(gettext("The expected error you submitted is empty")); // IMPROVE ME
}
}
@@ -592,12 +592,12 @@ class PEAR
if (is_callable($options)) {
$def_options = $options;
} else {
- trigger_error("invalid error callback", E_USER_WARNING);
+ trigger_error(gettext("invalid error callback"), E_USER_WARNING);
}
break;
default:
- trigger_error("invalid error mode", E_USER_WARNING);
+ trigger_error(gettext("invalid error mode"), E_USER_WARNING);
break;
}
$stack[] = array($mode, $options);
@@ -629,12 +629,12 @@ class PEAR
if (is_callable($options)) {
$setoptions = $options;
} else {
- trigger_error("invalid error callback", E_USER_WARNING);
+ trigger_error(gettext("invalid error callback"), E_USER_WARNING);
}
break;
default:
- trigger_error("invalid error mode", E_USER_WARNING);
+ trigger_error(gettext("invalid error mode"), E_USER_WARNING);
break;
}
return true;
@@ -863,7 +863,7 @@ class PEAR_Error
}
}
if ($this->mode & PEAR_ERROR_EXCEPTION) {
- trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_ErrorStack for exceptions", E_USER_WARNING);
+ trigger_error(gettext("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_ErrorStack for exceptions"), E_USER_WARNING);
eval('$e = new Exception($this->message, $this->code);$e->PEAR_Error = $this;throw($e);');
}
}
@@ -1020,8 +1020,8 @@ class PEAR_Error
} else {
$callback = $this->callback;
}
- return sprintf('[%s: message="%s" code=%d mode=callback '.
- 'callback=%s prefix="%s" info="%s"]',
+ return sprintf(gettext('[%s: message="%s" code=%d mode=callback '.
+ 'callback=%s prefix="%s" info="%s"]'),
strtolower(get_class($this)), $this->message, $this->code,
$callback, $this->error_message_prefix,
$this->userinfo);
@@ -1038,8 +1038,8 @@ class PEAR_Error
if ($this->mode & PEAR_ERROR_RETURN) {
$modes[] = 'return';
}
- return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
- 'prefix="%s" info="%s"]',
+ return sprintf(gettext('[%s: message="%s" code=%d mode=%s level=%s '.
+ 'prefix="%s" info="%s"]'),
strtolower(get_class($this)), $this->message, $this->code,
implode("|", $modes), $levels[$this->level],
$this->error_message_prefix,
@@ -1057,4 +1057,4 @@ class PEAR_Error
* End:
*/
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/array_intersect_key.inc b/etc/inc/array_intersect_key.inc
index 0cd5099..c1416ad 100644
--- a/etc/inc/array_intersect_key.inc
+++ b/etc/inc/array_intersect_key.inc
@@ -34,7 +34,7 @@ if (!function_exists('array_intersect_key')) {
{
$args = func_get_args();
if (count($args) < 2) {
- user_error('Wrong parameter count for array_intersect_key()', E_USER_WARNING);
+ user_error(gettext('Wrong parameter count for array_intersect_key()'), E_USER_WARNING);
return;
}
@@ -42,8 +42,8 @@ if (!function_exists('array_intersect_key')) {
$array_count = count($args);
for ($i = 0; $i !== $array_count; $i++) {
if (!is_array($args[$i])) {
- user_error('array_intersect_key() Argument #' .
- ($i + 1) . ' is not an array', E_USER_WARNING);
+ user_error(gettext('array_intersect_key() Argument #') .
+ ($i + 1) . gettext(' is not an array'), E_USER_WARNING);
return;
}
}
@@ -64,4 +64,4 @@ if (!function_exists('array_intersect_key')) {
}
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index ae4a8f3..e284943 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -95,7 +95,7 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][
if($found_host == false) {
if(!security_checks_disabled()) {
- display_error_form("501", "Potential DNS Rebind attack detected, see http://en.wikipedia.org/wiki/DNS_rebinding<br/>Try accessing the router by IP address instead of by hostname.");
+ display_error_form("501", gettext("Potential DNS Rebind attack detected, see http://en.wikipedia.org/wiki/DNS_rebinding<br/>Try accessing the router by IP address instead of by hostname."));
exit;
}
$security_passed = false;
@@ -302,7 +302,7 @@ function local_sync_accounts() {
continue;
$cmd = "/usr/sbin/pw userdel {$line[2]}";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
}
pclose($fd);
@@ -322,7 +322,7 @@ function local_sync_accounts() {
continue;
$cmd = "/usr/sbin/pw groupdel {$line[2]}";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
}
pclose($fd);
@@ -388,7 +388,7 @@ function local_user_set(& $user) {
if ($user_uid == 0) {
$cmd = "/usr/sbin/pw usermod -q -n root -s /bin/sh -H 0";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
$fd = popen($cmd, "w");
fwrite($fd, $user['password']);
pclose($fd);
@@ -415,7 +415,7 @@ function local_user_set(& $user) {
" -c ".escapeshellarg($user['descr'])." -H 0 2>&1";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
$fd = popen($cmd, "w");
fwrite($fd, $user['password']);
pclose($fd);
@@ -460,7 +460,7 @@ function local_user_del($user) {
$cmd = "/usr/sbin/pw userdel {$user['name']} {$rmhome}";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
/* Delete user from groups needs a call to write_config() */
@@ -591,7 +591,7 @@ function local_group_set($group, $reset = false) {
$cmd = "/usr/sbin/pw {$group_op} {$group_name} -g {$group_gid} -M {$group_members} 2>&1";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
}
@@ -603,7 +603,7 @@ function local_group_del($group) {
$cmd = "/usr/sbin/pw groupdel {$group['name']}";
if($debug)
- log_error("Running: {$cmd}");
+ log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
}
@@ -637,7 +637,7 @@ function ldap_test_connection($authcfg) {
$error = true;
if ($error == true) {
- log_error("ERROR! Could not connect to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname));
return false;
}
@@ -679,7 +679,7 @@ function ldap_test_bind($authcfg) {
$error = true;
if ($error == true) {
- log_error("ERROR! Could not connect to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname));
return false;
}
@@ -732,7 +732,7 @@ function ldap_get_user_ous($show_complete_ou=true, $authcfg) {
/* first check if there is even an LDAP server populated */
if(!$ldapserver) {
- log_error("ERROR! ldap_get_user_ous() backed selected with no LDAP authentication server defined.");
+ log_error(gettext("ERROR! ldap_get_user_ous() backed selected with no LDAP authentication server defined."));
return $ous;
}
@@ -746,7 +746,7 @@ function ldap_get_user_ous($show_complete_ou=true, $authcfg) {
$error = true;
if ($error == true) {
- log_error("ERROR! Could not connect to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname));
return $ous;
}
@@ -757,12 +757,12 @@ function ldap_get_user_ous($show_complete_ou=true, $authcfg) {
if ($ldapanon == true) {
if (!($res = @ldap_bind($ldap))) {
- log_error("ERROR! ldap_get_user_ous() could not bind anonymously to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! ldap_get_user_ous() could not bind anonymously to server %s."), $ldapname));
@ldap_close($ldap);
return $ous;
}
} else if (!($res = @ldap_bind($ldap, $ldapbindun, $ldapbindpw))) {
- log_error("ERROR! ldap_get_user_ous() could not bind to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! ldap_get_user_ous() could not bind to server %s."), $ldapname));
@ldap_close($ldap);
return $ous;
}
@@ -857,7 +857,7 @@ function ldap_get_groups($username, $authcfg) {
$error = true;
if ($error == true) {
- log_error("ERROR! ldap_get_groups() Could not connect to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! ldap_get_groups() Could not connect to server %s."), $ldapname));
return memberof;
}
@@ -867,12 +867,12 @@ function ldap_get_groups($username, $authcfg) {
/* bind as user that has rights to read group attributes */
if ($ldapanon == true) {
if (!($res = @ldap_bind($ldap))) {
- log_error("ERROR! ldap_get_groups() could not bind anonymously to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! ldap_get_groups() could not bind anonymously to server %s."), $ldapname));
@ldap_close($ldap);
return false;
}
} else if (!($res = @ldap_bind($ldap, $ldapbindun, $ldapbindpw))) {
- log_error("ERROR! ldap_get_groups() could not bind to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! ldap_get_groups() could not bind to server %s."), $ldapname));
@ldap_close($ldap);
return memberof;
}
@@ -956,10 +956,10 @@ function ldap_backed($username, $passwd, $authcfg) {
/* first check if there is even an LDAP server populated */
if(!$ldapserver) {
if ($ldapfallback) {
- log_error("ERROR! ldap_backed() called with no LDAP authentication server defined. Defaulting to local user database. Visit System -> User Manager.");
+ log_error(gettext("ERROR! ldap_backed() called with no LDAP authentication server defined. Defaulting to local user database. Visit System -> User Manager."));
return local_backed($username, $passwd);
} else
- log_error("ERROR! ldap_backed() called with no LDAP authentication server defined.");
+ log_error(gettext("ERROR! ldap_backed() called with no LDAP authentication server defined."));
return false;
}
@@ -977,7 +977,7 @@ function ldap_backed($username, $passwd, $authcfg) {
$error = true;
if ($error == true) {
- log_error("ERROR! Could not connect to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname));
return false;
}
@@ -991,7 +991,7 @@ function ldap_backed($username, $passwd, $authcfg) {
if ($error == true) {
@ldap_close($ldap);
- log_error("ERROR! Could not bind to server {$ldapname}.");
+ log_error(sprintf(gettext("ERROR! Could not bind to server %s."), $ldapname));
return false;
}
@@ -1008,11 +1008,11 @@ function ldap_backed($username, $passwd, $authcfg) {
/* Person. To later be used by ldap_get_groups. */
/* that way we don't have to search twice. */
/*****************************************************************/
- log_error("Now Searching for {$username} in directory.");
+ log_error(sprintf(gettext("Now Searching for %s in directory."), $username));
/* Iterate through the user containers for search */
foreach ($ldac_splits as $i => $ldac_split) {
/* Make sure we just use the first user we find */
- log_error("Now Searching in server {$ldapname}, container {$ldac_split} with filter {$ldapfilter}.");
+ log_error(sprintf(gettext('Now Searching in server %1$s, container %2$s with filter %3$s.'), $ldapname, $ldac_split, $ldapfilter));
if ($ldapscope == "one")
$ldapfunc = "ldap_list";
else
@@ -1023,7 +1023,7 @@ function ldap_backed($username, $passwd, $authcfg) {
else
$search = @$ldapfunc($ldap,"{$ldac_split},{$ldapbasedn}",$ldapfilter);
if (!$search) {
- log_error("Search resulted in error: " . ldap_error($ldap));
+ log_error(sprintf(gettext("Search resulted in error: %s"), ldap_error($ldap)));
continue;
}
$info = ldap_get_entries($ldap,$search);
@@ -1039,18 +1039,18 @@ function ldap_backed($username, $passwd, $authcfg) {
if ($usercount != 1){
@ldap_unbind($ldap);
- log_error("ERROR! Either LDAP search failed, or multiple users were found.");
+ log_error(gettext("ERROR! Either LDAP search failed, or multiple users were found."));
return false;
}
/* Now lets bind as the user we found */
if (!($res = @ldap_bind($ldap, $userdn, $passwd))) {
- log_error("ERROR! Could not login to server {$ldapname} as user {$username}.");
+ log_error(sprintf(gettext('ERROR! Could not login to server %1$s as user %2$s.'), $ldapname, $username));
@ldap_unbind($ldap);
return false;
}
- log_error("Logged in successfully as {$username} via LDAP server {$ldapname} with DN = {$userdn}.");
+ log_error(sprintf(gettext('Logged in successfully as %1$s via LDAP server %2$s with DN = %3$s.'), $username, $ldapname, $userdn));
/* At this point we are bound to LDAP so the user was auth'd okay. Close connection. */
@ldap_unbind($ldap);
@@ -1081,7 +1081,7 @@ function radius_backed($username, $passwd, $authcfg){
$retvalue['auth_val'] = 1;
$retvalue['error'] = $rauth->getError();
if ($debug)
- printf("Radius start: %s<br>\n", $retvalue['error']);
+ printf(gettext("Radius start: %s<br>\n"), $retvalue['error']);
}
// XXX - billm - somewhere in here we need to handle securid challenge/response
@@ -1092,7 +1092,7 @@ function radius_backed($username, $passwd, $authcfg){
$retvalue['auth_val'] = 1;
$retvalue['error'] = $result->getMessage();
if ($debug)
- printf("Radius send failed: %s<br>\n", $retvalue['error']);
+ printf(gettext("Radius send failed: %s<br>\n"), $retvalue['error']);
} else if ($result === true) {
$retvalue['auth_val'] = 2;
if ($debug)
@@ -1144,7 +1144,7 @@ function auth_get_authserver($name) {
}
}
if ($name == "Local Database")
- return array("name" => "Local Database", "type" => "Local Auth", "host" => $config['system']['hostname']);
+ return array("name" => gettext("Local Database"), "type" => gettext("Local Auth"), "host" => $config['system']['hostname']);
}
function auth_get_authserver_list() {
@@ -1159,7 +1159,7 @@ function auth_get_authserver_list() {
}
}
- $list["Local Database"] = array( "name" => "Local Database", "type" => "Local Auth", "host" => $config['system']['hostname']);
+ $list["Local Database"] = array( "name" => gettext("Local Database"), "type" => gettext("Local Auth"), "host" => $config['system']['hostname']);
return $list;
}
@@ -1230,7 +1230,7 @@ function session_auth() {
$_SESSION['Username'] = $_POST['usernamefld'];
$_SESSION['last_access'] = time();
if(! isset($config['system']['webgui']['quietlogin'])) {
- log_auth("Successful webConfigurator login for user '{$_POST['usernamefld']}' from {$_SERVER['REMOTE_ADDR']}");
+ log_auth(sprintf(gettext("Successful login for user '%1\$s' from: %2\$s"), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
}
$HTTP_SERVER_VARS['AUTH_USER'] = $_SESSION['Username'];
if (isset($_POST['postafterlogin']))
@@ -1284,9 +1284,9 @@ function session_auth() {
if (isset($_GET['logout'])) {
if ($_SESSION['Logout'])
- log_error("Session timed out for user '{$_SESSION['Username']}' from: {$_SERVER['REMOTE_ADDR']}");
+ log_error(sprintf(gettext("Session timed out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
else
- log_error("User logged out for user '{$_SESSION['Username']}' from: {$_SERVER['REMOTE_ADDR']}");
+ log_error(sprintf(gettext("User logged out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
/* wipe out $_SESSION */
$_SESSION = array();
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 070c0c2..9b1b8f0 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -64,7 +64,7 @@ if (!isAllowedPage($_SERVER['SCRIPT_NAME'])) {
pfSenseHeader("/{$page}");
exit;
} else {
- display_error_form("201", "No page assigned to this user! Click here to logout.");
+ display_error_form("201", gettext("No page assigned to this user! Click here to logout."));
exit;
}
} else
@@ -88,7 +88,7 @@ function display_error_form($http_code, $desc) {
global $config, $g;
$g['theme'] = $config['theme'];
if(isAjax()) {
- echo "Error: {$http_code} Description: {$desc}";
+ printf(gettext('Error: %1$s Description: %2$s'), $http_code, $desc);
return;
}
@@ -151,13 +151,13 @@ function display_login_form() {
if(isAjax()) {
if (isset($_POST['login'])) {
if($_SESSION['Logged_In'] <> "True") {
- isset($_SESSION['Login_Error']) ? $login_error = $_SESSION['Login_Error'] : $login_error = "unknown reason";
- echo "showajaxmessage('Invalid login ({$login_error}).');";
+ isset($_SESSION['Login_Error']) ? $login_error = $_SESSION['Login_Error'] : $login_error = gettext("unknown reason");
+ printf("showajaxmessage('" . gettext("Invalid login (%s).") . "')", $login_error);
}
if (file_exists("{$g['tmp_path']}/webconfigurator.lock")) {
// TODO: add the IP from the user who did lock the device
$whom = file_get_contents("{$g['tmp_path']}/webconfigurator.lock");
- echo "showajaxmessage('This device is currently being maintained by: {$whom}.');";
+ printf("showajaxmessage('" . gettext("This device is currently being maintained by: %s.") . "');", $whom);
}
}
exit;
@@ -239,14 +239,14 @@ if($config['virtualip']) {
<div id="inputerrors"><?=$_SESSION['Login_Error'];?></div>
<p>
<span style="text-align:left">
- <?=gettext("Username"); ?>:<br>
+ <?=gettext("Username:"); ?><br>
<input onclick="clearError();" onchange="clearError();" id="usernamefld" type="text" name="usernamefld" class="formfld user" tabindex="1" />
</span>
</p>
<br>
<p>
<span style="text-align:left">
- <?=gettext("Password"); ?>: <br>
+ <?=gettext("Password:"); ?> <br>
<input onclick="clearError();" onchange="clearError();" id="passwordfld" type="password" name="passwordfld" class="formfld pwd" tabindex="2" />
</span>
</p>
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index ce0435d..a31b28c 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -357,7 +357,7 @@ EOD;
captiveportal_init_radius_servers();
if ($g['booting'])
- echo "done\n";
+ printf(gettext("done%s"), "\n");
} else {
killbypid("{$g['varrun_path']}/lighty-CaptivePortal.pid");
@@ -1281,7 +1281,7 @@ function captiveportal_write_elements() {
foreach ($config['captiveportal']['element'] as $data) {
$fd = @fopen($g['captiveportal_element_path'] . '/' . $data['name'], "wb");
if (!$fd) {
- printf("Error: cannot open '{$data['name']}' in captiveportal_write_elements().\n");
+ printf(gettext("Error: cannot open '%s' in captiveportal_write_elements()%s"), $data['name'], "\n");
return 1;
}
$decoded = base64_decode($data['content']);
diff --git a/etc/inc/cmd_chain.inc b/etc/inc/cmd_chain.inc
index eb81954..4c1e69e 100644
--- a/etc/inc/cmd_chain.inc
+++ b/etc/inc/cmd_chain.inc
@@ -98,7 +98,7 @@ Class CmdCHAIN {
$ignore_return_text = $cmd['ignore_return_text'];
// Should we perform verbose debugging?
if($this->is_debugging == true) {
- log_error("CmdCHAIN is executing -> {$cmd_title} - {$command}");
+ log_error(sprintf(gettext('CmdCHAIN is executing -> %1$s - %2$s'), $cmd_title, $command));
usleep(100); // give network stack time to deliver network syslog message
}
// Execute command
@@ -106,9 +106,9 @@ Class CmdCHAIN {
if($this->ignore_return_text == true)
continue;
if(intval($status) <> 0) {
- log_error("{$cmd_title} failed with return code -> {$status}. The command was {$command}");
+ log_error(sprintf(gettext('%1$s failed with return code -> %2$s. The command was %3$s'), $cmd_title, $status, $command));
if($this->halt_on_errors == true)
- return("{$cmd_title} failed with return code -> {$status}. The command was {$command}");
+ return(sprintf(gettext('%1$s failed with return code -> %2$s. The command was %3$s'), $cmd_title, $status, $command));
}
}
return;
@@ -129,4 +129,4 @@ $cmdchain->clear(); // clears the previous added entries
*/
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/config.console.inc b/etc/inc/config.console.inc
index 7c5041b..03a9833 100644
--- a/etc/inc/config.console.inc
+++ b/etc/inc/config.console.inc
@@ -55,10 +55,10 @@ function set_networking_interfaces_ports() {
if($avail < $g['minimum_ram_warning']) {
echo "\n\n\n";
- echo "DANGER! WARNING! ACHTUNG!\n\n";
- echo "{$g['product_name']} requires *AT LEAST* {$g['minimum_ram_warning_text']} RAM to function correctly.\n";
- echo "Only ({$avail}) MB RAM has been detected.\n";
- echo "\nPress ENTER to continue. ";
+ echo gettext("DANGER! WARNING! ACHTUNG!") . "\n\n";
+ printf(gettext("%s requires *AT LEAST* %s RAM to function correctly.%s"), $g['product_name'], $g['minimum_ram_warning_text'], "\n");
+ printf(gettext("Only (%s) MB RAM has been detected.%s"), $avail, "\n");
+ echo "\n" . gettext("Press ENTER to continue.") . " ";
fgets($fp);
echo "\n";
}
@@ -80,7 +80,7 @@ Valid interfaces are:
EOD;
if(!is_array($iflist)) {
- echo "No interfaces found!\n";
+ echo gettext("No interfaces found!") . "\n";
$iflist = array();
} else {
foreach ($iflist as $iface => $ifa) {
@@ -178,7 +178,7 @@ EOD;
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
- echo "\n\nVLAN interfaces:\n\n";
+ echo "\n\n" . gettext("VLAN interfaces:") . "\n\n";
foreach ($config['vlans']['vlan'] as $vlan) {
echo sprintf("% -16s%s\n", "{$vlan['if']}_vlan{$vlan['tag']}",
@@ -204,7 +204,7 @@ hitting 'a' to initiate auto detection.
EOD;
do {
- echo "\nEnter the WAN interface name or 'a' for auto-detection: ";
+ echo "\n" . gettext("Enter the WAN interface name or 'a' for auto-detection:") . " ";
$wanif = chop(fgets($fp));
if ($wanif === "") {
return;
@@ -212,16 +212,16 @@ EOD;
if ($wanif === "a")
$wanif = autodetect_interface("WAN", $fp);
else if (!array_key_exists($wanif, $iflist)) {
- echo "\nInvalid interface name '{$wanif}'\n";
+ printf(gettext("%sInvalid interface name '%s'%s"), "\n", $wanif, "\n");
unset($wanif);
continue;
}
} while (!$wanif);
do {
- echo "\nEnter the LAN interface name or 'a' for auto-detection \n" .
- "NOTE: this enables full Firewalling/NAT mode.\n" .
- "(or nothing if finished): ";
+ printf(gettext("%sEnter the LAN interface name or 'a' for auto-detection %s" .
+ "NOTE: this enables full Firewalling/NAT mode.%s" .
+ "(or nothing if finished):%s"), "\n", "\n", "\n", " ");
$lanif = chop(fgets($fp));
@@ -241,7 +241,7 @@ EOD;
if ($lanif === "a")
$lanif = autodetect_interface("LAN", $fp);
else if (!array_key_exists($lanif, $iflist)) {
- echo "\nInvalid interface name '{$lanif}'\n";
+ printf(gettext("%sInvalid interface name '%s'%s)", "\n", $lanif), "\n");
unset($lanif);
continue;
}
@@ -258,22 +258,22 @@ EOD;
$i1 = $i + 1;
if($config['interfaces']['opt' . $i1]['descr'])
- echo "\nOptional interface {$i1} description found: {$config['interfaces']['opt' . $i1]['descr']}";
+ printf(gettext("%sOptional interface %s description found: %s"), "\n", $i1, $config['interfaces']['opt' . $i1]['descr']);
- echo "\nEnter the Optional {$i1} interface name or 'a' for auto-detection\n" .
- "(or nothing if finished): ";
+ printf(gettext("%sEnter the Optional %s{$i1} interface name or 'a' for auto-detection%s" .
+ "(or nothing if finished):%s"), "\n", $i1, "\n", " ");
$optif[$i] = chop(fgets($fp));
if ($optif[$i]) {
if ($optif[$i] === "a") {
- $ad = autodetect_interface("Optional " . $i1, $fp);
+ $ad = autodetect_interface(gettext("Optional") . " " . $i1, $fp);
if ($ad)
$optif[$i] = $ad;
else
unset($optif[$i]);
} else if (!array_key_exists($optif[$i], $iflist)) {
- echo "\nInvalid interface name '{$optif[$i]}'\n";
+ printf(gettext("%sInvalid interface name '%s'%s"), "\n", $optif[$i], "\n");
unset($optif[$i]);
continue;
}
@@ -301,7 +301,7 @@ EOD;
}
}
- echo "\nThe interfaces will be assigned as follows: \n\n";
+ echo "\n" . gettext("The interfaces will be assigned as follows:") . "\n\n";
echo "WAN -> " . $wanif . "\n";
if ($lanif != "")
@@ -413,20 +413,20 @@ EODD;
for (; isset($config['interfaces']['opt' . ($i+1)]); $i++)
unset($config['interfaces']['opt' . ($i+1)]);
- echo "\nWriting configuration...";
+ printf(gettext("%sWriting configuration..."), "\n");
write_config();
- echo "done.\n";
+ printf(gettext("done.%s"), "\n");
fclose($fp);
if($g['booting'])
return;
- echo "One moment while we reload the settings...";
+ echo gettext("One moment while we reload the settings...");
$g['booting'] = false;
- echo " done!\n";
+ echo gettext(" done!") . "\n";
touch("{$g['tmp_path']}/assign_complete");
@@ -446,12 +446,12 @@ EOD;
foreach ($iflist_prev as $ifn => $ifa) {
if (!$ifa['up'] && $iflist[$ifn]['up']) {
- echo "Detected link-up on interface {$ifn}.\n";
+ printf(gettext("Detected link-up on interface %s.%s"), $ifn, "\n");
return $ifn;
}
}
- echo "No link-up detected.\n";
+ printf(gettext("No link-up detected.%s"), "\n");
return null;
}
@@ -490,9 +490,9 @@ EOD;
while (1) {
$vlan = array();
- echo "\n\nVLAN Capable interfaces:\n\n";
+ echo "\n\n" . gettext("VLAN Capable interfaces:") . "\n\n";
if(!is_array($iflist)) {
- echo "No interfaces found!\n";
+ echo gettext("No interfaces found!") . "\n";
} else {
$vlan_capable=0;
foreach ($iflist as $iface => $ifa) {
@@ -505,28 +505,28 @@ EOD;
}
if($vlan_capable == 0) {
- echo "No VLAN capable interfaces detected.\n";
+ echo gettext("No VLAN capable interfaces detected.") . "\n";
return;
}
- echo "\nEnter the parent interface name for the new VLAN (or nothing if finished): ";
+ echo "\n" . gettext("Enter the parent interface name for the new VLAN (or nothing if finished):") . " ";
$vlan['if'] = chop(fgets($fp));
if ($vlan['if']) {
if (!array_key_exists($vlan['if'], $iflist) or
!is_jumbo_capable($vlan['if'])) {
- echo "\nInvalid interface name '{$vlan['if']}'\n";
+ printf(gettext("%sInvalid interface name '%s'%s"), "\n", $vlan['if'], "\n");
continue;
}
} else {
break;
}
- echo "Enter the VLAN tag (1-4094): ";
+ echo gettext("Enter the VLAN tag (1-4094):") . " ";
$vlan['tag'] = chop(fgets($fp));
$vlan['vlanif'] = "{$vlan['if']}_vlan{$vlan['tag']}";
if (!is_numericint($vlan['tag']) || ($vlan['tag'] < 1) || ($vlan['tag'] > 4094)) {
- echo "\nInvalid VLAN tag '{$vlan['tag']}'\n";
+ printf(gettext("%sInvalid VLAN tag '%s'%s"), "\n", $vlan['tag'], "\n");
continue;
}
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 1485669..78163fe 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -97,10 +97,10 @@ if($g['booting'] && file_exists("/cf/conf/config.xml")) {
if(stristr($config_contents, "<m0n0wall>") == true) {
if($g['booting']) echo ".";
/* user has just upgraded to m0n0wall, replace root xml tags */
- log_error("Upgrading m0n0wall configuration to pfSense... ");
+ log_error(gettext("Upgrading m0n0wall configuration to pfSense... "));
$config_contents = str_replace("m0n0wall","pfsense", $config_contents);
if (!config_validate("{$g['conf_path']}/config.xml"))
- log_error("ERROR! Could not convert m0n0wall -> pfsense in config.xml");
+ log_error(gettext("ERROR! Could not convert m0n0wall -> pfsense in config.xml"));
conf_mount_rw();
$fd = fopen("/cf/conf/config.xml", "w");
fwrite($fd, $config_contents);
@@ -130,9 +130,10 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
}
}
$cfgfstype = "msdosfs";
- echo "CDROM build\n";
- echo " CFG: {$cfgpartition}\n";
- echo " TYPE: {$cfgfstype}\n";
+ echo gettext("CDROM build") . "\n";
+ echo " " . gettext("CFG:") . " {$cfgpartition}\n";
+ echo " " . gettext("CFG:") . " {$cfgpartition}\n";
+ echo " " . gettext("TYPE:") . " {$cfgfstype}\n";
} else {
if($g['booting']) echo ".";
/* probe kernel known disks until we find one with config.xml */
@@ -147,7 +148,7 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
$cfgdevice = $mountdisk;
$cfgpartition = $cfgdevice . "a";
$cfgfstype = "ufs";
- echo "Found configuration on $cfgdevice.\n";
+ printf(gettext("Found configuration on %s.%s"), $cfgdevice, "\n");
}
mwexec("/sbin/umount -f {$g['cf_path']}");
@@ -162,7 +163,7 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
$cfgdevice = $mountdisk;
$cfgpartition = $cfgdevice . "d";
$cfgfstype = "ufs";
- echo "Found configuration on $cfgdevice.\n";
+ printf(gettext("Found configuration on %s.%s"), $cfgdevice, "\n");
}
mwexec("/sbin/umount -f {$g['cf_path']}");
@@ -176,11 +177,11 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
if (!$cfgdevice) {
$last_backup = discover_last_backup();
if($last_backup) {
- log_error("No config.xml found, attempting last known config restore.");
- file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
+ log_error(gettext("No config.xml found, attempting last known config restore."));
+ file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
restore_backup("/cf/conf/backup/{$last_backup}");
} else {
- log_error("No config.xml or config backups found, resetting to factory defaults.");
+ log_error(gettext("No config.xml or config backups found, resetting to factory defaults."));
restore_backup('/conf.default/config.xml');
}
}
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index 01bd7ec..9ac40c9 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -76,10 +76,10 @@ function encrypted_configxml() {
fwrite($fd, $data);
fclose($fd);
exec("/bin/mv {$g['conf_path']}/config.xml.tmp {$g['conf_path']}/config.xml");
- echo "\nConfig.xml unlocked.\n";
+ echo "\n" . gettext("Config.xml unlocked.") . "\n";
fclose($fp);
} else {
- echo "\nInvalid password entered. Please try again.\n";
+ echo "\n" . gettext("Invalid password entered. Please try again.") . "\n";
}
}
}
@@ -102,12 +102,12 @@ function parse_config($parse = false) {
if (!file_exists("{$g['conf_path']}/config.xml") || filesize("{$g['conf_path']}/config.xml") == 0) {
$last_backup = discover_last_backup();
if($last_backup) {
- log_error("No config.xml found, attempting last known config restore.");
- file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
+ log_error(gettext("No config.xml found, attempting last known config restore."));
+ file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
restore_backup("{$g['conf_path']}/backup/{$last_backup}");
} else {
unlock($lockkey);
- die("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup.");
+ die(gettext("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup."));
}
}
@@ -135,9 +135,9 @@ function parse_config($parse = false) {
if ($last_backup)
restore_backup("/cf/conf/backup/{$last_backup}");
else {
- log_error("Could not restore config.xml.");
+ log_error(gettext("Could not restore config.xml."));
unlock($lockkey);
- die("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup.");
+ die(gettext("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup."));
}
}
$config = parse_xml_config($g['conf_path'] . '/config.xml', array($g['xml_rootobj'], 'pfsense'));
@@ -207,8 +207,8 @@ function restore_backup($file) {
unlink_if_exists("{$g['tmp_path']}/config.cache");
copy("$file","/cf/conf/config.xml");
disable_security_checks();
- log_error("{$g['product_name']} is restoring the configuration $file");
- file_notice("config.xml", "{$g['product_name']} is restoring the configuration $file", "{$g['product_name']}Configurator", "");
+ log_error(sprintf(gettext('%1$s is restoring the configuration %2$s'), $g['product_name'], $file));
+ file_notice("config.xml", sprintf(gettext('%1$s is restoring the configuration %2$s'), $g['product_name'], $file), "pfSenseConfigurator", "");
conf_mount_ro();
}
}
@@ -230,29 +230,29 @@ function parse_config_bootup() {
if ($g['booting']) {
if (strstr($g['platform'], "cdrom")) {
/* try copying the default config. to the floppy */
- echo "Resetting factory defaults...\n";
+ echo gettext("Resetting factory defaults...") . "\n";
reset_factory_defaults(true);
if (!file_exists("{$g['conf_path']}/config.xml")) {
- echo "No XML configuration file found - using factory defaults.\n";
- echo "Make sure that the configuration floppy disk with the conf/config.xml\n";
- echo "file is inserted. If it isn't, your configuration changes will be lost\n";
- echo "on reboot.\n";
+ echo gettext("No XML configuration file found - using factory defaults.\n" .
+ "Make sure that the configuration floppy disk with the conf/config.xml\n" .
+ "file is inserted. If it isn't, your configuration changes will be lost\n" .
+ "on reboot.\n");
}
} else {
$last_backup = discover_last_backup();
if($last_backup) {
log_error("No config.xml found, attempting last known config restore.");
- file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
+ file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
restore_backup("/cf/conf/backup/{$last_backup}");
}
if(!file_exists("{$g['conf_path']}/config.xml")) {
- echo "XML configuration file not found. {$g['product_name']} cannot continue booting.\n";
+ echo sprintf(gettext("XML configuration file not found. %s cannot continue booting."), $g['product_name']) . "\n";
unlock($lockkey);
mwexec("/sbin/halt");
exit;
}
log_error("Last known config found and restored. Please double check your configuration file for accuracy.");
- file_notice("config.xml", "Last known config found and restored. Please double check your configuration file for accuracy.", "pfSenseConfigurator", "");
+ file_notice("config.xml", gettext("Last known config found and restored. Please double check your configuration file for accuracy."), "pfSenseConfigurator", "");
}
} else {
unlock($lockkey);
@@ -263,12 +263,12 @@ function parse_config_bootup() {
if (filesize("{$g['conf_path']}/config.xml") == 0) {
$last_backup = discover_last_backup();
if($last_backup) {
- log_error("No config.xml found, attempting last known config restore.");
- file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
+ log_error(gettext("No config.xml found, attempting last known config restore."));
+ file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
restore_backup("{$g['conf_path']}/backup/{$last_backup}");
} else {
unlock($lockkey);
- die("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup.");
+ die(gettext("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup."));
}
}
unlock($lockkey);
@@ -314,7 +314,7 @@ function conf_mount_rw() {
$status = mwexec("/sbin/mount -u -w -o sync,noatime {$g['cf_path']}");
if($status <> 0) {
if($g['booting'])
- echo "Disk is dirty. Running fsck -y\n";
+ echo gettext("Disk is dirty. Running fsck -y") . "\n";
mwexec("/sbin/fsck -y {$g['cf_path']}");
$status = mwexec("/sbin/mount -u -w -o sync,noatime {$g['cf_path']}");
}
@@ -325,7 +325,7 @@ function conf_mount_rw() {
$status = mwexec("/sbin/mount -u -w -o sync,noatime /");
/* we could not mount this correctly. kick off fsck */
if($status <> 0) {
- log_error("File system is dirty. Launching FSCK for /");
+ log_error(gettext("File system is dirty. Launching FSCK for /"));
mwexec("/sbin/fsck -y /");
$status = mwexec("/sbin/mount -u -w -o sync,noatime /");
}
@@ -376,7 +376,7 @@ function conf_mount_ro() {
function convert_config() {
global $config, $g;
$now = date("H:i:s");
- log_error("Start Configuration upgrade at $now, set execution timeout to 15 minutes");
+ log_error(sprintf(gettext("Start Configuration upgrade at %s, set execution timeout to 15 minutes"), $now));
//ini_set("max_execution_time", "900");
/* special case upgrades */
@@ -386,8 +386,8 @@ function convert_config() {
if(stristr($config['cron']['item'][$x]['command'], "rc.update_bogons.sh")) {
if($config['cron']['item'][$x]['hour'] == "*" ) {
$config['cron']['item'][$x]['hour'] = "3";
- write_config("Updated bogon update frequency to 3am");
- log_error("Updated bogon update frequency to 3am");
+ write_config(gettext("Updated bogon update frequency to 3am"));
+ log_error(gettext("Updated bogon update frequency to 3am"));
}
}
}
@@ -417,10 +417,10 @@ function convert_config() {
}
$now = date("H:i:s");
- log_error("Ended Configuration upgrade at $now");
+ log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now));
if ($prev_version != $config['version'])
- write_config("Upgraded config version level from {$prev_version} to {$config['version']}");
+ write_config(sprintf(gettext('Upgraded config version level from %1$s to %2$s'), $prev_version, $config['version']));
}
/****f* config/safe_write_file
@@ -509,7 +509,7 @@ function write_config($desc="Unknown", $backup = true) {
/* Log the running script so it's not entirely unlogged what changed */
if ($desc == "Unknown")
- $desc = "{$_SERVER['SCRIPT_NAME']} made unknown change";
+ $desc = sprintf(gettext("%s made unknown change"), $_SERVER['SCRIPT_NAME']);
$config['revision']['description'] = "{$username}: " . $desc;
$config['revision']['username'] = $username;
@@ -522,9 +522,9 @@ function write_config($desc="Unknown", $backup = true) {
/* write new configuration */
if (!safe_write_file("{$g['cf_conf_path']}/config.xml", $xmlconfig, false)) {
- log_error("WARNING: Config contents could not be save. Could not open file!");
+ log_error(gettext("WARNING: Config contents could not be save. Could not open file!"));
unlock($lockkey);
- file_notice("config.xml", "Unable to open {$g['cf_conf_path']}/config.xml for writing in write_config()\n");
+ file_notice("config.xml", sprintf(gettext("Unable to open %s/config.xml for writing in write_config()%s"), $g['cf_conf_path'], "\n"));
return -1;
}
@@ -633,7 +633,7 @@ function config_restore($conffile) {
conf_mount_ro();
- write_config("Reverted to " . array_pop(explode("/", $conffile)) . ".", false);
+ write_config(gettext("Reverted to") . " " . array_pop(explode("/", $conffile)) . ".", false);
return 0;
}
@@ -648,9 +648,9 @@ function config_install($conffile) {
return 1;
if($g['booting'] == true)
- echo "Installing configuration...\n";
+ echo gettext("Installing configuration...") . "\n";
else
- log_error("Installing configuration ....");
+ log_error(gettext("Installing configuration ...."));
conf_mount_rw();
$lockkey = lock('config', LOCK_EX);
@@ -701,13 +701,13 @@ function config_validate($conffile) {
$xml_parser = xml_parser_create();
if (!($fp = fopen($conffile, "r"))) {
- $xmlerr = "XML error: unable to open file";
+ $xmlerr = gettext("XML error: unable to open file");
return false;
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
- $xmlerr = sprintf("%s at line %d",
+ $xmlerr = sprintf(gettext('%1$s at line %2$d'),
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser));
return false;
@@ -753,9 +753,9 @@ function cleanup_backupcache($revisions = 30, $lock = false) {
echo ".";
$newxml = parse_xml_config($backup, array($g['xml_rootobj'], 'pfsense'));
if($newxml == "-1") {
- log_error("The backup cache file $backup is corrupted. Unlinking.");
+ log_error(sprintf(gettext("The backup cache file %s is corrupted. Unlinking."), $backup));
unlink($backup);
- log_error("The backup cache file $backup is corrupted. Unlinking.");
+ log_error(sprintf(gettext("The backup cache file %s is corrupted. Unlinking."), $backup));
continue;
}
if($newxml['revision']['description'] == "")
diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc
index 094bc83..39a4f24 100644
--- a/etc/inc/easyrule.inc
+++ b/etc/inc/easyrule.inc
@@ -113,7 +113,7 @@ function easyrule_block_rule_create($int = 'wan') {
$filterent['interface'] = $int;
$filterent['source']['address'] = $blockaliasname . strtoupper($int);
$filterent['destination']['any'] = '';
- $filterent['descr'] = "Easy Rule: Blocked from Firewall Log View";
+ $filterent['descr'] = gettext("Easy Rule: Blocked from Firewall Log View");
array_splice($a_filter, 0, 0, array($filterent));
@@ -162,15 +162,15 @@ function easyrule_block_alias_add($host, $int = 'wan') {
$alias['descr'] = $a_aliases[$id]['descr'];
$alias['address'] = $a_aliases[$id]['address'] . ' ' . $host . '/32';
- $alias['detail'] = $a_aliases[$id]['detail'] . 'Entry added ' . date('r') . '||';
+ $alias['detail'] = $a_aliases[$id]['detail'] . gettext('Entry added') . ' ' . date('r') . '||';
} else {
/* Create a new alias with all the proper information */
$alias['name'] = $blockaliasname . strtoupper($int);
$alias['type'] = 'network';
- $alias['descr'] = "Hosts blocked from Firewall Log view";
+ $alias['descr'] = gettext("Hosts blocked from Firewall Log view");
$alias['address'] = $host . '/32';
- $alias['detail'] = 'Entry added ' . date('r') . '||';
+ $alias['detail'] = gettext('Entry added') . ' ' . date('r') . '||';
}
/* Replace the old alias if needed, otherwise tack it on the end */
@@ -245,8 +245,12 @@ function easyrule_pass_rule_add($int, $proto, $srchost, $dsthost, $dstport, $ipp
$filterent = array();
$filterent['type'] = 'pass';
$filterent['interface'] = $int;
+<<<<<<< HEAD
$filterent['ipprotocol'] = $ipproto;
$filterent['descr'] = "Easy Rule: Passed from Firewall Log View";
+=======
+ $filterent['descr'] = gettext("Easy Rule: Passed from Firewall Log View");
+>>>>>>> upstream/master
if ($proto != "any")
$filterent['protocol'] = $proto;
@@ -277,21 +281,21 @@ function easyrule_parse_block($int, $src, $ipproto) {
$filterent['ipprotocol'] = $ipproto;
if (!empty($src) && !empty($int)) {
if (!is_ipaddr($src)) {
- return "Tried to block invalid IP: " . htmlspecialchars($src);
+ return gettext("Tried to block invalid IP:") . ' ' . htmlspecialchars($src);
}
$int = easyrule_find_rule_interface($int);
if ($int === false) {
- return "Invalid interface for block rule: " . htmlspecialchars($int);
+ return gettext("Invalid interface for block rule:") . ' ' . htmlspecialchars($int);
}
if (easyrule_block_host_add($src, $int)) {
- return "Host added successfully";
+ return gettext("Host added successfully");
} else {
- return "Failed to create block rule, alias, or add host.";
+ return gettext("Failed to create block rule, alias, or add host.");
}
} else {
- return "Tried to block but had no host IP or interface";
+ return gettext("Tried to block but had no host IP or interface");
}
- return "Unknown block error.";
+ return gettext("Unknown block error.");
}
function easyrule_parse_pass($int, $proto, $src, $dst, $dstport = 0, $ipproto = inet) {
/* Check for valid int, srchost, dsthost, dstport, and proto */
@@ -300,37 +304,37 @@ function easyrule_parse_pass($int, $proto, $src, $dst, $dstport = 0, $ipproto =
if (!empty($int) && !empty($proto) && !empty($src) && !empty($dst)) {
$int = easyrule_find_rule_interface($int);
if ($int === false) {
- return "Invalid interface for pass rule: " . htmlspecialchars($int);
+ return gettext("Invalid interface for pass rule:") . ' ' . htmlspecialchars($int);
}
if (getprotobyname($proto) == -1) {
- return "Invalid protocol for pass rule: " . htmlspecialchars($proto);
+ return gettext("Invalid protocol for pass rule:") . ' ' . htmlspecialchars($proto);
}
if (!is_ipaddr($src)) {
- return "Tried to pass invalid source IP: " . htmlspecialchars($src);
+ return gettext("Tried to pass invalid source IP:") . ' ' . htmlspecialchars($src);
}
if (!is_ipaddr($dst)) {
- return "Tried to pass invalid destination IP: " . htmlspecialchars($dst);
+ return gettext("Tried to pass invalid destination IP:") . ' ' . htmlspecialchars($dst);
}
if (in_array($proto, $protocols_with_ports)) {
if (empty($dstport)) {
- return "Missing destination port: " . htmlspecialchars($dstport);
+ return gettext("Missing destination port:") . ' ' . htmlspecialchars($dstport);
}
if (!is_port($dstport)) {
- return "Tried to pass invalid destination port: " . htmlspecialchars($dstport);
+ return gettext("Tried to pass invalid destination port:") . ' ' . htmlspecialchars($dstport);
}
} else {
$dstport = 0;
}
/* Should have valid input... */
if (easyrule_pass_rule_add($int, $proto, $src, $dst, $dstport, $ipproto)) {
- return "Successfully added pass rule!";
+ return gettext("Successfully added pass rule!");
} else {
- return "Failed to add pass rule.";
+ return gettext("Failed to add pass rule.");
}
} else {
- return "Missing parameters for pass rule.";
+ return gettext("Missing parameters for pass rule.");
}
- return "Unknown pass error.";
+ return gettext("Unknown pass error.");
}
?>
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 2e305f0..20b032a 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -192,7 +192,7 @@ function filter_configure_sync() {
filter_pflog_start();
- update_filter_reload_status("Initializing");
+ update_filter_reload_status(gettext("Initializing"));
/* invalidate interface cache */
get_interface_arr(true);
@@ -204,45 +204,45 @@ function filter_configure_sync() {
/* Get interface list to work with. */
filter_generate_optcfg_array();
if($g['booting'] == true)
- echo "Configuring firewall";
+ echo gettext("Configuring firewall");
/* generate aliases */
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Creating aliases");
+ update_filter_reload_status(gettext("Creating aliases"));
$aliases = filter_generate_aliases();
$gateways = filter_generate_gateways();
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Generating NAT rules");
+ update_filter_reload_status(gettext("Generating NAT rules"));
/* generate nat rules */
$natrules = filter_nat_rules_generate();
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Generating filter rules");
+ update_filter_reload_status(gettext("Generating filter rules"));
/* generate pfctl rules */
$pfrules = filter_rules_generate();
/* generate altq, limiter */
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Generating ALTQ queues");
+ update_filter_reload_status(gettext("Generating ALTQ queues"));
$altq_queues = filter_generate_altq_queues();
- update_filter_reload_status("Generating Limiter rules");
+ update_filter_reload_status(gettext("Generating Limiter rules"));
$dummynet_rules = filter_generate_dummynet_rules();
- update_filter_reload_status("Generating Layer7 rules");
+ update_filter_reload_status(gettext("Generating Layer7 rules"));
generate_layer7_files();
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Loading filter rules");
+ update_filter_reload_status(gettext("Loading filter rules"));
/* enable pf if we need to, otherwise disable */
if(!isset ($config['system']['disablefilter'])) {
mwexec("/sbin/pfctl -e", true);
} else {
mwexec("/sbin/pfctl -d");
unlink_if_exists("{$g['tmp_path']}/filter_loading");
- update_filter_reload_status("Filter is disabled. Not loading rules.");
+ update_filter_reload_status(gettext("Filter is disabled. Not loading rules."));
if($g['booting'] == true)
- echo "done.\n";
+ echo gettext("done.") . "\n";
unlock($filterlck);
return;
}
@@ -254,7 +254,7 @@ function filter_configure_sync() {
$rules = "";
$rules .= "{$aliases} \n";
$rules .= "{$gateways} \n";
- update_filter_reload_status("Setting up logging information");
+ update_filter_reload_status(gettext("Setting up logging information"));
$rules .= filter_setup_logging_interfaces();
if($config['system']['optimization'] <> "") {
$rules .= "set optimization {$config['system']['optimization']}\n";
@@ -285,7 +285,7 @@ function filter_configure_sync() {
$rules .= "\n";
$rules .= "set skip on pfsync0\n";
$rules .= "\n";
- update_filter_reload_status("Setting up SCRUB information");
+ update_filter_reload_status(gettext("Setting up SCRUB information"));
$rules .= filter_generate_scrubing();
$rules .= "\n";
/* NOTE: Disabled until we catch up with dummynet changes. */
@@ -331,11 +331,11 @@ function filter_configure_sync() {
$line_number = $line_error[1];
$line_split = file("{$g['tmp_path']}/rules.debug");
if(is_array($line_split))
- $line_error = "The line in question reads [{$line_number}]: {$line_split[$line_number-1]}";
+ $line_error = sprintf(gettext('The line in question reads [%1$d]: %2$s'), $line_number, $line_split[$line_number-1]);
if($line_error and $line_number) {
- file_notice("filter_load", "There were error(s) loading the rules: {$rules_error} {$line_error}", "Filter Reload", "");
+ file_notice("filter_load", sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $rules_error, $line_error), "Filter Reload", "");
log_error("There were error(s) loading the rules: {$rules_error} - {$line_error}");
- update_filter_reload_status("There were error(s) loading the rules: {$rules_error} - {$line_error}");
+ update_filter_reload_status(sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $rules_error, $line_error));
unlock($filterlck);
return;
}
@@ -344,12 +344,13 @@ function filter_configure_sync() {
exec("/sbin/pfctl -d");
exec("/sbin/pfctl -e");
exec("/sbin/pfctl -f {$g['tmp_path']}/rules.debug");
- file_notice("pf_busy", "PF was wedged/busy and has been reset.", "pf_busy", "");
- log_error("PF was wedged/busy and has been reset.");
+ $error_msg = gettext("PF was wedged/busy and has been reset.");
+ file_notice("pf_busy", $error_msg, "pf_busy", "");
+ log_error($error_msg);
}
}
- update_filter_reload_status("Starting up layer7 daemon");
+ update_filter_reload_status(gettext("Starting up layer7 daemon"));
layer7_start_l7daemon();
if(!empty($filterdns)) {
@@ -396,21 +397,21 @@ function filter_configure_sync() {
if($g['booting'] == true)
echo ".";
- update_filter_reload_status("Processing down interface states");
+ update_filter_reload_status(gettext("Processing down interface states"));
filter_delete_states_for_down_gateways();
- update_filter_reload_status("Running plugins");
+ update_filter_reload_status(gettext("Running plugins"));
if(is_dir("/usr/local/pkg/pf/")) {
/* process packager manager custom rules */
- update_filter_reload_status("Running plugins (pf)");
+ update_filter_reload_status(gettext("Running plugins (pf)"));
run_plugins("/usr/local/pkg/pf/");
- update_filter_reload_status("Plugins completed.");
+ update_filter_reload_status(gettext("Plugins completed."));
}
- update_filter_reload_status("Done");
+ update_filter_reload_status(gettext("Done"));
if($g['booting'] == true)
- echo "done.\n";
+ echo gettext("done.") . "\n";
unlock($filterlck);
return 0;
@@ -628,7 +629,7 @@ function filter_generate_gateways() {
$rules = "# Gateways\n";
- update_filter_reload_status("Creating gateway group item...");
+ update_filter_reload_status(gettext("Creating gateway group item..."));
/* Lookup Gateways to be used in filter rules once */
$GatewaysList = return_gateways_array();
@@ -658,14 +659,14 @@ function filter_generate_gateways() {
$gatewayip = $member['gwip'];
if (($int <> "") && is_ipaddr($gatewayip)) {
if ($g['debug'])
- log_error("Setting up route with {$gatewayip} om $int");
+ log_error(sprintf(gettext('Setting up route with %1$s on %2$s'), $gatewayip, $int));
if ($member['weight'] > 1) {
$routeto .= str_repeat("( {$int} {$gatewayip} ) ", $member['weight']);
} else
$routeto .= "( {$int} {$gatewayip} ) ";
$foundlb++;
} else
- log_error("An error occurred while trying to find the interface got $gatewayip . The rule has not been added.");
+ log_error(sprintf(gettext("An error occurred while trying to find the interface got %s . The rule has not been added."), $gatewayip));
}
$route = "";
if ($foundlb > 0) {
@@ -917,7 +918,7 @@ function filter_generate_reflection_nat($rule, &$route_table, $nat_ifs, $protoco
// Initialize natrules holder string
$natrules = "";
- update_filter_reload_status("Creating reflection NAT rule for {$rule['descr']}...");
+ update_filter_reload_status(sprintf(gettext("Creating reflection NAT rule for %s..."), $rule['descr']));
/* TODO: Add this option to port forwards page. */
if(isset($rule['staticnatport'])) {
@@ -971,7 +972,7 @@ function filter_generate_reflection($rule, $nordr, $rdr_ifs, $srcaddr, $dstaddr_
else
$reflectiontimeout = "2000";
- update_filter_reload_status("Creating reflection rule for {$rule['descr']}...");
+ update_filter_reload_status(sprintf(gettext("Creating reflection rule for %s..."), $rule['descr']));
$rdr_if_list = implode(" ", $rdr_ifs);
if(count($rdr_ifs) > 1)
@@ -1229,7 +1230,7 @@ function filter_nat_rules_generate() {
$natrules = "nat-anchor \"natearly/*\"\n";
$natrules .= "nat-anchor \"natrules/*\"\n\n";
- update_filter_reload_status("Creating 1:1 rules...");
+ update_filter_reload_status(gettext("Creating 1:1 rules..."));
$reflection_txt = "";
$route_table = "";
@@ -1328,7 +1329,7 @@ function filter_nat_rules_generate() {
/* advanced outbound rules */
if(is_array($config['nat']['advancedoutbound']['rule'])) {
foreach ($config['nat']['advancedoutbound']['rule'] as $obent) {
- update_filter_reload_status("Creating advanced outbound rule {$obent['descr']}");
+ update_filter_reload_status(sprintf(gettext("Creating advanced outbound rule %s"), $obent['descr']));
$src = alias_expand($obent['source']['network']);
if(!$src)
$src = $obent['source']['network'];
@@ -1364,7 +1365,7 @@ function filter_nat_rules_generate() {
}
} else {
/* standard outbound rules (one for each interface) */
- update_filter_reload_status("Creating outbound NAT rules");
+ update_filter_reload_status(gettext("Creating outbound NAT rules"));
$tonathosts = "";
$numberofnathosts = 0;
@@ -1456,7 +1457,7 @@ function filter_nat_rules_generate() {
foreach ($FilterIflist as $if => $ifcfg) {
if (substr($ifcfg['if'], 0, 4) == "ovpn")
continue;
- update_filter_reload_status("Creating outbound rules {$if} - ({$ifcfg['descr']})");
+ update_filter_reload_status(sprintf(gettext('Creating outbound rules %1$s - (%2$s)'), $if, $ifcfg['descr']));
if(interface_has_gateway($if)) {
$target = $ifcfg['ip'];
/* create outbound nat entries for all local networks */
@@ -1474,7 +1475,7 @@ function filter_nat_rules_generate() {
$natrules .= "\n# Load balancing anchor\n";
$natrules .= "rdr-anchor \"relayd/*\"\n";
- update_filter_reload_status("Setting up TFTP helper");
+ update_filter_reload_status(gettext("Setting up TFTP helper"));
$natrules .= "# TFTP proxy\n";
$natrules .= "rdr-anchor \"tftp-proxy/*\"\n";
@@ -1514,7 +1515,7 @@ function filter_nat_rules_generate() {
$starting_localhost_port = 19000;
$natrules .= "# NAT Inbound Redirects\n";
foreach ($config['nat']['rule'] as $rule) {
- update_filter_reload_status("Creating NAT rule {$rule['descr']}");
+ update_filter_reload_status(sprintf(gettext("Creating NAT rule %s"), $rule['descr']));
if(isset($rule['disabled']))
continue;
@@ -1658,7 +1659,7 @@ function filter_nat_rules_generate() {
function filter_generate_user_rule_arr($rule) {
global $config;
- update_filter_reload_status("Creating filter rule {$rule['descr']} ...");
+ update_filter_reload_status(sprintf(gettext("Creating filter rule %s ..."), $rule['descr']));
$ret = array();
$line = filter_generate_user_rule($rule);
$ret['rule'] = $line;
@@ -1792,7 +1793,7 @@ function filter_generate_address(& $rule, $target = "source", $isnat = false) {
$srcport = explode("-", $rule[$target]['port']);
$srcporta = alias_expand($srcport[0]);
if(!$srcporta)
- log_error("filter_generate_address: {$srcport[0]} is not a valid source port.");
+ log_error(sprintf(gettext("filter_generate_address: %s is not a valid source port."), $srcport[0]));
else if((!$srcport[1]) || ($srcport[0] == $srcport[1])) {
$src .= " port {$srcporta} ";
} else if(($srcport[0] == 1) && ($srcport[1] == 65535)) {
@@ -1908,7 +1909,7 @@ function filter_generate_user_rule($rule) {
$aline['quick'] = " quick ";
/* set the gateway interface */
- update_filter_reload_status("Setting up pass/block rules {$rule['descr']}");
+ update_filter_reload_status(sprintf(gettext("Setting up pass/block rules %s"), $rule['descr']));
/* do not process reply-to for gateway'd rules */
if($rule['gateway'] == "" && $aline['direction'] <> "" && interface_has_gateway($rule['interface']) && !isset($config['system']['disablereplyto'])) {
@@ -1927,7 +1928,7 @@ function filter_generate_user_rule($rule) {
$aline['reply'] = "reply-to ( {$ifcfg['if']} {$rg} ) ";
} else {
if($rule['interface'] <> "pptp") {
- log_error("Could not find IPv4 gateway for interface({$rule['interface']}).");
+ log_error(sprintf(gettext("Could not find IPv4 gateway for interface (%s)."), $rule['interface']));
}
}
}
@@ -1954,7 +1955,7 @@ function filter_generate_user_rule($rule) {
if($rule['source']['port'] <> "" || $rule['destination']['port'] <> "")
$aline['prot'] = " proto tcp ";
}
- update_filter_reload_status("Creating rule {$rule['descr']}");
+ update_filter_reload_status(sprintf(gettext("Creating rule %s"), $rule['descr']));
/* source address */
$src = filter_generate_address($rule, "source");
@@ -2163,7 +2164,7 @@ function filter_generate_user_rule($rule) {
function filter_rules_generate() {
global $config, $g, $FilterIflist, $time_based_rules, $GatewaysList;
- update_filter_reload_status("Creating default rules");
+ update_filter_reload_status(gettext("Creating default rules"));
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "filter_rules_generate() being called $mt\n";
@@ -2507,7 +2508,7 @@ EOD;
/* this shouldnt ever happen but instead of breaking the clients ruleset
* log an error.
*/
- log_error("ERROR! PPTP enabled but could not resolve the \$pptpdtarget");
+ log_error(gettext("ERROR! PPTP enabled but could not resolve the \$pptpdtarget"));
}
}
@@ -2603,7 +2604,7 @@ EOD;
}
}
- update_filter_reload_status("Creating IPsec rules...");
+ update_filter_reload_status(gettext("Creating IPsec rules..."));
$ipfrules .= filter_generate_ipsec_rules();
$ipfrules .= <<<EOD
@@ -2656,7 +2657,7 @@ function filter_rules_spoofcheck_generate($ifname, $if, $sa, $sn, $log) {
/* COMPAT Function */
function tdr_install_cron($should_install) {
- log_error("Please use filter_tdr_install_cron() function tdr_install_cron will be deprecated!");
+ log_error(gettext("Please use filter_tdr_install_cron() function tdr_install_cron will be deprecated!"));
filter_tdr_install_cron($should_install);
}
@@ -2701,7 +2702,7 @@ function filter_tdr_install_cron($should_install) {
$cron_item['who'] = "root";
$cron_item['command'] = "/etc/rc.filter_configure_sync";
$config['cron']['item'][] = $cron_item;
- write_config("Installed 15 minute filter reload for Time Based Rules");
+ write_config(gettext("Installed 15 minute filter reload for Time Based Rules"));
configure_cron();
}
break;
@@ -3056,17 +3057,17 @@ function discover_pkg_rules($ruletype) {
$rules = "";
$files = glob("/usr/local/pkg/*.inc");
foreach($files as $pkg_inc) {
- update_filter_reload_status("Checking for {$ruletype} PF hooks in package {$pkg_inc}");
+ update_filter_reload_status(sprintf(gettext('Checking for %1$s PF hooks in package %2$s'), $ruletype, $pkg_inc));
require_once($pkg_inc);
$pkg = basename($pkg_inc, ".inc");
$pkg_generate_rules = "{$pkg}_generate_rules";
if(function_exists($pkg_generate_rules)) {
- update_filter_reload_status("Processing early {$ruletype} rules for package {$pkg_inc}");
+ update_filter_reload_status(sprintf(gettext('Processing early %1$s rules for package %2$s'), $ruletype, $pkg_inc));
$tmprules = $pkg_generate_rules("$ruletype");
file_put_contents("{$g['tmp_path']}/rules.test.packages", $aliases . $tmprules);
$status = mwexec("/sbin/pfctl -nf {$g['tmp_path']}/rules.test.packages");
if ($status <> 0) {
- $errorrules = "There was an error while parsing the package filter rules for {$pkg_inc}.\n";
+ $errorrules = sprintf(gettext("There was an error while parsing the package filter rules for %s."), $pkg_inc) . "\n";
log_error($errorrules);
file_put_contents("{$g['tmp_path']}/rules.packages.{$pkg}", "#{$errorrules}\n");
continue;
diff --git a/etc/inc/filter_log.inc b/etc/inc/filter_log.inc
index 1c0e9ef..9b85a34 100644
--- a/etc/inc/filter_log.inc
+++ b/etc/inc/filter_log.inc
@@ -161,7 +161,7 @@ function parse_filter_line($line) {
return $flent;
} else {
if($g['debug']) {
- log_error("There was a error parsing rule: $errline. Please report to mailing list or forum.");
+ log_error(sprintf(gettext("There was a error parsing rule: %s. Please report to mailing list or forum."), $errline));
}
return "";
}
@@ -205,7 +205,7 @@ function get_port_with_service($port, $proto) {
$service = getservbyport($port, $proto);
$portstr = "";
if ($service) {
- $portstr = "<span title=\"Service {$port}/{$proto}: {$service}\">" . htmlspecialchars($port) . "</span>";
+ $portstr = sprintf('<span title="' . gettext('Service %1$s/%2$s: %3$s') . '">' . htmlspecialchars($port) . '</span>', $port, $proto, $service);
} else {
$portstr = htmlspecialchars($port);
}
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 17dc3c8..27e8020 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -215,7 +215,7 @@ EOD;
* not strictly necessary but is a added level of protection.
*/
if (is_ipaddr($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
- log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}");
+ log_error(sprintf(gettext('Removing static route for monitor %1$s and adding a new route through %2$s'), $gateway['monitor'], $gateway['gateway']));
mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']), true);
mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) .
" " . escapeshellarg($gateway['gateway']), true);
@@ -426,15 +426,15 @@ function return_gateway_groups_array() {
$status = $gateways_status[$gwname];
$gwdown = false;
if (stristr($status['status'], "down")) {
- $msg = "MONITOR: {$gwname} is down, removing from routing group";
+ $msg = sprintf(gettext("MONITOR: %s is down, removing from routing group"), $gwname);
$gwdown = true;
} else if (stristr($status['status'], "loss") && strstr($group['trigger'], "loss")) {
/* packet loss */
- $msg = "MONITOR: {$gwname} has packet loss, removing from routing group";
+ $msg = sprintf(gettext("MONITOR: %s has packet loss, removing from routing group"), $gwname);
$gwdown = true;
} else if (stristr($status['status'], "delay") && strstr($group['trigger'] , "latency")) {
/* high latency */
- $msg = "MONITOR: {$gwname} has high latency, removing from routing group";
+ $msg = sprintf(gettext("MONITOR: %s has high latency, removing from routing group"), $gwname);
$gwdown = true;
}
if ($gwdown == true) {
@@ -450,7 +450,7 @@ function return_gateway_groups_array() {
if($tiers_count == 0) {
/* Oh dear, we have no members! Engage Plan B */
if (!$g['booting']) {
- $msg = "Gateways status could not be determined, considering all as up/active.";
+ $msg = gettext("Gateways status could not be determined, considering all as up/active.");
log_error($msg);
notify_via_growl($msg);
notify_via_smtp($msg);
@@ -504,7 +504,7 @@ function dhclient_update_gateway_groups_defaultroute($interface = "wan") {
}
}
if($changed && $current_gw)
- write_config("Updating gateway group gateway for $interface - new gateway is $current_gw");
+ write_config(sprintf(gettext('Updating gateway group gateway for %1$s - new gateway is %2$s'), $interfac, $current_gw));
}
function lookup_gateway_ip_by_name($name) {
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 4bbc4ac..a5f647c 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -48,7 +48,7 @@ require_once("cmd_chain.inc");
function interfaces_bring_up($interface) {
if(!$interface) {
- log_error("interfaces_bring_up() was called but no variable defined.");
+ log_error(gettext("interfaces_bring_up() was called but no variable defined."));
log_error( "Backtrace: " . debug_backtrace() );
return;
}
@@ -206,18 +206,18 @@ This block of code is only entered for OPTx interfaces that are configured for P
function interfaces_loopback_configure() {
if($g['booting'])
- echo "Configuring loopback interface...";
+ echo gettext("Configuring loopback interface...");
pfSense_interface_setaddress("lo0", "127.0.0.1");
interfaces_bring_up("lo0");
if($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
return 0;
}
function interfaces_vlan_configure() {
global $config, $g;
if($g['booting'])
- echo "Configuring VLAN interfaces...";
+ echo gettext("Configuring VLAN interfaces...");
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
foreach ($config['vlans']['vlan'] as $vlan) {
if(empty($vlan['vlanif']))
@@ -227,14 +227,14 @@ function interfaces_vlan_configure() {
}
}
if($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
function interface_vlan_configure(&$vlan) {
global $config, $g;
if (!is_array($vlan)) {
- log_error("VLAN: called with wrong options. Problems with config!");
+ log_error(gettext("VLAN: called with wrong options. Problems with config!"));
return;
}
$if = $vlan['if'];
@@ -242,7 +242,7 @@ function interface_vlan_configure(&$vlan) {
$tag = $vlan['tag'];
if (empty($if)) {
- log_error("interface_vlan_confgure called with if undefined.");
+ log_error(gettext("interface_vlan_confgure called with if undefined."));
return;
}
@@ -276,14 +276,14 @@ function interface_qinq_configure(&$vlan, $fd = NULL) {
global $config, $g;
if (!is_array($vlan)) {
- log_error("QinQ compat VLAN: called with wrong options. Problems with config!\n");
+ log_error(sprintf(gettext("QinQ compat VLAN: called with wrong options. Problems with config!%s"), "\n"));
return;
}
$qinqif = $vlan['if'];
$tag = $vlan['tag'];
if(empty($qinqif)) {
- log_error("interface_qinq_confgure called with if undefined.\n");
+ log_error(sprintf(gettext("interface_qinq_confgure called with if undefined.%s"), "\n"));
return;
}
$vlanif = interface_vlan_configure($vlan);
@@ -345,7 +345,7 @@ function interface_qinq_configure(&$vlan, $fd = NULL) {
function interfaces_qinq_configure() {
global $config, $g;
if($g['booting'])
- echo "Configuring QinQ interfaces...";
+ echo gettext("Configuring QinQ interfaces...");
if (is_array($config['qinqs']['qinqentry']) && count($config['qinqs']['qinqentry'])) {
foreach ($config['qinqs']['qinqentry'] as $qinq) {
/* XXX: Maybe we should report any errors?! */
@@ -353,14 +353,14 @@ function interfaces_qinq_configure() {
}
}
if($g['booting'])
- echo "done.\n";
+ echo gettext( "done.") . "\n";
}
function interface_qinq2_configure(&$qinq, $fd, $macaddr) {
global $config, $g;
if (!is_array($qinq)) {
- log_error("QinQ compat VLAN: called with wrong options. Problems with config!\n");
+ log_error(sprintf(gettext("QinQ compat VLAN: called with wrong options. Problems with config!%s"), "\n"));
return;
}
@@ -368,7 +368,7 @@ function interface_qinq2_configure(&$qinq, $fd, $macaddr) {
$tag = $qinq['tag'];
$vlanif = "{$if}_{$tag}";
if(empty($if)) {
- log_error("interface_qinq_confgure called with if undefined.\n");
+ log_error(sprintf(gettext("interface_qinq_confgure called with if undefined.%s"), "\n"));
return;
}
@@ -389,7 +389,7 @@ function interfaces_create_wireless_clones() {
global $config;
if($g['booting'])
- echo "Creating other wireless clone interfaces...";
+ echo gettext("Creating other wireless clone interfaces...");
if (is_array($config['wireless']['clone']) && count($config['wireless']['clone'])) {
foreach ($config['wireless']['clone'] as $clone) {
if(empty($clone['cloneif']))
@@ -403,7 +403,7 @@ function interfaces_create_wireless_clones() {
}
}
if($g['booting'])
- echo " done.\n";
+ echo " " . gettext("done.") . "\n";
}
function interfaces_bridge_configure($checkmember = 0) {
@@ -432,7 +432,7 @@ function interface_bridge_configure(&$bridge) {
return -1;
if (empty($bridge['members'])) {
- log_error("No members found on {$bridge['bridgeif']}");
+ log_error(sprintf(gettext("No members found on %s"), $bridge['bridgeif']));
return -1;
}
@@ -498,7 +498,7 @@ function interface_bridge_configure(&$bridge) {
$realif1 = get_real_interface($member);
$realif = escapeshellarg($realif1);
if (!$realif) {
- log_error("realif not defined in interfaces bridge - up");
+ log_error(gettext("realif not defined in interfaces bridge - up"));
continue;
}
/* make sure the parent interface is up */
@@ -611,7 +611,7 @@ function interface_bridge_configure(&$bridge) {
if($bridgeif)
interfaces_bring_up($bridgeif);
else
- log_error("bridgeif not defined -- could not bring interface up");
+ log_error(gettext("bridgeif not defined -- could not bring interface up"));
return $bridgeif;
}
@@ -645,7 +645,7 @@ function interfaces_lagg_configure()
{
global $config, $g;
if($g['booting'])
- echo "Configuring LAGG interfaces...";
+ echo gettext("Configuring LAGG interfaces...");
$i = 0;
if (is_array($config['laggs']['lagg']) && count($config['laggs']['lagg'])) {
foreach ($config['laggs']['lagg'] as $lagg) {
@@ -657,7 +657,7 @@ function interfaces_lagg_configure()
}
}
if($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
function interface_lagg_configure(&$lagg) {
@@ -783,7 +783,7 @@ function interface_gre_configure(&$gre, $grekey = "") {
if($greif)
interfaces_bring_up($greif);
else
- log_error("Could not bring greif up -- variable not defined.");
+ log_error(gettext("Could not bring greif up -- variable not defined."));
if (isset($gre['link1']) && $gre['link1'])
mwexec("/sbin/route add {$gre['tunnel-remote-addr']}/{$gre['tunnel-remote-net']} {$gre['tunnel-local-addr']}");
@@ -826,7 +826,7 @@ function interface_gif_configure(&$gif, $gifkey = "") {
if($realif)
interfaces_bring_up($realif);
else
- log_error("could not bring realif up -- variable not defined -- interface_gif_configure()");
+ log_error(gettext("could not bring realif up -- variable not defined -- interface_gif_configure()"));
if ($g['booting'] || !(empty($gif['gifif']))) {
pfSense_interface_destroy($gif['gifif']);
@@ -849,7 +849,7 @@ function interface_gif_configure(&$gif, $gifkey = "") {
if($gifif)
interfaces_bring_up($gifif);
else
- log_error("could not bring gifif up -- variable not defined");
+ log_error(gettext("could not bring gifif up -- variable not defined"));
$iflist = get_configured_interface_list();
foreach($iflist as $ifname) {
@@ -909,12 +909,12 @@ function interfaces_configure() {
continue;
} else {
if ($g['booting'])
- echo "Configuring {$ifname} interface...";
+ printf(gettext("Configuring %s interface..."), $ifname);
if($g['debug'])
- log_error("Configuring {$ifname}");
+ log_error(sprintf(gettext("Configuring %s"), $ifname));
interface_configure($if, $reload);
if ($g['booting'])
- echo "done.\n";
+ echo gettext( "done.") . "\n";
}
}
@@ -947,14 +947,14 @@ function interfaces_configure() {
foreach ($delayed_list as $if => $ifname) {
if ($g['booting'])
- echo "Configuring {$ifname} interface...";
+ printf(gettext("Configuring %s interface..."), $ifname);
if ($g['debug'])
- log_error("Configuring {$ifname}");
+ log_error(sprintf(gettext("Configuring %s"), $ifname));
interface_configure($if, $reload);
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
/* set up BRIDGe virtual interfaces */
@@ -962,14 +962,14 @@ function interfaces_configure() {
foreach ($bridge_list as $if => $ifname) {
if ($g['booting'])
- echo "Configuring {$ifname} interface...";
+ printf(gettext("Configuring %s interface..."), $ifname);
if($g['debug'])
- log_error("Configuring {$ifname}");
+ log_error(sprintf(gettext("Configuring %s"), $ifname));
interface_configure($if, $reload);
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
/* configure interface groups */
@@ -1266,7 +1266,7 @@ function interface_ppps_configure($interface) {
}
}
if (!$ppp || $ifcfg['if'] != $ppp['if']){
- log_error("Can't find PPP config for {$ifcfg['if']} in interface_ppps_configure().");
+ log_error(sprintf(gettext("Can't find PPP config for %s in interface_ppps_configure()."), $ifcfg['if']));
return 0;
}
$pppif = $ifcfg['if'];
@@ -1329,19 +1329,19 @@ function interface_ppps_configure($interface) {
*/
}
if(!is_ipaddr($gateways[$pid])){
- log_error("Could not get a PPTP/L2TP Remote IP address from {$dhcp_gateway} for {$gway} in interfaces_ppps_configure.");
+ log_error(sprintf(gettext('Could not get a PPTP/L2TP Remote IP address from %1$s for %2$s in interfaces_ppps_configure.'), $dhcp_gateway, $gway));
return 0;
}
pfSense_ngctl_attach(".", $port);
break;
case "ppp":
if (!file_exists("{$port}")) {
- log_error("Device {$port} does not exist. PPP link cannot start without the modem device.");
+ log_error(sprintf(gettext("Device %s does not exist. PPP link cannot start without the modem device."), $port));
return 0;
}
break;
default:
- log_error("Unkown {$type} configured as ppp interface.");
+ log_error(sprintf(gettext("Unkown %s configured as ppp interface."), $type));
break;
}
}
@@ -1606,7 +1606,7 @@ EOD;
else {
$fd = fopen("{$g['varetc_path']}/mpd_{$interface}.conf", "w");
if (!$fd) {
- log_error("Error: cannot open mpd_{$interface}.conf in interface_ppps_configure().\n");
+ log_error(sprintf(gettext("Error: cannot open mpd_%s.conf in interface_ppps_configure().%s"), $interface, "\n"));
return 0;
}
// Write out mpd_ppp.conf
@@ -1658,7 +1658,7 @@ function interfaces_carp_setup() {
$cmdchain = new CmdCHAIN();
if ($g['booting']) {
- echo "Configuring CARP settings...";
+ echo gettext("Configuring CARP settings...");
mute_kernel_msgs();
}
@@ -1679,12 +1679,12 @@ function interfaces_carp_setup() {
}
if($balanacing) {
- $cmdchain->add("Enable CARP ARP-balancing", "/sbin/sysctl net.inet.carp.arpbalance=1", true);
- $cmdchain->add("Disallow CARP preemption", "/sbin/sysctl net.inet.carp.preempt=0", true);
+ $cmdchain->add(gettext("Enable CARP ARP-balancing"), "/sbin/sysctl net.inet.carp.arpbalance=1", true);
+ $cmdchain->add(gettext("Disallow CARP preemption"), "/sbin/sysctl net.inet.carp.preempt=0", true);
} else
- $cmdchain->add("Enable CARP preemption", "/sbin/sysctl net.inet.carp.preempt=1", true);
+ $cmdchain->add(gettext("Enable CARP preemption"), "/sbin/sysctl net.inet.carp.preempt=1", true);
- $cmdchain->add("Enable CARP logging", "/sbin/sysctl net.inet.carp.log=1", true);
+ $cmdchain->add(gettext("Enable CARP logging"), "/sbin/sysctl net.inet.carp.log=1", true);
if (!empty($pfsyncinterface))
$carp_sync_int = get_real_interface($pfsyncinterface);
@@ -1700,22 +1700,33 @@ function interfaces_carp_setup() {
fclose($fd);
mwexec("/sbin/pfctl -f {$g['tmp_path']}/rules.boot");
} else
- log_error("Could not create rules.boot file!");
+ log_error(gettext("Could not create rules.boot file!"));
}
/* setup pfsync interface */
if($carp_sync_int and $pfsyncenabled) {
if (is_ipaddr($pfsyncpeerip))
- $cmdchain->add("Bring up pfsync0 syncpeer", "/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up", false);
+ $cmdchain->add(gettext("Bring up pfsync0 syncpeer"), "/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up", false);
else
- $cmdchain->add("Bring up pfsync0 syncdev", "/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up", false);
+ $cmdchain->add(gettext("Bring up pfsync0 syncdev"), "/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up", false);
} else
- $cmdchain->add("Bring up pfsync0", "/sbin/ifconfig pfsync0 syncdev lo0 up", false);
+ $cmdchain->add(gettext("Bring up pfsync0"), "/sbin/ifconfig pfsync0 syncdev lo0 up", false);
+
+ sleep(1);
+
+ /* XXX: Handle an issue with pfsync(4) and carp(4). In a cluster carp will come up before pfsync(4) has updated and so will cause issuese
+ * for exiting sessions.
+ */
+ $i = 0;
+ while (intval(trim(`/sbin/ifconfig pfsync0 | /usr/bin/grep 'syncok: 0' | /usr/bin/grep -v grep | /usr/bin/wc -l`)) == 0 && $i < 30) {
+ $i++;
+ sleep(1);
+ }
if($config['virtualip']['vip'])
- $cmdchain->add("Allow CARP.", "/sbin/sysctl net.inet.carp.allow=1", true);
+ $cmdchain->add(gettext("Allow CARP."), "/sbin/sysctl net.inet.carp.allow=1", true);
else
- $cmdchain->add("Disallow CARP.", "/sbin/sysctl net.inet.carp.allow=0", true);
+ $cmdchain->add(gettext("Disallow CARP."), "/sbin/sysctl net.inet.carp.allow=0", true);
if($g['debug'])
$cmdchain->setdebug(); // optional for verbose logging
@@ -1725,7 +1736,7 @@ function interfaces_carp_setup() {
if ($g['booting']) {
unmute_kernel_msgs();
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
}
@@ -1908,7 +1919,7 @@ function interface_carp_configure(&$vip) {
*/
$realif = get_real_interface($vip['interface']);
if (!does_interface_exist($realif)) {
- file_notice("CARP", "Interface specified for the virtual IP address {$vip['subnet']} does not exist. Skipping this VIP.", "Firewall: Virtual IP", "");
+ file_notice("CARP", sprintf(gettext("Interface specified for the virtual IP address %s does not exist. Skipping this VIP."), $vip['subnet']), "Firewall: Virtual IP", "");
return;
}
@@ -1917,7 +1928,7 @@ function interface_carp_configure(&$vip) {
$ww_subnet_ip = find_interface_ip($realif);
$ww_subnet_bits = find_interface_subnet($realif);
if (!ip_in_subnet($vip['subnet'], gen_subnet($ww_subnet_ip, $ww_subnet_bits) . "/" . $ww_subnet_bits) && !ip_in_interface_alias_subnet($vip['interface'], $vip['subnet'])) {
- file_notice("CARP", "Sorry but we could not find a matching real interface subnet for the virtual IP address {$vip['subnet']}.", "Firewall: Virtual IP", "");
+ file_notice("CARP", sprintf(gettext("Sorry but we could not find a matching real interface subnet for the virtual IP address %s."), $vip['subnet']), "Firewall: Virtual IP", "");
return;
}
}
@@ -1926,7 +1937,7 @@ function interface_carp_configure(&$vip) {
$ww_subnet_ip = find_interface_ipv6($realif);
$ww_subnet_bits = find_interface_subnetv6($realif);
if (!ip_in_subnet($vip['subnet'], gen_subnetv6($ww_subnet_ip, $ww_subnet_bits) . "/" . $ww_subnet_bits) && !ip_in_interface_alias_subnet($vip['interface'], $vip['subnet'])) {
- file_notice("CARP", "Sorry but we could not find a matching real interface subnet for the virtual IPv6 address {$vip['subnet']}.", "Firewall: Virtual IP", "");
+ file_notice("CARP", sprintf(gettext("Sorry but we could not find a matching real interface subnet for the virtual IPv6 address %s."), $vip['subnet']), "Firewall: Virtual IP", "");
return;
}
}
@@ -1983,7 +1994,7 @@ function interface_carpdev_configure(&$vip) {
* prevents a panic if the interface is missing or invalid
*/
if (!does_interface_exist($realif)) {
- file_notice("CARP", "Interface specified for the virtual IP address {$vip['subnet']} does not exist. Skipping this VIP.", "Firewall: Virtual IP", "");
+ file_notice("CARP", sprintf(gettext("Interface specified for the virtual IP address %s does not exist. Skipping this VIP."), $vip['subnet']), "Firewall: Virtual IP", "");
return;
}
@@ -2029,7 +2040,7 @@ EOD;
/* fire up dhclient */
mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient_{$vipif}.conf {$vipif} >{$g['tmp_path']}/{$vipif}_output 2>{$g['tmp_path']}/{$vipif}_error_output", false);
} else {
- log_error("Error: cannot open dhclient_{$vipif}.conf in interfaces_carpdev_configure() for writing.\n");
+ log_error(sprintf(gettext("Error: cannot open dhclient_%s.conf in interfaces_carpdev_configure() for writing.%s"), $vipif, "\n"));
mwexec("/sbin/dhclient -b {$vipif}");
}
@@ -2062,15 +2073,15 @@ function interface_wireless_clone($realif, $wlcfg) {
exec("/sbin/ifconfig {$realif}", $output, $ret);
$ifconfig_str = implode($output);
if(($wlcfg_mode == "hostap") && (! preg_match("/hostap/si", $ifconfig_str))) {
- log_error("Interface {$realif} changed to hostap mode");
+ log_error(sprintf(gettext("Interface %s changed to hostap mode"), $realif));
$needs_clone = true;
}
if(($wlcfg_mode == "adhoc") && (! preg_match("/adhoc/si", $ifconfig_str))) {
- log_error("Interface {$realif} changed to adhoc mode");
+ log_error(sprintf(gettext("Interface %s changed to adhoc mode"), $realif));
$needs_clone = true;
}
if(($wlcfg_mode == "bss") && (preg_match("/hostap|adhoc/si", $ifconfig_str))) {
- log_error("Interface {$realif} changed to infrastructure mode");
+ log_error(sprintf(gettext("Interface %s changed to infrastructure mode"), $realif));
$needs_clone = true;
}
} else {
@@ -2082,12 +2093,12 @@ function interface_wireless_clone($realif, $wlcfg) {
if(does_interface_exist($realif))
pfSense_interface_destroy($realif);
- log_error("Cloning new wireless interface {$realif}");
+ log_error(sprintf(gettext("Cloning new wireless interface %s"), $realif));
// Create the new wlan interface. FreeBSD returns the new interface name.
// example: wlan2
exec("/sbin/ifconfig wlan create wlandev {$baseif} {$mode} bssid 2>&1", $out, $ret);
if($ret <> 0) {
- log_error("Failed to clone interface {$baseif} with error code {$ret}, output {$out[0]}");
+ log_error(sprintf(gettext('Failed to clone interface %1$s with error code %2$s, output %3$s'), $baseif, $ret, $out[0]));
return false;
}
$newif = trim($out[0]);
@@ -2661,13 +2672,13 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
/* this is not a valid mac address. generate a
* temporary mac address so the machine can get online.
*/
- echo "Generating new MAC address.";
+ echo gettext("Generating new MAC address.");
$random_mac = generate_random_mac_address();
mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) .
" link " . escapeshellarg($random_mac));
$wancfg['spoofmac'] = $random_mac;
write_config();
- file_notice("MAC Address altered", "The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface {$realif} has been automatically replaced with {$random_mac}", "Interfaces");
+ file_notice("MAC Address altered", sprintf(gettext('The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically replaced with %2$s'), $realif, $random_mac), "Interfaces");
}
}
@@ -2807,7 +2818,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
if (!empty($gif))
array_walk($gif, 'interface_gif_configure');
- if ($linkupevent == false) {
+ if ($linkupevent == false || substr($realif, 0, 4) == "ovpn") {
unset($bridgetmp);
$bridgetmp = link_interface_to_bridge($interface);
if (!empty($bridgetmp))
@@ -2853,7 +2864,7 @@ function interface_carpdev_dhcp_configure($interface = "wan") {
if($wanif)
interfaces_bring_up($wanif);
else
- log_error("Could not bring wanif up in terface_carpdev_dhcp_configure()");
+ log_error(gettext("Could not bring wanif up in terface_carpdev_dhcp_configure()"));
return 0;
}
@@ -2950,7 +2961,7 @@ function interface_dhcpv4_configure($interface = "wan") {
/* generate dhclient_wan.conf */
$fd = fopen("{$g['varetc_path']}/dhclient_{$interface}.conf", "w");
if (!$fd) {
- printf("Error: cannot open dhclient_{$interface}.conf in interfaces_wan_dhcp_configure() for writing.\n");
+ printf(printf(gettext("Error: cannot open dhclient_%s.conf in interfaces_wan_dhcp_configure() for writing.%s"), $interface, "\n"));
return 1;
}
@@ -2963,7 +2974,7 @@ function interface_dhcpv4_configure($interface = "wan") {
$wanif = get_real_interface($interface);
if (empty($wanif)) {
- log_error("Invalid interface \"{$interface}\" in interface_dhcp_configure()");
+ log_error(sprintf(gettext("Invalid interface \"%s\" in interface_dhcp_configure()"), $interface));
return 0;
}
$dhclientconf = "";
@@ -2994,6 +3005,12 @@ EOD;
fwrite($fd, $dhclientconf);
fclose($fd);
+ /* bring wan interface up before starting dhclient */
+ if($wanif)
+ interfaces_bring_up($wanif);
+ else
+ log_error(printf(gettext("Could not bring up %s interface in interface_dhcp_configure()"), $wanif));
+
/* fire up dhclient */
mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient_{$interface}.conf {$wanif} > {$g['tmp_path']}/{$wanif}_output > {$g['tmp_path']}/{$wanif}_error_output");
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index aa04430..a64f1de 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -36,21 +36,21 @@
/* IPsec defines */
$my_identifier_list = array(
- 'myaddress' => array( 'desc' => 'My IP address', 'mobile' => true ),
- 'address' => array( 'desc' => 'IP address', 'mobile' => true ),
- 'fqdn' => array( 'desc' => 'Distinguished name', 'mobile' => true ),
- 'user_fqdn' => array( 'desc' => 'User distinguished name', 'mobile' => true ),
- 'asn1dn' => array( 'desc' => 'ASN.1 distinguished Name', 'mobile' => true ),
- 'keyid tag' => array( 'desc' => 'KeyID tag', 'mobile' => true ),
- 'dyn_dns' => array( 'desc' => 'Dynamic DNS', 'mobile' => true ));
+ 'myaddress' => array( 'desc' => gettext('My IP address'), 'mobile' => true ),
+ 'address' => array( 'desc' => gettext('IP address'), 'mobile' => true ),
+ 'fqdn' => array( 'desc' => gettext('Distinguished name'), 'mobile' => true ),
+ 'user_fqdn' => array( 'desc' => gettext('User distinguished name'), 'mobile' => true ),
+ 'asn1dn' => array( 'desc' => gettext('ASN.1 distinguished Name'), 'mobile' => true ),
+ 'keyid tag' => array( 'desc' => gettext('KeyID tag'), 'mobile' => true ),
+ 'dyn_dns' => array( 'desc' => gettext('Dynamic DNS'), 'mobile' => true ));
$peer_identifier_list = array(
- 'peeraddress' => array( 'desc' => 'Peer IP address', 'mobile' => false ),
- 'address' => array( 'desc' => 'IP address', 'mobile' => false ),
- 'fqdn' => array( 'desc' => 'Distinguished name', 'mobile' => true ),
- 'user_fqdn' => array( 'desc' => 'User distinguished name', 'mobile' => true ),
- 'asn1dn' => array( 'desc' => 'ASN.1 distinguished Name', 'mobile' => true ),
- 'keyid tag' => array( 'desc' =>'KeyID tag', 'mobile' => true ));
+ 'peeraddress' => array( 'desc' => gettext('Peer IP address'), 'mobile' => false ),
+ 'address' => array( 'desc' => gettext('IP address'), 'mobile' => false ),
+ 'fqdn' => array( 'desc' => gettext('Distinguished name'), 'mobile' => true ),
+ 'user_fqdn' => array( 'desc' => gettext('User distinguished name'), 'mobile' => true ),
+ 'asn1dn' => array( 'desc' => gettext('ASN.1 distinguished Name'), 'mobile' => true ),
+ 'keyid tag' => array( 'desc' =>gettext('KeyID tag'), 'mobile' => true ));
$p1_ealgos = array(
'aes' => array( 'name' => 'AES', 'keysel' => array( 'lo' => 128, 'hi' => 256, 'step' => 64 ) ),
@@ -253,9 +253,9 @@ function ipsec_idinfo_to_text(& $idinfo) {
case "network":
return $idinfo['address']."/".$idinfo['netbits'];
case "mobile":
- return "Mobile Client";
+ return gettext("Mobile Client");
case "none":
- return "None";
+ return gettext("None");
default:
return strtoupper($idinfo['type']);
}
diff --git a/etc/inc/meta.inc b/etc/inc/meta.inc
index 4091eac..11295f5 100644
--- a/etc/inc/meta.inc
+++ b/etc/inc/meta.inc
@@ -65,7 +65,7 @@ function list_phpfiles($path, & $found) {
$dir = opendir($path);
if (!$dir) {
- echo "list_phpfiles: unable to examine path {$path}\n";
+ printf(gettext("list_phpfiles: unable to examine path %s\n"), $path);
return;
}
@@ -96,7 +96,7 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
$fdata = @file_get_contents($fpath);
if (!$fdata) {
- echo "unable to read {$fpath}\n";
+ printf(gettext("unable to read %s\n"), $fpath);
continue;
}
@@ -129,7 +129,7 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
$tagend = substr($fdata, $tagend_off + 4, $tagend_len - 4);
if ($tagbeg != $tagend) {
- echo "error: tag mismatch ( {$tagbeg} != {$tagend} ) in '$fpath'\n";
+ printf(gettext("error: tag mismatch ( %1\$s != %2\$s ) in '%3\$s'%4\$s"), $tagbeg, $tagend, $fpath, "\n");
break;
}
@@ -140,7 +140,7 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
$mdata = substr($fdata, $mdata_off, $mdata_len);
if (!strlen($mdata)) {
- echo "warning: tag {$tagbeg} has no data in '$fpath'\n";
+ printf(gettext("warning: tag %1\$s has no data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
break;
}
@@ -160,7 +160,7 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
$valtag = stripos($line, "##|*");
if ($valtag === false || $valtag) {
- echo "warning: tag {$tagbeg} has malformed data in '$fpath'\n";
+ printf(gettext("warning: tag %1\$s has malformed data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
continue;
}
@@ -182,7 +182,7 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
}
if (!isset($vname) || !isset($vdata)) {
- echo "warning: tag {$tagbeg} has invalid data in '$fpath'\n";
+ printf(gettext("warning: tag %1\$s has invalid data in '%2\$s'%3\$s"), $tagbeg, $fpath, "\n");
continue;
}
@@ -197,4 +197,4 @@ function read_file_metadata($fpath, & $metadata, $taglist = false) {
$metadata[$fname] = $tags;
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index 9edd32b..314473d 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -73,12 +73,12 @@ function file_notice($id, $notice, $category = "General", $url = "", $priority =
$queue[$queuekey] = $toqueue;
$queueout = fopen($notice_path, "w");
if(!$queueout) {
- log_error("Could not open {$notice_path} for writing");
+ log_error(printf(gettext("Could not open %s for writing"), $notice_path));
return;
}
fwrite($queueout, serialize($queue));
fclose($queueout);
- log_error("New alert found: {$notice}");
+ log_error("New alert found: $notice");
/* soekris */
if(file_exists("/dev/led/error"))
exec("/bin/echo 1 > /dev/led/error");
@@ -324,11 +324,11 @@ function notify_via_smtp($message) {
fclose($fd);
if($smtp->SendMessage($from, array($to), $headers, $message)) {
- log_error("Message sent to {$to} OK");
+ log_error(sprintf(gettext("Message sent to %s OK"), $to));
return;
} else {
- log_error("Could not send the message to {$to} -- Error: {$smtp->error}");
- return("Could not send the message to {$to} -- Error: {$smtp->error}");
+ log_error(sprintf(gettext('Could not send the message to %1$s -- Error: %2$s'), $to, $smtp->error));
+ return(sprintf(gettext('Could not send the message to %1$s -- Error: %2$s'), $to, $smtp->error));
}
}
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 913903d..bf109f4 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -72,15 +72,15 @@ $openvpn_dh_lengths = array(
1024, 2048, 4096 );
$openvpn_server_modes = array(
- 'p2p_tls' => "Peer to Peer ( SSL/TLS )",
- 'p2p_shared_key' => "Peer to Peer ( Shared Key )",
- 'server_tls' => "Remote Access ( SSL/TLS )",
- 'server_user' => "Remote Access ( User Auth )",
- 'server_tls_user' => "Remote Access ( SSL/TLS + User Auth )");
+ 'p2p_tls' => gettext("Peer to Peer ( SSL/TLS )"),
+ 'p2p_shared_key' => gettext("Peer to Peer ( Shared Key )"),
+ 'server_tls' => gettext("Remote Access ( SSL/TLS )"),
+ 'server_user' => gettext("Remote Access ( User Auth )"),
+ 'server_tls_user' => gettext("Remote Access ( SSL/TLS + User Auth )"));
$openvpn_client_modes = array(
- 'p2p_tls' => "Peer to Peer ( SSL/TLS )",
- 'p2p_shared_key' => "Peer to Peer ( Shared Key )" );
+ 'p2p_tls' => gettext("Peer to Peer ( SSL/TLS )"),
+ 'p2p_shared_key' => gettext("Peer to Peer ( Shared Key )") );
function openvpn_create_key() {
@@ -168,7 +168,7 @@ function openvpn_get_cipherlist() {
$words = explode(' ', $line);
$ciphers[$words[0]] = "{$words[0]} {$words[1]}";
}
- $ciphers["none"] = "None (No Encryption)";
+ $ciphers["none"] = gettext("None (No Encryption)");
return $ciphers;
}
@@ -192,14 +192,14 @@ function openvpn_validate_engine($engine) {
function openvpn_validate_host($value, $name) {
$value = trim($value);
if (empty($value) || (!is_domain($value) && !is_ipaddr($value)))
- return "The field '$name' must contain a valid IP address or domain name.";
+ return sprintf(gettext("The field '%s' must contain a valid IP address or domain name."), $name);
return false;
}
function openvpn_validate_port($value, $name) {
$value = trim($value);
if (empty($value) || !is_numeric($value) || $value < 0 || ($value > 65535))
- return "The field '$name' must contain a valid port, ranging from 0 to 65535.";
+ return sprintf(gettext("The field '%s' must contain a valid port, ranging from 0 to 65535."), $name);
return false;
}
@@ -208,7 +208,7 @@ function openvpn_validate_cidr($value, $name) {
if (!empty($value)) {
list($ip, $mask) = explode('/', $value);
if (!is_ipaddr($ip) or !is_numeric($mask) or ($mask > 32) or ($mask < 0))
- return "The field '$name' must contain a valid CIDR range.";
+ return sprintf(gettext("The field '%s' must contain a valid CIDR range."), $name);
}
return false;
}
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index b9378e6..e5dbe93 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -342,11 +342,11 @@ function get_carp_interface_status($carpinterface) {
exec("/sbin/ifconfig $carpinterface | /usr/bin/grep -v grep | /usr/bin/grep carp:", $carp_query);
foreach($carp_query as $int) {
if(stristr($int, "MASTER"))
- return "MASTER";
+ return gettext("MASTER");
if(stristr($int, "BACKUP"))
- return "BACKUP";
+ return gettext("BACKUP");
if(stristr($int, "INIT"))
- return "INIT";
+ return gettext("INIT");
}
return;
}
@@ -414,7 +414,7 @@ function after_sync_bump_adv_skew() {
}
}
if($processed_skew == 1)
- write_config("After synch increase advertising skew");
+ write_config(gettext("After synch increase advertising skew"));
}
/*
@@ -459,16 +459,16 @@ function WakeOnLan($addr, $mac)
// send it to the broadcast address using UDP
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
if ($s == false) {
- log_error("Error creating socket!");
- log_error("Error code is '".socket_last_error($s)."' - " . socket_strerror(socket_last_error($s)));
+ log_error(gettext("Error creating socket!"));
+ log_error(sprintf(gettext("Error code is '%1\$s' - %2\$s"), socket_last_error($s), socket_strerror(socket_last_error($s))));
} else {
// setting a broadcast option to socket:
$opt_ret = socket_set_option($s, 1, 6, TRUE);
if($opt_ret < 0)
- log_error("setsockopt() failed, error: " . strerror($opt_ret));
+ log_error(sprintf(gettext("setsockopt() failed, error: %s"), strerror($opt_ret)));
$e = socket_sendto($s, $msg, strlen($msg), 0, $addr, 2050);
socket_close($s);
- log_error("Magic Packet sent ({$e}) to {$addr} MAC={$mac}");
+ log_error(sprintf(gettext('Magic Packet sent (%1$s) to {%2$s} MAC=%3$s'), $e, $addr, $mac));
return true;
}
@@ -545,7 +545,7 @@ function restore_config_section($section, $new_contents) {
@unlink($g['tmp_path'] . "/tmpxml");
if(file_exists("{$g['tmp_path']}/config.cache"))
unlink("{$g['tmp_path']}/config.cache");
- write_config("Restored {$section} of config file (maybe from CARP partner)");
+ write_config(sprintf(gettext("Restored %s of config file (maybe from CARP partner)"), $section));
disable_security_checks();
conf_mount_ro();
return;
@@ -567,7 +567,7 @@ function merge_config_section($section, $new_contents) {
$section_xml = parse_xml_config($fname, $section);
$config[$section] = $section_xml;
unlink($fname);
- write_config("Restored {$section} of config file (maybe from CARP partner)");
+ write_config(sprintf(gettext("Restored %s of config file (maybe from CARP partner)"), $section));
disable_security_checks();
conf_mount_ro();
return;
@@ -726,10 +726,10 @@ function call_pfsense_method($method, $params, $timeout = 0) {
}
$resp = $cli->send($msg, $timeout);
if(!is_object($resp)) {
- log_error("XMLRPC communication error: " . $cli->errstr);
+ log_error(sprintf(gettext("XMLRPC communication error: %s"), $cli->errstr));
return false;
} elseif($resp->faultCode()) {
- log_error("XMLRPC request failed with error " . $resp->faultCode() . ": " . $resp->faultString());
+ log_error(sprintf(gettext('XMLRPC request failed with error %1$s: %2$s'), $resp->faultCode(), $resp->faultString()));
return false;
} else {
return XML_RPC_Decode($resp->value());
@@ -822,7 +822,7 @@ function reload_interfaces_sync() {
global $config, $g;
if($g['debug'])
- log_error("reload_interfaces_sync() is starting.");
+ log_error(gettext("reload_interfaces_sync() is starting."));
/* parse config.xml again */
$config = parse_config(true);
@@ -830,10 +830,10 @@ function reload_interfaces_sync() {
/* enable routing */
system_routing_enable();
if($g['debug'])
- log_error("Enabling system routing");
+ log_error(gettext("Enabling system routing"));
if($g['debug'])
- log_error("Cleaning up Interfaces");
+ log_error(gettext("Cleaning up Interfaces"));
/* set up interfaces */
interfaces_configure();
@@ -939,7 +939,7 @@ function auto_login() {
}
if (!$fd) {
conf_mount_ro();
- log_error("Enabling auto login was not possible.");
+ log_error(gettext("Enabling auto login was not possible."));
return;
}
foreach($getty_split as $gs) {
@@ -1111,7 +1111,7 @@ function get_ppp_uptime($port){
}
return convert_seconds_to_hms($sec);
} else {
- $total_time = "No history data found!";
+ $total_time = gettext("No history data found!");
return $total_time;
}
}
@@ -1233,7 +1233,7 @@ function get_interface_info($ifdescr) {
break;
if (!file_exists($dev)) {
$ifinfo['nodevice'] = 1;
- $ifinfo['pppinfo'] = $dev . " device not present! Is the modem attached to the system?";
+ $ifinfo['pppinfo'] = $dev . " " . gettext("device not present! Is the modem attached to the system?");
}
// Calculate cumulative uptime for PPP link. Useful for connections that have per minute/hour contracts so you don't go over!
if (isset($ppp['uptime']))
@@ -1273,8 +1273,8 @@ function get_interface_info($ifdescr) {
if (preg_match("/status: (.*)$/", $ici, $matches)) {
if ($matches[1] != "active")
$ifinfo['status'] = $matches[1];
- if($ifinfo['status'] == "running")
- $ifinfo['status'] = "up";
+ if($ifinfo['status'] == gettext("running"))
+ $ifinfo['status'] = gettext("up");
}
if (preg_match("/channel (\S*)/", $ici, $matches)) {
$ifinfo['channel'] = $matches[1];
@@ -1311,13 +1311,13 @@ function get_interface_info($ifdescr) {
if($bridge) {
$bridge_text = `/sbin/ifconfig {$bridge}`;
if(stristr($bridge_text, "blocking") <> false) {
- $ifinfo['bridge'] = "<b><font color='red'>blocking</font></b> - check for ethernet loops";
+ $ifinfo['bridge'] = "<b><font color='red'>" . gettext("blocking") . "</font></b> - " . gettext("check for ethernet loops");
$ifinfo['bridgeint'] = $bridge;
} else if(stristr($bridge_text, "learning") <> false) {
- $ifinfo['bridge'] = "learning";
+ $ifinfo['bridge'] = gettext("learning");
$ifinfo['bridgeint'] = $bridge;
} else if(stristr($bridge_text, "forwarding") <> false) {
- $ifinfo['bridge'] = "forwarding";
+ $ifinfo['bridge'] = gettext("forwarding");
$ifinfo['bridgeint'] = $bridge;
}
}
@@ -1428,7 +1428,7 @@ function compare_hostname_to_dnscache($hostname) {
if(trim($oldcontents) != trim($contents)) {
if($g['debug']) {
- log_error("DNSCACHE: Found old IP {$oldcontents} and new IP {$contents}");
+ log_error(sprintf(gettext('DNSCACHE: Found old IP %1$s and new IP %2$s'), $oldcontents, $contents));
}
return ($oldcontents);
} else {
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 8bf9515..2f47f3c 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -194,7 +194,7 @@ function get_pkg_sizes($pkgs = 'all') {
function resync_all_package_configs($show_message = false) {
global $config, $pkg_interface, $g;
- log_error("Resyncing configuration for all packages.");
+ log_error(gettext("Resyncing configuration for all packages."));
if (!is_array($config['installedpackages']['package']))
return;
@@ -214,7 +214,7 @@ function resync_all_package_configs($show_message = false) {
stop_service($package['name']);
sync_package($idx, true, true);
if($pkg_interface == "console")
- echo "\nSyncing packages:";
+ echo "\n" . gettext("Syncing packages:");
}
if($show_message == true)
@@ -256,7 +256,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
$package =& $config['installedpackages']['package'][$pkg_id];
if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) {
- log_error("The {$package['name']} package is missing required dependencies and is being reinstalled." . $package['configurationfile']);
+ log_error(sprintf(gettext('The %1$s package is missing required dependencies and must be reinstalled. %2$s'), $package['name'], $package['configurationfile']));
uninstall_package($package['name']);
if (install_package($package['name']) < 0) {
log_error("Failed reinstalling package {$package['name']}.");
@@ -280,7 +280,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
if(!is_dir($prefix))
exec("/bin/mkdir -p {$prefix}");
if(!file_exists($prefix . $depend_file))
- log_error("The {$package['name']} package is missing required dependencies and must be reinstalled.");
+ log_error(sprintf(gettext("The %s package is missing required dependencies and must be reinstalled."), $package['name']));
switch ($format) {
case "files":
$depends[] = $prefix . $depend_file;
@@ -385,7 +385,7 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
else
return; /* empty package tag */
if(!file_exists("/usr/local/pkg/" . $package['configurationfile'])) {
- log_error("The {$package['name']} package is missing its configuration file and must be reinstalled.");
+ log_error(sprintf(gettext("The %s package is missing its configuration file and must be reinstalled."), $package['name']));
force_remove_package($package['name']);
return -1;
}
@@ -418,7 +418,7 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
foreach($depends as $item) {
if(!file_exists($item)) {
require_once("notices.inc");
- file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
+ file_notice($package['name'], sprintf(gettext("The %s package is missing required dependencies and must be reinstalled."), $package['name']), "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
log_error("Could not find {$item}. Reinstalling package.");
uninstall_package($pkg_name);
if (install_package($pkg_name) < 0) {
@@ -541,44 +541,44 @@ function install_package($package, $pkg_info = "") {
return -1;
}
}
- pkg_debug("Beginning package installation.\n");
- log_error('Beginning package installation for ' . $pkg_info['name'] . '.');
- $static_output .= "Beginning package installation for " . $pkg_info['name'] . "...";
+ pkg_debug(gettext("Beginning package installation.") . "\n");
+ log_error(sprintf(gettext('Beginning package installation for %s .'), $pkg_info['name']));
+ $static_output .= sprintf(gettext("Beginning package installation for %s ."), $pkg_info['name']);
update_status($static_output);
/* fetch the package's configuration file */
if($pkg_info['config_file'] != "") {
- $static_output .= "\nDownloading package configuration file... ";
+ $static_output .= "\n" . gettext(Downloading package configuration file... ");
update_output_window($static_output);
- pkg_debug("Downloading package configuration file...\n");
+ pkg_debug(gettext("Downloading package configuration file...") . "\n");
$fetchto = substr(strrchr($pkg_info['config_file'], '/'), 1);
download_file_with_progress_bar($pkg_info['config_file'], '/usr/local/pkg/' . $fetchto);
if(!file_exists('/usr/local/pkg/' . $fetchto)) {
- pkg_debug("ERROR! Unable to fetch package configuration file. Aborting installation.\n");
+ pkg_debug(gettext("ERROR! Unable to fetch package configuration file. Aborting installation.") . \n");
if($pkg_interface == "console")
- print "\nERROR! Unable to fetch package configuration file. Aborting package installation.\n";
+ print "\n" . gettext("ERROR! Unable to fetch package configuration file. Aborting package installation.") . "\n";
else {
- $static_output .= "failed!\n\nInstallation aborted.\n";
+ $static_output .= gettext("failed!\n\nInstallation aborted.\n");
update_output_window($static_output);
echo "<br>Show <a href=\"pkg_mgr_install.php?showlog=true\">install log</a></center>";
}
conf_mount_ro();
return -1;
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* add package information to config.xml */
$pkgid = get_pkg_id($pkg_info['name']);
- $static_output .= "Saving updated package information... ";
+ $static_output .= gettext("Saving updated package information...") . " ";
update_output_window($static_output);
if($pkgid == -1) {
$config['installedpackages']['package'][] = $pkg_info;
- $changedesc = "Installed {$pkg_info['name']} package.";
- $to_output = "done.\n";
+ $changedesc = gettext("Installed") . $pkg_info['name'] . gettext("package.");
+ $to_output = gettext("done.") . "\n";
} else {
$config['installedpackages']['package'][$pkgid] = $pkg_info;
- $changedesc = "Overwrote previous installation of {$pkg_info['name']}.";
- $to_output = "overwrite!\n";
+ $changedesc = sprintf(gettext("Overwrote previous installation of %s."), $pkg_info['name']);
+ $to_output = gettext("overwrite!") . "\n";
}
if(file_exists('/conf/needs_package_sync'))
@unlink('/conf/needs_package_sync');
@@ -590,14 +590,14 @@ function install_package($package, $pkg_info = "") {
if (!install_package_xml($package)) {
uninstall_package($package);
write_config($changedesc);
- $static_output .= "Failed to install package.\n";
+ $static_output .= gettext("Failed to install package.") . "\n";
update_output_window($static_output);
return -1;
} else {
- $static_output .= "Writing configuration... ";
+ $static_output .= gettext("Writing configuration... ");
update_output_window($static_output);
write_config($changedesc);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
update_output_window($static_output);
if($pkg_info['after_install_info'])
@@ -631,7 +631,7 @@ function install_package_xml($pkg) {
global $g, $config, $static_output, $pkg_interface, $config_parsed;
if(($pkgid = get_pkg_id($pkg)) == -1) {
- $static_output .= "The {$pkg} package is not installed.\n\nInstallation aborted.";
+ $static_output .= sprintf(gettext("The %s package is not installed.%sInstallation aborted."), $pkg, "\n\n");
update_output_window($static_output);
if($pkg_interface <> "console") {
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>";
@@ -646,8 +646,8 @@ function install_package_xml($pkg) {
if($pkg_info['depends_on_package_base_url'] != "") {
if($pkg_interface == "console")
echo "\n";
- update_status("Installing " . $pkg_info['name'] . " and its dependencies.");
- $static_output .= "Downloading " . $pkg_info['name'] . " and its dependencies... ";
+ update_status(gettext("Installing") . " " . $pkg_info['name'] . " " . gettext("and its dependencies."));
+ $static_output .= gettext("Downloading") . " " . $pkg_info['name'] . " " . gettext("and its dependencies... ");
$static_orig = $static_output;
$static_output .= "\n";
update_output_window($static_output);
@@ -659,7 +659,7 @@ function install_package_xml($pkg) {
if (!pkg_fetch_recursive($pkg_name, $pkgdep, 0, $pkg_info['depends_on_package_base_url'])) {
$static_output .= "of {$pkg_name} failed!\n\nInstallation aborted.";
update_output_window($static_output);
- pkg_debug("Package WAS NOT installed properly.\n");
+ pkg_debug(gettext("Package WAS NOT installed properly.") . "\n");
if($pkg_interface <> "console") {
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>";
echo "\n<script language=\"JavaScript\">document.progholder.style.visibility='hidden';</script>";
@@ -672,30 +672,30 @@ function install_package_xml($pkg) {
}
$configfile = substr(strrchr($pkg_info['config_file'], '/'), 1);
if(file_exists("/usr/local/pkg/" . $configfile)) {
- $static_output .= "Loading package configuration... ";
+ $static_output .= gettext("Loading package configuration... ");
update_output_window($static_output);
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $configfile, "packagegui");
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
- $static_output .= "Configuring package components...\n";
+ $static_output .= gettext("Configuring package components...\n");
if (!empty($pkg_config['filter_rules_needed']))
$config['installedpackages']['package'][$pkgid]['filter_rule_function'] = $pkg_config['filter_rules_needed'];
update_output_window($static_output);
/* modify system files */
if(is_array($pkg_config['modify_system']) && is_array($pkg_config['modify_system']['item'])) {
- $static_output .= "System files... ";
+ $static_output .= gettext("System files... ");
update_output_window($static_output);
foreach($pkg_config['modify_system']['item'] as $ms) {
if($ms['textneeded']) {
add_text_to_file($ms['modifyfilename'], $ms['textneeded']);
}
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* download additional files */
if(is_array($pkg_config['additional_files_needed'])) {
- $static_output .= "Additional files... ";
+ $static_output .= gettext("Additional files... ");
$static_orig = $static_output;
update_output_window($static_output);
foreach($pkg_config['additional_files_needed'] as $afn) {
@@ -720,20 +720,20 @@ function install_package_xml($pkg) {
return false;
}
if(stristr($filename, ".tgz") <> "") {
- pkg_debug("Extracting tarball to -C for " . $filename . "...\n");
+ pkg_debug(gettext("Extracting tarball to -C for ") . $filename . "...\n");
$tarout = "";
exec("/usr/bin/tar xvzf " . $prefix . $filename . " -C / 2>&1", $tarout);
pkg_debug(print_r($tarout, true) . "\n");
}
if($pkg_chmod <> "") {
- pkg_debug("Changing file mode to {$pkg_chmod} for {$prefix}{$filename}\n");
+ pkg_debug(sprintf(gettext('Changing file mode to %1$s for %2$s%3$s%4$s'), $pkg_chmod, $prefix, $filename, "\n"));
@chmod($prefix . $filename, $pkg_chmod);
system("/bin/chmod {$pkg_chmod} {$prefix}{$filename}");
}
$static_output = $static_orig;
update_output_window($static_output);
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* if a require exists, include it. this will
@@ -742,7 +742,7 @@ function install_package_xml($pkg) {
*/
$missing_include = false;
if($pkg_config['include_file'] <> "") {
- $static_output .= "Loading package instructions...\n";
+ $static_output = gettext("Loading package instructions...") . "\n";
update_output_window($static_output);
pkg_debug("require_once('{$pkg_config['include_file']}')\n");
if (file_exists($pkg_config['include_file']))
@@ -757,7 +757,7 @@ function install_package_xml($pkg) {
}
/* sidebar items */
if(is_array($pkg_config['menu'])) {
- $static_output .= "Menu items... ";
+ $static_output .= gettext("Menu items... ");
update_output_window($static_output);
foreach($pkg_config['menu'] as $menu) {
if(is_array($config['installedpackages']['menu']))
@@ -766,12 +766,12 @@ function install_package_xml($pkg) {
continue 2;
$config['installedpackages']['menu'][] = $menu;
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* integrated tab items */
if(is_array($pkg_config['tabs']['tab'])) {
- $static_output .= "Integrated Tab items... ";
+ $static_output .= gettext("Integrated Tab items... ");
update_output_window($static_output);
foreach($pkg_config['tabs']['tab'] as $tab) {
if(is_array($config['installedpackages']['tab']))
@@ -780,12 +780,12 @@ function install_package_xml($pkg) {
continue 2;
$config['installedpackages']['tab'][] = $tab;
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* services */
if(is_array($pkg_config['service'])) {
- $static_output .= "Services... ";
+ $static_output .= gettext("Services... ");
update_output_window($static_output);
foreach($pkg_config['service'] as $service) {
if(is_array($config['installedpackages']['service']))
@@ -794,39 +794,39 @@ function install_package_xml($pkg) {
continue 2;
$config['installedpackages']['service'][] = $service;
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* custom commands */
- $static_output .= "Custom commands...\n";
+ $static_output .= gettext("Custom commands...") . "\n";
update_output_window($static_output);
if ($missing_include == false) {
if($pkg_config['custom_php_global_functions'] <> "") {
- $static_output .= "Executing custom_php_global_functions()...";
+ $static_output .= gettext("Executing custom_php_global_functions()...");
update_output_window($static_output);
eval_once($pkg_config['custom_php_global_functions']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
if($pkg_config['custom_php_install_command']) {
- $static_output .= "Executing custom_php_install_command()...";
+ $static_output .= gettext("Executing custom_php_install_command()...");
update_output_window($static_output);
eval_once($pkg_config['custom_php_install_command']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
if($pkg_config['custom_php_resync_config_command'] <> "") {
- $static_output .= "Executing custom_php_resync_config_command()...";
+ $static_output .= gettext("Executing custom_php_resync_config_command()...");
update_output_window($static_output);
eval_once($pkg_config['custom_php_resync_config_command']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
}
} else {
- $static_output .= "Loading package configuration... failed!\n\nInstallation aborted.";
+ $static_output .= gettext("Loading package configuration... failed!") . "\n\n" . gettext("Installation aborted.");
update_output_window($static_output);
- pkg_debug("Unable to load package configuration. Installation aborted.\n");
+ pkg_debug(gettext("Unable to load package configuration. Installation aborted.") ."\n");
if($pkg_interface <> "console") {
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>";
echo "\n<script language=\"JavaScript\">document.progholder.style.visibility='hidden';</script>";
@@ -871,12 +871,12 @@ function delete_package($pkg) {
// If package has dependencies then skip it
if(does_package_depend($pkg)) {
- $static_output .= "Skipping package deletion for {$pkg} because it is a dependency.\n";
+ $static_output .= sprintf(gettext("Skipping package deletion for %s because it is a dependency."),$pkg) . "\n";
update_output_window($static_output);
return;
} else {
if($pkg)
- $static_output .= "Starting package deletion for {$pkg}...";
+ $static_output .= sprintf(gettext("Starting package deletion for %s..."),$pkg);
update_output_window($static_output);
}
@@ -905,7 +905,7 @@ function delete_package_xml($pkg) {
$pkgid = get_pkg_id($pkg);
if ($pkgid == -1) {
- $static_output .= "The {$pkg} package is not installed.\n\nDeletion aborted.";
+ $static_output .= sprintf(gettext("The %s package is not installed.%sDeletion aborted."), $pkg, "\n\n");
update_output_window($static_output);
if($pkg_interface <> "console") {
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>";
@@ -916,8 +916,8 @@ function delete_package_xml($pkg) {
conf_mount_ro();
return;
}
- pkg_debug("Removing {$pkg} package... ");
- $static_output .= "Removing {$pkg} components...\n";
+ pkg_debug(sprintf(gettext("Removing %s package... "),$pkg));
+ $static_output .= sprintf(gettext("Removing %s components..."),$pkg) . "\n";
update_output_window($static_output);
/* parse package configuration */
$packages = &$config['installedpackages']['package'];
@@ -929,7 +929,7 @@ function delete_package_xml($pkg) {
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $packages[$pkgid]['configurationfile'], "packagegui");
/* remove tab items */
if(is_array($pkg_config['tabs'])) {
- $static_output .= "Tabs items... ";
+ $static_output .= gettext("Tabs items... ");
update_output_window($static_output);
if(is_array($pkg_config['tabs']['tab']) && is_array($tabs)) {
foreach($pkg_config['tabs']['tab'] as $tab) {
@@ -941,12 +941,12 @@ function delete_package_xml($pkg) {
}
}
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* remove menu items */
if(is_array($pkg_config['menu'])) {
- $static_output .= "Menu items... ";
+ $static_output .= gettext("Menu items... ");
update_output_window($static_output);
if (is_array($pkg_config['menu']) && is_array($menus)) {
foreach($pkg_config['menu'] as $menu) {
@@ -958,12 +958,12 @@ function delete_package_xml($pkg) {
}
}
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* remove services */
if(is_array($pkg_config['service'])) {
- $static_output .= "Services... ";
+ $static_output .= gettext("Services... ");
update_output_window($static_output);
if (is_array($pkg_config['service']) && is_array($services)) {
foreach($pkg_config['service'] as $service) {
@@ -983,7 +983,7 @@ function delete_package_xml($pkg) {
}
}
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/*
@@ -999,7 +999,7 @@ function delete_package_xml($pkg) {
*/
$missing_include = false;
if($pkg_config['include_file'] <> "") {
- $static_output .= "Loading package instructions...\n";
+ $static_output .= gettext("Loading package instructions...") . "\n";
update_output_window($static_output);
pkg_debug("require_once(\"{$pkg_config['include_file']}\")\n");
if (file_exists($pkg_config['include_file']))
@@ -1023,36 +1023,36 @@ function delete_package_xml($pkg) {
}
/* system files */
if(is_array($pkg_config['modify_system']) && is_array($pkg_config['modify_system']['item'])) {
- $static_output .= "System files... ";
+ $static_output .= gettext("System files... ");
update_output_window($static_output);
foreach($pkg_config['modify_system']['item'] as $ms)
if($ms['textneeded']) remove_text_from_file($ms['modifyfilename'], $ms['textneeded']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* deinstall commands */
if($pkg_config['custom_php_deinstall_command'] <> "") {
- $static_output .= "Deinstall commands... ";
+ $static_output .= gettext("Deinstall commands... ");
update_output_window($static_output);
if ($missing_include == false) {
eval_once($pkg_config['custom_php_deinstall_command']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
} else
$static_output .= "\nNot executing custom deinstall hook because an include is missing.\n";
update_output_window($static_output);
}
if($pkg_config['include_file'] <> "") {
- $static_output .= "Removing package instructions...";
+ $static_output .= gettext("Removing package instructions...");
update_output_window($static_output);
- pkg_debug("Remove '{$pkg_config['include_file']}'\n");
+ pkg_debug(sprintf(gettext("Remove '%s'"), $pkg_config['include_file']) . "\n");
unlink_if_exists("/usr/local/pkg/" . $pkg_config['include_file']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* remove all additional files */
if(is_array($pkg_config['additional_files_needed'])) {
- $static_output .= "Auxiliary files... ";
+ $static_output .= gettext("Auxiliary files... ");
update_output_window($static_output);
foreach($pkg_config['additional_files_needed'] as $afn) {
$filename = get_filename_from_url($afn['item'][0]);
@@ -1062,14 +1062,14 @@ function delete_package_xml($pkg) {
$prefix = "/usr/local/pkg/";
unlink_if_exists($prefix . $filename);
}
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* package XML file */
- $static_output .= "Package XML... ";
+ $static_output .= gettext("Package XML... ");
update_output_window($static_output);
unlink_if_exists("/usr/local/pkg/" . $packages[$pkgid]['configurationfile']);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
}
/* syslog */
@@ -1085,10 +1085,10 @@ function delete_package_xml($pkg) {
conf_mount_ro();
/* remove config.xml entries */
- $static_output .= "Configuration... ";
+ $static_output .= gettext("Configuration... ");
update_output_window($static_output);
unset($config['installedpackages']['package'][$pkgid]);
- $static_output .= "done.\n";
+ $static_output .= gettext("done.") . "\n";
update_output_window($static_output);
write_config("Removed {$pkg} package.\n");
}
@@ -1194,4 +1194,4 @@ function pkg_reinstall_all() {
}
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/priv.defs.inc b/etc/inc/priv.defs.inc
index 186906f..b5ca9bd 100644
--- a/etc/inc/priv.defs.inc
+++ b/etc/inc/priv.defs.inc
@@ -7,710 +7,710 @@
$priv_list = array();
$priv_list['page-all'] = array();
-$priv_list['page-all']['name'] = "WebCfg - All pages";
-$priv_list['page-all']['descr'] = "Allow access to all pages";
+$priv_list['page-all']['name'] = gettext("WebCfg - All pages");
+$priv_list['page-all']['descr'] = gettext("Allow access to all pages");
$priv_list['page-all']['match'] = array();
$priv_list['page-all']['match'][] = "*";
$priv_list['page-status-carp'] = array();
-$priv_list['page-status-carp']['name'] = "WebCfg - Status: CARP page";
-$priv_list['page-status-carp']['descr'] = "Allow access to the 'Status: CARP' page.";
+$priv_list['page-status-carp']['name'] = gettext("WebCfg - Status: CARP page");
+$priv_list['page-status-carp']['descr'] = gettext("Allow access to the 'Status: CARP' page.");
$priv_list['page-status-carp']['match'] = array();
$priv_list['page-status-carp']['match'][] = "carp_status.php*";
$priv_list['page-diagnostics-crash-reporter'] = array();
-$priv_list['page-diagnostics-crash-reporter']['name'] = "WebCfg - Crash reporter";
-$priv_list['page-diagnostics-crash-reporter']['descr'] = "Uploads crash reports to pfSense and or deletes crash reports.";
+$priv_list['page-diagnostics-crash-reporter']['name'] = gettext("WebCfg - Crash reporter");
+$priv_list['page-diagnostics-crash-reporter']['descr'] = gettext("Uploads crash reports to pfSense and or deletes crash reports.");
$priv_list['page-diagnostics-crash-reporter']['match'] = array();
$priv_list['page-diagnostics-crash-reporter']['match'][] = "crash_reporter.php*";
$priv_list['page-diagnostics-arptable'] = array();
-$priv_list['page-diagnostics-arptable']['name'] = "WebCfg - Diagnostics: ARP Table page";
-$priv_list['page-diagnostics-arptable']['descr'] = "Allow access to the 'Diagnostics: ARP Table' page.";
+$priv_list['page-diagnostics-arptable']['name'] = gettext("WebCfg - Diagnostics: ARP Table page");
+$priv_list['page-diagnostics-arptable']['descr'] = gettext("Allow access to the 'Diagnostics: ARP Table' page.");
$priv_list['page-diagnostics-arptable']['match'] = array();
$priv_list['page-diagnostics-arptable']['match'][] = "diag_arp.php*";
$priv_list['page-diagnostics-authentication'] = array();
-$priv_list['page-diagnostics-authentication']['name'] = "WebCfg - Diagnostics: Authentication page";
-$priv_list['page-diagnostics-authentication']['descr'] = "Allow access to the 'Diagnostics: Authentication' page.";
+$priv_list['page-diagnostics-authentication']['name'] = gettext("WebCfg - Diagnostics: Authentication page");
+$priv_list['page-diagnostics-authentication']['descr'] = gettext("Allow access to the 'Diagnostics: Authentication' page.");
$priv_list['page-diagnostics-authentication']['match'] = array();
$priv_list['page-diagnostics-authentication']['match'][] = "diag_authentication.php*";
$priv_list['page-diagnostics-backup/restore'] = array();
-$priv_list['page-diagnostics-backup/restore']['name'] = "WebCfg - Diagnostics: Backup/restore page";
-$priv_list['page-diagnostics-backup/restore']['descr'] = "Allow access to the 'Diagnostics: Backup/restore' page.";
+$priv_list['page-diagnostics-backup/restore']['name'] = gettext("WebCfg - Diagnostics: Backup/restore page");
+$priv_list['page-diagnostics-backup/restore']['descr'] = gettext("Allow access to the 'Diagnostics: Backup/restore' page.");
$priv_list['page-diagnostics-backup/restore']['match'] = array();
$priv_list['page-diagnostics-backup/restore']['match'][] = "diag_backup.php*";
$priv_list['page-diagnostics-configurationhistory'] = array();
-$priv_list['page-diagnostics-configurationhistory']['name'] = "WebCfg - Diagnostics: Configuration History page";
-$priv_list['page-diagnostics-configurationhistory']['descr'] = "Allow access to the 'Diagnostics: Configuration History' page.";
+$priv_list['page-diagnostics-configurationhistory']['name'] = gettext("WebCfg - Diagnostics: Configuration History page");
+$priv_list['page-diagnostics-configurationhistory']['descr'] = gettext("Allow access to the 'Diagnostics: Configuration History' page.");
$priv_list['page-diagnostics-configurationhistory']['match'] = array();
$priv_list['page-diagnostics-configurationhistory']['match'][] = "diag_confbak.php*";
$priv_list['page-diagnostics-factorydefaults'] = array();
-$priv_list['page-diagnostics-factorydefaults']['name'] = "WebCfg - Diagnostics: Factory defaults page";
-$priv_list['page-diagnostics-factorydefaults']['descr'] = "Allow access to the 'Diagnostics: Factory defaults' page.";
+$priv_list['page-diagnostics-factorydefaults']['name'] = gettext("WebCfg - Diagnostics: Factory defaults page");
+$priv_list['page-diagnostics-factorydefaults']['descr'] = gettext("Allow access to the 'Diagnostics: Factory defaults' page.");
$priv_list['page-diagnostics-factorydefaults']['match'] = array();
$priv_list['page-diagnostics-factorydefaults']['match'][] = "diag_defaults.php*";
$priv_list['page-diagnostics-showstates'] = array();
-$priv_list['page-diagnostics-showstates']['name'] = "WebCfg - Diagnostics: Show States page";
-$priv_list['page-diagnostics-showstates']['descr'] = "Allow access to the 'Diagnostics: Show States' page.";
+$priv_list['page-diagnostics-showstates']['name'] = gettext("WebCfg - Diagnostics: Show States page");
+$priv_list['page-diagnostics-showstates']['descr'] = gettext("Allow access to the 'Diagnostics: Show States' page.");
$priv_list['page-diagnostics-showstates']['match'] = array();
$priv_list['page-diagnostics-showstates']['match'][] = "diag_dump_states.php*";
$priv_list['page-status-ipsec'] = array();
-$priv_list['page-status-ipsec']['name'] = "WebCfg - Status: IPsec page";
-$priv_list['page-status-ipsec']['descr'] = "Allow access to the 'Status: IPsec' page.";
+$priv_list['page-status-ipsec']['name'] = gettext("WebCfg - Status: IPsec page");
+$priv_list['page-status-ipsec']['descr'] = gettext("Allow access to the 'Status: IPsec' page.");
$priv_list['page-status-ipsec']['match'] = array();
$priv_list['page-status-ipsec']['match'][] = "diag_ipsec.php*";
$priv_list['page-status-ipsec-sad'] = array();
-$priv_list['page-status-ipsec-sad']['name'] = "WebCfg - Status: IPsec: SAD page";
-$priv_list['page-status-ipsec-sad']['descr'] = "Allow access to the 'Status: IPsec: SAD' page.";
+$priv_list['page-status-ipsec-sad']['name'] = gettext("WebCfg - Status: IPsec: SAD page");
+$priv_list['page-status-ipsec-sad']['descr'] = gettext("Allow access to the 'Status: IPsec: SAD' page.");
$priv_list['page-status-ipsec-sad']['match'] = array();
$priv_list['page-status-ipsec-sad']['match'][] = "diag_ipsec_sad.php*";
$priv_list['page-status-ipsec-spd'] = array();
-$priv_list['page-status-ipsec-spd']['name'] = "WebCfg - Status: IPsec: SPD page";
-$priv_list['page-status-ipsec-spd']['descr'] = "Allow access to the 'Status: IPsec: SPD' page.";
+$priv_list['page-status-ipsec-spd']['name'] = gettext("WebCfg - Status: IPsec: SPD page");
+$priv_list['page-status-ipsec-spd']['descr'] = gettext("Allow access to the 'Status: IPsec: SPD' page.");
$priv_list['page-status-ipsec-spd']['match'] = array();
$priv_list['page-status-ipsec-spd']['match'][] = "diag_ipsec_spd.php*";
$priv_list['page-ipsecxml'] = array();
-$priv_list['page-ipsecxml']['name'] = "WebCfg - Diag IPsec XML page";
-$priv_list['page-ipsecxml']['descr'] = "Allow access to the 'Diag IPsec XML' page.";
+$priv_list['page-ipsecxml']['name'] = gettext("WebCfg - Diag IPsec XML page");
+$priv_list['page-ipsecxml']['descr'] = gettext("Allow access to the 'Diag IPsec XML' page.");
$priv_list['page-ipsecxml']['match'] = array();
$priv_list['page-ipsecxml']['match'][] = "diag_ipsec_xml.php";
$priv_list['page-diag-system-activity'] = array();
-$priv_list['page-diag-system-activity']['name'] = "WebCfg - Diagnostics: System Activity";
-$priv_list['page-diag-system-activity']['descr'] = "Allows access to the 'Diagnostics: System Activity' page";
+$priv_list['page-diag-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
+$priv_list['page-diag-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
$priv_list['page-diag-system-activity']['match'] = array();
$priv_list['page-diag-system-activity']['match'][] = "diag_system_activity*";
$priv_list['page-diagnostics-logs-system'] = array();
-$priv_list['page-diagnostics-logs-system']['name'] = "WebCfg - Diagnostics: Logs: System page";
-$priv_list['page-diagnostics-logs-system']['descr'] = "Allow access to the 'Diagnostics: Logs: System' page.";
+$priv_list['page-diagnostics-logs-system']['name'] = gettext("WebCfg - Diagnostics: Logs: System page");
+$priv_list['page-diagnostics-logs-system']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: System' page.");
$priv_list['page-diagnostics-logs-system']['match'] = array();
$priv_list['page-diagnostics-logs-system']['match'][] = "diag_logs.php*";
$priv_list['page-status-systemlogs-portalauth'] = array();
-$priv_list['page-status-systemlogs-portalauth']['name'] = "WebCfg - Status: System logs: Portal Auth page";
-$priv_list['page-status-systemlogs-portalauth']['descr'] = "Allow access to the 'Status: System logs: Portal Auth' page.";
+$priv_list['page-status-systemlogs-portalauth']['name'] = gettext("WebCfg - Status: System logs: Portal Auth page");
+$priv_list['page-status-systemlogs-portalauth']['descr'] = gettext("Allow access to the 'Status: System logs: Portal Auth' page.");
$priv_list['page-status-systemlogs-portalauth']['match'] = array();
$priv_list['page-status-systemlogs-portalauth']['match'][] = "diag_logs_auth.php*";
$priv_list['page-diagnostics-logs-dhcp'] = array();
-$priv_list['page-diagnostics-logs-dhcp']['name'] = "WebCfg - Diagnostics: Logs: DHCP page";
-$priv_list['page-diagnostics-logs-dhcp']['descr'] = "Allow access to the 'Diagnostics: Logs: DHCP' page.";
+$priv_list['page-diagnostics-logs-dhcp']['name'] = gettext("WebCfg - Diagnostics: Logs: DHCP page");
+$priv_list['page-diagnostics-logs-dhcp']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: DHCP' page.");
$priv_list['page-diagnostics-logs-dhcp']['match'] = array();
$priv_list['page-diagnostics-logs-dhcp']['match'][] = "diag_logs_dhcp.php*";
$priv_list['page-diagnostics-logs-firewall'] = array();
-$priv_list['page-diagnostics-logs-firewall']['name'] = "WebCfg - Diagnostics: Logs: Firewall page";
-$priv_list['page-diagnostics-logs-firewall']['descr'] = "Allow access to the 'Diagnostics: Logs: Firewall' page.";
+$priv_list['page-diagnostics-logs-firewall']['name'] = gettext("WebCfg - Diagnostics: Logs: Firewall page");
+$priv_list['page-diagnostics-logs-firewall']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: Firewall' page.");
$priv_list['page-diagnostics-logs-firewall']['match'] = array();
$priv_list['page-diagnostics-logs-firewall']['match'][] = "diag_logs_filter.php*";
$priv_list['page-hidden-nolongerincluded'] = array();
-$priv_list['page-hidden-nolongerincluded']['name'] = "WebCfg - Hidden: No longer included page";
-$priv_list['page-hidden-nolongerincluded']['descr'] = "Allow access to the 'Hidden: No longer included' page.";
+$priv_list['page-hidden-nolongerincluded']['name'] = gettext("WebCfg - Hidden: No longer included page");
+$priv_list['page-hidden-nolongerincluded']['descr'] = gettext("Allow access to the 'Hidden: No longer included' page.");
$priv_list['page-hidden-nolongerincluded']['match'] = array();
$priv_list['page-hidden-nolongerincluded']['match'][] = "diag_logs_filter_dynamic.php*";
$priv_list['page-status-systemlogs-ipsecvpn'] = array();
-$priv_list['page-status-systemlogs-ipsecvpn']['name'] = "WebCfg - Status: System logs: IPsec VPN page";
-$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = "Allow access to the 'Status: System logs: IPsec VPN' page.";
+$priv_list['page-status-systemlogs-ipsecvpn']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN page");
+$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
$priv_list['page-status-systemlogs-ipsecvpn']['match'] = array();
$priv_list['page-status-systemlogs-ipsecvpn']['match'][] = "diag_logs_ipsec.php*";
$priv_list['page-status-systemlogs-openntpd'] = array();
-$priv_list['page-status-systemlogs-openntpd']['name'] = "WebCfg - Status: System logs: OpenNTPD page";
-$priv_list['page-status-systemlogs-openntpd']['descr'] = "Allow access to the 'Status: System logs: OpenNTPD' page.";
+$priv_list['page-status-systemlogs-openntpd']['name'] = gettext("WebCfg - Status: System logs: OpenNTPD page");
+$priv_list['page-status-systemlogs-openntpd']['descr'] = gettext("Allow access to the 'Status: System logs: OpenNTPD' page.");
$priv_list['page-status-systemlogs-openntpd']['match'] = array();
$priv_list['page-status-systemlogs-openntpd']['match'][] = "diag_logs_ntpd.php*";
$priv_list['page-status-systemlogs-openvpn'] = array();
-$priv_list['page-status-systemlogs-openvpn']['name'] = "WebCfg - Status: System logs: OpenVPN page";
-$priv_list['page-status-systemlogs-openvpn']['descr'] = "Allow access to the 'Status: System logs: OpenVPN' page.";
+$priv_list['page-status-systemlogs-openvpn']['name'] = gettext("WebCfg - Status: System logs: OpenVPN page");
+$priv_list['page-status-systemlogs-openvpn']['descr'] = gettext("Allow access to the 'Status: System logs: OpenVPN' page.");
$priv_list['page-status-systemlogs-openvpn']['match'] = array();
$priv_list['page-status-systemlogs-openvpn']['match'][] = "diag_logs_openvpn.php*";
$priv_list['page-status-systemlogs-ppp'] = array();
-$priv_list['page-status-systemlogs-ppp']['name'] = "WebCfg - Status: System logs: IPsec VPN page";
-$priv_list['page-status-systemlogs-ppp']['descr'] = "Allow access to the 'Status: System logs: IPsec VPN' page.";
+$priv_list['page-status-systemlogs-ppp']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN page");
+$priv_list['page-status-systemlogs-ppp']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
$priv_list['page-status-systemlogs-ppp']['match'] = array();
$priv_list['page-status-systemlogs-ppp']['match'][] = "diag_logs_ppp.php*";
$priv_list['page-status-systemlogs-loadbalancer'] = array();
-$priv_list['page-status-systemlogs-loadbalancer']['name'] = "WebCfg - Status: System logs: Load Balancer page";
-$priv_list['page-status-systemlogs-loadbalancer']['descr'] = "Allow access to the 'Status: System logs: Load Balancer' page.";
+$priv_list['page-status-systemlogs-loadbalancer']['name'] = gettext("WebCfg - Status: System logs: Load Balancer page");
+$priv_list['page-status-systemlogs-loadbalancer']['descr'] = gettext("Allow access to the 'Status: System logs: Load Balancer' page.");
$priv_list['page-status-systemlogs-loadbalancer']['match'] = array();
$priv_list['page-status-systemlogs-loadbalancer']['match'][] = "diag_logs_relayd.php*";
$priv_list['page-diagnostics-logs-settings'] = array();
-$priv_list['page-diagnostics-logs-settings']['name'] = "WebCfg - Diagnostics: Logs: Settings page";
-$priv_list['page-diagnostics-logs-settings']['descr'] = "Allow access to the 'Diagnostics: Logs: Settings' page.";
+$priv_list['page-diagnostics-logs-settings']['name'] = gettext("WebCfg - Diagnostics: Logs: Settings page");
+$priv_list['page-diagnostics-logs-settings']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: Settings' page.");
$priv_list['page-diagnostics-logs-settings']['match'] = array();
$priv_list['page-diagnostics-logs-settings']['match'][] = "diag_logs_settings.php*";
$priv_list['page-diagnostics-logs-pptpvpn'] = array();
-$priv_list['page-diagnostics-logs-pptpvpn']['name'] = "WebCfg - Diagnostics: Logs: VPN page";
-$priv_list['page-diagnostics-logs-pptpvpn']['descr'] = "Allow access to the 'Diagnostics: Logs: VPN' page.";
+$priv_list['page-diagnostics-logs-pptpvpn']['name'] = gettext("WebCfg - Diagnostics: Logs: VPN page");
+$priv_list['page-diagnostics-logs-pptpvpn']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: VPN' page.");
$priv_list['page-diagnostics-logs-pptpvpn']['match'] = array();
$priv_list['page-diagnostics-logs-pptpvpn']['match'][] = "diag_logs_vpn.php*";
$priv_list['page-diagnostics-nanobsd'] = array();
-$priv_list['page-diagnostics-nanobsd']['name'] = "WebCfg - Diagnostics: NanoBSD";
-$priv_list['page-diagnostics-nanobsd']['descr'] = "Allow access to the 'Diagnostics: NanoBSD' page.";
+$priv_list['page-diagnostics-nanobsd']['name'] = gettext("WebCfg - Diagnostics: NanoBSD");
+$priv_list['page-diagnostics-nanobsd']['descr'] = gettext("Allow access to the 'Diagnostics: NanoBSD' page.");
$priv_list['page-diagnostics-nanobsd']['match'] = array();
$priv_list['page-diagnostics-nanobsd']['match'][] = "diag_nanobsd.php*";
$priv_list['page-diagnostics-packetcapture'] = array();
-$priv_list['page-diagnostics-packetcapture']['name'] = "WebCfg - Diagnostics: Packet Capture page";
-$priv_list['page-diagnostics-packetcapture']['descr'] = "Allow access to the 'Diagnostics: Packet Capture' page.";
+$priv_list['page-diagnostics-packetcapture']['name'] = gettext("WebCfg - Diagnostics: Packet Capture page");
+$priv_list['page-diagnostics-packetcapture']['descr'] = gettext("Allow access to the 'Diagnostics: Packet Capture' page.");
$priv_list['page-diagnostics-packetcapture']['match'] = array();
$priv_list['page-diagnostics-packetcapture']['match'][] = "diag_packet_capture.php*";
$priv_list['page-diagnostics-patters'] = array();
-$priv_list['page-diagnostics-patters']['name'] = "WebCfg - Diagnostics: Patterns page";
-$priv_list['page-diagnostics-patters']['descr'] = "Allow access to the 'Diagnostics: Patterns' page.";
+$priv_list['page-diagnostics-patters']['name'] = gettext("WebCfg - Diagnostics: Patterns page");
+$priv_list['page-diagnostics-patters']['descr'] = gettext("Allow access to the 'Diagnostics: Patterns' page.");
$priv_list['page-diagnostics-patters']['match'] = array();
$priv_list['page-diagnostics-patters']['match'][] = "patterns.php*";
$priv_list['page-diag-system-activity'] = array();
-$priv_list['page-diag-system-activity']['name'] = "WebCfg - Diagnostics: System Activity";
-$priv_list['page-diag-system-activity']['descr'] = "Allows access to the 'Diagnostics: System Activity' page";
+$priv_list['page-diag-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
+$priv_list['page-diag-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
$priv_list['page-diag-system-activity']['match'] = array();
$priv_list['page-diag-system-activity']['match'][] = "diag_system_activity*";
$priv_list['page-diagnostics-ping'] = array();
-$priv_list['page-diagnostics-ping']['name'] = "WebCfg - Diagnostics: Ping page";
-$priv_list['page-diagnostics-ping']['descr'] = "Allow access to the 'Diagnostics: Ping' page.";
+$priv_list['page-diagnostics-ping']['name'] = gettext("WebCfg - Diagnostics: Ping page");
+$priv_list['page-diagnostics-ping']['descr'] = gettext("Allow access to the 'Diagnostics: Ping' page.");
$priv_list['page-diagnostics-ping']['match'] = array();
$priv_list['page-diagnostics-ping']['match'][] = "diag_ping.php*";
$priv_list['page-status-packagelogs'] = array();
-$priv_list['page-status-packagelogs']['name'] = "WebCfg - Status: Package logs page";
-$priv_list['page-status-packagelogs']['descr'] = "Allow access to the 'Status: Package logs' page.";
+$priv_list['page-status-packagelogs']['name'] = gettext("WebCfg - Status: Package logs page");
+$priv_list['page-status-packagelogs']['descr'] = gettext("Allow access to the 'Status: Package logs' page.");
$priv_list['page-status-packagelogs']['match'] = array();
$priv_list['page-status-packagelogs']['match'][] = "diag_pkglogs.php*";
$priv_list['page-diagnostics-resetstate'] = array();
-$priv_list['page-diagnostics-resetstate']['name'] = "WebCfg - Diagnostics: Reset state page";
-$priv_list['page-diagnostics-resetstate']['descr'] = "Allow access to the 'Diagnostics: Reset state' page.";
+$priv_list['page-diagnostics-resetstate']['name'] = gettext("WebCfg - Diagnostics: Reset state page");
+$priv_list['page-diagnostics-resetstate']['descr'] = gettext("Allow access to the 'Diagnostics: Reset state' page.");
$priv_list['page-diagnostics-resetstate']['match'] = array();
$priv_list['page-diagnostics-resetstate']['match'][] = "diag_resetstate.php*";
$priv_list['page-diagnostics-routingtables'] = array();
-$priv_list['page-diagnostics-routingtables']['name'] = "WebCfg - Diagnostics: Routing tables page";
-$priv_list['page-diagnostics-routingtables']['descr'] = "Allow access to the 'Diagnostics: Routing tables' page.";
+$priv_list['page-diagnostics-routingtables']['name'] = gettext("WebCfg - Diagnostics: Routing tables page");
+$priv_list['page-diagnostics-routingtables']['descr'] = gettext("Allow access to the 'Diagnostics: Routing tables' page.");
$priv_list['page-diagnostics-routingtables']['match'] = array();
$priv_list['page-diagnostics-routingtables']['match'][] = "diag_routes.php*";
$priv_list['page-diagnostics-statessummary'] = array();
-$priv_list['page-diagnostics-statessummary']['name'] = "WebCfg - Diagnostics: States Summary page";
-$priv_list['page-diagnostics-statessummary']['descr'] = "Allow access to the 'Diagnostics: States Summary' page.";
+$priv_list['page-diagnostics-statessummary']['name'] = gettext("WebCfg - Diagnostics: States Summary page");
+$priv_list['page-diagnostics-statessummary']['descr'] = gettext("Allow access to the 'Diagnostics: States Summary' page.");
$priv_list['page-diagnostics-statessummary']['match'] = array();
$priv_list['page-diagnostics-statessummary']['match'][] = "diag_states_summary.php*";
$priv_list['page-diag-system-activity'] = array();
-$priv_list['page-diag-system-activity']['name'] = "WebCfg - Diagnostics: System Activity";
-$priv_list['page-diag-system-activity']['descr'] = "Allows access to the 'Diagnostics: System Activity' page";
+$priv_list['page-diag-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
+$priv_list['page-diag-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
$priv_list['page-diag-system-activity']['match'] = array();
$priv_list['page-diag-system-activity']['match'][] = "diag_system_activity*";
$priv_list['page-diag-system-activity'] = array();
-$priv_list['page-diag-system-activity']['name'] = "WebCfg - Diagnostics: System Activity";
-$priv_list['page-diag-system-activity']['descr'] = "Allows access to the 'Diagnostics: System Activity' page";
+$priv_list['page-diag-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
+$priv_list['page-diag-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
$priv_list['page-diag-system-activity']['match'] = array();
$priv_list['page-diag-system-activity']['match'][] = "diag_system_pftop*";
$priv_list['page-diagnostics-tables'] = array();
-$priv_list['page-diagnostics-tables']['name'] = "WebCfg - Diagnostics: PF Table IP addresses";
-$priv_list['page-diagnostics-tables']['descr'] = "Allow access to the 'Diagnostics: Tables' page.";
+$priv_list['page-diagnostics-tables']['name'] = gettext("WebCfg - Diagnostics: PF Table IP addresses");
+$priv_list['page-diagnostics-tables']['descr'] = gettext("Allow access to the 'Diagnostics: Tables' page.");
$priv_list['page-diagnostics-tables']['match'] = array();
$priv_list['page-diagnostics-tables']['match'][] = "diag_tables.php*";
$priv_list['page-diagnostics-traceroute'] = array();
-$priv_list['page-diagnostics-traceroute']['name'] = "WebCfg - Diagnostics: Traceroute page";
-$priv_list['page-diagnostics-traceroute']['descr'] = "Allow access to the 'Diagnostics: Traceroute' page.";
+$priv_list['page-diagnostics-traceroute']['name'] = gettext("WebCfg - Diagnostics: Traceroute page");
+$priv_list['page-diagnostics-traceroute']['descr'] = gettext("Allow access to the 'Diagnostics: Traceroute' page.");
$priv_list['page-diagnostics-traceroute']['match'] = array();
$priv_list['page-diagnostics-traceroute']['match'][] = "diag_traceroute.php*";
$priv_list['page-diagnostics-edit'] = array();
-$priv_list['page-diagnostics-edit']['name'] = "WebCfg - Diagnostics: Edit FIle";
-$priv_list['page-diagnostics-edit']['descr'] = "Allow access to the 'Diagnostics: Edit File' page.";
+$priv_list['page-diagnostics-edit']['name'] = gettext("WebCfg - Diagnostics: Edit FIle");
+$priv_list['page-diagnostics-edit']['descr'] = gettext("Allow access to the 'Diagnostics: Edit File' page.");
$priv_list['page-diagnostics-edit']['match'] = array();
$priv_list['page-diagnostics-edit']['match'][] = "edit.php*";
$priv_list['page-diagnostics-command'] = array();
-$priv_list['page-diagnostics-command']['name'] = "WebCfg - Diagnostics: Command page";
-$priv_list['page-diagnostics-command']['descr'] = "Allow access to the 'Diagnostics: Command' page.";
+$priv_list['page-diagnostics-command']['name'] = gettext("WebCfg - Diagnostics: Command page");
+$priv_list['page-diagnostics-command']['descr'] = gettext("Allow access to the 'Diagnostics: Command' page.");
$priv_list['page-diagnostics-command']['match'] = array();
$priv_list['page-diagnostics-command']['match'][] = "exec.php*";
$priv_list['page-hidden-execraw'] = array();
-$priv_list['page-hidden-execraw']['name'] = "WebCfg - Hidden: Exec Raw page";
-$priv_list['page-hidden-execraw']['descr'] = "Allow access to the 'Hidden: Exec Raw' page.";
+$priv_list['page-hidden-execraw']['name'] = gettext("WebCfg - Hidden: Exec Raw page");
+$priv_list['page-hidden-execraw']['descr'] = gettext("Allow access to the 'Hidden: Exec Raw' page.");
$priv_list['page-hidden-execraw']['match'] = array();
$priv_list['page-hidden-execraw']['match'][] = "exec_raw.php*";
$priv_list['page-firewall-aliases'] = array();
-$priv_list['page-firewall-aliases']['name'] = "WebCfg - Firewall: Aliases page";
-$priv_list['page-firewall-aliases']['descr'] = "Allow access to the 'Firewall: Aliases' page.";
+$priv_list['page-firewall-aliases']['name'] = gettext("WebCfg - Firewall: Aliases page");
+$priv_list['page-firewall-aliases']['descr'] = gettext("Allow access to the 'Firewall: Aliases' page.");
$priv_list['page-firewall-aliases']['match'] = array();
$priv_list['page-firewall-aliases']['match'][] = "firewall_aliases.php*";
$priv_list['page-firewall-alias-edit'] = array();
-$priv_list['page-firewall-alias-edit']['name'] = "WebCfg - Firewall: Alias: Edit page";
-$priv_list['page-firewall-alias-edit']['descr'] = "Allow access to the 'Firewall: Alias: Edit' page.";
+$priv_list['page-firewall-alias-edit']['name'] = gettext("WebCfg - Firewall: Alias: Edit page");
+$priv_list['page-firewall-alias-edit']['descr'] = gettext("Allow access to the 'Firewall: Alias: Edit' page.");
$priv_list['page-firewall-alias-edit']['match'] = array();
$priv_list['page-firewall-alias-edit']['match'][] = "firewall_aliases_edit.php*";
$priv_list['page-firewall-alias-import'] = array();
-$priv_list['page-firewall-alias-import']['name'] = "WebCfg - Firewall: Alias: Import page";
-$priv_list['page-firewall-alias-import']['descr'] = "Allow access to the 'Firewall: Alias: Import' page.";
+$priv_list['page-firewall-alias-import']['name'] = gettext("WebCfg - Firewall: Alias: Import page");
+$priv_list['page-firewall-alias-import']['descr'] = gettext("Allow access to the 'Firewall: Alias: Import' page.");
$priv_list['page-firewall-alias-import']['match'] = array();
$priv_list['page-firewall-alias-import']['match'][] = "firewall_aliases_import.php*";
$priv_list['page-firewall-nat-portforward'] = array();
-$priv_list['page-firewall-nat-portforward']['name'] = "WebCfg - Firewall: NAT: Port Forward page";
-$priv_list['page-firewall-nat-portforward']['descr'] = "Allow access to the 'Firewall: NAT: Port Forward' page.";
+$priv_list['page-firewall-nat-portforward']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward page");
+$priv_list['page-firewall-nat-portforward']['descr'] = gettext("Allow access to the 'Firewall: NAT: Port Forward' page.");
$priv_list['page-firewall-nat-portforward']['match'] = array();
$priv_list['page-firewall-nat-portforward']['match'][] = "firewall_nat.php*";
$priv_list['page-firewall-nat-1-1'] = array();
-$priv_list['page-firewall-nat-1-1']['name'] = "WebCfg - Firewall: NAT: 1:1 page";
-$priv_list['page-firewall-nat-1-1']['descr'] = "Allow access to the 'Firewall: NAT: 1:1' page.";
+$priv_list['page-firewall-nat-1-1']['name'] = gettext("WebCfg - Firewall: NAT: 1:1 page");
+$priv_list['page-firewall-nat-1-1']['descr'] = gettext("Allow access to the 'Firewall: NAT: 1:1' page.");
$priv_list['page-firewall-nat-1-1']['match'] = array();
$priv_list['page-firewall-nat-1-1']['match'][] = "firewall_nat_1to1.php*";
$priv_list['page-firewall-nat-1-1-edit'] = array();
-$priv_list['page-firewall-nat-1-1-edit']['name'] = "WebCfg - Firewall: NAT: 1:1: Edit page";
-$priv_list['page-firewall-nat-1-1-edit']['descr'] = "Allow access to the 'Firewall: NAT: 1:1: Edit' page.";
+$priv_list['page-firewall-nat-1-1-edit']['name'] = gettext("WebCfg - Firewall: NAT: 1:1: Edit page");
+$priv_list['page-firewall-nat-1-1-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: 1:1: Edit' page.");
$priv_list['page-firewall-nat-1-1-edit']['match'] = array();
$priv_list['page-firewall-nat-1-1-edit']['match'][] = "firewall_nat_1to1_edit.php*";
$priv_list['page-firewall-nat-portforward-edit'] = array();
-$priv_list['page-firewall-nat-portforward-edit']['name'] = "WebCfg - Firewall: NAT: Port Forward: Edit page";
-$priv_list['page-firewall-nat-portforward-edit']['descr'] = "Allow access to the 'Firewall: NAT: Port Forward: Edit' page.";
+$priv_list['page-firewall-nat-portforward-edit']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward: Edit page");
+$priv_list['page-firewall-nat-portforward-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: Port Forward: Edit' page.");
$priv_list['page-firewall-nat-portforward-edit']['match'] = array();
$priv_list['page-firewall-nat-portforward-edit']['match'][] = "firewall_nat_edit.php*";
$priv_list['page-firewall-nat-outbound'] = array();
-$priv_list['page-firewall-nat-outbound']['name'] = "WebCfg - Firewall: NAT: Outbound page";
-$priv_list['page-firewall-nat-outbound']['descr'] = "Allow access to the 'Firewall: NAT: Outbound' page.";
+$priv_list['page-firewall-nat-outbound']['name'] = gettext("WebCfg - Firewall: NAT: Outbound page");
+$priv_list['page-firewall-nat-outbound']['descr'] = gettext("Allow access to the 'Firewall: NAT: Outbound' page.");
$priv_list['page-firewall-nat-outbound']['match'] = array();
$priv_list['page-firewall-nat-outbound']['match'][] = "firewall_nat_out.php*";
$priv_list['page-firewall-nat-outbound-edit'] = array();
-$priv_list['page-firewall-nat-outbound-edit']['name'] = "WebCfg - Firewall: NAT: Outbound: Edit page";
-$priv_list['page-firewall-nat-outbound-edit']['descr'] = "Allow access to the 'Firewall: NAT: Outbound: Edit' page.";
+$priv_list['page-firewall-nat-outbound-edit']['name'] = gettext("WebCfg - Firewall: NAT: Outbound: Edit page");
+$priv_list['page-firewall-nat-outbound-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: Outbound: Edit' page.");
$priv_list['page-firewall-nat-outbound-edit']['match'] = array();
$priv_list['page-firewall-nat-outbound-edit']['match'][] = "firewall_nat_out_edit.php*";
$priv_list['page-firewall-rules'] = array();
-$priv_list['page-firewall-rules']['name'] = "WebCfg - Firewall: Rules page";
-$priv_list['page-firewall-rules']['descr'] = "Allow access to the 'Firewall: Rules' page.";
+$priv_list['page-firewall-rules']['name'] = gettext("WebCfg - Firewall: Rules page");
+$priv_list['page-firewall-rules']['descr'] = gettext("Allow access to the 'Firewall: Rules' page.");
$priv_list['page-firewall-rules']['match'] = array();
$priv_list['page-firewall-rules']['match'][] = "firewall_rules.php*";
$priv_list['page-firewall-rules-edit'] = array();
-$priv_list['page-firewall-rules-edit']['name'] = "WebCfg - Firewall: Rules: Edit page";
-$priv_list['page-firewall-rules-edit']['descr'] = "Allow access to the 'Firewall: Rules: Edit' page.";
+$priv_list['page-firewall-rules-edit']['name'] = gettext("WebCfg - Firewall: Rules: Edit page");
+$priv_list['page-firewall-rules-edit']['descr'] = gettext("Allow access to the 'Firewall: Rules: Edit' page.");
$priv_list['page-firewall-rules-edit']['match'] = array();
$priv_list['page-firewall-rules-edit']['match'][] = "firewall_rules_edit.php*";
$priv_list['page-firewall-schedules'] = array();
-$priv_list['page-firewall-schedules']['name'] = "WebCfg - Firewall: Schedules page";
-$priv_list['page-firewall-schedules']['descr'] = "Allow access to the 'Firewall: Schedules' page.";
+$priv_list['page-firewall-schedules']['name'] = gettext("WebCfg - Firewall: Schedules page");
+$priv_list['page-firewall-schedules']['descr'] = gettext("Allow access to the 'Firewall: Schedules' page.");
$priv_list['page-firewall-schedules']['match'] = array();
$priv_list['page-firewall-schedules']['match'][] = "firewall_schedule.php*";
$priv_list['page-firewall-schedules-edit'] = array();
-$priv_list['page-firewall-schedules-edit']['name'] = "WebCfg - Firewall: Schedules: Edit page";
-$priv_list['page-firewall-schedules-edit']['descr'] = "Allow access to the 'Firewall: Schedules: Edit' page.";
+$priv_list['page-firewall-schedules-edit']['name'] = gettext("WebCfg - Firewall: Schedules: Edit page");
+$priv_list['page-firewall-schedules-edit']['descr'] = gettext("Allow access to the 'Firewall: Schedules: Edit' page.");
$priv_list['page-firewall-schedules-edit']['match'] = array();
$priv_list['page-firewall-schedules-edit']['match'][] = "firewall_schedule_edit.php*";
$priv_list['page-firewall-trafficshaper'] = array();
-$priv_list['page-firewall-trafficshaper']['name'] = "WebCfg - Firewall: Traffic Shaper page";
-$priv_list['page-firewall-trafficshaper']['descr'] = "Allow access to the 'Firewall: Traffic Shaper' page.";
+$priv_list['page-firewall-trafficshaper']['name'] = gettext("WebCfg - Firewall: Traffic Shaper page");
+$priv_list['page-firewall-trafficshaper']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper' page.");
$priv_list['page-firewall-trafficshaper']['match'] = array();
$priv_list['page-firewall-trafficshaper']['match'][] = "firewall_shaper.php*";
$priv_list['page-firewall-trafficshaper-layer7'] = array();
-$priv_list['page-firewall-trafficshaper-layer7']['name'] = "WebCfg - Firewall: Traffic Shaper: Layer7 page";
-$priv_list['page-firewall-trafficshaper-layer7']['descr'] = "Allow access to the 'Firewall: Traffic Shaper: Layer7' page.";
+$priv_list['page-firewall-trafficshaper-layer7']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Layer7 page");
+$priv_list['page-firewall-trafficshaper-layer7']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Layer7' page.");
$priv_list['page-firewall-trafficshaper-layer7']['match'] = array();
$priv_list['page-firewall-trafficshaper-layer7']['match'][] = "firewall_shaper_layer7.php*";
$priv_list['page-firewall-trafficshaper-queues'] = array();
-$priv_list['page-firewall-trafficshaper-queues']['name'] = "WebCfg - Firewall: Traffic Shaper: Queues page";
-$priv_list['page-firewall-trafficshaper-queues']['descr'] = "Allow access to the 'Firewall: Traffic Shaper: Queues' page.";
+$priv_list['page-firewall-trafficshaper-queues']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Queues page");
+$priv_list['page-firewall-trafficshaper-queues']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Queues' page.");
$priv_list['page-firewall-trafficshaper-queues']['match'] = array();
$priv_list['page-firewall-trafficshaper-queues']['match'][] = "firewall_shaper_queues.php*";
$priv_list['page-firewall-trafficshaper-limiter'] = array();
-$priv_list['page-firewall-trafficshaper-limiter']['name'] = "WebCfg - Firewall: Traffic Shaper: Limiter page";
-$priv_list['page-firewall-trafficshaper-limiter']['descr'] = "Allow access to the 'Firewall: Traffic Shaper: Limiter' page.";
+$priv_list['page-firewall-trafficshaper-limiter']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Limiter page");
+$priv_list['page-firewall-trafficshaper-limiter']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Limiter' page.");
$priv_list['page-firewall-trafficshaper-limiter']['match'] = array();
$priv_list['page-firewall-trafficshaper-limiter']['match'][] = "firewall_shaper_vinterface.php*";
$priv_list['page-firewall-trafficshaper-wizard'] = array();
-$priv_list['page-firewall-trafficshaper-wizard']['name'] = "WebCfg - Firewall: Traffic Shaper: Wizard page";
-$priv_list['page-firewall-trafficshaper-wizard']['descr'] = "Allow access to the 'Firewall: Traffic Shaper: Wizard' page.";
+$priv_list['page-firewall-trafficshaper-wizard']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Wizard page");
+$priv_list['page-firewall-trafficshaper-wizard']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Wizard' page.");
$priv_list['page-firewall-trafficshaper-wizard']['match'] = array();
$priv_list['page-firewall-trafficshaper-wizard']['match'][] = "firewall_shaper_wizards.php*";
$priv_list['page-firewall-virtualipaddresses'] = array();
-$priv_list['page-firewall-virtualipaddresses']['name'] = "WebCfg - Firewall: Virtual IP Addresses page";
-$priv_list['page-firewall-virtualipaddresses']['descr'] = "Allow access to the 'Firewall: Virtual IP Addresses' page.";
+$priv_list['page-firewall-virtualipaddresses']['name'] = gettext("WebCfg - Firewall: Virtual IP Addresses page");
+$priv_list['page-firewall-virtualipaddresses']['descr'] = gettext("Allow access to the 'Firewall: Virtual IP Addresses' page.");
$priv_list['page-firewall-virtualipaddresses']['match'] = array();
$priv_list['page-firewall-virtualipaddresses']['match'][] = "firewall_virtual_ip.php*";
$priv_list['page-firewall-virtualipaddress-edit'] = array();
-$priv_list['page-firewall-virtualipaddress-edit']['name'] = "WebCfg - Firewall: Virtual IP Address: Edit page";
-$priv_list['page-firewall-virtualipaddress-edit']['descr'] = "Allow access to the 'Firewall: Virtual IP Address: Edit' page.";
+$priv_list['page-firewall-virtualipaddress-edit']['name'] = gettext("WebCfg - Firewall: Virtual IP Address: Edit page");
+$priv_list['page-firewall-virtualipaddress-edit']['descr'] = gettext("Allow access to the 'Firewall: Virtual IP Address: Edit' page.");
$priv_list['page-firewall-virtualipaddress-edit']['match'] = array();
$priv_list['page-firewall-virtualipaddress-edit']['match'][] = "firewall_virtual_ip_edit.php*";
$priv_list['page-getserviceproviders'] = array();
-$priv_list['page-getserviceproviders']['name'] = "WebCfg - AJAX: Get Service Providers";
-$priv_list['page-getserviceproviders']['descr'] = "Allow access to the 'AJAX: Service Providers' page.";
+$priv_list['page-getserviceproviders']['name'] = gettext("WebCfg - AJAX: Get Service Providers");
+$priv_list['page-getserviceproviders']['descr'] = gettext("Allow access to the 'AJAX: Service Providers' page.");
$priv_list['page-getserviceproviders']['match'] = array();
$priv_list['page-getserviceproviders']['match'][] = "getserviceproviders.php*";
$priv_list['page-getstats'] = array();
-$priv_list['page-getstats']['name'] = "WebCfg - AJAX: Get Stats";
-$priv_list['page-getstats']['descr'] = "Allow access to the 'AJAX: Get Stats' page.";
+$priv_list['page-getstats']['name'] = gettext("WebCfg - AJAX: Get Stats");
+$priv_list['page-getstats']['descr'] = gettext("Allow access to the 'AJAX: Get Stats' page.");
$priv_list['page-getstats']['match'] = array();
$priv_list['page-getstats']['match'][] = "getstats.php*";
$priv_list['page-diagnostics-interfacetraffic'] = array();
-$priv_list['page-diagnostics-interfacetraffic']['name'] = "WebCfg - Diagnostics: Interface Traffic page";
-$priv_list['page-diagnostics-interfacetraffic']['descr'] = "Allow access to the 'Diagnostics: Interface Traffic' page.";
+$priv_list['page-diagnostics-interfacetraffic']['name'] = gettext("WebCfg - Diagnostics: Interface Traffic page");
+$priv_list['page-diagnostics-interfacetraffic']['descr'] = gettext("Allow access to the 'Diagnostics: Interface Traffic' page.");
$priv_list['page-diagnostics-interfacetraffic']['match'] = array();
$priv_list['page-diagnostics-interfacetraffic']['match'][] = "graph.php*";
$priv_list['page-diagnostics-cpuutilization'] = array();
-$priv_list['page-diagnostics-cpuutilization']['name'] = "WebCfg - Diagnostics: CPU Utilization page";
-$priv_list['page-diagnostics-cpuutilization']['descr'] = "Allow access to the 'Diagnostics: CPU Utilization' page.";
+$priv_list['page-diagnostics-cpuutilization']['name'] = gettext("WebCfg - Diagnostics: CPU Utilization page");
+$priv_list['page-diagnostics-cpuutilization']['descr'] = gettext("Allow access to the 'Diagnostics: CPU Utilization' page.");
$priv_list['page-diagnostics-cpuutilization']['match'] = array();
$priv_list['page-diagnostics-cpuutilization']['match'][] = "graph_cpu.php*";
$priv_list['page-diagnostics-haltsystem'] = array();
-$priv_list['page-diagnostics-haltsystem']['name'] = "WebCfg - Diagnostics: Halt system page";
-$priv_list['page-diagnostics-haltsystem']['descr'] = "Allow access to the 'Diagnostics: Halt system' page.";
+$priv_list['page-diagnostics-haltsystem']['name'] = gettext("WebCfg - Diagnostics: Halt system page");
+$priv_list['page-diagnostics-haltsystem']['descr'] = gettext("Allow access to the 'Diagnostics: Halt system' page.");
$priv_list['page-diagnostics-haltsystem']['match'] = array();
$priv_list['page-diagnostics-haltsystem']['match'][] = "halt.php*";
$priv_list['page-requiredforjavascript'] = array();
-$priv_list['page-requiredforjavascript']['name'] = "WebCfg - Required for javascript page";
-$priv_list['page-requiredforjavascript']['descr'] = "Allow access to the 'Required for javascript' page.";
+$priv_list['page-requiredforjavascript']['name'] = gettext("WebCfg - Required for javascript page");
+$priv_list['page-requiredforjavascript']['descr'] = gettext("Allow access to the 'Required for javascript' page.");
$priv_list['page-requiredforjavascript']['match'] = array();
$priv_list['page-requiredforjavascript']['match'][] = "headjs.php*";
$priv_list['page-xmlrpcinterfacestats'] = array();
-$priv_list['page-xmlrpcinterfacestats']['name'] = "WebCfg - XMLRPC Interface Stats page";
-$priv_list['page-xmlrpcinterfacestats']['descr'] = "Allow access to the 'XMLRPC Interface Stats' page.";
+$priv_list['page-xmlrpcinterfacestats']['name'] = gettext("WebCfg - XMLRPC Interface Stats page");
+$priv_list['page-xmlrpcinterfacestats']['descr'] = gettext("Allow access to the 'XMLRPC Interface Stats' page.");
$priv_list['page-xmlrpcinterfacestats']['match'] = array();
$priv_list['page-xmlrpcinterfacestats']['match'][] = "ifstats.php*";
$priv_list['page-system-login/logout'] = array();
-$priv_list['page-system-login/logout']['name'] = "WebCfg - System: Login / Logout page / Dashboard";
-$priv_list['page-system-login/logout']['descr'] = "Allow access to the 'System: Login / Logout' page and Dashboard.";
+$priv_list['page-system-login/logout']['name'] = gettext("WebCfg - System: Login / Logout page / Dashboard");
+$priv_list['page-system-login/logout']['descr'] = gettext("Allow access to the 'System: Login / Logout' page and Dashboard.");
$priv_list['page-system-login/logout']['match'] = array();
$priv_list['page-system-login/logout']['match'][] = "index.php*";
$priv_list['page-interfaces'] = array();
-$priv_list['page-interfaces']['name'] = "WebCfg - Interfaces: WAN page";
-$priv_list['page-interfaces']['descr'] = "Allow access to the 'Interfaces' page.";
+$priv_list['page-interfaces']['name'] = gettext("WebCfg - Interfaces: WAN page");
+$priv_list['page-interfaces']['descr'] = gettext("Allow access to the 'Interfaces' page.");
$priv_list['page-interfaces']['match'] = array();
$priv_list['page-interfaces']['match'][] = "interfaces.php*";
$priv_list['page-interfaces-assignnetworkports'] = array();
-$priv_list['page-interfaces-assignnetworkports']['name'] = "WebCfg - Interfaces: Assign network ports page";
-$priv_list['page-interfaces-assignnetworkports']['descr'] = "Allow access to the 'Interfaces: Assign network ports' page.";
+$priv_list['page-interfaces-assignnetworkports']['name'] = gettext("WebCfg - Interfaces: Assign network ports page");
+$priv_list['page-interfaces-assignnetworkports']['descr'] = gettext("Allow access to the 'Interfaces: Assign network ports' page.");
$priv_list['page-interfaces-assignnetworkports']['match'] = array();
$priv_list['page-interfaces-assignnetworkports']['match'][] = "interfaces_assign.php*";
$priv_list['page-interfaces-bridge'] = array();
-$priv_list['page-interfaces-bridge']['name'] = "WebCfg - Interfaces: Bridge page";
-$priv_list['page-interfaces-bridge']['descr'] = "Allow access to the 'Interfaces: Bridge' page.";
+$priv_list['page-interfaces-bridge']['name'] = gettext("WebCfg - Interfaces: Bridge page");
+$priv_list['page-interfaces-bridge']['descr'] = gettext("Allow access to the 'Interfaces: Bridge' page.");
$priv_list['page-interfaces-bridge']['match'] = array();
$priv_list['page-interfaces-bridge']['match'][] = "interfaces_bridge.php*";
$priv_list['page-interfaces-bridge-edit'] = array();
-$priv_list['page-interfaces-bridge-edit']['name'] = "WebCfg - Interfaces: Bridge edit page";
-$priv_list['page-interfaces-bridge-edit']['descr'] = "Allow access to the 'Interfaces: Bridge : Edit' page.";
+$priv_list['page-interfaces-bridge-edit']['name'] = gettext("WebCfg - Interfaces: Bridge edit page");
+$priv_list['page-interfaces-bridge-edit']['descr'] = gettext("Allow access to the 'Interfaces: Bridge : Edit' page.");
$priv_list['page-interfaces-bridge-edit']['match'] = array();
$priv_list['page-interfaces-bridge-edit']['match'][] = "interfaces_bridge_edit.php*";
$priv_list['page-interfaces-gif'] = array();
-$priv_list['page-interfaces-gif']['name'] = "WebCfg - Interfaces: GIF page";
-$priv_list['page-interfaces-gif']['descr'] = "Allow access to the 'Interfaces: GIF' page.";
+$priv_list['page-interfaces-gif']['name'] = gettext("WebCfg - Interfaces: GIF page");
+$priv_list['page-interfaces-gif']['descr'] = gettext("Allow access to the 'Interfaces: GIF' page.");
$priv_list['page-interfaces-gif']['match'] = array();
$priv_list['page-interfaces-gif']['match'][] = "interfaces_gif.php*";
$priv_list['page-interfaces-gif-edit'] = array();
-$priv_list['page-interfaces-gif-edit']['name'] = "WebCfg - Interfaces: GIF: Edit page";
-$priv_list['page-interfaces-gif-edit']['descr'] = "Allow access to the 'Interfaces: GIF: Edit' page.";
+$priv_list['page-interfaces-gif-edit']['name'] = gettext("WebCfg - Interfaces: GIF: Edit page");
+$priv_list['page-interfaces-gif-edit']['descr'] = gettext("Allow access to the 'Interfaces: GIF: Edit' page.");
$priv_list['page-interfaces-gif-edit']['match'] = array();
$priv_list['page-interfaces-gif-edit']['match'][] = "interfaces_gif_edit.php*";
$priv_list['page-interfaces-gre'] = array();
-$priv_list['page-interfaces-gre']['name'] = "WebCfg - Interfaces: GRE page";
-$priv_list['page-interfaces-gre']['descr'] = "Allow access to the 'Interfaces: GRE' page.";
+$priv_list['page-interfaces-gre']['name'] = gettext("WebCfg - Interfaces: GRE page");
+$priv_list['page-interfaces-gre']['descr'] = gettext("Allow access to the 'Interfaces: GRE' page.");
$priv_list['page-interfaces-gre']['match'] = array();
$priv_list['page-interfaces-gre']['match'][] = "interfaces_gre.php*";
$priv_list['page-interfaces-gre-edit'] = array();
-$priv_list['page-interfaces-gre-edit']['name'] = "WebCfg - Interfaces: GRE: Edit page";
-$priv_list['page-interfaces-gre-edit']['descr'] = "Allow access to the 'Interfaces: GRE: Edit' page.";
+$priv_list['page-interfaces-gre-edit']['name'] = gettext("WebCfg - Interfaces: GRE: Edit page");
+$priv_list['page-interfaces-gre-edit']['descr'] = gettext("Allow access to the 'Interfaces: GRE: Edit' page.");
$priv_list['page-interfaces-gre-edit']['match'] = array();
$priv_list['page-interfaces-gre-edit']['match'][] = "interfaces_gre_edit.php*";
$priv_list['page-interfaces-groups'] = array();
-$priv_list['page-interfaces-groups']['name'] = "WebCfg - Interfaces: Groups page";
-$priv_list['page-interfaces-groups']['descr'] = "Create interface groups";
+$priv_list['page-interfaces-groups']['name'] = gettext("WebCfg - Interfaces: Groups page");
+$priv_list['page-interfaces-groups']['descr'] = gettext("Create interface groups");
$priv_list['page-interfaces-groups']['match'] = array();
$priv_list['page-interfaces-groups']['match'][] = "interfaces_groups.php*";
$priv_list['page-interfacess-groups'] = array();
-$priv_list['page-interfacess-groups']['name'] = "WebCfg - Interfaces: Groups: Edit page";
-$priv_list['page-interfacess-groups']['descr'] = "Edit Interface groups";
+$priv_list['page-interfacess-groups']['name'] = gettext("WebCfg - Interfaces: Groups: Edit page");
+$priv_list['page-interfacess-groups']['descr'] = gettext("Edit Interface groups");
$priv_list['page-interfacess-groups']['match'] = array();
$priv_list['page-interfacess-groups']['match'][] = "interfaces_groups_edit.php*";
$priv_list['page-interfacess-lagg'] = array();
-$priv_list['page-interfacess-lagg']['name'] = "WebCfg - Interfaces: LAGG: page";
-$priv_list['page-interfacess-lagg']['descr'] = "Edit Interface LAGG";
+$priv_list['page-interfacess-lagg']['name'] = gettext("WebCfg - Interfaces: LAGG: page");
+$priv_list['page-interfacess-lagg']['descr'] = gettext("Edit Interface LAGG");
$priv_list['page-interfacess-lagg']['match'] = array();
$priv_list['page-interfacess-lagg']['match'][] = "interfaces_lagg.php*";
$priv_list['page-interfacess-lagg'] = array();
-$priv_list['page-interfacess-lagg']['name'] = "WebCfg - Interfaces: LAGG: Edit page";
-$priv_list['page-interfacess-lagg']['descr'] = "Edit Interface LAGG";
+$priv_list['page-interfacess-lagg']['name'] = gettext("WebCfg - Interfaces: LAGG: Edit page");
+$priv_list['page-interfacess-lagg']['descr'] = gettext("Edit Interface LAGG");
$priv_list['page-interfacess-lagg']['match'] = array();
$priv_list['page-interfacess-lagg']['match'][] = "interfaces_lagg_edit.php*";
$priv_list['page-interfaces-ppps'] = array();
-$priv_list['page-interfaces-ppps']['name'] = "WebCfg - Interfaces: ppps page";
-$priv_list['page-interfaces-ppps']['descr'] = "Allow access to the 'Interfaces: ppps' page.";
+$priv_list['page-interfaces-ppps']['name'] = gettext("WebCfg - Interfaces: ppps page");
+$priv_list['page-interfaces-ppps']['descr'] = gettext("Allow access to the 'Interfaces: ppps' page.");
$priv_list['page-interfaces-ppps']['match'] = array();
$priv_list['page-interfaces-ppps']['match'][] = "interfaces_ppps.php*";
$priv_list['page-interfaces-ppps-edit'] = array();
-$priv_list['page-interfaces-ppps-edit']['name'] = "WebCfg - Interfaces: PPPs: Edit page";
-$priv_list['page-interfaces-ppps-edit']['descr'] = "Allow access to the 'Interfaces: PPPs: Edit' page.";
+$priv_list['page-interfaces-ppps-edit']['name'] = gettext("WebCfg - Interfaces: PPPs: Edit page");
+$priv_list['page-interfaces-ppps-edit']['descr'] = gettext("Allow access to the 'Interfaces: PPPs: Edit' page.");
$priv_list['page-interfaces-ppps-edit']['match'] = array();
$priv_list['page-interfaces-ppps-edit']['match'][] = "interfaces_ppps_edit.php*";
$priv_list['page-interfaces-qinq'] = array();
-$priv_list['page-interfaces-qinq']['name'] = "WebCfg - Interfaces: QinQ page";
-$priv_list['page-interfaces-qinq']['descr'] = "Allow access to the 'Interfaces: QinQ' page.";
+$priv_list['page-interfaces-qinq']['name'] = gettext("WebCfg - Interfaces: QinQ page");
+$priv_list['page-interfaces-qinq']['descr'] = gettext("Allow access to the 'Interfaces: QinQ' page.");
$priv_list['page-interfaces-qinq']['match'] = array();
$priv_list['page-interfaces-qinq']['match'][] = "interfaces_qinq.php*";
$priv_list['page-interfacess-qinq'] = array();
-$priv_list['page-interfacess-qinq']['name'] = "WebCfg - Interfaces: QinQ: Edit page";
-$priv_list['page-interfacess-qinq']['descr'] = "Edit Interface qinq";
+$priv_list['page-interfacess-qinq']['name'] = gettext("WebCfg - Interfaces: QinQ: Edit page");
+$priv_list['page-interfacess-qinq']['descr'] = gettext("Edit Interface qinq");
$priv_list['page-interfacess-qinq']['match'] = array();
$priv_list['page-interfacess-qinq']['match'][] = "interfaces_qinq_edit.php*";
$priv_list['page-interfaces-vlan'] = array();
-$priv_list['page-interfaces-vlan']['name'] = "WebCfg - Interfaces: VLAN page";
-$priv_list['page-interfaces-vlan']['descr'] = "Allow access to the 'Interfaces: VLAN' page.";
+$priv_list['page-interfaces-vlan']['name'] = gettext("WebCfg - Interfaces: VLAN page");
+$priv_list['page-interfaces-vlan']['descr'] = gettext("Allow access to the 'Interfaces: VLAN' page.");
$priv_list['page-interfaces-vlan']['match'] = array();
$priv_list['page-interfaces-vlan']['match'][] = "interfaces_vlan.php*";
$priv_list['page-interfaces-vlan-edit'] = array();
-$priv_list['page-interfaces-vlan-edit']['name'] = "WebCfg - Interfaces: VLAN: Edit page";
-$priv_list['page-interfaces-vlan-edit']['descr'] = "Allow access to the 'Interfaces: VLAN: Edit' page.";
+$priv_list['page-interfaces-vlan-edit']['name'] = gettext("WebCfg - Interfaces: VLAN: Edit page");
+$priv_list['page-interfaces-vlan-edit']['descr'] = gettext("Allow access to the 'Interfaces: VLAN: Edit' page.");
$priv_list['page-interfaces-vlan-edit']['match'] = array();
$priv_list['page-interfaces-vlan-edit']['match'][] = "interfaces_vlan_edit.php*";
$priv_list['page-interfaces-wireless'] = array();
-$priv_list['page-interfaces-wireless']['name'] = "WebCfg - Interfaces: Wireless page";
-$priv_list['page-interfaces-wireless']['descr'] = "Allow access to the 'Interfaces: Wireless' page.";
+$priv_list['page-interfaces-wireless']['name'] = gettext("WebCfg - Interfaces: Wireless page");
+$priv_list['page-interfaces-wireless']['descr'] = gettext("Allow access to the 'Interfaces: Wireless' page.");
$priv_list['page-interfaces-wireless']['match'] = array();
$priv_list['page-interfaces-wireless']['match'][] = "interfaces_wireless.php*";
$priv_list['page-interfaces-wireless-edit'] = array();
-$priv_list['page-interfaces-wireless-edit']['name'] = "WebCfg - Interfaces: Wireless edit page";
-$priv_list['page-interfaces-wireless-edit']['descr'] = "Allow access to the 'Interfaces: Wireless : Edit' page.";
+$priv_list['page-interfaces-wireless-edit']['name'] = gettext("WebCfg - Interfaces: Wireless edit page");
+$priv_list['page-interfaces-wireless-edit']['descr'] = gettext("Allow access to the 'Interfaces: Wireless : Edit' page.");
$priv_list['page-interfaces-wireless-edit']['match'] = array();
$priv_list['page-interfaces-wireless-edit']['match'][] = "interfaces_wireless_edit.php*";
$priv_list['page-system-license'] = array();
-$priv_list['page-system-license']['name'] = "WebCfg - System: License page";
-$priv_list['page-system-license']['descr'] = "Allow access to the 'System: License' page.";
+$priv_list['page-system-license']['name'] = gettext("WebCfg - System: License page");
+$priv_list['page-system-license']['descr'] = gettext("Allow access to the 'System: License' page.");
$priv_list['page-system-license']['match'] = array();
$priv_list['page-system-license']['match'][] = "license.php*";
$priv_list['page-services-loadbalancer-monitor'] = array();
-$priv_list['page-services-loadbalancer-monitor']['name'] = "WebCfg - Services: Load Balancer: Monitors page";
-$priv_list['page-services-loadbalancer-monitor']['descr'] = "Allow access to the 'Services: Load Balancer: Monitors' page.";
+$priv_list['page-services-loadbalancer-monitor']['name'] = gettext("WebCfg - Services: Load Balancer: Monitors page");
+$priv_list['page-services-loadbalancer-monitor']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Monitors' page.");
$priv_list['page-services-loadbalancer-monitor']['match'] = array();
$priv_list['page-services-loadbalancer-monitor']['match'][] = "load_balancer_monitor.php*";
$priv_list['page-services-loadbalancer-monitor-edit'] = array();
-$priv_list['page-services-loadbalancer-monitor-edit']['name'] = "WebCfg - Services: Load Balancer: Monitor: Edit page";
-$priv_list['page-services-loadbalancer-monitor-edit']['descr'] = "Allow access to the 'Services: Load Balancer: Monitor: Edit' page.";
+$priv_list['page-services-loadbalancer-monitor-edit']['name'] = gettext("WebCfg - Services: Load Balancer: Monitor: Edit page");
+$priv_list['page-services-loadbalancer-monitor-edit']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Monitor: Edit' page.");
$priv_list['page-services-loadbalancer-monitor-edit']['match'] = array();
$priv_list['page-services-loadbalancer-monitor-edit']['match'][] = "load_balancer_monitor_edit.php*";
$priv_list['page-loadbalancer-pool'] = array();
-$priv_list['page-loadbalancer-pool']['name'] = "WebCfg - Load Balancer: Pool page";
-$priv_list['page-loadbalancer-pool']['descr'] = "Allow access to the 'Load Balancer: Pool' page.";
+$priv_list['page-loadbalancer-pool']['name'] = gettext("WebCfg - Load Balancer: Pool page");
+$priv_list['page-loadbalancer-pool']['descr'] = gettext("Allow access to the 'Load Balancer: Pool' page.");
$priv_list['page-loadbalancer-pool']['match'] = array();
$priv_list['page-loadbalancer-pool']['match'][] = "load_balancer_pool.php*";
$priv_list['page-loadbalancer-pool-edit'] = array();
-$priv_list['page-loadbalancer-pool-edit']['name'] = "WebCfg - Load Balancer: Pool: Edit page";
-$priv_list['page-loadbalancer-pool-edit']['descr'] = "Allow access to the 'Load Balancer: Pool: Edit' page.";
+$priv_list['page-loadbalancer-pool-edit']['name'] = gettext("WebCfg - Load Balancer: Pool: Edit page");
+$priv_list['page-loadbalancer-pool-edit']['descr'] = gettext("Allow access to the 'Load Balancer: Pool: Edit' page.");
$priv_list['page-loadbalancer-pool-edit']['match'] = array();
$priv_list['page-loadbalancer-pool-edit']['match'][] = "load_balancer_pool_edit.php*";
$priv_list['page-services-loadbalancer-relay-action'] = array();
-$priv_list['page-services-loadbalancer-relay-action']['name'] = "WebCfg - Services: Load Balancer: Relay Actions page";
-$priv_list['page-services-loadbalancer-relay-action']['descr'] = "Allow access to the 'Services: Load Balancer: Relay Actions' page.";
+$priv_list['page-services-loadbalancer-relay-action']['name'] = gettext("WebCfg - Services: Load Balancer: Relay Actions page");
+$priv_list['page-services-loadbalancer-relay-action']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Relay Actions' page.");
$priv_list['page-services-loadbalancer-relay-action']['match'] = array();
$priv_list['page-services-loadbalancer-relay-action']['match'][] = "load_balancer_relay_action.php*";
$priv_list['page-services-loadbalancer-relay-action-edit'] = array();
-$priv_list['page-services-loadbalancer-relay-action-edit']['name'] = "WebCfg - Services: Load Balancer: Relay Action: Edit page";
-$priv_list['page-services-loadbalancer-relay-action-edit']['descr'] = "Allow access to the 'Services: Load Balancer: Relay Action: Edit' page.";
+$priv_list['page-services-loadbalancer-relay-action-edit']['name'] = gettext("WebCfg - Services: Load Balancer: Relay Action: Edit page");
+$priv_list['page-services-loadbalancer-relay-action-edit']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Relay Action: Edit' page.");
$priv_list['page-services-loadbalancer-relay-action-edit']['match'] = array();
$priv_list['page-services-loadbalancer-relay-action-edit']['match'][] = "load_balancer_relay_action_edit.php*";
$priv_list['page-services-loadbalancer-relay-protocol'] = array();
-$priv_list['page-services-loadbalancer-relay-protocol']['name'] = "WebCfg - Services: Load Balancer: Relay Protocols page";
-$priv_list['page-services-loadbalancer-relay-protocol']['descr'] = "Allow access to the 'Services: Load Balancer: Relay Protocols' page.";
+$priv_list['page-services-loadbalancer-relay-protocol']['name'] = gettext("WebCfg - Services: Load Balancer: Relay Protocols page");
+$priv_list['page-services-loadbalancer-relay-protocol']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Relay Protocols' page.");
$priv_list['page-services-loadbalancer-relay-protocol']['match'] = array();
$priv_list['page-services-loadbalancer-relay-protocol']['match'][] = "load_balancer_relay_protocol.php*";
$priv_list['page-services-loadbalancer-relay-protocol-edit'] = array();
-$priv_list['page-services-loadbalancer-relay-protocol-edit']['name'] = "WebCfg - Services: Load Balancer: Relay Protocol: Edit page";
-$priv_list['page-services-loadbalancer-relay-protocol-edit']['descr'] = "Allow access to the 'Services: Load Balancer: Relay Protocol: Edit' page.";
+$priv_list['page-services-loadbalancer-relay-protocol-edit']['name'] = gettext("WebCfg - Services: Load Balancer: Relay Protocol: Edit page");
+$priv_list['page-services-loadbalancer-relay-protocol-edit']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Relay Protocol: Edit' page.");
$priv_list['page-services-loadbalancer-relay-protocol-edit']['match'] = array();
$priv_list['page-services-loadbalancer-relay-protocol-edit']['match'][] = "load_balancer_relay_protocol_edit.php*";
$priv_list['page-services-loadbalancer-virtualservers'] = array();
-$priv_list['page-services-loadbalancer-virtualservers']['name'] = "WebCfg - Services: Load Balancer: Virtual Servers page";
-$priv_list['page-services-loadbalancer-virtualservers']['descr'] = "Allow access to the 'Services: Load Balancer: Virtual Servers' page.";
+$priv_list['page-services-loadbalancer-virtualservers']['name'] = gettext("WebCfg - Services: Load Balancer: Virtual Servers page");
+$priv_list['page-services-loadbalancer-virtualservers']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Virtual Servers' page.");
$priv_list['page-services-loadbalancer-virtualservers']['match'] = array();
$priv_list['page-services-loadbalancer-virtualservers']['match'][] = "load_balancer_virtual_server.php*";
$priv_list['page-loadbalancer-virtualserver-edit'] = array();
-$priv_list['page-loadbalancer-virtualserver-edit']['name'] = "WebCfg - Load Balancer: Virtual Server: Edit page";
-$priv_list['page-loadbalancer-virtualserver-edit']['descr'] = "Allow access to the 'Load Balancer: Virtual Server: Edit' page.";
+$priv_list['page-loadbalancer-virtualserver-edit']['name'] = gettext("WebCfg - Load Balancer: Virtual Server: Edit page");
+$priv_list['page-loadbalancer-virtualserver-edit']['descr'] = gettext("Allow access to the 'Load Balancer: Virtual Server: Edit' page.");
$priv_list['page-loadbalancer-virtualserver-edit']['match'] = array();
$priv_list['page-loadbalancer-virtualserver-edit']['match'][] = "load_balancer_virtual_server_edit.php*";
$priv_list['page-package-settings'] = array();
-$priv_list['page-package-settings']['name'] = "WebCfg - Package: Settings page";
-$priv_list['page-package-settings']['descr'] = "Allow access to the 'Package: Settings' page.";
+$priv_list['page-package-settings']['name'] = gettext("WebCfg - Package: Settings page");
+$priv_list['page-package-settings']['descr'] = gettext("Allow access to the 'Package: Settings' page.");
$priv_list['page-package-settings']['match'] = array();
$priv_list['page-package-settings']['match'][] = "pkg.php*";
$priv_list['page-package-edit'] = array();
-$priv_list['page-package-edit']['name'] = "WebCfg - Package: Edit page";
-$priv_list['page-package-edit']['descr'] = "Allow access to the 'Package: Edit' page.";
+$priv_list['page-package-edit']['name'] = gettext("WebCfg - Package: Edit page");
+$priv_list['page-package-edit']['descr'] = gettext("Allow access to the 'Package: Edit' page.");
$priv_list['page-package-edit']['match'] = array();
$priv_list['page-package-edit']['match'][] = "pkg_edit.php*";
$priv_list['page-system-packagemanager'] = array();
-$priv_list['page-system-packagemanager']['name'] = "WebCfg - System: Package Manager page";
-$priv_list['page-system-packagemanager']['descr'] = "Allow access to the 'System: Package Manager' page.";
+$priv_list['page-system-packagemanager']['name'] = gettext("WebCfg - System: Package Manager page");
+$priv_list['page-system-packagemanager']['descr'] = gettext("Allow access to the 'System: Package Manager' page.");
$priv_list['page-system-packagemanager']['match'] = array();
$priv_list['page-system-packagemanager']['match'][] = "pkg_mgr.php*";
$priv_list['page-system-packagemanager-installpackage'] = array();
-$priv_list['page-system-packagemanager-installpackage']['name'] = "WebCfg - System: Package Manager: Install Package page";
-$priv_list['page-system-packagemanager-installpackage']['descr'] = "Allow access to the 'System: Package Manager: Install Package' page.";
+$priv_list['page-system-packagemanager-installpackage']['name'] = gettext("WebCfg - System: Package Manager: Install Package page");
+$priv_list['page-system-packagemanager-installpackage']['descr'] = gettext("Allow access to the 'System: Package Manager: Install Package' page.");
$priv_list['page-system-packagemanager-installpackage']['match'] = array();
$priv_list['page-system-packagemanager-installpackage']['match'][] = "pkg_mgr_install.php*";
$priv_list['page-system-packagemanager-installed'] = array();
-$priv_list['page-system-packagemanager-installed']['name'] = "WebCfg - System: Package Manager: Installed page";
-$priv_list['page-system-packagemanager-installed']['descr'] = "Allow access to the 'System: Package Manager: Installed' page.";
+$priv_list['page-system-packagemanager-installed']['name'] = gettext("WebCfg - System: Package Manager: Installed page");
+$priv_list['page-system-packagemanager-installed']['descr'] = gettext("Allow access to the 'System: Package Manager: Installed' page.");
$priv_list['page-system-packagemanager-installed']['match'] = array();
$priv_list['page-system-packagemanager-installed']['match'][] = "pkg_mgr_installed.php*";
$priv_list['page-pkg-mgr-settings'] = array();
-$priv_list['page-pkg-mgr-settings']['name'] = "WebCfg - Packages: Settings page";
-$priv_list['page-pkg-mgr-settings']['descr'] = "Allow access to the 'Packages: Settings' page.";
+$priv_list['page-pkg-mgr-settings']['name'] = gettext("WebCfg - Packages: Settings page");
+$priv_list['page-pkg-mgr-settings']['descr'] = gettext("Allow access to the 'Packages: Settings' page.");
$priv_list['page-pkg-mgr-settings']['match'] = array();
$priv_list['page-pkg-mgr-settings']['match'][] = "pkg_mgr_settings.php*";
$priv_list['page-diagnostics-rebootsystem'] = array();
-$priv_list['page-diagnostics-rebootsystem']['name'] = "WebCfg - Diagnostics: Reboot System page";
-$priv_list['page-diagnostics-rebootsystem']['descr'] = "Allow access to the 'Diagnostics: Reboot System' page.";
+$priv_list['page-diagnostics-rebootsystem']['name'] = gettext("WebCfg - Diagnostics: Reboot System page");
+$priv_list['page-diagnostics-rebootsystem']['descr'] = gettext("Allow access to the 'Diagnostics: Reboot System' page.");
$priv_list['page-diagnostics-rebootsystem']['match'] = array();
$priv_list['page-diagnostics-rebootsystem']['match'][] = "reboot.php*";
$priv_list['page-diagnostics-restart-httpd'] = array();
-$priv_list['page-diagnostics-restart-httpd']['name'] = "WebCfg - Diagnostics: Restart HTTPD : System page";
-$priv_list['page-diagnostics-restart-httpd']['descr'] = "Allow access to the 'Diagnostics: Restart HTTPD: System' page.";
+$priv_list['page-diagnostics-restart-httpd']['name'] = gettext("WebCfg - Diagnostics: Restart HTTPD : System page");
+$priv_list['page-diagnostics-restart-httpd']['descr'] = gettext("Allow access to the 'Diagnostics: Restart HTTPD: System' page.");
$priv_list['page-diagnostics-restart-httpd']['match'] = array();
$priv_list['page-diagnostics-restart-httpd']['match'][] = "restart_httpd.php*";
$priv_list['page-services-captiveportal'] = array();
-$priv_list['page-services-captiveportal']['name'] = "WebCfg - Services: Captive portal page";
-$priv_list['page-services-captiveportal']['descr'] = "Allow access to the 'Services: Captive portal' page.";
+$priv_list['page-services-captiveportal']['name'] = gettext("WebCfg - Services: Captive portal page");
+$priv_list['page-services-captiveportal']['descr'] = gettext("Allow access to the 'Services: Captive portal' page.");
$priv_list['page-services-captiveportal']['match'] = array();
$priv_list['page-services-captiveportal']['match'][] = "services_captiveportal.php*";
$priv_list['page-services-captiveportal-filemanager'] = array();
-$priv_list['page-services-captiveportal-filemanager']['name'] = "WebCfg - Services: Captive portal: File Manager page";
-$priv_list['page-services-captiveportal-filemanager']['descr'] = "Allow access to the 'Services: Captive portal: File Manager' page.";
+$priv_list['page-services-captiveportal-filemanager']['name'] = gettext("WebCfg - Services: Captive portal: File Manager page");
+$priv_list['page-services-captiveportal-filemanager']['descr'] = gettext("Allow access to the 'Services: Captive portal: File Manager' page.");
$priv_list['page-services-captiveportal-filemanager']['match'] = array();
$priv_list['page-services-captiveportal-filemanager']['match'][] = "services_captiveportal_filemanager.php*";
$priv_list['page-services-captiveportal-allowedhostnames'] = array();
-$priv_list['page-services-captiveportal-allowedhostnames']['name'] = "WebCfg - Services: Captive portal: Allowed IPs page";
-$priv_list['page-services-captiveportal-allowedhostnames']['descr'] = "Allow access to the 'Services: Captive portal: Allowed IPs' page.";
+$priv_list['page-services-captiveportal-allowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Allowed IPs page");
+$priv_list['page-services-captiveportal-allowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed IPs' page.");
$priv_list['page-services-captiveportal-allowedhostnames']['match'] = array();
$priv_list['page-services-captiveportal-allowedhostnames']['match'][] = "services_captiveportal_ip.php*";
$priv_list['page-services-captiveportal-editallowedhostnames'] = array();
-$priv_list['page-services-captiveportal-editallowedhostnames']['name'] = "WebCfg - Services: Captive portal: Edit Allowed IPs page";
-$priv_list['page-services-captiveportal-editallowedhostnames']['descr'] = "Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.";
+$priv_list['page-services-captiveportal-editallowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed IPs page");
+$priv_list['page-services-captiveportal-editallowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.");
$priv_list['page-services-captiveportal-editallowedhostnames']['match'] = array();
$priv_list['page-services-captiveportal-editallowedhostnames']['match'][] = "services_captiveportal_hostname_edit.php*";
$priv_list['page-services-captiveportal-allowedips'] = array();
-$priv_list['page-services-captiveportal-allowedips']['name'] = "WebCfg - Services: Captive portal: Allowed IPs page";
-$priv_list['page-services-captiveportal-allowedips']['descr'] = "Allow access to the 'Services: Captive portal: Allowed IPs' page.";
+$priv_list['page-services-captiveportal-allowedips']['name'] = gettext("WebCfg - Services: Captive portal: Allowed IPs page");
+$priv_list['page-services-captiveportal-allowedips']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed IPs' page.");
$priv_list['page-services-captiveportal-allowedips']['match'] = array();
$priv_list['page-services-captiveportal-allowedips']['match'][] = "services_captiveportal_ip.php*";
$priv_list['page-services-captiveportal-editallowedips'] = array();
-$priv_list['page-services-captiveportal-editallowedips']['name'] = "WebCfg - Services: Captive portal: Edit Allowed IPs page";
-$priv_list['page-services-captiveportal-editallowedips']['descr'] = "Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.";
+$priv_list['page-services-captiveportal-editallowedips']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed IPs page");
+$priv_list['page-services-captiveportal-editallowedips']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.");
$priv_list['page-services-captiveportal-editallowedips']['match'] = array();
$priv_list['page-services-captiveportal-editallowedips']['match'][] = "services_captiveportal_ip_edit.php*";
$priv_list['page-services-captiveportal-macaddresses'] = array();
-$priv_list['page-services-captiveportal-macaddresses']['name'] = "WebCfg - Services: Captive portal: Mac Addresses page";
-$priv_list['page-services-captiveportal-macaddresses']['descr'] = "Allow access to the 'Services: Captive portal: Mac Addresses' page.";
+$priv_list['page-services-captiveportal-macaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Mac Addresses page");
+$priv_list['page-services-captiveportal-macaddresses']['descr'] = gettext("Allow access to the 'Services: Captive portal: Mac Addresses' page.");
$priv_list['page-services-captiveportal-macaddresses']['match'] = array();
$priv_list['page-services-captiveportal-macaddresses']['match'][] = "services_captiveportal_mac.php*";
$priv_list['page-services-captiveportal-editmacaddresses'] = array();
-$priv_list['page-services-captiveportal-editmacaddresses']['name'] = "WebCfg - Services: Captive portal: Edit MAC Addresses page";
-$priv_list['page-services-captiveportal-editmacaddresses']['descr'] = "Allow access to the 'Services: Captive portal: Edit MAC Addresses' page.";
+$priv_list['page-services-captiveportal-editmacaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Edit MAC Addresses page");
+$priv_list['page-services-captiveportal-editmacaddresses']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit MAC Addresses' page.");
$priv_list['page-services-captiveportal-editmacaddresses']['match'] = array();
$priv_list['page-services-captiveportal-editmacaddresses']['match'][] = "services_captiveportal_mac_edit.php*";
$priv_list['page-services-captiveportal-vouchers'] = array();
-$priv_list['page-services-captiveportal-vouchers']['name'] = "WebCfg - Services: Captive portal Vouchers page";
-$priv_list['page-services-captiveportal-vouchers']['descr'] = "Allow access to the 'Services: Captive portal Vouchers' page.";
+$priv_list['page-services-captiveportal-vouchers']['name'] = gettext("WebCfg - Services: Captive portal Vouchers page");
+$priv_list['page-services-captiveportal-vouchers']['descr'] = gettext("Allow access to the 'Services: Captive portal Vouchers' page.");
$priv_list['page-services-captiveportal-vouchers']['match'] = array();
$priv_list['page-services-captiveportal-vouchers']['match'][] = "services_captiveportal_vouchers.php*";
@@ -721,512 +721,512 @@ $priv_list['page-services-captiveportal-voucher-edit']['match'] = array();
$priv_list['page-services-captiveportal-voucher-edit']['match'][] = "services_captiveportal_vouchers_edit.php*";
$priv_list['page-services-dhcpserver'] = array();
-$priv_list['page-services-dhcpserver']['name'] = "WebCfg - Services: DHCP server page";
-$priv_list['page-services-dhcpserver']['descr'] = "Allow access to the 'Services: DHCP server' page.";
+$priv_list['page-services-dhcpserver']['name'] = gettext("WebCfg - Services: DHCP server page");
+$priv_list['page-services-dhcpserver']['descr'] = gettext("Allow access to the 'Services: DHCP server' page.");
$priv_list['page-services-dhcpserver']['match'] = array();
$priv_list['page-services-dhcpserver']['match'][] = "services_dhcp.php*";
$priv_list['page-services-dhcpserver-editstaticmapping'] = array();
-$priv_list['page-services-dhcpserver-editstaticmapping']['name'] = "WebCfg - Services: DHCP Server : Edit static mapping page";
-$priv_list['page-services-dhcpserver-editstaticmapping']['descr'] = "Allow access to the 'Services: DHCP Server : Edit static mapping' page.";
+$priv_list['page-services-dhcpserver-editstaticmapping']['name'] = gettext("WebCfg - Services: DHCP Server : Edit static mapping page");
+$priv_list['page-services-dhcpserver-editstaticmapping']['descr'] = gettext("Allow access to the 'Services: DHCP Server : Edit static mapping' page.");
$priv_list['page-services-dhcpserver-editstaticmapping']['match'] = array();
$priv_list['page-services-dhcpserver-editstaticmapping']['match'][] = "services_dhcp_edit.php*";
$priv_list['page-services-dhcprelay'] = array();
-$priv_list['page-services-dhcprelay']['name'] = "WebCfg - Services: DHCP Relay page";
-$priv_list['page-services-dhcprelay']['descr'] = "Allow access to the 'Services: DHCP Relay' page.";
+$priv_list['page-services-dhcprelay']['name'] = gettext("WebCfg - Services: DHCP Relay page");
+$priv_list['page-services-dhcprelay']['descr'] = gettext("Allow access to the 'Services: DHCP Relay' page.");
$priv_list['page-services-dhcprelay']['match'] = array();
$priv_list['page-services-dhcprelay']['match'][] = "services_dhcp_relay.php*";
$priv_list['page-services-dnsforwarder'] = array();
-$priv_list['page-services-dnsforwarder']['name'] = "WebCfg - Services: DNS Forwarder page";
-$priv_list['page-services-dnsforwarder']['descr'] = "Allow access to the 'Services: DNS Forwarder' page.";
+$priv_list['page-services-dnsforwarder']['name'] = gettext("WebCfg - Services: DNS Forwarder page");
+$priv_list['page-services-dnsforwarder']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder' page.");
$priv_list['page-services-dnsforwarder']['match'] = array();
$priv_list['page-services-dnsforwarder']['match'][] = "services_dnsmasq.php*";
$priv_list['page-services-dnsforwarder-editdomainoverride'] = array();
-$priv_list['page-services-dnsforwarder-editdomainoverride']['name'] = "WebCfg - Services: DNS Forwarder: Edit Domain Override page";
-$priv_list['page-services-dnsforwarder-editdomainoverride']['descr'] = "Allow access to the 'Services: DNS Forwarder: Edit Domain Override' page.";
+$priv_list['page-services-dnsforwarder-editdomainoverride']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit Domain Override page");
+$priv_list['page-services-dnsforwarder-editdomainoverride']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder: Edit Domain Override' page.");
$priv_list['page-services-dnsforwarder-editdomainoverride']['match'] = array();
$priv_list['page-services-dnsforwarder-editdomainoverride']['match'][] = "services_dnsmasq_domainoverride_edit.php*";
$priv_list['page-services-dnsforwarder-edithost'] = array();
-$priv_list['page-services-dnsforwarder-edithost']['name'] = "WebCfg - Services: DNS Forwarder: Edit host page";
-$priv_list['page-services-dnsforwarder-edithost']['descr'] = "Allow access to the 'Services: DNS Forwarder: Edit host' page.";
+$priv_list['page-services-dnsforwarder-edithost']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit host page");
+$priv_list['page-services-dnsforwarder-edithost']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder: Edit host' page.");
$priv_list['page-services-dnsforwarder-edithost']['match'] = array();
$priv_list['page-services-dnsforwarder-edithost']['match'][] = "services_dnsmasq_edit.php*";
$priv_list['page-services-dynamicdnsclients'] = array();
-$priv_list['page-services-dynamicdnsclients']['name'] = "WebCfg - Services: Dynamic DNS clients page";
-$priv_list['page-services-dynamicdnsclients']['descr'] = "Allow access to the 'Services: Dynamic DNS clients' page.";
+$priv_list['page-services-dynamicdnsclients']['name'] = gettext("WebCfg - Services: Dynamic DNS clients page");
+$priv_list['page-services-dynamicdnsclients']['descr'] = gettext("Allow access to the 'Services: Dynamic DNS clients' page.");
$priv_list['page-services-dynamicdnsclients']['match'] = array();
$priv_list['page-services-dynamicdnsclients']['match'][] = "services_dyndns.php*";
$priv_list['page-services-dynamicdnsclient'] = array();
-$priv_list['page-services-dynamicdnsclient']['name'] = "WebCfg - Services: Dynamic DNS client page";
-$priv_list['page-services-dynamicdnsclient']['descr'] = "Allow access to the 'Services: Dynamic DNS client' page.";
+$priv_list['page-services-dynamicdnsclient']['name'] = gettext("WebCfg - Services: Dynamic DNS client page");
+$priv_list['page-services-dynamicdnsclient']['descr'] = gettext("Allow access to the 'Services: Dynamic DNS client' page.");
$priv_list['page-services-dynamicdnsclient']['match'] = array();
$priv_list['page-services-dynamicdnsclient']['match'][] = "services_dyndns_edit.php*";
$priv_list['page-services-igmpproxy'] = array();
-$priv_list['page-services-igmpproxy']['name'] = "WebCfg - Services: Igmpproxy page";
-$priv_list['page-services-igmpproxy']['descr'] = "Allow access to the 'Services: Igmpproxy' page.";
+$priv_list['page-services-igmpproxy']['name'] = gettext("WebCfg - Services: Igmpproxy page");
+$priv_list['page-services-igmpproxy']['descr'] = gettext("Allow access to the 'Services: Igmpproxy' page.");
$priv_list['page-services-igmpproxy']['match'] = array();
$priv_list['page-services-igmpproxy']['match'][] = "services_igmpproxy.php*";
$priv_list['page-services-igmpproxy'] = array();
-$priv_list['page-services-igmpproxy']['name'] = "WebCfg - Firewall: Igmpproxy: Edit page";
-$priv_list['page-services-igmpproxy']['descr'] = "Allow access to the 'Firewall: Igmpproxy' page.";
+$priv_list['page-services-igmpproxy']['name'] = gettext("WebCfg - Firewall: Igmpproxy: Edit page");
+$priv_list['page-services-igmpproxy']['descr'] = gettext("Allow access to the 'Firewall: Igmpproxy' page.");
$priv_list['page-services-igmpproxy']['match'] = array();
$priv_list['page-services-igmpproxy']['match'][] = "services_igmpproxy_edit.php*";
$priv_list['page-services-rfc2136clients'] = array();
-$priv_list['page-services-rfc2136clients']['name'] = "WebCfg - Services: RFC 2136 clients page";
-$priv_list['page-services-rfc2136clients']['descr'] = "Allow access to the 'Services: RFC 2136 clients' page.";
+$priv_list['page-services-rfc2136clients']['name'] = gettext("WebCfg - Services: RFC 2136 clients page");
+$priv_list['page-services-rfc2136clients']['descr'] = gettext("Allow access to the 'Services: RFC 2136 clients' page.");
$priv_list['page-services-rfc2136clients']['match'] = array();
$priv_list['page-services-rfc2136clients']['match'][] = "services_rfc2136.php*";
$priv_list['page-services-snmp'] = array();
-$priv_list['page-services-snmp']['name'] = "WebCfg - Services: SNMP page";
-$priv_list['page-services-snmp']['descr'] = "Allow access to the 'Services: SNMP' page.";
+$priv_list['page-services-snmp']['name'] = gettext("WebCfg - Services: SNMP page");
+$priv_list['page-services-snmp']['descr'] = gettext("Allow access to the 'Services: SNMP' page.");
$priv_list['page-services-snmp']['match'] = array();
$priv_list['page-services-snmp']['match'][] = "services_snmp.php*";
$priv_list['page-services-wakeonlan'] = array();
-$priv_list['page-services-wakeonlan']['name'] = "WebCfg - Services: Wake on LAN page";
-$priv_list['page-services-wakeonlan']['descr'] = "Allow access to the 'Services: Wake on LAN' page.";
+$priv_list['page-services-wakeonlan']['name'] = gettext("WebCfg - Services: Wake on LAN page");
+$priv_list['page-services-wakeonlan']['descr'] = gettext("Allow access to the 'Services: Wake on LAN' page.");
$priv_list['page-services-wakeonlan']['match'] = array();
$priv_list['page-services-wakeonlan']['match'][] = "services_wol.php*";
$priv_list['page-services-wakeonlan-edit'] = array();
-$priv_list['page-services-wakeonlan-edit']['name'] = "WebCfg - Services: Wake on LAN: Edit page";
-$priv_list['page-services-wakeonlan-edit']['descr'] = "Allow access to the 'Services: Wake on LAN: Edit' page.";
+$priv_list['page-services-wakeonlan-edit']['name'] = gettext("WebCfg - Services: Wake on LAN: Edit page");
+$priv_list['page-services-wakeonlan-edit']['descr'] = gettext("Allow access to the 'Services: Wake on LAN: Edit' page.");
$priv_list['page-services-wakeonlan-edit']['match'] = array();
$priv_list['page-services-wakeonlan-edit']['match'][] = "services_wol_edit.php*";
$priv_list['page-diagnostics-cpuutilization'] = array();
-$priv_list['page-diagnostics-cpuutilization']['name'] = "WebCfg - Diagnostics: CPU Utilization page";
-$priv_list['page-diagnostics-cpuutilization']['descr'] = "Allow access to the 'Diagnostics: CPU Utilization' page.";
+$priv_list['page-diagnostics-cpuutilization']['name'] = gettext("WebCfg - Diagnostics: CPU Utilization page");
+$priv_list['page-diagnostics-cpuutilization']['descr'] = gettext("Allow access to the 'Diagnostics: CPU Utilization' page.");
$priv_list['page-diagnostics-cpuutilization']['match'] = array();
$priv_list['page-diagnostics-cpuutilization']['match'][] = "stats.php*";
$priv_list['page-hidden-detailedstatus'] = array();
-$priv_list['page-hidden-detailedstatus']['name'] = "WebCfg - Hidden: Detailed Status page";
-$priv_list['page-hidden-detailedstatus']['descr'] = "Allow access to the 'Hidden: Detailed Status' page.";
+$priv_list['page-hidden-detailedstatus']['name'] = gettext("WebCfg - Hidden: Detailed Status page");
+$priv_list['page-hidden-detailedstatus']['descr'] = gettext("Allow access to the 'Hidden: Detailed Status' page.");
$priv_list['page-hidden-detailedstatus']['match'] = array();
$priv_list['page-hidden-detailedstatus']['match'][] = "status.php*";
$priv_list['page-status-captiveportal'] = array();
-$priv_list['page-status-captiveportal']['name'] = "WebCfg - Status: Captive portal page";
-$priv_list['page-status-captiveportal']['descr'] = "Allow access to the 'Status: Captive portal' page.";
+$priv_list['page-status-captiveportal']['name'] = gettext("WebCfg - Status: Captive portal page");
+$priv_list['page-status-captiveportal']['descr'] = gettext("Allow access to the 'Status: Captive portal' page.");
$priv_list['page-status-captiveportal']['match'] = array();
$priv_list['page-status-captiveportal']['match'][] = "status_captiveportal.php*";
$priv_list['page-status-captiveportal-test'] = array();
-$priv_list['page-status-captiveportal-test']['name'] = "WebCfg - Status: Captive portal test Vouchers page";
-$priv_list['page-status-captiveportal-test']['descr'] = "Allow access to the 'Status: Captive portal Test Vouchers' page.";
+$priv_list['page-status-captiveportal-test']['name'] = gettext("WebCfg - Status: Captive portal test Vouchers page");
+$priv_list['page-status-captiveportal-test']['descr'] = gettext("Allow access to the 'Status: Captive portal Test Vouchers' page.");
$priv_list['page-status-captiveportal-test']['match'] = array();
$priv_list['page-status-captiveportal-test']['match'][] = "status_captiveportal_test.php*";
$priv_list['page-status-captiveportal-voucher-rolls'] = array();
-$priv_list['page-status-captiveportal-voucher-rolls']['name'] = "WebCfg - Status: Captive portal Voucher Rolls page";
-$priv_list['page-status-captiveportal-voucher-rolls']['descr'] = "Allow access to the 'Status: Captive portal Voucher Rolls' page.";
+$priv_list['page-status-captiveportal-voucher-rolls']['name'] = gettext("WebCfg - Status: Captive portal Voucher Rolls page");
+$priv_list['page-status-captiveportal-voucher-rolls']['descr'] = gettext("Allow access to the 'Status: Captive portal Voucher Rolls' page.");
$priv_list['page-status-captiveportal-voucher-rolls']['match'] = array();
$priv_list['page-status-captiveportal-voucher-rolls']['match'][] = "status_captiveportal_voucher_rolls.php*";
$priv_list['page-status-captiveportal-vouchers'] = array();
-$priv_list['page-status-captiveportal-vouchers']['name'] = "WebCfg - Status: Captive portal Vouchers page";
-$priv_list['page-status-captiveportal-vouchers']['descr'] = "Allow access to the 'Status: Captive portal Vouchers' page.";
+$priv_list['page-status-captiveportal-vouchers']['name'] = gettext("WebCfg - Status: Captive portal Vouchers page");
+$priv_list['page-status-captiveportal-vouchers']['descr'] = gettext("Allow access to the 'Status: Captive portal Vouchers' page.");
$priv_list['page-status-captiveportal-vouchers']['match'] = array();
$priv_list['page-status-captiveportal-vouchers']['match'][] = "status_captiveportal_vouchers.php*";
$priv_list['page-status-dhcpleases'] = array();
-$priv_list['page-status-dhcpleases']['name'] = "WebCfg - Status: DHCP leases page";
-$priv_list['page-status-dhcpleases']['descr'] = "Allow access to the 'Status: DHCP leases' page.";
+$priv_list['page-status-dhcpleases']['name'] = gettext("WebCfg - Status: DHCP leases page");
+$priv_list['page-status-dhcpleases']['descr'] = gettext("Allow access to the 'Status: DHCP leases' page.");
$priv_list['page-status-dhcpleases']['match'] = array();
$priv_list['page-status-dhcpleases']['match'][] = "status_dhcp_leases.php*";
$priv_list['page-status-filterreloadstatus'] = array();
-$priv_list['page-status-filterreloadstatus']['name'] = "WebCfg - Status: Filter Reload Status page";
-$priv_list['page-status-filterreloadstatus']['descr'] = "Allow access to the 'Status: Filter Reload Status' page.";
+$priv_list['page-status-filterreloadstatus']['name'] = gettext("WebCfg - Status: Filter Reload Status page");
+$priv_list['page-status-filterreloadstatus']['descr'] = gettext("Allow access to the 'Status: Filter Reload Status' page.");
$priv_list['page-status-filterreloadstatus']['match'] = array();
$priv_list['page-status-filterreloadstatus']['match'][] = "status_filter_reload.php*";
$priv_list['page-status-gatewaygroups'] = array();
-$priv_list['page-status-gatewaygroups']['name'] = "WebCfg - Status: Gateway Groups page";
-$priv_list['page-status-gatewaygroups']['descr'] = "Allow access to the 'Status: Gateway Groups' page.";
+$priv_list['page-status-gatewaygroups']['name'] = gettext("WebCfg - Status: Gateway Groups page");
+$priv_list['page-status-gatewaygroups']['descr'] = gettext("Allow access to the 'Status: Gateway Groups' page.");
$priv_list['page-status-gatewaygroups']['match'] = array();
$priv_list['page-status-gatewaygroups']['match'][] = "status_gateway_groups.php*";
$priv_list['page-status-gateways'] = array();
-$priv_list['page-status-gateways']['name'] = "WebCfg - Status: Gateways page";
-$priv_list['page-status-gateways']['descr'] = "Allow access to the 'Status: Gateways' page.";
+$priv_list['page-status-gateways']['name'] = gettext("WebCfg - Status: Gateways page");
+$priv_list['page-status-gateways']['descr'] = gettext("Allow access to the 'Status: Gateways' page.");
$priv_list['page-status-gateways']['match'] = array();
$priv_list['page-status-gateways']['match'][] = "status_gateways.php*";
$priv_list['page-status-trafficgraph'] = array();
-$priv_list['page-status-trafficgraph']['name'] = "WebCfg - Status: Traffic Graph page";
-$priv_list['page-status-trafficgraph']['descr'] = "Allow access to the 'Status: Traffic Graph' page.";
+$priv_list['page-status-trafficgraph']['name'] = gettext("WebCfg - Status: Traffic Graph page");
+$priv_list['page-status-trafficgraph']['descr'] = gettext("Allow access to the 'Status: Traffic Graph' page.");
$priv_list['page-status-trafficgraph']['match'] = array();
$priv_list['page-status-trafficgraph']['match'][] = "status_graph.php*";
$priv_list['page-status-cpuload'] = array();
-$priv_list['page-status-cpuload']['name'] = "WebCfg - Status: CPU load page";
-$priv_list['page-status-cpuload']['descr'] = "Allow access to the 'Status: CPU load' page.";
+$priv_list['page-status-cpuload']['name'] = gettext("WebCfg - Status: CPU load page");
+$priv_list['page-status-cpuload']['descr'] = gettext("Allow access to the 'Status: CPU load' page.");
$priv_list['page-status-cpuload']['match'] = array();
$priv_list['page-status-cpuload']['match'][] = "status_graph_cpu.php*";
$priv_list['page-status-interfaces'] = array();
-$priv_list['page-status-interfaces']['name'] = "WebCfg - Status: Interfaces page";
-$priv_list['page-status-interfaces']['descr'] = "Allow access to the 'Status: Interfaces' page.";
+$priv_list['page-status-interfaces']['name'] = gettext("WebCfg - Status: Interfaces page");
+$priv_list['page-status-interfaces']['descr'] = gettext("Allow access to the 'Status: Interfaces' page.");
$priv_list['page-status-interfaces']['match'] = array();
$priv_list['page-status-interfaces']['match'][] = "status_interfaces.php*";
$priv_list['page-status-loadbalancer-pool'] = array();
-$priv_list['page-status-loadbalancer-pool']['name'] = "WebCfg - Status: Load Balancer: Pool page";
-$priv_list['page-status-loadbalancer-pool']['descr'] = "Allow access to the 'Status: Load Balancer: Pool' page.";
+$priv_list['page-status-loadbalancer-pool']['name'] = gettext("WebCfg - Status: Load Balancer: Pool page");
+$priv_list['page-status-loadbalancer-pool']['descr'] = gettext("Allow access to the 'Status: Load Balancer: Pool' page.");
$priv_list['page-status-loadbalancer-pool']['match'] = array();
$priv_list['page-status-loadbalancer-pool']['match'][] = "status_lb_pool.php*";
$priv_list['page-status-loadbalancer-virtualserver'] = array();
-$priv_list['page-status-loadbalancer-virtualserver']['name'] = "WebCfg - Status: Load Balancer: Virtual Server page";
-$priv_list['page-status-loadbalancer-virtualserver']['descr'] = "Allow access to the 'Status: Load Balancer: Virtual Server' page.";
+$priv_list['page-status-loadbalancer-virtualserver']['name'] = gettext("WebCfg - Status: Load Balancer: Virtual Server page");
+$priv_list['page-status-loadbalancer-virtualserver']['descr'] = gettext("Allow access to the 'Status: Load Balancer: Virtual Server' page.");
$priv_list['page-status-loadbalancer-virtualserver']['match'] = array();
$priv_list['page-status-loadbalancer-virtualserver']['match'][] = "status_lb_vs.php*";
$priv_list['page-status-openvpn'] = array();
-$priv_list['page-status-openvpn']['name'] = "WebCfg - Status: OpenVPN page";
-$priv_list['page-status-openvpn']['descr'] = "Allow access to the 'Status: OpenVPN' page.";
+$priv_list['page-status-openvpn']['name'] = gettext("WebCfg - Status: OpenVPN page");
+$priv_list['page-status-openvpn']['descr'] = gettext("Allow access to the 'Status: OpenVPN' page.");
$priv_list['page-status-openvpn']['match'] = array();
$priv_list['page-status-openvpn']['match'][] = "status_openvpn.php*";
$priv_list['page-status-trafficshaper-queues'] = array();
-$priv_list['page-status-trafficshaper-queues']['name'] = "WebCfg - Status: Traffic shaper: Queues page";
-$priv_list['page-status-trafficshaper-queues']['descr'] = "Allow access to the 'Status: Traffic shaper: Queues' page.";
+$priv_list['page-status-trafficshaper-queues']['name'] = gettext("WebCfg - Status: Traffic shaper: Queues page");
+$priv_list['page-status-trafficshaper-queues']['descr'] = gettext("Allow access to the 'Status: Traffic shaper: Queues' page.");
$priv_list['page-status-trafficshaper-queues']['match'] = array();
$priv_list['page-status-trafficshaper-queues']['match'][] = "status_queues.php*";
$priv_list['page-status-rrdgraphs'] = array();
-$priv_list['page-status-rrdgraphs']['name'] = "WebCfg - Status: RRD Graphs page";
-$priv_list['page-status-rrdgraphs']['descr'] = "Allow access to the 'Status: RRD Graphs' page.";
+$priv_list['page-status-rrdgraphs']['name'] = gettext("WebCfg - Status: RRD Graphs page");
+$priv_list['page-status-rrdgraphs']['descr'] = gettext("Allow access to the 'Status: RRD Graphs' page.");
$priv_list['page-status-rrdgraphs']['match'] = array();
$priv_list['page-status-rrdgraphs']['match'][] = "status_rrd_graph.php*";
$priv_list['page-status-rrdgraph-settings'] = array();
-$priv_list['page-status-rrdgraph-settings']['name'] = "WebCfg - Status: RRD Graphs settings page";
-$priv_list['page-status-rrdgraph-settings']['descr'] = "Allow access to the 'Status: RRD Graphs: settings' page.";
+$priv_list['page-status-rrdgraph-settings']['name'] = gettext("WebCfg - Status: RRD Graphs settings page");
+$priv_list['page-status-rrdgraph-settings']['descr'] = gettext("Allow access to the 'Status: RRD Graphs: settings' page.");
$priv_list['page-status-rrdgraph-settings']['match'] = array();
$priv_list['page-status-rrdgraph-settings']['match'][] = "status_rrd_graph_settings.php*";
$priv_list['page-status-services'] = array();
-$priv_list['page-status-services']['name'] = "WebCfg - Status: Services page";
-$priv_list['page-status-services']['descr'] = "Allow access to the 'Status: Services' page.";
+$priv_list['page-status-services']['name'] = gettext("WebCfg - Status: Services page");
+$priv_list['page-status-services']['descr'] = gettext("Allow access to the 'Status: Services' page.");
$priv_list['page-status-services']['match'] = array();
$priv_list['page-status-services']['match'][] = "status_services.php*";
$priv_list['page-status-upnpstatus'] = array();
-$priv_list['page-status-upnpstatus']['name'] = "WebCfg - Status: UPnP Status page";
-$priv_list['page-status-upnpstatus']['descr'] = "Allow access to the 'Status: UPnP Status' page.";
+$priv_list['page-status-upnpstatus']['name'] = gettext("WebCfg - Status: UPnP Status page");
+$priv_list['page-status-upnpstatus']['descr'] = gettext("Allow access to the 'Status: UPnP Status' page.");
$priv_list['page-status-upnpstatus']['match'] = array();
$priv_list['page-status-upnpstatus']['match'][] = "status_upnp.php*";
$priv_list['page-diagnostics-wirelessstatus'] = array();
-$priv_list['page-diagnostics-wirelessstatus']['name'] = "WebCfg - Status: Wireless page";
-$priv_list['page-diagnostics-wirelessstatus']['descr'] = "Allow access to the 'Status: Wireless' page.";
+$priv_list['page-diagnostics-wirelessstatus']['name'] = gettext("WebCfg - Status: Wireless page");
+$priv_list['page-diagnostics-wirelessstatus']['descr'] = gettext("Allow access to the 'Status: Wireless' page.");
$priv_list['page-diagnostics-wirelessstatus']['match'] = array();
$priv_list['page-diagnostics-wirelessstatus']['match'][] = "status_wireless.php*";
$priv_list['page-system-generalsetup'] = array();
-$priv_list['page-system-generalsetup']['name'] = "WebCfg - System: General Setup page";
-$priv_list['page-system-generalsetup']['descr'] = "Allow access to the 'System: General Setup' page.";
+$priv_list['page-system-generalsetup']['name'] = gettext("WebCfg - System: General Setup page");
+$priv_list['page-system-generalsetup']['descr'] = gettext("Allow access to the 'System: General Setup' page.");
$priv_list['page-system-generalsetup']['match'] = array();
$priv_list['page-system-generalsetup']['match'][] = "system.php*";
$priv_list['page-system-advanced-admin'] = array();
-$priv_list['page-system-advanced-admin']['name'] = "WebCfg - System: Advanced: Admin Access Page";
-$priv_list['page-system-advanced-admin']['descr'] = "Allow access to the 'System: Advanced: Admin Access' page.";
+$priv_list['page-system-advanced-admin']['name'] = gettext("WebCfg - System: Advanced: Admin Access Page");
+$priv_list['page-system-advanced-admin']['descr'] = gettext("Allow access to the 'System: Advanced: Admin Access' page.");
$priv_list['page-system-advanced-admin']['match'] = array();
$priv_list['page-system-advanced-admin']['match'][] = "system_advanced_admin.php*";
$priv_list['page-system-advanced-firewall'] = array();
-$priv_list['page-system-advanced-firewall']['name'] = "WebCfg - System: Advanced: Firewall and NAT page";
-$priv_list['page-system-advanced-firewall']['descr'] = "Allow access to the 'System: Advanced: Firewall and NAT' page.";
+$priv_list['page-system-advanced-firewall']['name'] = gettext("WebCfg - System: Advanced: Firewall and NAT page");
+$priv_list['page-system-advanced-firewall']['descr'] = gettext("Allow access to the 'System: Advanced: Firewall and NAT' page.");
$priv_list['page-system-advanced-firewall']['match'] = array();
$priv_list['page-system-advanced-firewall']['match'][] = "system_advanced.php*";
$priv_list['page-system-advanced-misc'] = array();
-$priv_list['page-system-advanced-misc']['name'] = "WebCfg - System: Advanced: Miscellaneous page";
-$priv_list['page-system-advanced-misc']['descr'] = "Allow access to the 'System: Advanced: Miscellaneous' page.";
+$priv_list['page-system-advanced-misc']['name'] = gettext("WebCfg - System: Advanced: Miscellaneous page");
+$priv_list['page-system-advanced-misc']['descr'] = gettext("Allow access to the 'System: Advanced: Miscellaneous' page.");
$priv_list['page-system-advanced-misc']['match'] = array();
$priv_list['page-system-advanced-misc']['match'][] = "system_advanced.php*";
$priv_list['page-system-advanced-network'] = array();
-$priv_list['page-system-advanced-network']['name'] = "WebCfg - System: Advanced: Network page";
-$priv_list['page-system-advanced-network']['descr'] = "Allow access to the 'System: Advanced: Networking' page.";
+$priv_list['page-system-advanced-network']['name'] = gettext("WebCfg - System: Advanced: Network page");
+$priv_list['page-system-advanced-network']['descr'] = gettext("Allow access to the 'System: Advanced: Networking' page.");
$priv_list['page-system-advanced-network']['match'] = array();
$priv_list['page-system-advanced-network']['match'][] = "system_advanced-network.php*";
$priv_list['page-system-advanced-notifications'] = array();
-$priv_list['page-system-advanced-notifications']['name'] = "WebCfg - System: Advanced: Tunables page";
-$priv_list['page-system-advanced-notifications']['descr'] = "Allow access to the 'System: Advanced: Tunables' page.";
+$priv_list['page-system-advanced-notifications']['name'] = gettext("WebCfg - System: Advanced: Tunables page");
+$priv_list['page-system-advanced-notifications']['descr'] = gettext("Allow access to the 'System: Advanced: Tunables' page.");
$priv_list['page-system-advanced-notifications']['match'] = array();
$priv_list['page-system-advanced-notifications']['match'][] = "system_advanced-sysctrl.php*";
$priv_list['page-system-advanced-sysctl'] = array();
-$priv_list['page-system-advanced-sysctl']['name'] = "WebCfg - System: Advanced: Tunables page";
-$priv_list['page-system-advanced-sysctl']['descr'] = "Allow access to the 'System: Advanced: Tunables' page.";
+$priv_list['page-system-advanced-sysctl']['name'] = gettext("WebCfg - System: Advanced: Tunables page");
+$priv_list['page-system-advanced-sysctl']['descr'] = gettext("Allow access to the 'System: Advanced: Tunables' page.");
$priv_list['page-system-advanced-sysctl']['match'] = array();
$priv_list['page-system-advanced-sysctl']['match'][] = "system_advanced-sysctl.php*";
$priv_list['page-system-authservers'] = array();
-$priv_list['page-system-authservers']['name'] = "WebCfg - System: Authentication Servers";
-$priv_list['page-system-authservers']['descr'] = "Allow access to the 'System: Authentication Servers' page.";
+$priv_list['page-system-authservers']['name'] = gettext("WebCfg - System: Authentication Servers");
+$priv_list['page-system-authservers']['descr'] = gettext("Allow access to the 'System: Authentication Servers' page.");
$priv_list['page-system-authservers']['match'] = array();
$priv_list['page-system-authservers']['match'][] = "system_authservers.php*";
$priv_list['page-system-camanager'] = array();
-$priv_list['page-system-camanager']['name'] = "WebCfg - System: CA Manager";
-$priv_list['page-system-camanager']['descr'] = "Allow access to the 'System: CA Manager' page.";
+$priv_list['page-system-camanager']['name'] = gettext("WebCfg - System: CA Manager");
+$priv_list['page-system-camanager']['descr'] = gettext("Allow access to the 'System: CA Manager' page.");
$priv_list['page-system-camanager']['match'] = array();
$priv_list['page-system-camanager']['match'][] = "system_camanager.php*";
$priv_list['page-system-certmanager'] = array();
-$priv_list['page-system-certmanager']['name'] = "WebCfg - System: Certificate Manager";
-$priv_list['page-system-certmanager']['descr'] = "Allow access to the 'System: Certificate Manager' page.";
+$priv_list['page-system-certmanager']['name'] = gettext("WebCfg - System: Certificate Manager");
+$priv_list['page-system-certmanager']['descr'] = gettext("Allow access to the 'System: Certificate Manager' page.");
$priv_list['page-system-certmanager']['match'] = array();
$priv_list['page-system-certmanager']['match'][] = "system_certmanager.php*";
$priv_list['page-system-crlmanager'] = array();
-$priv_list['page-system-crlmanager']['name'] = "WebCfg - System: CRL Manager";
-$priv_list['page-system-crlmanager']['descr'] = "Allow access to the 'System: CRL Manager' page.";
+$priv_list['page-system-crlmanager']['name'] = gettext("WebCfg - System: CRL Manager");
+$priv_list['page-system-crlmanager']['descr'] = gettext("Allow access to the 'System: CRL Manager' page.");
$priv_list['page-system-crlmanager']['match'] = array();
$priv_list['page-system-crlmanager']['match'][] = "system_crlmanager.php*";
$priv_list['page-system-firmware-manualupdate'] = array();
-$priv_list['page-system-firmware-manualupdate']['name'] = "WebCfg - System: Firmware: Manual Update page";
-$priv_list['page-system-firmware-manualupdate']['descr'] = "Allow access to the 'System: Firmware: Manual Update' page.";
+$priv_list['page-system-firmware-manualupdate']['name'] = gettext("WebCfg - System: Firmware: Manual Update page");
+$priv_list['page-system-firmware-manualupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Manual Update' page.");
$priv_list['page-system-firmware-manualupdate']['match'] = array();
$priv_list['page-system-firmware-manualupdate']['match'][] = "system_firmware.php*";
$priv_list['page-system-firmware-checkforupdate'] = array();
-$priv_list['page-system-firmware-checkforupdate']['name'] = "WebCfg - System: Firmware: Check For Update page";
-$priv_list['page-system-firmware-checkforupdate']['descr'] = "Allow access to the 'System: Firmware: Check For Update' page.";
+$priv_list['page-system-firmware-checkforupdate']['name'] = gettext("WebCfg - System: Firmware: Check For Update page");
+$priv_list['page-system-firmware-checkforupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Check For Update' page.");
$priv_list['page-system-firmware-checkforupdate']['match'] = array();
$priv_list['page-system-firmware-checkforupdate']['match'][] = "system_firmware_auto.php*";
$priv_list['page-system-firmware-autoupdate'] = array();
-$priv_list['page-system-firmware-autoupdate']['name'] = "WebCfg - System: Firmware: Auto Update page";
-$priv_list['page-system-firmware-autoupdate']['descr'] = "Allow access to the 'System: Firmware: Auto Update' page.";
+$priv_list['page-system-firmware-autoupdate']['name'] = gettext("WebCfg - System: Firmware: Auto Update page");
+$priv_list['page-system-firmware-autoupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Auto Update' page.");
$priv_list['page-system-firmware-autoupdate']['match'] = array();
$priv_list['page-system-firmware-autoupdate']['match'][] = "system_firmware_check.php*";
$priv_list['page-system-firmware-settings'] = array();
-$priv_list['page-system-firmware-settings']['name'] = "WebCfg - System: Firmware: Settings page";
-$priv_list['page-system-firmware-settings']['descr'] = "Allow access to the 'System: Firmware: Settings' page.";
+$priv_list['page-system-firmware-settings']['name'] = gettext("WebCfg - System: Firmware: Settings page");
+$priv_list['page-system-firmware-settings']['descr'] = gettext("Allow access to the 'System: Firmware: Settings' page.");
$priv_list['page-system-firmware-settings']['match'] = array();
$priv_list['page-system-firmware-settings']['match'][] = "system_firmware_settings.php*";
$priv_list['page-system-gatewaygroups'] = array();
-$priv_list['page-system-gatewaygroups']['name'] = "WebCfg - System: Gateway Groups page";
-$priv_list['page-system-gatewaygroups']['descr'] = "Allow access to the 'System: Gateway Groups' page.";
+$priv_list['page-system-gatewaygroups']['name'] = gettext("WebCfg - System: Gateway Groups page");
+$priv_list['page-system-gatewaygroups']['descr'] = gettext("Allow access to the 'System: Gateway Groups' page.");
$priv_list['page-system-gatewaygroups']['match'] = array();
$priv_list['page-system-gatewaygroups']['match'][] = "system_gateway_groups.php*";
$priv_list['page-system-gateways-editgatewaygroups'] = array();
-$priv_list['page-system-gateways-editgatewaygroups']['name'] = "WebCfg - System: Gateways: Edit Gateway Groups page";
-$priv_list['page-system-gateways-editgatewaygroups']['descr'] = "Allow access to the 'System: Gateways: Edit Gateway Groups' page.";
+$priv_list['page-system-gateways-editgatewaygroups']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway Groups page");
+$priv_list['page-system-gateways-editgatewaygroups']['descr'] = gettext("Allow access to the 'System: Gateways: Edit Gateway Groups' page.");
$priv_list['page-system-gateways-editgatewaygroups']['match'] = array();
$priv_list['page-system-gateways-editgatewaygroups']['match'][] = "system_gateway_groups_edit.php*";
$priv_list['page-system-gateways'] = array();
-$priv_list['page-system-gateways']['name'] = "WebCfg - System: Gateways page";
-$priv_list['page-system-gateways']['descr'] = "Allow access to the 'System: Gateways' page.";
+$priv_list['page-system-gateways']['name'] = gettext("WebCfg - System: Gateways page");
+$priv_list['page-system-gateways']['descr'] = gettext("Allow access to the 'System: Gateways' page.");
$priv_list['page-system-gateways']['match'] = array();
$priv_list['page-system-gateways']['match'][] = "system_gateways.php*";
$priv_list['page-system-gateways-editgateway'] = array();
-$priv_list['page-system-gateways-editgateway']['name'] = "WebCfg - System: Gateways: Edit Gateway page";
-$priv_list['page-system-gateways-editgateway']['descr'] = "Allow access to the 'System: Gateways: Edit Gateway' page.";
+$priv_list['page-system-gateways-editgateway']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway page");
+$priv_list['page-system-gateways-editgateway']['descr'] = gettext("Allow access to the 'System: Gateways: Edit Gateway' page.");
$priv_list['page-system-gateways-editgateway']['match'] = array();
$priv_list['page-system-gateways-editgateway']['match'][] = "system_gateways_edit.php*";
$priv_list['page-system-groupmanager'] = array();
-$priv_list['page-system-groupmanager']['name'] = "WebCfg - System: Group manager page";
-$priv_list['page-system-groupmanager']['descr'] = "Allow access to the 'System: Group manager' page.";
+$priv_list['page-system-groupmanager']['name'] = gettext("WebCfg - System: Group manager page");
+$priv_list['page-system-groupmanager']['descr'] = gettext("Allow access to the 'System: Group manager' page.");
$priv_list['page-system-groupmanager']['match'] = array();
$priv_list['page-system-groupmanager']['match'][] = "system_groupmanager.php*";
$priv_list['page-system-groupmanager-addprivs'] = array();
-$priv_list['page-system-groupmanager-addprivs']['name'] = "WebCfg - System: Group Manager: Add Privileges page";
-$priv_list['page-system-groupmanager-addprivs']['descr'] = "Allow access to the 'System: Group Manager: Add Privileges' page.";
+$priv_list['page-system-groupmanager-addprivs']['name'] = gettext("WebCfg - System: Group Manager: Add Privileges page");
+$priv_list['page-system-groupmanager-addprivs']['descr'] = gettext("Allow access to the 'System: Group Manager: Add Privileges' page.");
$priv_list['page-system-groupmanager-addprivs']['match'] = array();
$priv_list['page-system-groupmanager-addprivs']['match'][] = "system_groupmanager_addprivs.php*";
$priv_list['page-system-staticroutes'] = array();
-$priv_list['page-system-staticroutes']['name'] = "WebCfg - System: Static Routes page";
-$priv_list['page-system-staticroutes']['descr'] = "Allow access to the 'System: Static Routes' page.";
+$priv_list['page-system-staticroutes']['name'] =gettext("WebCfg - System: Static Routes page");
+$priv_list['page-system-staticroutes']['descr'] = gettext("Allow access to the 'System: Static Routes' page.");
$priv_list['page-system-staticroutes']['match'] = array();
$priv_list['page-system-staticroutes']['match'][] = "system_routes.php*";
$priv_list['page-system-staticroutes-editroute'] = array();
-$priv_list['page-system-staticroutes-editroute']['name'] = "WebCfg - System: Static Routes: Edit route page";
-$priv_list['page-system-staticroutes-editroute']['descr'] = "Allow access to the 'System: Static Routes: Edit route' page.";
+$priv_list['page-system-staticroutes-editroute']['name'] = gettext("WebCfg - System: Static Routes: Edit route page");
+$priv_list['page-system-staticroutes-editroute']['descr'] = gettext("Allow access to the 'System: Static Routes: Edit route' page.");
$priv_list['page-system-staticroutes-editroute']['match'] = array();
$priv_list['page-system-staticroutes-editroute']['match'][] = "system_routes_edit.php*";
$priv_list['page-system-usermanager'] = array();
-$priv_list['page-system-usermanager']['name'] = "WebCfg - System: User Manager page";
-$priv_list['page-system-usermanager']['descr'] = "Allow access to the 'System: User Manager' page.";
+$priv_list['page-system-usermanager']['name'] = gettext("WebCfg - System: User Manager page");
+$priv_list['page-system-usermanager']['descr'] = gettext("Allow access to the 'System: User Manager' page.");
$priv_list['page-system-usermanager']['match'] = array();
$priv_list['page-system-usermanager']['match'][] = "system_usermanager.php*";
$priv_list['page-system-usermanager-addprivs'] = array();
-$priv_list['page-system-usermanager-addprivs']['name'] = "WebCfg - System: User Manager: Add Privileges page";
-$priv_list['page-system-usermanager-addprivs']['descr'] = "Allow access to the 'System: User Manager: Add Privileges' page.";
+$priv_list['page-system-usermanager-addprivs']['name'] = gettext("WebCfg - System: User Manager: Add Privileges page");
+$priv_list['page-system-usermanager-addprivs']['descr'] = gettext("Allow access to the 'System: User Manager: Add Privileges' page.");
$priv_list['page-system-usermanager-addprivs']['match'] = array();
$priv_list['page-system-usermanager-addprivs']['match'][] = "system_usermanager_addprivs.php*";
$priv_list['page-system-usermanager-passwordmg'] = array();
-$priv_list['page-system-usermanager-passwordmg']['name'] = "WebCfg - System: User Password Manager page";
-$priv_list['page-system-usermanager-passwordmg']['descr'] = "Allow access to the 'System: User Password Manager' page.";
+$priv_list['page-system-usermanager-passwordmg']['name'] = gettext("WebCfg - System: User Password Manager page");
+$priv_list['page-system-usermanager-passwordmg']['descr'] = gettext("Allow access to the 'System: User Password Manager' page.");
$priv_list['page-system-usermanager-passwordmg']['match'] = array();
$priv_list['page-system-usermanager-passwordmg']['match'][] = "system_usermanager_passwordmg.php*";
$priv_list['page-system-usermanager-settings'] = array();
-$priv_list['page-system-usermanager-settings']['name'] = "WebCfg - System: User manager: settings page";
-$priv_list['page-system-usermanager-settings']['descr'] = "Allow access to the 'System: User manager: settings' page.";
+$priv_list['page-system-usermanager-settings']['name'] = gettext("WebCfg - System: User manager: settings page");
+$priv_list['page-system-usermanager-settings']['descr'] = gettext("Allow access to the 'System: User manager: settings' page.");
$priv_list['page-system-usermanager-settings']['match'] = array();
$priv_list['page-system-usermanager-settings']['match'][] = "system_usermanager_settings.php*";
$priv_list['page-system-usermanager-settings-testldap'] = array();
-$priv_list['page-system-usermanager-settings-testldap']['name'] = "WebCfg - System: User Manager: Settings: Test LDAP page";
-$priv_list['page-system-usermanager-settings-testldap']['descr'] = "Allow access to the 'System: User Manager: Settings: Test LDAP' page.";
+$priv_list['page-system-usermanager-settings-testldap']['name'] = gettext("WebCfg - System: User Manager: Settings: Test LDAP page");
+$priv_list['page-system-usermanager-settings-testldap']['descr'] = gettext("Allow access to the 'System: User Manager: Settings: Test LDAP' page.");
$priv_list['page-system-usermanager-settings-testldap']['match'] = array();
$priv_list['page-system-usermanager-settings-testldap']['match'][] = "system_usermanager_settings_test.php*";
$priv_list['page-upload_progress'] = array();
-$priv_list['page-upload_progress']['name'] = "WebCfg - System: Firmware: Manual Update page (progress bar)";
-$priv_list['page-upload_progress']['descr'] = "Allow access to the 'System: Firmware: Manual Update: Progress bar' page.";
+$priv_list['page-upload_progress']['name'] = gettext("WebCfg - System: Firmware: Manual Update page (progress bar)");
+$priv_list['page-upload_progress']['descr'] = gettext("Allow access to the 'System: Firmware: Manual Update: Progress bar' page.");
$priv_list['page-upload_progress']['match'] = array();
$priv_list['page-upload_progress']['match'][] = "upload_progress*";
$priv_list['page-hidden-uploadconfiguration'] = array();
-$priv_list['page-hidden-uploadconfiguration']['name'] = "WebCfg - Hidden: Upload Configuration page";
-$priv_list['page-hidden-uploadconfiguration']['descr'] = "Allow access to the 'Hidden: Upload Configuration' page.";
+$priv_list['page-hidden-uploadconfiguration']['name'] = gettext("WebCfg - Hidden: Upload Configuration page");
+$priv_list['page-hidden-uploadconfiguration']['descr'] = gettext("Allow access to the 'Hidden: Upload Configuration' page.");
$priv_list['page-hidden-uploadconfiguration']['match'] = array();
$priv_list['page-hidden-uploadconfiguration']['match'][] = "uploadconfig.php*";
$priv_list['page-vpn-ipsec'] = array();
-$priv_list['page-vpn-ipsec']['name'] = "WebCfg - VPN: IPsec page";
-$priv_list['page-vpn-ipsec']['descr'] = "Allow access to the 'VPN: IPsec' page.";
+$priv_list['page-vpn-ipsec']['name'] = gettext("WebCfg - VPN: IPsec page");
+$priv_list['page-vpn-ipsec']['descr'] = gettext("Allow access to the 'VPN: IPsec' page.");
$priv_list['page-vpn-ipsec']['match'] = array();
$priv_list['page-vpn-ipsec']['match'][] = "vpn_ipsec.php*";
$priv_list['page-vpn-ipsec-listkeys'] = array();
-$priv_list['page-vpn-ipsec-listkeys']['name'] = "WebCfg - VPN: IPsec: Pre-Shared Keys List";
-$priv_list['page-vpn-ipsec-listkeys']['descr'] = "Allow access to the 'VPN: IPsec: Pre-Shared Keys List' page.";
+$priv_list['page-vpn-ipsec-listkeys']['name'] = gettext("WebCfg - VPN: IPsec: Pre-Shared Keys List");
+$priv_list['page-vpn-ipsec-listkeys']['descr'] = gettext("Allow access to the 'VPN: IPsec: Pre-Shared Keys List' page.");
$priv_list['page-vpn-ipsec-listkeys']['match'] = array();
$priv_list['page-vpn-ipsec-listkeys']['match'][] = "vpn_ipsec_keys.php*";
$priv_list['page-vpn-ipsec-editkeys'] = array();
-$priv_list['page-vpn-ipsec-editkeys']['name'] = "WebCfg - VPN: IPsec: Edit Pre-Shared Keys";
-$priv_list['page-vpn-ipsec-editkeys']['descr'] = "Allow access to the 'VPN: IPsec: Edit Pre-Shared Keys' page.";
+$priv_list['page-vpn-ipsec-editkeys']['name'] = gettext("WebCfg - VPN: IPsec: Edit Pre-Shared Keys");
+$priv_list['page-vpn-ipsec-editkeys']['descr'] = gettext("Allow access to the 'VPN: IPsec: Edit Pre-Shared Keys' page.");
$priv_list['page-vpn-ipsec-editkeys']['match'] = array();
$priv_list['page-vpn-ipsec-editkeys']['match'][] = "vpn_ipsec_keys_edit.php*";
$priv_list['page-vpn-ipsec-mobile'] = array();
-$priv_list['page-vpn-ipsec-mobile']['name'] = "WebCfg - VPN: IPsec: Mobile page";
-$priv_list['page-vpn-ipsec-mobile']['descr'] = "Allow access to the 'VPN: IPsec: Mobile' page.";
+$priv_list['page-vpn-ipsec-mobile']['name'] = gettext("WebCfg - VPN: IPsec: Mobile page");
+$priv_list['page-vpn-ipsec-mobile']['descr'] = gettext("Allow access to the 'VPN: IPsec: Mobile' page.");
$priv_list['page-vpn-ipsec-mobile']['match'] = array();
$priv_list['page-vpn-ipsec-mobile']['match'][] = "vpn_ipsec_mobile.php*";
$priv_list['page-vpn-ipsec-editphase1'] = array();
-$priv_list['page-vpn-ipsec-editphase1']['name'] = "WebCfg - VPN: IPsec: Edit Phase 1 page";
-$priv_list['page-vpn-ipsec-editphase1']['descr'] = "Allow access to the 'VPN: IPsec: Edit Phase 1' page.";
+$priv_list['page-vpn-ipsec-editphase1']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 1 page");
+$priv_list['page-vpn-ipsec-editphase1']['descr'] = gettext("Allow access to the 'VPN: IPsec: Edit Phase 1' page.");
$priv_list['page-vpn-ipsec-editphase1']['match'] = array();
$priv_list['page-vpn-ipsec-editphase1']['match'][] = "vpn_ipsec_phase1.php*";
$priv_list['page-vpn-ipsec-editphase2'] = array();
-$priv_list['page-vpn-ipsec-editphase2']['name'] = "WebCfg - VPN: IPsec: Edit Phase 2 page";
-$priv_list['page-vpn-ipsec-editphase2']['descr'] = "Allow access to the 'VPN: IPsec: Edit Phase 2' page.";
+$priv_list['page-vpn-ipsec-editphase2']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 2 page");
+$priv_list['page-vpn-ipsec-editphase2']['descr'] = gettext("Allow access to the 'VPN: IPsec: Edit Phase 2' page.");
$priv_list['page-vpn-ipsec-editphase2']['match'] = array();
$priv_list['page-vpn-ipsec-editphase2']['match'][] = "vpn_ipsec_phase2.php*";
$priv_list['page-vpn-vpnl2tp'] = array();
-$priv_list['page-vpn-vpnl2tp']['name'] = "WebCfg - VPN: VPN L2TP page";
-$priv_list['page-vpn-vpnl2tp']['descr'] = "Allow access to the 'VPN: VPN L2TP' page.";
+$priv_list['page-vpn-vpnl2tp']['name'] = gettext("WebCfg - VPN: VPN L2TP page");
+$priv_list['page-vpn-vpnl2tp']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP' page.");
$priv_list['page-vpn-vpnl2tp']['match'] = array();
$priv_list['page-vpn-vpnl2tp']['match'][] = "vpn_l2tp.php*";
$priv_list['page-vpn-vpnl2tp-users'] = array();
-$priv_list['page-vpn-vpnl2tp-users']['name'] = "WebCfg - VPN: VPN L2TP : Users page";
-$priv_list['page-vpn-vpnl2tp-users']['descr'] = "Allow access to the 'VPN: VPN L2TP : Users' page.";
+$priv_list['page-vpn-vpnl2tp-users']['name'] = gettext("WebCfg - VPN: VPN L2TP : Users page");
+$priv_list['page-vpn-vpnl2tp-users']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP : Users' page.");
$priv_list['page-vpn-vpnl2tp-users']['match'] = array();
$priv_list['page-vpn-vpnl2tp-users']['match'][] = "vpn_l2tp_users.php*";
$priv_list['page-vpn-vpnl2tp-users-edit'] = array();
-$priv_list['page-vpn-vpnl2tp-users-edit']['name'] = "WebCfg - VPN: VPN L2TP : Users : Edit page";
-$priv_list['page-vpn-vpnl2tp-users-edit']['descr'] = "Allow access to the 'VPN: VPN L2TP : Users : Edit' page.";
+$priv_list['page-vpn-vpnl2tp-users-edit']['name'] = gettext("WebCfg - VPN: VPN L2TP : Users : Edit page");
+$priv_list['page-vpn-vpnl2tp-users-edit']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP : Users : Edit' page.");
$priv_list['page-vpn-vpnl2tp-users-edit']['match'] = array();
$priv_list['page-vpn-vpnl2tp-users-edit']['match'][] = "vpn_l2tp_users_edit.php*";
$priv_list['page-openvpn-client'] = array();
-$priv_list['page-openvpn-client']['name'] = "WebCfg - OpenVPN: Client page";
-$priv_list['page-openvpn-client']['descr'] = "Allow access to the 'OpenVPN: Client' page.";
+$priv_list['page-openvpn-client']['name'] = gettext("WebCfg - OpenVPN: Client page");
+$priv_list['page-openvpn-client']['descr'] = gettext("Allow access to the 'OpenVPN: Client' page.");
$priv_list['page-openvpn-client']['match'] = array();
$priv_list['page-openvpn-client']['match'][] = "vpn_openvpn_client.php*";
$priv_list['page-openvpn-csc'] = array();
-$priv_list['page-openvpn-csc']['name'] = "WebCfg - OpenVPN: Client Specific Override page";
-$priv_list['page-openvpn-csc']['descr'] = "Allow access to the 'OpenVPN: Client Specific Override' page.";
+$priv_list['page-openvpn-csc']['name'] = gettext("WebCfg - OpenVPN: Client Specific Override page");
+$priv_list['page-openvpn-csc']['descr'] = gettext("Allow access to the 'OpenVPN: Client Specific Override' page.");
$priv_list['page-openvpn-csc']['match'] = array();
$priv_list['page-openvpn-csc']['match'][] = "vpn_openvpn_csc.php*";
$priv_list['page-openvpn-server'] = array();
-$priv_list['page-openvpn-server']['name'] = "WebCfg - OpenVPN: Server page";
-$priv_list['page-openvpn-server']['descr'] = "Allow access to the 'OpenVPN: Server' page.";
+$priv_list['page-openvpn-server']['name'] = gettext("WebCfg - OpenVPN: Server page");
+$priv_list['page-openvpn-server']['descr'] = gettext("Allow access to the 'OpenVPN: Server' page.");
$priv_list['page-openvpn-server']['match'] = array();
$priv_list['page-openvpn-server']['match'][] = "vpn_openvpn_server.php*";
$priv_list['page-services-pppoeserver'] = array();
-$priv_list['page-services-pppoeserver']['name'] = "WebCfg - Services: PPPoE Server page";
-$priv_list['page-services-pppoeserver']['descr'] = "Allow access to the 'Services: PPPoE Server' page.";
+$priv_list['page-services-pppoeserver']['name'] = gettext("WebCfg - Services: PPPoE Server page");
+$priv_list['page-services-pppoeserver']['descr'] = gettext("Allow access to the 'Services: PPPoE Server' page.");
$priv_list['page-services-pppoeserver']['match'] = array();
$priv_list['page-services-pppoeserver']['match'][] = "vpn_pppoe.php*";
$priv_list['page-services-pppoeserver-eidt'] = array();
-$priv_list['page-services-pppoeserver-eidt']['name'] = "WebCfg - Services: PPPoE Server: Edit page";
-$priv_list['page-services-pppoeserver-eidt']['descr'] = "Allow access to the 'Services: PPPoE Server: Edit' page.";
+$priv_list['page-services-pppoeserver-eidt']['name'] = gettext("WebCfg - Services: PPPoE Server: Edit page");
+$priv_list['page-services-pppoeserver-eidt']['descr'] = gettext("Allow access to the 'Services: PPPoE Server: Edit' page.");
$priv_list['page-services-pppoeserver-eidt']['match'] = array();
$priv_list['page-services-pppoeserver-eidt']['match'][] = "vpn_pppoe_edit.php*";
$priv_list['page-vpn-vpnpptp'] = array();
-$priv_list['page-vpn-vpnpptp']['name'] = "WebCfg - VPN: VPN PPTP page";
-$priv_list['page-vpn-vpnpptp']['descr'] = "Allow access to the 'VPN: VPN PPTP' page.";
+$priv_list['page-vpn-vpnpptp']['name'] = gettext("WebCfg - VPN: VPN PPTP page");
+$priv_list['page-vpn-vpnpptp']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP' page.");
$priv_list['page-vpn-vpnpptp']['match'] = array();
$priv_list['page-vpn-vpnpptp']['match'][] = "vpn_pptp.php*";
$priv_list['page-vpn-vpnpptp-users'] = array();
-$priv_list['page-vpn-vpnpptp-users']['name'] = "WebCfg - VPN: VPN PPTP: Users page";
-$priv_list['page-vpn-vpnpptp-users']['descr'] = "Allow access to the 'VPN: VPN PPTP: Users' page.";
+$priv_list['page-vpn-vpnpptp-users']['name'] = gettext("WebCfg - VPN: VPN PPTP: Users page");
+$priv_list['page-vpn-vpnpptp-users']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP: Users' page.");
$priv_list['page-vpn-vpnpptp-users']['match'] = array();
$priv_list['page-vpn-vpnpptp-users']['match'][] = "vpn_pptp_users.php*";
$priv_list['page-vpn-vpnpptp-user-edit'] = array();
-$priv_list['page-vpn-vpnpptp-user-edit']['name'] = "WebCfg - VPN: VPN PPTP: User: Edit page";
-$priv_list['page-vpn-vpnpptp-user-edit']['descr'] = "Allow access to the 'VPN: VPN PPTP: User: Edit' page.";
+$priv_list['page-vpn-vpnpptp-user-edit']['name'] = gettext("WebCfg - VPN: VPN PPTP: User: Edit page");
+$priv_list['page-vpn-vpnpptp-user-edit']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP: User: Edit' page.");
$priv_list['page-vpn-vpnpptp-user-edit']['match'] = array();
$priv_list['page-vpn-vpnpptp-user-edit']['match'][] = "vpn_pptp_users_edit.php*";
$priv_list['page-pfsensewizardsubsystem'] = array();
-$priv_list['page-pfsensewizardsubsystem']['name'] = "WebCfg - pfSense wizard subsystem page";
-$priv_list['page-pfsensewizardsubsystem']['descr'] = "Allow access to the 'pfSense wizard subsystem' page.";
+$priv_list['page-pfsensewizardsubsystem']['name'] = gettext("WebCfg - pfSense wizard subsystem page");
+$priv_list['page-pfsensewizardsubsystem']['descr'] = gettext("Allow access to the 'pfSense wizard subsystem' page.");
$priv_list['page-pfsensewizardsubsystem']['match'] = array();
$priv_list['page-pfsensewizardsubsystem']['match'][] = "wizard.php*";
$priv_list['page-xmlrpclibrary'] = array();
-$priv_list['page-xmlrpclibrary']['name'] = "WebCfg - XMLRPC Library page";
-$priv_list['page-xmlrpclibrary']['descr'] = "Allow access to the 'XMLRPC Library' page.";
+$priv_list['page-xmlrpclibrary']['name'] = gettext("WebCfg - XMLRPC Library page");
+$priv_list['page-xmlrpclibrary']['descr'] = gettext("Allow access to the 'XMLRPC Library' page.");
$priv_list['page-xmlrpclibrary']['match'] = array();
$priv_list['page-xmlrpclibrary']['match'][] = "xmlrpc.php*";
diff --git a/etc/inc/radius.inc b/etc/inc/radius.inc
index 459b0cf..2c433d1 100644
--- a/etc/inc/radius.inc
+++ b/etc/inc/radius.inc
@@ -401,13 +401,13 @@ class Auth_RADIUS extends PEAR {
{
$req = radius_send_request($this->res);
if (!$req) {
- return $this->raiseError('Error sending request: ' . $this->getError());
+ return $this->raiseError(gettext('Error sending request:') . ' ' . $this->getError());
}
switch($req) {
case RADIUS_ACCESS_ACCEPT:
if (is_subclass_of($this, 'auth_radius_acct')) {
- return $this->raiseError('RADIUS_ACCESS_ACCEPT is unexpected for accounting');
+ return $this->raiseError(gettext('RADIUS_ACCESS_ACCEPT is unexpected for accounting'));
}
return true;
@@ -416,12 +416,12 @@ class Auth_RADIUS extends PEAR {
case RADIUS_ACCOUNTING_RESPONSE:
if (is_subclass_of($this, 'auth_radius_pap')) {
- return $this->raiseError('RADIUS_ACCOUNTING_RESPONSE is unexpected for authentication');
+ return $this->raiseError(gettext('RADIUS_ACCOUNTING_RESPONSE is unexpected for authentication'));
}
return true;
default:
- return $this->raiseError("Unexpected return value: $req");
+ return $this->raiseError(gettext("Unexpected return value:") . $req);
}
}
@@ -1126,4 +1126,4 @@ class Auth_RADIUS_Acct_Update extends Auth_RADIUS_Acct
var $status_type = RADIUS_UPDATE;
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc
index 0475169..e24f30c 100644
--- a/etc/inc/rrd.inc
+++ b/etc/inc/rrd.inc
@@ -42,7 +42,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile) {
exec("$rrdtool dump {$rrddatabase} {$xmldumpfile} 2>&1", $dumpout, $dumpret);
if ($dumpret <> 0) {
$dumpout = implode(" ", $dumpout);
- log_error("RRD dump failed exited with $dumpret, the error is: $dumpout");
+ log_error(sprintf(gettext('RRD dump failed exited with %1$s, the error is: %2$s'), $dumpret, $dumpout));
}
return($dumpret);
}
@@ -53,7 +53,7 @@ function create_new_rrd($rrdcreatecmd) {
exec("$rrdcreatecmd 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn <> 0) {
$rrdcreateoutput = implode(" ", $rrdcreateoutput);
- log_error("RRD create failed exited with $rrdcreatereturn, the error is: $rrdcreateoutput");
+ log_error(sprintf(gettext('RRD create failed exited with %1$s, the error is: %2$s'), $rrdcreatereturn, $rrdcreateoutput));
}
return $rrdcreatereturn;
}
@@ -67,7 +67,7 @@ function migrate_rrd_format($rrdoldxml, $rrdnewxml) {
$numdsold = count($rrdoldxml['ds']);
$numrranew = count($rrdnewxml['rra']);
$numdsnew = count($rrdnewxml['ds']);
- log_error("Import RRD has $numdsold DS values and $numrraold RRA databases, new format RRD has $numdsnew DS values and $numrranew RRA databases");
+ log_error(sprintf(gettext('Import RRD has %1$s DS values and %2$s RRA databases, new format RRD has %3$s DS values and %4$s RRA databases'), $numdsold, $numrraold, $numdsnew ,$numrranew));
/* add data sources not found in the old array from the new array */
$i = 0;
@@ -151,7 +151,7 @@ function migrate_rrd_format($rrdoldxml, $rrdnewxml) {
$numrranew = count($rrdoldxml['rra']);
$numdsnew = count($rrdoldxml['ds']);
- log_error("The new RRD now has $numdsnew DS values and $numrranew RRA databases");
+ log_error(sprintf(gettext('The new RRD now has %1$s DS values and %2$s RRA databases'), $numdsnew, $numrranew));
return $rrdoldxml;
}
@@ -159,7 +159,7 @@ function enable_rrd_graphing() {
global $config, $g, $altq_list_queues;
if($g['booting'])
- echo "Generating RRD graphs...";
+ echo gettext("Generating RRD graphs...");
$rrddbpath = "/var/db/rrd/";
$rrdgraphpath = "/usr/local/www/rrd";
@@ -244,7 +244,7 @@ function enable_rrd_graphing() {
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/rrd.tgz 2>&1", $rrdrestore, $rrdreturn);
$rrdrestore = implode(" ", $rrdrestore);
if($rrdreturn <> 0) {
- log_error("RRD restore failed exited with $rrdreturn, the error is: $rrdrestore\n");
+ log_error(sprintf(gettext('RRD restore failed exited with %1$s, the error is: %2$s%3$s'), $rrdreturn, $rrdrestore, "\n"));
}
}
}
@@ -755,7 +755,7 @@ function enable_rrd_graphing() {
$rrdupdatesh .= "sleep 60\n";
$rrdupdatesh .= "done\n";
- log_error("Creating rrd update script");
+ log_error(gettext("Creating rrd update script"));
/* write the rrd update script */
$updaterrdscript = "{$g['vardb_path']}/rrd/updaterrd.sh";
$fd = fopen("$updaterrdscript", "w");
@@ -779,7 +779,7 @@ function enable_rrd_graphing() {
}
if($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index e731357..313ad69 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -214,7 +214,7 @@ function services_dhcpdv4_configure() {
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/dhcpleases.tgz 2>&1", $dhcprestore, $dhcpreturn);
$dhcprestore = implode(" ", $dhcprestore);
if($dhcpreturn <> 0) {
- log_error("DHCP leases restore failed exited with $dhcpreturn, the error is: $dhcprestore\n");
+ log_error(sprintf(gettext('DHCP leases restore failed exited with %1$s, the error is: %2$s%3$s'), $dhcpreturn, $dhcprestore, "\n"));
}
}
}
@@ -227,14 +227,14 @@ function services_dhcpdv4_configure() {
$Iflist = get_configured_interface_list();
if ($g['booting'])
- echo "Starting DHCP service...";
+ echo gettext("Starting DHCP service...");
else
sleep(1);
/* write dhcpd.conf */
$fd = fopen("{$g['dhcpd_chroot_path']}/etc/dhcpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open dhcpd.conf in services_dhcpdv4_configure().\n");
+ printf(gettext("Error: cannot open dhcpd.conf in services_dhcpdv4_configure().%s"), "\n");
return 1;
}
@@ -305,7 +305,7 @@ EOD;
}
}
} else {
- log_error("Warning! DHCP Failover setup and no CARP virtual IP's defined!");
+ log_error(gettext("Warning! DHCP Failover setup and no CARP virtual IP's defined!"));
}
if($skew > 10) {
$type = "secondary";
@@ -851,7 +851,7 @@ EOD;
}
if ($g['booting']) {
- print "done.\n";
+ print gettext("done.") . "\n";
}
return 0;
@@ -901,14 +901,14 @@ EOD;
$igmpfl = fopen($g['tmp_path'] . "/igmpproxy.conf", "w");
if (!$igmpfl) {
- log_error("Could not write Igmpproxy configuration file!");
+ log_error(gettext("Could not write Igmpproxy configuration file!"));
return;
}
fwrite($igmpfl, $igmpconf);
fclose($igmpfl);
mwexec("/usr/local/sbin/igmpproxy -c " . $g['tmp_path'] . "/igmpproxy.conf");
- log_error("Started Igmpproxy service sucsesfully.");
+ log_error(gettext("Started Igmpproxy service sucsesfully."));
return 0;
}
@@ -930,7 +930,7 @@ function services_dhcrelay_configure() {
return 0;
if ($g['booting'])
- echo "Starting DHCP relay service...";
+ echo gettext("Starting DHCP relay service...");
else
sleep(1);
@@ -1056,7 +1056,7 @@ function services_dyndns_configure($int = "") {
if (is_array($dyndnscfg)) {
if ($g['booting'])
- echo "Starting DynDNS clients...";
+ echo gettext("Starting DynDNS clients...");
foreach ($dyndnscfg as $dyndns) {
if (!empty($int) && $int != $dyndns['interface'])
@@ -1068,7 +1068,7 @@ function services_dyndns_configure($int = "") {
}
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
return 0;
@@ -1089,7 +1089,7 @@ function services_dnsmasq_configure() {
if (isset($config['dnsmasq']['enable'])) {
if ($g['booting'])
- echo "Starting DNS forwarder...";
+ echo gettext("Starting DNS forwarder...");
else
sleep(1);
@@ -1126,7 +1126,7 @@ function services_dnsmasq_configure() {
mwexec("/usr/local/sbin/dnsmasq --local-ttl 1 --all-servers {$dns_rebind} --dns-forward-max=5000 --cache-size=10000 {$args}");
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
if (!$g['booting']) {
@@ -1153,12 +1153,12 @@ function services_snmpd_configure() {
if (isset($config['snmpd']['enable'])) {
if ($g['booting'])
- echo "Starting SNMP daemon... ";
+ echo gettext("Starting SNMP daemon... ");
/* generate snmpd.conf */
$fd = fopen("{$g['varetc_path']}/snmpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open snmpd.conf in services_snmpd_configure().\n");
+ printf(gettext("Error: cannot open snmpd.conf in services_snmpd_configure().%s"),"\n");
return 1;
}
@@ -1306,7 +1306,7 @@ EOD;
"{$bindlan} -p {$g['varrun_path']}/snmpd.pid");
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
return 0;
@@ -1704,8 +1704,8 @@ function configure_cron() {
if (is_array($config['cron']['item'])) {
$crontab_contents .= "#\n";
- $crontab_contents .= "# pfSense specific crontab entries\n";
- $crontab_contents .= "# Created: " . date("F j, Y, g:i a") . "\n";
+ $crontab_contents .= "# " . gettext("pfSense specific crontab entries") . "\n";
+ $crontab_contents .= "# " .gettext( "Created:") . " " . date("F j, Y, g:i a") . "\n";
$crontab_contents .= "#\n";
foreach ($config['cron']['item'] as $item) {
@@ -1719,8 +1719,8 @@ function configure_cron() {
}
$crontab_contents .= "\n#\n";
- $crontab_contents .= "# If possible do not add items to this file manually.\n";
- $crontab_contents .= "# If you do so, this file must be terminated with a blank line (e.g. new line)\n";
+ $crontab_contents .= "# " . gettext("If possible do not add items to this file manually.") . "\n";
+ $crontab_contents .= "# " . gettext("If you do so, this file must be terminated with a blank line (e.g. new line)") . "\n";
$crontab_contents .= "#\n\n";
}
@@ -1763,7 +1763,7 @@ function upnp_start() {
return;
if($config['installedpackages']['miniupnpd']['config'][0]['enable']) {
- echo "Starting UPnP service... ";
+ echo gettext("Starting UPnP service... ");
require_once('/usr/local/pkg/miniupnpd.inc');
sync_package_miniupnpd();
echo "done.\n";
@@ -1798,15 +1798,15 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
$cron_item['command'] = $command;
if(!$is_installed) {
$config['cron']['item'][] = $cron_item;
- write_config("Installed cron job for {$command}");
+ write_config(sprintf(gettext("Installed cron job for %s"), $command));
} else {
$config['cron']['item'][$x] = $cron_item;
- write_config("Updated cron job for {$command}");
+ write_config(sprintf(gettext("Updated cron job for %s"), $command));
}
} else {
if(($is_installed == true) && ($x > 0)) {
unset($config['cron']['item'][$x]);
- write_config("Remvoed cron job for {$command}");
+ write_config(sprintf(gettext("Remvoed cron job for %s"), $command));
}
}
configure_cron();
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 9d9868b..6c4cbb2 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -186,13 +186,13 @@ function shaper_do_input_validation($postdata, $reqdfields, $reqdfieldsn, $input
/* check for bad control characters */
foreach ($postdata as $pn => $pd) {
if (is_string($pd) && preg_match("/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/", $pd)) {
- $input_errors[] = "The field '" . $pn . "' contains invalid characters.";
+ $input_errors[] = sprintf(gettext("The field '%s' contains invalid characters."), $pn);
}
}
for ($i = 0; $i < count($reqdfields); $i++) {
if ($postdata[$reqdfields[$i]] == "") {
- $input_errors[] = "The field '" . $reqdfieldsn[$i] . "' is required.";
+ $input_errors[] = sprintf(gettext("The field '%s' is required."), $reqdfieldsn[$i]);
}
}
}
@@ -311,24 +311,24 @@ class altq_root_queue {
function validate_input($data, &$input_errors) {
$reqdfields[] = "bandwidth";
- $reqdfieldsn[] = "Bandwidth";
+ $reqdfieldsn[] = gettext("Bandwidth");
$reqdfields[] = "bandwidthtype";
- $reqdfieldsn[] = "Bandwidthtype";
+ $reqdfieldsn[] = gettext("Bandwidthtype");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
- $input_errors[] = "Bandwidth must be an integer.";
+ $input_errors[] = gettext("Bandwidth must be an integer.");
if ($data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth cannot be negative.";
+ $input_errors[] = gettext("Bandwidth cannot be negative.");
if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
- $input_errors[] = "Qlimit must be an integer.";
+ $input_errors[] = gettext("Qlimit must be an integer.");
if ($data['qlimit'] < 0)
- $input_errors[] = "Qlimit must be an positive.";
+ $input_errors[] = gettext("Qlimit must be an positive.");
if ($data['tbrconfig'] && (!is_numeric($data['tbrconfig'])))
- $input_errors[] = "Tbrsize must be an integer.";
+ $input_errors[] = gettext("Tbrsize must be an integer.");
if ($data['tbrconfig'] < 0)
- $input_errors[] = "Tbrsize must be an positive.";
+ $input_errors[] = gettext("Tbrsize must be an positive.");
}
/* Implement this to shorten some code on the frontend page */
@@ -608,18 +608,18 @@ class altq_root_queue {
*/
function build_form() {
$form = "<tr><td valign=\"center\" class=\"vncellreq\"><br>";
- $form .= "Enable/Disable";
+ $form .= gettext("Enable/Disable");
$form .= "<br/></td><td class=\"vncellreq\">";
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
if ($this->GetEnabled() == "on")
$form .= " CHECKED";
- $form .= " ><span class=\"vexpl\"> Enable/disable discipline and its children</span>";
+ $form .= " ><span class=\"vexpl\"> " . gettext("Enable/disable discipline and its children") . "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">" . gettext("Name") . "</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<strong>".$this->GetQname()."</strong>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Scheduler Type ";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Scheduler Type ");
$form .= "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<select id=\"scheduler\" name=\"scheduler\" class=\"formselect\">";
@@ -641,11 +641,11 @@ class altq_root_queue {
$form .= ">PRIQ</option>";
$form .= "</select>";
$form .= "<br> <span class=\"vexpl\">";
- $form .= "NOTE: Changing this changes all child queues!";
- $form .= " Beware you can lose information.";
+ $form .= gettext("NOTE: Changing this changes all child queues!");
+ $form .= gettext(" Beware you can lose information.");
$form .= "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Bandwidth";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Bandwidth");
$form .= "</td><td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"bandwidth\" name=\"bandwidth\" value=\"";
$form .= $this->GetBandwidth() . "\">";
@@ -680,9 +680,9 @@ class altq_root_queue {
$form .= $this->GetTbrConfig();
$form .= "\">";
$form .= "<br> <span class=\"vexpl\">";
- $form .= "Adjusts the size, in bytes, of the token bucket regulator. ";
- $form .= "If not specified, heuristics based on the interface ";
- $form .= "bandwidth are used to determine the size.";
+ $form .= gettext("Adjusts the size, in bytes, of the token bucket regulator. "
+ . "If not specified, heuristics based on the interface "
+ . "bandwidth are used to determine the size.");
$form .= "</span></td></tr>";
$form .= "<input type=\"hidden\" id=\"interface\" name=\"interface\"";
$form .= " value=\"" . $this->GetInterface() . "\">";
@@ -950,7 +950,7 @@ class priq_queue {
function validate_input($data, &$input_errors) {
$reqdfields[] = "name";
- $reqdfieldsn[] = "Name";
+ $reqdfieldsn[] = gettext("Name");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
@@ -963,16 +963,16 @@ class priq_queue {
$input_errors[] = "Qlimit must be an positive.";
if ($data['priority'] && (!is_numeric($data['priority'])
|| ($data['priority'] < 1) || ($data['priority'] > 15))) {
- $input_errors[] = "The priority must be an integer between 1 and 15.";
+ $input_errors[] = gettext("The priority must be an integer between 1 and 15.");
}
if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
- $input_errors[] = "Queue limit must be an integer";
+ $input_errors[] = gettext("Queue limit must be an integer");
if ($data['qlimit'] < 0)
- $input_errors[] = "Queue limit must be positive";
+ $input_errors[] = gettext("Queue limit must be positive");
if (!empty($data['newname']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['newname']))
- $input_errors[] = "Queue names must be alphanumeric and _ or - only.";
+ $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['name']))
- $input_errors[] = "Queue names must be alphanumeric and _ or - only.";
+ $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
}
@@ -1104,69 +1104,69 @@ class priq_queue {
*/
function build_form() {
$form = "<tr><td valign=\"center\" class=\"vncellreq\"><br>";
- $form .= "Enable/Disable";
+ $form .= gettext("Enable/Disable");
$form .= "<br/></td><td class=\"vncellreq\">";
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
if ($this->GetEnabled() == "on")
$form .= " CHECKED";
- $form .= " ><span class=\"vexpl\"> Enable/Disable queue and its children</span>";
+ $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue and its children") . "</span>";
$form .= "</td></tr>";
$form .= "<tr>";
$form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">";
- $form .= "Queue Name</td><td width=\"78%\" class=\"vtable\">";
+ $form .= gettext("Queue Name") . "</td><td width=\"78%\" class=\"vtable\">";
$form .= "<input name=\"newname\" type=\"text\" id=\"newname\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\"";
$form .= htmlspecialchars($this->GetQname());
$form .= "\">";
$form .= "<input name=\"name\" type=\"hidden\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\"";
$form .= htmlspecialchars($this->GetQname());
$form .= "\">";
- $form .= "<br /> <span class=\"vexpl\">Enter the name of the queue here. Do not use spaces and limit the size to 15 characters.";
+ $form .= "<br /> <span class=\"vexpl\">" . gettext("Enter the name of the queue here. Do not use spaces and limit the size to 15 characters.");
$form .= "</span><br /></td>";
$form .= "</tr><tr>";
- $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">Priority</td>";
+ $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">" . gettext("Priority") . "</td>";
$form .= "<td width=\"78%\" class=\"vtable\"> <input name=\"priority\" type=\"text\" id=\"priority\" size=\"5\" value=\"";
$form .= htmlspecialchars($this->GetQpriority());
$form .= "\">";
- $form .= "<br> <span class=\"vexpl\">For hfsc, the range is 0 to 7. The default is 1. Hfsc queues with a higher priority are preferred in the case of overload.</span></td>";
+ $form .= "<br> <span class=\"vexpl\">" . gettext("For hfsc, the range is 0 to 7. The default is 1. Hfsc queues with a higher priority are preferred in the case of overload.") . "</span></td>";
$form .= "</tr>";
$form .= "<tr>";
- $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">Queue limit</td>";
+ $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">" . gettext("Queue limit") . "</td>";
$form .= "<td width=\"78%\" class=\"vtable\"> <input name=\"qlimit\" type=\"text\" id=\"qlimit\" size=\"8\" value=\"";
$form .= htmlspecialchars($this->GetQlimit());
$form .= "\">";
- $form .= "<br> <span class=\"vexpl\">Queue limit in packets per second.";
+ $form .= "<br> <span class=\"vexpl\">" . gettext("Queue limit in packets per second.");
$form .= "</span></td>";
$form .= "<tr>";
- $form .= "<td width=\"22%\" valign=\"center\" class=\"vncell\">Scheduler options</td>";
+ $form .= "<td width=\"22%\" valign=\"center\" class=\"vncell\">" . gettext("Scheduler options") . "</td>";
$form .= "<td width=\"78%\" class=\"vtable\">";
if (empty($this->subqueues)) {
$tmpvalue = $this->GetDefault();
if (!empty($tmpvalue)) {
$form .= "<input type=\"checkbox\" id=\"default\" CHECKED name=\"default\" value=\"default\"";
- $form .= "> Default queue<br>";
+ $form .= "> " . gettext("Default queue") . "<br>";
} else {
$form .= "<input type=\"checkbox\" id=\"default\" name=\"default\" value=\"default\"";
- $form .= "> Default queue<br>";
+ $form .= "> " . gettext("Default queue") . "<br>";
}
}
$form .= "<input type=\"checkbox\" id=\"red\" name=\"red\" value=\"red\" ";
$tmpvalue = $this->GetRed();
if(!empty($tmpvalue))
$form .= " CHECKED";
- $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#red\">Random Early Detection</a><br>";
+ $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#red\">" . gettext("Random Early Detection") . "</a><br>";
$form .= "<input type=\"checkbox\" id=\"rio\" name=\"rio\" value=\"rio\"";
$tmpvalue = $this->GetRio();
if(!empty($tmpvalue))
$form .= " CHECKED";
- $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#rio\">Random Early Detection In and Out</a><br>";
+ $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#rio\">" . gettext("Random Early Detection In and Out") . "</a><br>";
$form .= "<input type=\"checkbox\" id=\"ecn\" name=\"ecn\" value=\"ecn\"";
$tmpvalue = $this->GetEcn();
if(!empty($tmpvalue))
$form .= " CHECKED";
- $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#ecn\">Explicit Congestion Notification</a><br>";
- $form .= "<span class=\"vexpl\"><br>Select options for this queue";
+ $form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#ecn\">" . gettext("Explicit Congestion Notification") . "</a><br>";
+ $form .= "<span class=\"vexpl\"><br>" . gettext("Select options for this queue");
$form .= "</tr><tr>";
- $form .= "<td width=\"22%\" class=\"vncellreq\">Description</td>";
+ $form .= "<td width=\"22%\" class=\"vncellreq\">" . gettext("Description") . "</td>";
$form .= "<td width=\"78%\" class=\"vtable\">";
$form .= "<input type=\"text\" name=\"description\" size=\"50%\" class=\"formfld unknown\" value=\"" . $this->GetDescription() . "\" >";
$form .= "</td></tr>";
@@ -1192,23 +1192,23 @@ class priq_queue {
*/
$form .= "<tr>";
$form .= "<td width=\"50%\" class=\"vncellreq\">";
- $form .= "Bandwidth: " . $this->GetBandwidth().$this->GetBwscale();
+ $form .= gettext("Bandwidth:") . " " . $this->GetBandwidth().$this->GetBwscale();
$form .= "</td><td width=\"50%\"></td></tr>";
$form .= "<tr><td width=\"20%\" class=\"vncellreq\">";
$tmpvalue = $this->GetQpriority();
if (!empty($tmpvalue))
- $form .= "Priority: on </td></tr>";
+ $form .= gettext("Priority: on") . " </td></tr>";
$tmpvalue = $this->GetDefault();
if (!empty($tmpvalue))
- $form .= "<tr><td class=\"vncellreq\">Default: on </td></tr>";
+ $form .= "<tr><td class=\"vncellreq\">" . gettext("Default: on") . " </td></tr>";
$form .= "<tr><td width=\"20%\" class=\"vncellreq\">";
$form .= "<a href=\"firewall_shaper_queues.php?interface=";
$form .= $this->GetInterface() . "&queue=";
$form .= $this->GetQname() . "&action=delete\">";
$form .= "<img src=\"";
$form .= "./themes/".$g['theme']."/images/icons/icon_x.gif\"";
- $form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Delete queue from interface\">";
- $form .= "<span>Delete queue from interface</span></a></td></tr>";
+ $form .= " width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("Delete queue from interface") . "\">";
+ $form .= "<span>" . gettext("Delete queue from interface") . "</span></a></td></tr>";
return $form;
@@ -1532,22 +1532,22 @@ class hfsc_queue extends priq_queue {
parent::validate_input($data, $input_errors);
$reqdfields[] = "bandwidth";
- $reqdfieldsn[] = "Bandwidth";
+ $reqdfieldsn[] = gettext("Bandwidth");
$reqdfields[] = "bandwidthtype";
- $reqdfieldsn[] = "Bandwidthtype";
+ $reqdfieldsn[] = gettext("Bandwidthtype");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if (isset($data['linkshare3']) && $data['linkshare3'] <> "") {
if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
- $input_errors[] = "Bandwidth must be an integer.";
+ $input_errors[] = gettext("Bandwidth must be an integer.");
- if ($data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth cannot be negative.";
+ if ($data['bandwidth'] < 0)
+ $input_errors[] = gettext("Bandwidth cannot be negative.");
if ($data['bandwidthtype'] == "%") {
if ($data['bandwidth'] > 100 || $data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth in percentage should be between 1 and 100 bounds.";
+ $input_errors[] = gettext("Bandwidth in percentage should be between 1 and 100 bounds.");
}
/*
$parent =& $this->GetParent();
@@ -1564,15 +1564,15 @@ class hfsc_queue extends priq_queue {
}
if ($data['upperlimit1'] <> "" && $data['upperlimit2'] == "")
- $input_errors[] = ("upperlimit service curve defined but missing (d) value");
+ $input_errors[] = gettext("upperlimit service curve defined but missing (d) value");
if ($data['upperlimit2'] <> "" && $data['upperlimit1'] == "")
- $input_errors[] = ("upperlimit service curve defined but missing initial bandwidth (m1) value");
+ $input_errors[] = gettext("upperlimit service curve defined but missing initial bandwidth (m1) value");
if ($data['upperlimit1'] <> "" && !is_valid_shaperbw($data['upperlimit1']))
- $input_errors[] = ("upperlimit m1 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("upperlimit m1 value needs to be Kb, Mb, Gb, or %");
if ($data['upperlimit2'] <> "" && !is_numeric($data['upperlimit2']))
- $input_errors[] = ("upperlimit d value needs to be numeric");
+ $input_errors[] = gettext("upperlimit d value needs to be numeric");
if ($data['upperlimit3'] <> "" && !is_valid_shaperbw($data['upperlimit3']))
- $input_errors[] = ("upperlimit m2 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("upperlimit m2 value needs to be Kb, Mb, Gb, or %");
/*
if (isset($data['upperlimit']) && $data['upperlimit3'] <> "" && $data['upperlimit1'] <> "") {
@@ -1586,19 +1586,19 @@ class hfsc_queue extends priq_queue {
}
*/
if ($data['linkshare1'] <> "" && $data['linkshare2'] == "")
- $input_errors[] = ("linkshare service curve defined but missing (d) value");
+ $input_errors[] = gettext("linkshare service curve defined but missing (d) value");
if ($data['linkshare2'] <> "" && $data['linkshare1'] == "")
- $input_errors[] = ("linkshare service curve defined but missing initial bandwidth (m1) value");
+ $input_errors[] = gettext("linkshare service curve defined but missing initial bandwidth (m1) value");
if ($data['linkshare1'] <> "" && !is_valid_shaperbw($data['linkshare1']))
- $input_errors[] = ("linkshare m1 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("linkshare m1 value needs to be Kb, Mb, Gb, or %");
if ($data['linkshare2'] <> "" && !is_numeric($data['linkshare2']))
- $input_errors[] = ("linkshare d value needs to be numeric");
+ $input_errors[] = gettext("linkshare d value needs to be numeric");
if ($data['linkshare3'] <> "" && !is_valid_shaperbw($data['linkshare3']))
- $input_errors[] = ("linkshare m2 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("linkshare m2 value needs to be Kb, Mb, Gb, or %");
if ($data['realtime1'] <> "" && $data['realtime2'] == "")
- $input_errors[] = ("realtime service curve defined but missing (d) value");
+ $input_errors[] = gettext("realtime service curve defined but missing (d) value");
if ($data['realtime2'] <> "" && $data['realtime1'] == "")
- $input_errors[] = ("realtime service curve defined but missing initial bandwidth (m1) value");
+ $input_errors[] = gettext("realtime service curve defined but missing initial bandwidth (m1) value");
/*
if (isset($data['linkshare']) && $data['linkshare3'] <> "" && $data['linkshare1'] <> "" && 0) {
@@ -1613,11 +1613,11 @@ class hfsc_queue extends priq_queue {
*/
if ($data['realtime1'] <> "" && !is_valid_shaperbw($data['realtime1']))
- $input_errors[] = ("realtime m1 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("realtime m1 value needs to be Kb, Mb, Gb, or %");
if ($data['realtime2'] <> "" && !is_numeric($data['realtime2']))
- $input_errors[] = ("realtime d value needs to be numeric");
+ $input_errors[] = gettext("realtime d value needs to be numeric");
if ($data['realtime3'] <> "" && !is_valid_shaperbw($data['realtime3']))
- $input_errors[] = ("realtime m2 value needs to be Kb, Mb, Gb, or %");
+ $input_errors[] = gettext("realtime m2 value needs to be Kb, Mb, Gb, or %");
/*
if (isset($data['realtime']) && $data['realtime3'] <> "" && $data['realtime1'] <> "" && 0) {
@@ -1839,7 +1839,7 @@ class hfsc_queue extends priq_queue {
function build_form() {
$form = parent::build_form();
$form .= "<tr>";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Bandwidth</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Bandwidth") . "</td>";
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\"";
$form .= htmlspecialchars($this->GetBandwidth());
$form .= "\">";
@@ -1847,35 +1847,35 @@ class hfsc_queue extends priq_queue {
$form .= "<option value=\"Gb\"";
if ($this->GetBwscale() == "Gb")
$form .= " selected=\"yes\"";
- $form .= ">Gbit/s</option>";
+ $form .= ">" . gettext("Gbit/s") . "</option>";
$form .= "<option value=\"Mb\"";
if ($this->GetBwscale() == "Mb")
$form .= " selected=\"yes\"";
- $form .= ">Mbit/s</option>";
+ $form .= ">" . gettext("Mbit/s") . "</option>";
$form .= "<option value=\"Kb\"";
if ($this->GetBwscale() == "Kb")
$form .= " selected=\"yes\"";
- $form .= ">Kbit/s</option>";
+ $form .= ">" . gettext("Kbit/s") . "</option>";
$form .= "<option value=\"\"";
if ($this->GetBwscale() == "b")
$form .= " selected=\"yes\"";
- $form .= ">Bit/s</option>";
+ $form .= ">" . gettext("Bit/s") . "</option>";
$form .= "<option value=\"%\"";
if ($this->GetBwscale() == "%")
$form .= " selected=\"yes\"";
$form .= ">%</option>";
$form .= "</select> <br>";
- $form .= "<span class=\"vexpl\">Choose the amount of bandwidth for this queue";
+ $form .= "<span class=\"vexpl\">" . gettext("Choose the amount of bandwidth for this queue");
$form .= "</span></td></tr>";
$form .= "<tr>";
- $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">Service Curve (sc)</td>";
+ $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">" . gettext("Service Curve (sc)") . "</td>";
$form .= "<td width=\"78%\" class=\"vtable\">";
$form .= "<table>";
$form .= "<tr><td>&nbsp;</td><td><center>m1</center></td><td><center>d</center></td><td><center><b>m2</b></center></td></tr>";
$form .= "<tr><td><input type=\"checkbox\" id=\"upperlimit\" name=\"upperlimit\"";
if($this->GetUpperlimit()<> "")
$form .= " CHECKED ";
- $form .= "onChange=\"enable_upperlimit()\"> Upperlimit:</td><td><input size=\"6\" value=\"";
+ $form .= "onChange=\"enable_upperlimit()\"> " . gettext("Upperlimit:") . "</td><td><input size=\"6\" value=\"";
$form .= htmlspecialchars($this->GetU_m1());
$form .= "\" id=\"upperlimit1\" name=\"upperlimit1\" ";
if ($this->GetUpperlimit() == "")
@@ -1890,11 +1890,11 @@ class hfsc_queue extends priq_queue {
$form .= "\" id=\"upperlimit3\" name=\"upperlimit3\" ";
if ($this->GetUpperlimit() == "")
$form .= " disabled";
- $form .= "></td><td>The maximum allowed bandwidth for the queue.</td></tr>";
+ $form .= "></td><td>" . gettext("The maximum allowed bandwidth for the queue.") . "</td></tr>";
$form .= "<tr><td><input type=\"checkbox\" id=\"realtime\" name=\"realtime\"";
if($this->GetRealtime() <> "")
$form .= " CHECKED ";
- $form .= "onChange=\"enable_realtime()\"> Real time:</td><td><input size=\"6\" value=\"";
+ $form .= "onChange=\"enable_realtime()\"> " . gettext("Real time:") . "</td><td><input size=\"6\" value=\"";
$form .= htmlspecialchars($this->GetR_m1());
$form .= "\" id=\"realtime1\" name=\"realtime1\" ";
if ($this->GetRealtime() == "")
@@ -1909,11 +1909,11 @@ class hfsc_queue extends priq_queue {
$form .= "\" id=\"realtime3\" name=\"realtime3\" ";
if ($this->GetRealtime() == "")
$form .= " disabled";
- $form .= "></td><td>The minimum required bandwidth for the queue.</td></tr>";
+ $form .= "></td><td>" . gettext("The minimum required bandwidth for the queue.") . "</td></tr>";
$form .= "<tr><td><input type=\"checkbox\" id=\"linkshare\" id=\"linkshare\" name=\"linkshare\"";
if($this->GetLinkshare() <> "")
$form .= " CHECKED ";
- $form .= "onChange=\"enable_linkshare()\"> Link share:</td><td><input size=\"6\" value=\"";
+ $form .= "onChange=\"enable_linkshare()\"> " . gettext("Link share:") . "</td><td><input size=\"6\" value=\"";
$form .= htmlspecialchars($this->GetL_m1());
$form .= "\" id=\"linkshare1\" name=\"linkshare1\" ";
if ($this->GetLinkshare() == "")
@@ -1928,12 +1928,12 @@ class hfsc_queue extends priq_queue {
$form .= "\" id=\"linkshare3\" name=\"linkshare3\" ";
if ($this->GetLinkshare() == "")
$form .= " disabled";
- $form .= "></td><td>The bandwidth share of a backlogged queue - this overrides priority.</td></tr>";
+ $form .= "></td><td>" . gettext("The bandwidth share of a backlogged queue - this overrides priority.") . "</td></tr>";
$form .= "</table><br>";
- $form .= "The format for service curve specifications is (m1, d, m2). m2 controls";
- $form .= "the bandwidth assigned to the queue. m1 and d are optional and can be";
- $form .= "used to control the initial bandwidth assignment. For the first d milliseconds the queue gets the bandwidth given as m1, afterwards the value";
- $form .= "given in m2.";
+ $form .= gettext("The format for service curve specifications is (m1, d, m2). m2 controls "
+ . "the bandwidth assigned to the queue. m1 and d are optional and can be "
+ . "used to control the initial bandwidth assignment. For the first d milliseconds the queue gets the bandwidth given as m1, afterwards the value "
+ . "given in m2.");
$form .= "</span></td>";
$form .= "</tr>";
@@ -2181,24 +2181,24 @@ class cbq_queue extends priq_queue {
parent::validate_input($data, $input_errors);
if ($data['priority'] > 7)
- $input_errors[] = "Priority must be an integer between 1 and 7.";
+ $input_errors[] = gettext("Priority must be an integer between 1 and 7.");
$reqdfields[] = "bandwidth";
- $reqdfieldsn[] = "Bandwidth";
+ $reqdfieldsn[] = gettext("Bandwidth");
$reqdfields[] = "bandwidthtype";
- $reqdfieldsn[] = "Bandwidthtype";
+ $reqdfieldsn[] = gettext("Bandwidthtype");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if ($data['bandwidth'] && !is_numeric($data['bandwidth']))
- $input_errors[] = "Bandwidth must be an integer.";
+ $input_errors[] = gettext("Bandwidth must be an integer.");
if ($data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth cannot be negative.";
+ $input_errors[] = gettext("Bandwidth cannot be negative.");
if ($data['bandwidthtype'] == "%") {
if ($data['bandwidth'] > 100 || $data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth in percentage should be between 1 and 100 bounds.";
+ $input_errors[] = gettext("Bandwidth in percentage should be between 1 and 100 bounds.");
}
/*
@@ -2317,7 +2317,7 @@ class cbq_queue extends priq_queue {
function build_form() {
$form = parent::build_form();
$form .= "<tr>";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Bandwidth</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Bandwidth") . "</td>";
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\"";
if ($this->GetBandwidth() > 0)
$form .= htmlspecialchars($this->GetBandwidth());
@@ -2326,31 +2326,31 @@ class cbq_queue extends priq_queue {
$form .= "<option value=\"Gb\"";
if ($this->GetBwscale() == "Gb")
$form .= " selected=\"yes\"";
- $form .= ">Gbit/s</option>";
+ $form .= ">" . gettext("Gbit/s") . "</option>";
$form .= "<option value=\"Mb\"";
if ($this->GetBwscale() == "Mb")
$form .= " selected=\"yes\"";
- $form .= ">Mbit/s</option>";
+ $form .= ">" . gettext("Mbit/s") . "</option>";
$form .= "<option value=\"Kb\"";
if ($this->GetBwscale() == "Kb")
$form .= " selected=\"yes\"";
- $form .= ">Kbit/s</option>";
+ $form .= ">" . gettext("Kbit/s") . "</option>";
$form .= "<option value=\"\"";
if ($this->GetBwscale() == "b")
$form .= " selected=\"yes\"";
- $form .= ">Bit/s</option>";
+ $form .= ">" . gettext("Bit/s") . "</option>";
$form .= "<option value=\"%\"";
if ($this->GetBwscale() == "%")
$form .= " selected=\"yes\"";
$form .= ">%</option>";
$form .= "</select> <br>";
- $form .= "<span class=\"vexpl\">Choose the amount of bandwidth for this queue";
+ $form .= "<span class=\"vexpl\">" . gettext("Choose the amount of bandwidth for this queue");
$form .= "</span></td></tr>";
- $form .= "<tr><td class=\"vncellreq\">Scheduler specific options</td>";
+ $form .= "<tr><td class=\"vncellreq\">" . gettext("Scheduler specific options") . "</td>";
$form .= "<td class=\"vtable\"><input type=\"checkbox\" id=\"borrow\" name=\"borrow\"";
if($this->GetBorrow() == "on")
$form .= " CHECKED ";
- $form .= "> Borrow from other queues when available<br></td></tr>";
+ $form .= "> " . gettext("Borrow from other queues when available") . "<br></td></tr>";
return $form;
}
@@ -2457,26 +2457,26 @@ class fairq_queue extends priq_queue {
parent::validate_input($data, $input_errors);
if ($data['priority'] > 255)
- $input_errors[] = "Priority must be an integer between 1 and 255.";
+ $input_errors[] = gettext("Priority must be an integer between 1 and 255.");
$reqdfields[] = "bandwidth";
- $reqdfieldsn[] = "Bandwidth";
+ $reqdfieldsn[] = gettext("Bandwidth");
$reqdfields[] = "bandwidthtype";
- $reqdfieldsn[] = "Bandwidthtype";
+ $reqdfieldsn[] = gettext("Bandwidthtype");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if ($data['bandwidth'] && !is_numeric($data['bandwidth']))
- $input_errors[] = "Bandwidth must be an integer.";
+ $input_errors[] = gettext("Bandwidth must be an integer.");
- if ($data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth cannot be negative.";
+ if ($data['bandwidth'] < 0)
+ $input_errors[] = gettext("Bandwidth cannot be negative.");
- if ($data['bandwidthtype'] == "%") {
- if ($data['bandwidth'] > 100 || $data['bandwidth'] < 0)
- $input_errors[] = "Bandwidth in percentage should be between 1 and 100 bounds.";
- }
+ if ($data['bandwidthtype'] == "%") {
+ if ($data['bandwidth'] > 100 || $data['bandwidth'] < 0)
+ $input_errors[] = gettext("Bandwidth in percentage should be between 1 and 100 bounds.");
+ }
/*
$parent =& $this->GetParent();
@@ -2585,7 +2585,7 @@ class fairq_queue extends priq_queue {
function build_form() {
$form = parent::build_form();
$form .= "<tr>";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Bandwidth</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Bandwidth") . "</td>";
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\"";
if ($this->GetBandwidth() > 0)
$form .= htmlspecialchars($this->GetBandwidth());
@@ -2594,38 +2594,38 @@ class fairq_queue extends priq_queue {
$form .= "<option value=\"Gb\"";
if ($this->GetBwscale() == "Gb")
$form .= " selected=\"yes\"";
- $form .= ">Gbit/s</option>";
+ $form .= ">" . gettext("Gbit/s") . "</option>";
$form .= "<option value=\"Mb\"";
if ($this->GetBwscale() == "Mb")
$form .= " selected=\"yes\"";
- $form .= ">Mbit/s</option>";
+ $form .= ">" . gettext("Mbit/s") . "</option>";
$form .= "<option value=\"Kb\"";
if ($this->GetBwscale() == "Kb")
$form .= " selected=\"yes\"";
- $form .= ">Kbit/s</option>";
+ $form .= ">" . gettext("Kbit/s") . "</option>";
$form .= "<option value=\"\"";
if ($this->GetBwscale() == "b")
$form .= " selected=\"yes\"";
- $form .= ">Bit/s</option>";
+ $form .= ">" . gettext("Bit/s") . "</option>";
$form .= "<option value=\"%\"";
if ($this->GetBwscale() == "%")
$form .= " selected=\"yes\"";
$form .= ">%</option>";
$form .= "</select> <br>";
- $form .= "<span class=\"vexpl\">Choose the amount of bandwidth for this queue";
+ $form .= "<span class=\"vexpl\">" . gettext("Choose the amount of bandwidth for this queue");
$form .= "</span></td></tr>";
- $form .= "<tr><td class=\"vncellreq\">Scheduler specific options</td>";
+ $form .= "<tr><td class=\"vncellreq\">" . gettext("Scheduler specific options") . "</td>";
$form .= "<td class=\"vtable\"><table><tr><td>";
$form .= "<input id=\"buckets\" name=\"buckets\" value=\"";
$tmpvalue = trim($this->GetBuckets());
if(!empty($tmpvalue))
$form .= $this->GetBuckets();
- $form .= "\"> Number of buckets available.<br></td></tr>";
+ $form .= "\"> " . gettext("Number of buckets available.") . "<br></td></tr>";
$form .= "<tr><td class=\"vtable\"><input id=\"hogs\" name=\"hogs\" value=\"";
$tmpvalue = trim($this->GetHogs());
if(!empty($tmpvalue))
$form .= $this->GetHogs();
- $form .= "\"> Bandwidth limit for hosts to not saturate link.<br></td></tr>";
+ $form .= "\"> " . gettext("Bandwidth limit for hosts to not saturate link.") . "<br></td></tr>";
$form .= "</table></td></tr>";
return $form;
}
@@ -2779,26 +2779,26 @@ class dummynet_class {
function validate_input($data, &$input_errors) {
$reqdfields[] = "bandwidth";
- $reqdfieldsn[] = "Bandwidth";
+ $reqdfieldsn[] = gettext("Bandwidth");
$reqdfields[] = "bandwidthtype";
- $reqdfieldsn[] = "Bandwidthtype";
+ $reqdfieldsn[] = gettext("Bandwidthtype");
$reqdfields[] = "newname";
- $reqdfieldsn[] = "Name";
+ $reqdfieldsn[] = gettext("Name");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if ($data['plr'] && ((!is_numeric($data['plr'])) ||
($data['plr'] <= 0 && $data['plr'] > 1)))
- $input_errors[] = "Plr must be an integer between 1 and 100.";
+ $input_errors[] = gettext("Plr must be an integer between 1 and 100.");
if (($data['buckets'] && (!is_numeric($data['buckets']))) ||
($data['buckets'] < 1 && $data['buckets'] > 100))
- $input_errors[] = "Buckets must be an integer between 16 and 65535.";
+ $input_errors[] = gettext("Buckets must be an integer between 16 and 65535.");
if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
- $input_errors[] = "Queue limit must be an integer";
+ $input_errors[] = gettext("Queue limit must be an integer");
if (!empty($data['newname']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['newname']))
- $input_errors[] = "Queue names must be alphanumeric and _ or - only.";
+ $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['name']))
- $input_errors[] = "Queue names must be alphanumeric and _ or - only.";
+ $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
}
}
@@ -2892,10 +2892,10 @@ class dnpipe_class extends dummynet_class {
parent::validate_input($data, $input_errors);
if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
- $input_errors[] = "Bandwidth must be an integer.";
+ $input_errors[] = gettext("Bandwidth must be an integer.");
if ($data['delay'] && (!is_numeric($data['delay'])))
- $input_errors[] = "Delay must be an integer.";
- }
+ $input_errors[] = gettext("Delay must be an integer.");
+ }
function ReadConfig(&$q) {
if (!empty($q['name']) && !empty($q['newname']) && $q['name'] != $q['newname']) {
@@ -3001,21 +3001,21 @@ class dnpipe_class extends dummynet_class {
function build_form() {
$form = "<tr><td valign=\"center\" class=\"vncellreq\"><br>";
- $form .= "Enable";
+ $form .= gettext("Enable");
$form .= "</td><td class=\"vncellreq\">";
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
if ($this->GetEnabled() == "on")
$form .= " CHECKED";
- $form .= " ><span class=\"vexpl\"> Enable limiter and its children</span>";
+ $form .= " ><span class=\"vexpl\"> " . gettext("Enable limiter and its children") . "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">" . gettext("Name") . "</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"newname\" name=\"newname\" value=\"";
$form .= $this->GetQname()."\">";
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\"";
$form .= $this->GetQname()."\">";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Bandwidth";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Bandwidth");
$form .= "</td><td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"bandwidth\" name=\"bandwidth\" value=\"";
$form .= $this->GetBandwidth() . "\">";
@@ -3023,22 +3023,22 @@ class dnpipe_class extends dummynet_class {
$form .= "<option value=\"Kb\"";
if ($this->GetBwscale() == "Kb")
$form .= " selected=\"yes\"";
- $form .= ">Kbit/s</option>";
+ $form .= ">" .gettext( "Kbit/s") . "</option>";
$form .= "<option value=\"Mb\"";
if ($this->GetBwscale() == "Mb")
$form .= " selected=\"yes\"";
- $form .= ">Mbit/s</option>";
+ $form .= ">" . gettext("Mbit/s") . "</option>";
$form .= "<option value=\"Gb\"";
if ($this->GetBwscale() == "Gb")
$form .= " selected=\"yes\"";
- $form .= ">Gbit/s</option>";
+ $form .= ">" . gettext("Gbit/s") . "</option>";
$form .= "<option value=\"\"";
if ($this->GetBwscale() == "b")
$form .= " selected=\"yes\"";
- $form .= ">Bit/s</option>";
+ $form .= ">" . gettext("Bit/s") . "</option>";
$form .= "</select>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Mask</td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Mask") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<select name=\"mask\" class=\"formselect\">";
$form .= "<option value=\"none\"";
@@ -3048,71 +3048,70 @@ class dnpipe_class extends dummynet_class {
$form .= "<option value=\"srcaddress\"";
if ($this->GetMask() == "srcaddress")
$form .= " selected=\"yes\"";
- $form .= ">Source addresses</option>";
+ $form .= ">" . gettext("Source addresses") . "</option>";
$form .= "<option value=\"dstaddress\"";
if ($this->GetMask() == "dstaddress")
$form .= " selected=\"yes\"";
- $form .= ">Destination addresses</option>";
+ $form .= ">" . gettext("Destination addresses") . "</option>";
$form .= "</select>";
$form .= "&nbsp;<br>";
- $form .= "<span class=\"vexpl\">If 'source' or 'destination' is chosen, \n";
- $form .= "a dynamic pipe with the bandwidth, delay, packet loss and queue size given above will \n";
- $form .= "be created for each source/destination IP address encountered, \n";
- $form .= "respectively. This makes it possible to easily specify bandwidth \n";
- $form .= "limits per host.</span>";
+ $form .= "<span class=\"vexpl\">" . gettext("If 'source' or 'destination' is chosen, \n"
+ . "a dynamic pipe with the bandwidth, delay, packet loss and queue size given above will \n"
+ . "be created for each source/destination IP address encountered, \n"
+ . "respectively. This makes it possible to easily specify bandwidth \n"
+ . "limits per host.") . "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Description</td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Description") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" class=\"formfld unknown\" size=\"50%\" id=\"description\" name=\"description\" value=\"";
$form .= $this->GetDescription();
$form .= "\">";
$form .= "<br> <span class=\"vexpl\">";
- $form .= "You may enter a description here ";
- $form .= "for your reference (not parsed).</span>";
+ $form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>";
$form .= "</td></tr>";
$form .= "<tr id=\"sprtable4\" name=\"sprtable4\">";
$form .= "<td></td>";
$form .= "<td><div id=\"showadvancedboxspr\">";
$form .= "<p><input type=\"button\" onClick=\"show_source_port_range()\"";
- $form .= " value=\"Show advanced options\"></input></a>";
+ $form .= " value=\"" . gettext("Show advanced options") . "\"></input></a>";
$form .= "</div></td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable\" name=\"sprtable\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Delay</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Delay") . "</td>";
$form .= "<td valign=\"center\" class=\"vncellreq\">";
$form .= "<input name=\"delay\" type=\"text\" id=\"delay\" size=\"5\" value=\"";
$form .= $this->GetDelay() . "\">";
- $form .= "&nbsp;ms<br> <span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should specify 0 here (or leave the field empty)</span>";
+ $form .= "&nbsp;ms<br> <span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should specify 0 here (or leave the field empty)") . "</span>";
$form .= "</td></tr><br/>";
$form .= "<tr style=\"display:none\" id=\"sprtable1\" name=\"sprtable1\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Packet loss rate</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Packet loss rate") . "</td>";
$form .= "<td valign=\"center\" class=\"vncellreq\">";
$form .= "<input name=\"plr\" type=\"text\" id=\"plr\" size=\"5\" value=\"";
$form .= $this->GetPlr() . "\">";
- $form .= "&nbsp;<br> <span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should specify 0 here (or leave the field empty).";
- $form .= "A value of 0.001 means one packet in 1000 gets dropped</span>";
+ $form .= "&nbsp;<br> <span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should specify 0 here (or leave the field empty). "
+ . "A value of 0.001 means one packet in 1000 gets dropped") . "</span>";
$form .= "</td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable2\" name=\"sprtable2\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Queue Size</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Queue Size") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"qlimit\" name=\"qlimit\" value=\"";
$form .= $this->GetQlimit() . "\">";
$form .= "&nbsp;slots<br>";
- $form .= "<span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first,";
- $form .= "then they are delayed by value specified in the Delay field, and then they ";
- $form .= "are delivered to their destination.</span>";
+ $form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first, "
+ . "then they are delayed by value specified in the Delay field, and then they "
+ . "are delivered to their destination.") . "</span>";
$form .= "</td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable5\" name=\"sprtable5\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Bucket Size</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Bucket Size") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"buckets\" name=\"buckets\" value=\"";
$form .= $this->GetBuckets() . "\">";
$form .= "&nbsp;slots<br>";
- $form .= "<span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should leave the field empty. It increases the hash size set.";
+ $form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should leave the field empty. It increases the hash size set.");
$form .= "</td></tr>";
return $form;
@@ -3169,7 +3168,7 @@ class dnqueue_class extends dummynet_class {
if ($data['weight'] && ((!is_numeric($data['weight'])) ||
($data['weight'] < 1 && $data['weight'] > 100)))
- $input_errors[] = "Weight must be an integer between 1 and 100.";
+ $input_errors[] = gettext("Weight must be an integer between 1 and 100.");
}
/*
@@ -3262,42 +3261,42 @@ class dnqueue_class extends dummynet_class {
function build_form() {
$form = "<tr><td valign=\"center\" class=\"vncellreq\"><br>";
- $form .= "Enable/Disable";
+ $form .= gettext("Enable/Disable");
$form .= "</td><td class=\"vncellreq\">";
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
if ($this->GetEnabled() == "on")
$form .= " CHECKED";
- $form .= " ><span class=\"vexpl\"> Enable/Disable queue</span>";
+ $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue") . "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">" . gettext("Name") . "</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"newname\" name=\"newname\" value=\"";
$form .= $this->GetQname()."\">";
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\"";
$form .= $this->GetQname()."\">";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Mask</td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Mask") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<select name=\"mask\" class=\"formselect\">";
$form .= "<option value=\"none\"";
if ($this->GetMask() == "none")
$form .= " selected=\"yes\"";
- $form .= ">none</option>";
+ $form .= ">" . gettext("none") . "</option>";
$form .= "<option value=\"srcaddress\"";
if ($this->GetMask() == "srcaddress")
$form .= " selected=\"yes\"";
- $form .= ">Source addresses</option>";
+ $form .= ">" . gettext("Source addresses") . "</option>";
$form .= "<option value=\"dstaddress\"";
if ($this->GetMask() == "dstaddress")
$form .= " selected=\"yes\"";
- $form .= ">Destination addresses</option>";
+ $form .= ">" . gettext("Destination addresses") . "</option>";
$form .= "</select>";
$form .= "&nbsp;slots<br>";
- $form .= "<span class=\"vexpl\">If 'source' or 'destination' is chosen, \n";
- $form .= "a dynamic pipe with the bandwidth, delay, packet loss and queue size given above will \n";
- $form .= "be created for each source/destination IP address encountered, \n";
- $form .= "respectively. This makes it possible to easily specify bandwidth \n";
- $form .= "limits per host.</span>";
+ $form .= "<span class=\"vexpl\">" . gettext("If 'source' or 'destination' is chosen, \n"
+ . "a dynamic pipe with the bandwidth, delay, packet loss and queue size given above will \n"
+ . "be created for each source/destination IP address encountered, \n"
+ . "respectively. This makes it possible to easily specify bandwidth \n"
+ . "limits per host.") . "</span>";
$form .= "</td></tr>";
$form .= "<tr><td valign=\"center\" class=\"vncellreq\">Description</td>";
$form .= "<td class=\"vncellreq\">";
@@ -3305,51 +3304,50 @@ class dnqueue_class extends dummynet_class {
$form .= $this->GetDescription();
$form .= "\">";
$form .= "<br> <span class=\"vexpl\">";
- $form .= "You may enter a description here ";
- $form .= "for your reference (not parsed).</span>";
+ $form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>";
$form .= "</td></tr>";
$form .= "<tr id=\"sprtable4\" name=\"sprtable4\">";
$form .= "<td></td>";
$form .= "<td><div id=\"showadvancedboxspr\">";
$form .= "<p><input type=\"button\" onClick=\"show_source_port_range()\"";
- $form .= " value=\"Show advanced options\"></input></a>";
+ $form .= " value=\"" . gettext("Show advanced options") . "\"></input></a>";
$form .= "</div></td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable\" name=\"sprtable\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Weight</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Weight") . "</td>";
$form .= "<td valign=\"center\" class=\"vncellreq\">";
$form .= "<input name=\"weight\" type=\"text\" id=\"weight\" size=\"5\" value=\"";
$form .= $this->GetWeight() . "\">";
- $form .= "&nbsp;ms<br> <span class=\"vexpl\">Hint: For queues under the same parent ";
- $form .= "this specifies the share that a queue gets(values range from 1 to 100, you can leave it blank otherwise)</span>";
+ $form .= "&nbsp;ms<br> <span class=\"vexpl\">" . gettext("Hint: For queues under the same parent "
+ . "this specifies the share that a queue gets(values range from 1 to 100, you can leave it blank otherwise)") . "</span>";
$form .= "</td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable1\" name=\"sprtable1\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Packet loss rate</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Packet loss rate") . "</td>";
$form .= "<td valign=\"center\" class=\"vncellreq\">";
$form .= "<input name=\"plr\" type=\"text\" id=\"plr\" size=\"5\" value=\"";
$form .= $this->GetPlr() . "\">";
- $form .= "&nbsp;<br> <span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should specify 0 here (or leave the field empty).";
- $form .= "A value of 0.001 means one packet in 1000 gets dropped</span>";
+ $form .= "&nbsp;<br> <span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should specify 0 here (or leave the field empty). "
+ . "A value of 0.001 means one packet in 1000 gets dropped") . "</span>";
$form .= "</td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable2\" name=\"sprtable2\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Queue Size</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Queue Size") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"qlimit\" name=\"qlimit\" value=\"";
$form .= $this->GetQlimit() . "\">";
$form .= "&nbsp;slots<br>";
- $form .= "<span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first, ";
- $form .= "then they are delayed by value specified in the Delay field, and then they ";
- $form .= "are delivered to their destination.</span>";
+ $form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first, "
+ . "then they are delayed by value specified in the Delay field, and then they "
+ . "are delivered to their destination.") . "</span>";
$form .= "</td></tr>";
$form .= "<tr style=\"display:none\" id=\"sprtable5\" name=\"sprtable5\">";
- $form .= "<td valign=\"center\" class=\"vncellreq\">Bucket Size</td>";
+ $form .= "<td valign=\"center\" class=\"vncellreq\">" . gettext("Bucket Size") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"buckets\" name=\"buckets\" value=\"";
$form .= $this->GetBuckets() . "\">";
- $form .= "&nbsp;slots<br>";
- $form .= "<span class=\"vexpl\">Hint: in most cases, you ";
- $form .= "should leave the field empty. It increases the hash size set.";
+ $form .= "&nbsp;" . gettext("slots") . "<br>";
+ $form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you "
+ . "should leave the field empty. It increases the hash size set.");
$form .= "</td></tr>";
$form .= "<input type=\"hidden\" id=\"pipe\" name=\"pipe\"";
@@ -3482,27 +3480,26 @@ class layer7 {
function build_form() {
$form = "<tr><td valign=\"center\" class=\"vncellreq\"><br>";
- $form .= "Enable/Disable";
+ $form .= gettext("Enable/Disable");
$form .= "</td><td class=\"vncellreq\">";
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\" ";
if ($this->GetREnabled() == "on") {
$form .= "checked = \"CHECKED\"";
}
- $form .= " ><span class=\"vexpl\"> Enable/Disable layer7 Container</span>";
+ $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable layer7 Container") . "</span>";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">" . gettext("Name") . "</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"container\" name=\"container\" value=\"";
$form .= $this->GetRName()."\">";
$form .= "</td></tr>";
- $form .= "<tr><td valign=\"center\" class=\"vncellreq\">Description</td>";
+ $form .= "<tr><td valign=\"center\" class=\"vncellreq\">" . gettext("Description") . "</td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" class=\"formfld unknown\" size=\"50%\" id=\"description\" name=\"description\" value=\"";
$form .= $this->GetRDescription();
$form .= "\">";
$form .= "<br> <span class=\"vexpl\">";
- $form .= "You may enter a description here ";
- $form .= "for your reference (not parsed).</span>";
+ $form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>";
$form .= "</td></tr>";
return $form;
@@ -3563,12 +3560,12 @@ class layer7 {
function validate_input($data, &$input_errors) {
$reqdfields[] = "container";
- $reqdfieldsn[] = "Name";
+ $reqdfieldsn[] = gettext("Name");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['container']))
- $input_errors[] = "Queue names must be alphanumeric and _ or - only.";
+ $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
}
function delete_l7c() {
@@ -3739,7 +3736,7 @@ function layer7_start_l7daemon() {
/* Only reread the configuration rather than restart to avoid loosing information. */
exec("/bin/pgrep -f 'ipfw-classifyd .* -p ". $l7rules->GetRPort() . "'", $l7pid);
if (count($l7pid) > 0) {
- log_error("Sending HUP signal to {$l7pid[0]}");
+ log_error(sprintf(gettext("Sending HUP signal to %s"), $l7pid[0]));
mwexec("/bin/kill -HUP {$l7pid[0]}");
} else {
// XXX: Hardcoded number of packets to garbage collect and queue length..
@@ -4059,7 +4056,7 @@ function build_iface_without_this_queue($iface, $qname) {
$form .= "<img src=\"";
$form .= "./themes/".$g['theme']."/images/icons/icon_plus.gif\"";
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Clone shaper/queue on this interface\">";
- $form .= " Clone shaper/queue on this interface</a></td></tr>";
+ $form .= gettext(" Clone shaper/queue on this interface") . "</a></td></tr>";
return $form;
@@ -4067,16 +4064,16 @@ function build_iface_without_this_queue($iface, $qname) {
$default_shaper_msg = "<tr><td align=\"center\" width=\"80%\" >";
-$default_shaper_msg .= "<span class=\"vexpl\"><strong><p><b>Welcome to the {$g['product_name']} Traffic Shaper.</b><br />";
-$default_shaper_msg .= "The tree on the left helps you navigate through the queues <br />";
-$default_shaper_msg .= "buttons at the bottom represent queue actions and are activated accordingly.";
+$default_shaper_msg .= "<span class=\"vexpl\"><strong><p><b>" . sprintf(gettext("Welcome to the %s Traffic Shaper."), $g['product_name']) . "</b><br />";
+$default_shaper_msg .= gettext("The tree on the left helps you navigate through the queues <br />"
+ . "buttons at the bottom represent queue actions and are activated accordingly.");
$default_shaper_msg .= " </p></strong></span>";
$default_shaper_msg .= "</td></tr>";
$dn_default_shaper_msg = "<tr><td align=\"center\" width=\"80%\" >";
-$dn_default_shaper_msg .= "<span class=\"vexpl\"><strong><p><b>Welcome to the {$g['product_name']} Traffic Shaper.</b><br />";
-$dn_default_shaper_msg .= "The tree on the left helps you navigate through the queues <br />";
-$dn_default_shaper_msg .= "buttons at the bottom represent queue actions and are activated accordingly.";
+$dn_default_shaper_msg .= "<span class=\"vexpl\"><strong><p><b>" . sprintf(gettext("Welcome to the %s Traffic Shaper."), $g['product_name']) . "</b><br />";
+$dn_default_shaper_msg .= gettext("The tree on the left helps you navigate through the queues <br />"
+ . "buttons at the bottom represent queue actions and are activated accordingly.");
$dn_default_shaper_msg .= " </p></strong></span>";
$dn_default_shaper_msg .= "</td></tr>";
diff --git a/etc/inc/smtp.inc b/etc/inc/smtp.inc
index 4f39682..1f371f6 100644
--- a/etc/inc/smtp.inc
+++ b/etc/inc/smtp.inc
@@ -89,10 +89,10 @@ class smtp_class
{
$status=socket_get_status($this->connection);
if($status["timed_out"])
- $this->error.=": data access time out";
+ $this->error.=gettext(": data access time out");
elseif($status["eof"])
{
- $this->error.=": the server disconnected";
+ $this->error.=gettext(": the server disconnected");
$this->disconnected_error=1;
}
}
@@ -104,13 +104,13 @@ class smtp_class
{
if(feof($this->connection))
{
- $this->error="reached the end of data while reading from the SMTP server conection";
+ $this->error=gettext("reached the end of data while reading from the SMTP server conection");
return("");
}
if(GetType($data=@fgets($this->connection,100))!="string"
|| strlen($data)==0)
{
- $this->SetDataAccessError("it was not possible to read line from the SMTP server");
+ $this->SetDataAccessError(gettext("it was not possible to read line from the SMTP server"));
return("");
}
$line.=$data;
@@ -132,7 +132,7 @@ class smtp_class
$this->OutputDebug("C $line");
if(!@fputs($this->connection,"$line\r\n"))
{
- $this->SetDataAccessError("it was not possible to send a line to the SMTP server");
+ $this->SetDataAccessError(gettext("it was not possible to send a line to the SMTP server"));
return(0);
}
return(1);
@@ -146,7 +146,7 @@ class smtp_class
$this->OutputDebug("C $data");
if(!@fputs($this->connection,$data))
{
- $this->SetDataAccessError("it was not possible to send data to the SMTP server");
+ $this->SetDataAccessError(gettext("it was not possible to send data to the SMTP server"));
return(0);
}
}
@@ -218,10 +218,10 @@ class smtp_class
$version=explode(".",function_exists("phpversion") ? phpversion() : "3.0.7");
$php_version=intval($version[0])*1000000+intval($version[1])*1000+intval($version[2]);
if($php_version<4003000)
- return("establishing SSL connections requires at least PHP version 4.3.0");
+ return(gettext("establishing SSL connections requires at least PHP version 4.3.0"));
if(!function_exists("extension_loaded")
|| !extension_loaded("openssl"))
- return("establishing SSL connections requires the OpenSSL extension enabled");
+ return(gettext("establishing SSL connections requires the OpenSSL extension enabled"));
}
if(ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$',$domain))
$ip=$domain;
@@ -230,30 +230,30 @@ class smtp_class
if($this->debug)
$this->OutputDebug($resolve_message);
if(!strcmp($ip=@gethostbyname($domain),$domain))
- return("could not resolve host \"".$domain."\"");
+ return(sprintf(gettext("could not resolve host \"%s\""), $domain));
}
if(strlen($this->exclude_address)
&& !strcmp(@gethostbyname($this->exclude_address),$ip))
- return("domain \"".$domain."\" resolved to an address excluded to be valid");
+ return(sprintf(gettext("domain \"%s\" resolved to an address excluded to be valid"), $domain));
if($this->debug)
- $this->OutputDebug("Connecting to host address \"".$ip."\" port ".$port."...");
+ $this->OutputDebug(sprintf(gettext('Connecting to host address "%1$s" port %2$s...'), $ip, $port));
if(($this->connection=($this->timeout ? @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port,$errno,$error,$this->timeout) : @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port))))
return("");
$error=($this->timeout ? strval($error) : "??");
switch($error)
{
case "-3":
- return("-3 socket could not be created");
+ return(gettext("-3 socket could not be created"));
case "-4":
- return("-4 dns lookup on hostname \"".$domain."\" failed");
+ return(sprintf(gettext("-4 dns lookup on hostname \"%s\" failed"), $domain));
case "-5":
- return("-5 connection refused or timed out");
+ return(gettext("-5 connection refused or timed out"));
case "-6":
- return("-6 fdopen() call failed");
+ return(gettext("-6 fdopen() call failed"));
case "-7":
- return("-7 setvbuf() call failed");
+ return(gettext("-7 setvbuf() call failed"));
}
- return("could not connect to the host \"".$domain."\": ".$error);
+ return(sprintf(gettext('could not connect to the host "%1$s": %2$s'), $domain, $error));
}
Function SASLAuthenticate($mechanisms, $credentials, &$authenticated, &$mechanism)
@@ -262,7 +262,7 @@ class smtp_class
if(!function_exists("class_exists")
|| !class_exists("sasl_client_class"))
{
- $this->error="it is not possible to authenticate using the specified mechanism because the SASL library class is not loaded";
+ $this->error=gettext("it is not possible to authenticate using the specified mechanism because the SASL library class is not loaded");
return(0);
}
$sasl=new sasl_client_class;
@@ -286,19 +286,19 @@ class smtp_class
case SASL_NOMECH:
if(strlen($this->authentication_mechanism))
{
- $this->error="authenticated mechanism ".$this->authentication_mechanism." may not be used: ".$sasl->error;
+ $this->error=printf(gettext('authenticated mechanism %1$s may not be used: %2$s'), $this->authentication_mechanism, $sasl->error);
return(0);
}
break;
default:
- $this->error="Could not start the SASL authentication client: ".$sasl->error;
+ $this->error=gettext("Could not start the SASL authentication client:") . " ".$sasl->error;
return(0);
}
if(strlen($mechanism=$sasl->mechanism))
{
if($this->PutLine("AUTH ".$sasl->mechanism.(IsSet($message) ? " ".base64_encode($message) : ""))==0)
{
- $this->error="Could not send the AUTH command";
+ $this->error=gettext("Could not send the AUTH command");
return(0);
}
if(!$this->VerifyResultLines(array("235","334"),$responses))
@@ -313,7 +313,7 @@ class smtp_class
$response=base64_decode($responses[0]);
break;
default:
- $this->error="Authentication error: ".$responses[0];
+ $this->error=gettext("Authentication error:") . " ".$responses[0];
return(0);
}
for(;!$authenticated;)
@@ -328,7 +328,7 @@ class smtp_class
case SASL_CONTINUE:
if($this->PutLine(base64_encode($message))==0)
{
- $this->error="Could not send the authentication step message";
+ $this->error=gettext("Could not send the authentication step message");
return(0);
}
if(!$this->VerifyResultLines(array("235","334"),$responses))
@@ -343,12 +343,12 @@ class smtp_class
$response=base64_decode($responses[0]);
break;
default:
- $this->error="Authentication error: ".$responses[0];
+ $this->error=gettext("Authentication error:") . " ".$responses[0];
return(0);
}
break;
default:
- $this->error="Could not process the SASL authentication step: ".$sasl->error;
+ $this->error=gettext("Could not process the SASL authentication step:") . " ".$sasl->error;
return(0);
}
}
@@ -362,7 +362,7 @@ class smtp_class
{
if(strcmp($this->state,"Disconnected"))
{
- $this->error="connection is already established";
+ $this->error=gettext("connection is already established");
return(0);
}
$this->disconnected_error=0;
@@ -400,24 +400,24 @@ class smtp_class
$user=$this->user;
if(strlen($user)==0)
{
- $this->error="it was not specified the POP3 authentication user";
+ $this->error=gettext("it was not specified the POP3 authentication user");
return(0);
}
$password=$this->password;
if(strlen($password)==0)
{
- $this->error="it was not specified the POP3 authentication password";
+ $this->error=gettext("it was not specified the POP3 authentication password");
return(0);
}
$domain=$this->pop3_auth_host;
- $this->error=$this->ConnectToHost($domain, $this->pop3_auth_port, "Resolving POP3 authentication host \"".$domain."\"...");
+ $this->error=$this->ConnectToHost($domain, $this->pop3_auth_port, sprintf(gettext("Resolving POP3 authentication host \"%s\"..."), $domain));
if(strlen($this->error))
return(0);
if(strlen($response=$this->GetLine())==0)
return(0);
if(strcmp($this->Tokenize($response," "),"+OK"))
{
- $this->error="POP3 authentication server greeting was not found";
+ $this->error=gettext("POP3 authentication server greeting was not found");
return(0);
}
if(!$this->PutLine("USER ".$this->user)
@@ -425,7 +425,7 @@ class smtp_class
return(0);
if(strcmp($this->Tokenize($response," "),"+OK"))
{
- $this->error="POP3 authentication user was not accepted: ".$this->Tokenize("\r\n");
+ $this->error=gettext("POP3 authentication user was not accepted:") . " ".$this->Tokenize("\r\n");
return(0);
}
if(!$this->PutLine("PASS ".$password)
@@ -433,7 +433,7 @@ class smtp_class
return(0);
if(strcmp($this->Tokenize($response," "),"+OK"))
{
- $this->error="POP3 authentication password was not accepted: ".$this->Tokenize("\r\n");
+ $this->error=gettext("POP3 authentication password was not accepted:") . " ".$this->Tokenize("\r\n");
return(0);
}
fclose($this->connection);
@@ -442,13 +442,13 @@ class smtp_class
}
if(count($hosts)==0)
{
- $this->error="could not determine the SMTP to connect";
+ $this->error=gettext("could not determine the SMTP to connect");
return(0);
}
for($host=0, $error="not connected";strlen($error) && $host<count($hosts);$host++)
{
$domain=$hosts[$host];
- $error=$this->ConnectToHost($domain, $this->host_port, "Resolving SMTP server domain \"$domain\"...");
+ $error=$this->ConnectToHost($domain, $this->host_port, sprintf(gettext("Resolving SMTP server domain \"%s\"..."), $domain));
}
if(strlen($error))
{
@@ -460,7 +460,7 @@ class smtp_class
&& function_exists("socket_set_timeout"))
socket_set_timeout($this->connection,$timeout,0);
if($this->debug)
- $this->OutputDebug("Connected to SMTP server \"".$domain."\".");
+ $this->OutputDebug(sprintf(gettext("Connected to SMTP server \"%s\"."), $domain));
if(!strcmp($localhost=$this->localhost,"")
&& !strcmp($localhost=getenv("SERVER_NAME"),"")
&& !strcmp($localhost=getenv("HOST"),""))
@@ -514,7 +514,7 @@ class smtp_class
{
if(!IsSet($this->esmtp_extensions["AUTH"]))
{
- $this->error="server does not require authentication";
+ $this->error=gettext("server does not require authentication");
$success=0;
}
else
@@ -578,7 +578,7 @@ class smtp_class
if($success
&& strlen($mechanism)==0)
{
- $this->error="it is not supported any of the authentication mechanisms required by the server";
+ $this->error=gettext("it is not supported any of the authentication mechanisms required by the server");
$success=0;
}
}
@@ -610,7 +610,7 @@ class smtp_class
$sender=$this->direct_sender;
break;
default:
- $this->error="direct delivery connection is already established and sender is already set";
+ $this->error=gettext("direct delivery connection is already established and sender is already set");
return(0);
}
}
@@ -618,7 +618,7 @@ class smtp_class
{
if(strcmp($this->state,"Connected"))
{
- $this->error="connection is not in the initial state";
+ $this->error=gettext("connection is not in the initial state");
return(0);
}
}
@@ -640,7 +640,7 @@ class smtp_class
if($this->direct_delivery)
{
if(GetType($at=strrpos($recipient,"@"))!="integer")
- return("it was not specified a valid direct recipient");
+ return(gettext("it was not specified a valid direct recipient"));
$domain=substr($recipient,$at+1);
switch($this->state)
{
@@ -659,12 +659,12 @@ class smtp_class
case "RecipientSet":
if(strcmp($this->connected_domain,$domain))
{
- $this->error="it is not possible to deliver directly to recipients of different domains";
+ $this->error=gettext("it is not possible to deliver directly to recipients of different domains");
return(0);
}
break;
default:
- $this->error="connection is already established and the recipient is already set";
+ $this->error=gettext("connection is already established and the recipient is already set");
return(0);
}
}
@@ -676,7 +676,7 @@ class smtp_class
case "RecipientSet":
break;
default:
- $this->error="connection is not in the recipient setting state";
+ $this->error=gettext("connection is not in the recipient setting state");
return(0);
}
}
@@ -705,7 +705,7 @@ class smtp_class
{
if(strcmp($this->state,"RecipientSet"))
{
- $this->error="connection is not in the start sending data state";
+ $this->error=gettext("connection is not in the start sending data state");
return(0);
}
$this->error="";
@@ -735,7 +735,7 @@ class smtp_class
{
if(strcmp($this->state,"SendingData"))
{
- $this->error="connection is not in the sending data state";
+ $this->error=gettext("connection is not in the sending data state");
return(0);
}
$this->error="";
@@ -746,7 +746,7 @@ class smtp_class
{
if(strcmp($this->state,"SendingData"))
{
- $this->error="connection is not in the sending data state";
+ $this->error=gettext("connection is not in the sending data state");
return(0);
}
$this->error="";
@@ -782,7 +782,7 @@ class smtp_class
{
if(!strcmp($this->state,"Disconnected"))
{
- $this->error="it was not previously established a SMTP connection";
+ $this->error=gettext("it was not previously established a SMTP connection");
return(0);
}
$this->error="";
@@ -840,4 +840,4 @@ class smtp_class
};
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 2c644d8..c80b0da 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -228,6 +228,8 @@ function system_hosts_generate() {
$hostscfg = $dnsmasqcfg['hosts'];
$hosts = "127.0.0.1 localhost localhost.{$syscfg['domain']}\n";
+ $lhosts = "";
+ $dhosts = "";
if ($config['interfaces']['lan']) {
$cfgip = get_interface_ip("lan");
@@ -248,18 +250,23 @@ function system_hosts_generate() {
foreach ($hostscfg as $host) {
if ($host['host'])
- $hosts .= "{$host['ip']} {$host['host']}.{$host['domain']} {$host['host']}\n";
+ $lhosts .= "{$host['ip']} {$host['host']}.{$host['domain']} {$host['host']}\n";
else
- $hosts .= "{$host['ip']} {$host['domain']}\n";
+ $lhosts .= "{$host['ip']} {$host['domain']}\n";
}
if (isset($dnsmasqcfg['regdhcpstatic']) && is_array($config['dhcpd'])) {
foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf)
if(is_array($dhcpifconf['staticmap']) && isset($dhcpifconf['enable']))
foreach ($dhcpifconf['staticmap'] as $host)
if ($host['ipaddr'] && $host['hostname'])
- $hosts .= "{$host['ipaddr']} {$host['hostname']}.{$syscfg['domain']} {$host['hostname']}\n";
+ $dhosts .= "{$host['ipaddr']} {$host['hostname']}.{$syscfg['domain']} {$host['hostname']}\n";
}
+ if (isset($dnsmasqcfg['dhcpfirst']))
+ $hosts .= $dhosts . $lhosts;
+ else
+ $hosts .= $lhosts . $dhosts;
+
/*
* Do not remove this because dhcpleases monitors with kqueue it needs to be
* killed before writing to hosts files.
@@ -447,7 +454,7 @@ function system_routing_configure($interface = "") {
foreach ($config['staticroutes']['route'] as $rtent) {
$gatewayip = "";
if (empty($gateways_arr[$rtent['gateway']])) {
- log_error("Static Routes: Gateway IP could not be found for {$rtent['network']}");
+ log_error(sprintf(gettext("Static Routes: Gateway IP could not be found for %s"), $rtent['network']));
continue;
}
$gateway = $gateways_arr[$rtent['gateway']];
@@ -500,7 +507,7 @@ function system_syslogd_start() {
$syslogcfg = $config['syslog'];
if ($g['booting'])
- echo "Starting syslog...";
+ echo gettext("Starting syslog...");
else
killbypid("{$g['varrun_path']}/syslog.pid");
@@ -539,7 +546,7 @@ function system_syslogd_start() {
/* write syslog.conf */
$fd = fopen("{$g['varetc_path']}/syslog.conf", "w");
if (!$fd) {
- printf("Error: cannot open syslog.conf in system_syslogd_start().\n");
+ printf(gettext("Error: cannot open syslog.conf in system_syslogd_start().%s"), "\n");
return 1;
}
$syslogconf .= "!ntpdate,!ntpd\n";
@@ -709,7 +716,7 @@ EOD;
}
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
return $retval;
}
@@ -722,7 +729,7 @@ function system_pccard_start() {
}
if ($g['booting'])
- echo "Initializing PCMCIA...";
+ echo gettext("Initializing PCMCIA...");
/* kill any running pccardd */
killbypid("{$g['varrun_path']}/pccardd.pid");
@@ -732,9 +739,9 @@ function system_pccard_start() {
if ($g['booting']) {
if ($res == 0)
- echo "done.\n";
+ echo gettext("done.") . "\n";
else
- echo "failed!\n";
+ echo gettext("failed!") . "\n";
}
return $res;
@@ -745,7 +752,7 @@ function system_webgui_start() {
global $config, $g;
if ($g['booting'])
- echo "Starting webConfigurator...";
+ echo gettext("Starting webConfigurator...");
/* kill any running lighttpd */
killbypid("{$g['varrun_path']}/lighty-webConfigurator.pid");
@@ -777,7 +784,7 @@ function system_webgui_start() {
log_error("Creating SSL Certificate for this host");
$cert = array();
$cert['refid'] = uniqid();
- $cert['descr'] = "webConfigurator default";
+ $cert['descr'] = gettext("webConfigurator default");
mwexec("/usr/bin/openssl genrsa 1024 > {$g['tmp_path']}/ssl.key");
mwexec("/usr/bin/openssl req -new -x509 -nodes -sha1 -days 2000 -key {$g['tmp_path']}/ssl.key > {$g['tmp_path']}/ssl.crt");
$crt = file_get_contents("{$g['tmp_path']}/ssl.crt");
@@ -787,7 +794,7 @@ function system_webgui_start() {
cert_import($cert, $crt, $key);
$a_cert[] = $cert;
$config['system']['webgui']['ssl-certref'] = $cert['refid'];
- write_config("Importing HTTPS certificate");
+ write_config(gettext("Importing HTTPS certificate"));
if(!$config['system']['webgui']['port'])
$portarg = "443";
$ca = ca_chain($cert);
@@ -817,9 +824,9 @@ function system_webgui_start() {
if ($g['booting']) {
if ($res == 0)
- echo "done.\n";
+ echo gettext("done.") . "\n";
else
- echo "failed!\n";
+ echo gettext("failed!") . "\n";
}
return $res;
@@ -1169,7 +1176,7 @@ EOD;
if($cert <> "" and $key <> "") {
$fd = fopen("{$g['varetc_path']}/{$cert_location}", "w");
if (!$fd) {
- printf("Error: cannot open cert.pem in system_webgui_start().\n");
+ printf(gettext("Error: cannot open cert.pem in system_webgui_start().%s"), "\n");
return 1;
}
chmod("{$g['varetc_path']}/{$cert_location}", 0600);
@@ -1180,7 +1187,7 @@ EOD;
if(!(empty($ca) || (strlen(trim($ca)) == 0))) {
$fd = fopen("{$g['varetc_path']}/{$ca_location}", "w");
if (!$fd) {
- printf("Error: cannot open ca.pem in system_webgui_start().\n");
+ printf(gettext("Error: cannot open ca.pem in system_webgui_start().%s"), "\n");
return 1;
}
chmod("{$g['varetc_path']}/{$ca_location}", 0600);
@@ -1188,7 +1195,7 @@ EOD;
fclose($fd);
}
$lighty_config .= "\n";
- $lighty_config .= "## ssl configuration\n";
+ $lighty_config .= "## " . gettext("ssl configuration") . "\n";
$lighty_config .= "ssl.engine = \"enable\"\n";
$lighty_config .= "ssl.pemfile = \"{$g['varetc_path']}/{$cert_location}\"\n\n";
@@ -1215,7 +1222,7 @@ EOD;
$fd = fopen("{$filename}", "w");
if (!$fd) {
- printf("Error: cannot open {$filename} in system_generate_lighty_config().\n");
+ printf(gettext("Error: cannot open %s in system_generate_lighty_config().%s"), $filename, "\n");
return 1;
}
fwrite($fd, $lighty_config);
@@ -1235,7 +1242,7 @@ function system_timezone_configure() {
$syscfg = $config['system'];
if ($g['booting'])
- echo "Setting timezone...";
+ echo gettext("Setting timezone...");
/* extract appropriate timezone file */
$timezone = $syscfg['timezone'];
@@ -1251,7 +1258,7 @@ function system_timezone_configure() {
conf_mount_ro();
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
function system_ntp_configure() {
@@ -1321,7 +1328,7 @@ function sync_system_time() {
global $config, $g;
if ($g['booting'])
- echo "Syncing system time before startup...";
+ echo gettext("Syncing system time before startup...");
/* foreach through servers and write out to ntpd.conf */
foreach (explode(' ', $config['system']['timeservers']) as $ts) {
@@ -1329,7 +1336,7 @@ function sync_system_time() {
}
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
@@ -1427,7 +1434,7 @@ function system_dmesg_save() {
$fd = fopen("{$g['varlog_path']}/dmesg.boot", "w");
if (!$fd) {
- printf("Error: cannot open dmesg.boot in system_dmesg_save().\n");
+ printf(gettext("Error: cannot open dmesg.boot in system_dmesg_save().%s"), "\n");
return 1;
}
@@ -1448,7 +1455,7 @@ function system_set_harddisk_standby() {
if (isset($config['system']['harddiskstandby'])) {
if ($g['booting']) {
- echo 'Setting hard disk standby... ';
+ echo gettext('Setting hard disk standby... ');
}
$standby = $config['system']['harddiskstandby'];
@@ -1460,13 +1467,13 @@ function system_set_harddisk_standby() {
// Reinitialize ATA-drives
mwexec('/usr/local/sbin/atareinit');
if ($g['booting']) {
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
} else if ($g['booting']) {
- echo "failed!\n";
+ echo gettext("failed!") . "\n";
}
} else if ($g['booting']) {
- echo "failed!\n";
+ echo gettext("failed!") . "\n";
}
}
}
@@ -1565,10 +1572,10 @@ function system_identify_specific_platform() {
global $g;
if ($g['platform'] == 'generic-pc')
- return array('name' => 'generic-pc', 'descr' => "Generic PC");
+ return array('name' => 'generic-pc', 'descr' => gettext("Generic PC"));
if ($g['platform'] == 'generic-pc-cdrom')
- return array('name' => 'generic-pc-cdrom', 'descr' => "Generic PC (CD-ROM)");
+ return array('name' => 'generic-pc-cdrom', 'descr' => gettext("Generic PC (CD-ROM)"));
/* the rest of the code only deals with 'embedded' platforms */
if ($g['platform'] != 'nanobsd')
@@ -1577,10 +1584,10 @@ function system_identify_specific_platform() {
$dmesg = system_get_dmesg_boot();
if (strpos($dmesg, "PC Engines WRAP") !== false)
- return array('name' => 'wrap', 'descr' => 'PC Engines WRAP');
+ return array('name' => 'wrap', 'descr' => gettext('PC Engines WRAP'));
if (strpos($dmesg, "PC Engines ALIX") !== false)
- return array('name' => 'alix', 'descr' => 'PC Engines ALIX');
+ return array('name' => 'alix', 'descr' => gettext('PC Engines ALIX'));
if (preg_match("/Soekris net45../", $dmesg, $matches))
return array('name' => 'net45xx', 'descr' => $matches[0]);
@@ -1592,7 +1599,7 @@ function system_identify_specific_platform() {
return array('name' => 'net55xx', 'descr' => $matches[0]);
/* unknown embedded platform */
- return array('name' => 'embedded', 'descr' => 'embedded (unknown)');
+ return array('name' => 'embedded', 'descr' => gettext('embedded (unknown)'));
}
function system_get_dmesg_boot() {
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index f8e3439..1abc8c5 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -110,8 +110,8 @@ function upgrade_010_to_011() {
$fr['interface'] = $ifmap[$fr['interface']];
else {
/* remove the rule */
- echo "\nWarning: filter rule removed " .
- "(interface '{$fr['interface']}' does not exist anymore).";
+ printf(gettext("%sWarning: filter rule removed " .
+ "(interface '%s' does not exist anymore)."), "\n", $fr['interface']);
unset($config['filter']['rule'][$i]);
continue;
}
@@ -122,8 +122,8 @@ function upgrade_010_to_011() {
$fr['source']['network'] = $ifmap[$fr['source']['network']];
else {
/* remove the rule */
- echo "\nWarning: filter rule removed " .
- "(source network '{$fr['source']['network']}' does not exist anymore).";
+ printf(gettext("%sWarning: filter rule removed " .
+ "(source network '%s' does not exist anymore)."), "\n", $fr['source']['network']);
unset($config['filter']['rule'][$i]);
continue;
}
@@ -135,8 +135,8 @@ function upgrade_010_to_011() {
$fr['destination']['network'] = $ifmap[$fr['destination']['network']];
else {
/* remove the rule */
- echo "\nWarning: filter rule removed " .
- "(destination network '{$fr['destination']['network']}' does not exist anymore).";
+ printf(gettext("%sWarning: filter rule removed " .
+ "(destination network '%s' does not exist anymore)."), "\n", $fr['destination']['network']);
unset($config['filter']['rule'][$i]);
continue;
}
@@ -155,8 +155,8 @@ function upgrade_010_to_011() {
$fr['interface'] = $ifmap[$fr['interface']];
else {
/* remove the rule */
- echo "\nWarning: traffic shaper rule removed " .
- "(interface '{$fr['interface']}' does not exist anymore).";
+ printf(gettext("%sWarning: traffic shaper rule removed " .
+ "(interface '%s' does not exist anymore)."), "\n", $fr['interface']);
unset($config['pfqueueing']['rule'][$i]);
continue;
}
@@ -167,8 +167,8 @@ function upgrade_010_to_011() {
$fr['source']['network'] = $ifmap[$fr['source']['network']];
else {
/* remove the rule */
- echo "\nWarning: traffic shaper rule removed " .
- "(source network '{$fr['source']['network']}' does not exist anymore).";
+ printf(gettext("%sWarning: traffic shaper rule removed " .
+ "(source network '%s' does not exist anymore)."), "\n", $fr['source']['network']);
unset($config['pfqueueing']['rule'][$i]);
continue;
}
@@ -180,8 +180,8 @@ function upgrade_010_to_011() {
$fr['destination']['network'] = $ifmap[$fr['destination']['network']];
else {
/* remove the rule */
- echo "\nWarning: traffic shaper rule removed " .
- "(destination network '{$fr['destination']['network']}' does not exist anymore).";
+ printf(gettext("%sWarning: traffic shaper rule removed " .
+ "(destination network '%s' does not exist anymore)."), "\n", $fr['destination']['network']);
unset($config['pfqueueing']['rule'][$i]);
continue;
}
@@ -330,7 +330,7 @@ function upgrade_017_to_018() {
$vip = array();
$vip['mode'] = "carp";
$vip['interface'] = "AUTO";
- $vip['descr'] = "CARP vhid {$carpent['vhid']}";
+ $vip['descr'] = sprintf(gettext("CARP vhid %s"), $carpent['vhid']);
$vip['type'] = "single";
$vip['vhid'] = $carpent['vhid'];
$vip['advskew'] = $carpent['advskew'];
@@ -507,7 +507,7 @@ function upgrade_028_to_029() {
$rule_item['type'] = "pass";
$rule_item['source']['any'] = true;
$rule_item['destination']['any'] = true;
- $rule_item['descr'] = "Permit IPsec traffic.";
+ $rule_item['descr'] = gettext("Permit IPsec traffic.");
$rule_item['statetype'] = "keep state";
$a_filter[] = $rule_item;
}
@@ -582,7 +582,7 @@ function upgrade_039_to_040() {
if (isset ($config['system']['username'])) {
$config['system']['group'] = array();
$config['system']['group'][0]['name'] = "admins";
- $config['system']['group'][0]['description'] = "System Administrators";
+ $config['system']['group'][0]['description'] = gettext("System Administrators");
$config['system']['group'][0]['scope'] = "system";
$config['system']['group'][0]['priv'] = "page-all";
$config['system']['group'][0]['home'] = "index.php";
@@ -601,19 +601,19 @@ function upgrade_039_to_040() {
$config['system']['user'][0]['priv'] = array();
$config['system']['user'][0]['priv'][0]['id'] = "lockwc";
$config['system']['user'][0]['priv'][0]['name'] = "Lock webConfigurator";
- $config['system']['user'][0]['priv'][0]['descr'] = "Indicates whether this user will lock access to the webConfigurator for other users.";
+ $config['system']['user'][0]['priv'][0]['descr'] = gettext("Indicates whether this user will lock access to the webConfigurator for other users.");
$config['system']['user'][0]['priv'][1]['id'] = "lock-ipages";
$config['system']['user'][0]['priv'][1]['name'] = "Lock individual pages";
- $config['system']['user'][0]['priv'][1]['descr'] = "Indicates whether this user will lock individual HTML pages after having accessed a particular page (the lock will be freed if the user leaves or saves the page form).";
+ $config['system']['user'][0]['priv'][1]['descr'] = gettext("Indicates whether this user will lock individual HTML pages after having accessed a particular page (the lock will be freed if the user leaves or saves the page form).");
$config['system']['user'][0]['priv'][2]['id'] = "hasshell";
$config['system']['user'][0]['priv'][2]['name'] = "Has shell access";
- $config['system']['user'][0]['priv'][2]['descr'] = "Indicates whether this user is able to login for example via SSH.";
+ $config['system']['user'][0]['priv'][2]['descr'] = gettext("Indicates whether this user is able to login for example via SSH.");
$config['system']['user'][0]['priv'][3]['id'] = "copyfiles";
$config['system']['user'][0]['priv'][3]['name'] = "Is allowed to copy files";
- $config['system']['user'][0]['priv'][3]['descr'] = "Indicates whether this user is allowed to copy files onto the {$g['product_name']} appliance via SCP/SFTP. If you are going to use this privilege, you must install scponly on the appliance (Hint: pkg_add -r scponly).";
+ $config['system']['user'][0]['priv'][3]['descr'] = sprintf(gettext("Indicates whether this user is allowed to copy files onto the %s appliance via SCP/SFTP. If you are going to use this privilege, you must install scponly on the appliance (Hint: pkg_add -r scponly)."), $g['product_name']);
$config['system']['user'][0]['priv'][4]['id'] = "isroot";
$config['system']['user'][0]['priv'][4]['name'] = "Is root user";
- $config['system']['user'][0]['priv'][4]['descr'] = "This user is associated with the UNIX root user (you should associate this privilege only with one single user).";
+ $config['system']['user'][0]['priv'][4]['descr'] = gettext("This user is associated with the UNIX root user (you should associate this privilege only with one single user).");
$config['system']['nextuid'] = "111";
$config['system']['nextgid'] = "111";
@@ -630,75 +630,75 @@ function upgrade_040_to_041() {
$config['sysctl']['item'] = array();
$config['sysctl']['item'][0]['tunable'] = "net.inet.tcp.blackhole";
- $config['sysctl']['item'][0]['descr'] = "Drop packets to closed TCP ports without returning a RST";
+ $config['sysctl']['item'][0]['descr'] = gettext("Drop packets to closed TCP ports without returning a RST");
$config['sysctl']['item'][0]['value'] = "default";
$config['sysctl']['item'][1]['tunable'] = "net.inet.udp.blackhole";
- $config['sysctl']['item'][1]['descr'] = "Do not send ICMP port unreachable messages for closed UDP ports";
+ $config['sysctl']['item'][1]['descr'] = gettext("Do not send ICMP port unreachable messages for closed UDP ports");
$config['sysctl']['item'][1]['value'] = "default";
$config['sysctl']['item'][2]['tunable'] = "net.inet.ip.random_id";
- $config['sysctl']['item'][2]['descr'] = "Randomize the ID field in IP packets (default is 0: sequential IP IDs)";
+ $config['sysctl']['item'][2]['descr'] = gettext("Randomize the ID field in IP packets (default is 0: sequential IP IDs)");
$config['sysctl']['item'][2]['value'] = "default";
$config['sysctl']['item'][3]['tunable'] = "net.inet.tcp.drop_synfin";
- $config['sysctl']['item'][3]['descr'] = "Drop SYN-FIN packets (breaks RFC1379, but nobody uses it anyway)";
+ $config['sysctl']['item'][3]['descr'] = gettext("Drop SYN-FIN packets (breaks RFC1379, but nobody uses it anyway)");
$config['sysctl']['item'][3]['value'] = "default";
$config['sysctl']['item'][4]['tunable'] = "net.inet.ip.redirect";
- $config['sysctl']['item'][4]['descr'] = "Sending of IPv4 ICMP redirects";
+ $config['sysctl']['item'][4]['descr'] = gettext("Sending of IPv4 ICMP redirects");
$config['sysctl']['item'][4]['value'] = "default";
$config['sysctl']['item'][5]['tunable'] = "net.inet6.ip6.redirect";
- $config['sysctl']['item'][5]['descr'] = "Sending of IPv6 ICMP redirects";
+ $config['sysctl']['item'][5]['descr'] = gettext("Sending of IPv6 ICMP redirects");
$config['sysctl']['item'][5]['value'] = "default";
$config['sysctl']['item'][6]['tunable'] = "net.inet.tcp.syncookies";
- $config['sysctl']['item'][6]['descr'] = "Generate SYN cookies for outbound SYN-ACK packets";
+ $config['sysctl']['item'][6]['descr'] = gettext("Generate SYN cookies for outbound SYN-ACK packets");
$config['sysctl']['item'][6]['value'] = "default";
$config['sysctl']['item'][7]['tunable'] = "net.inet.tcp.recvspace";
- $config['sysctl']['item'][7]['descr'] = "Maximum incoming TCP datagram size";
+ $config['sysctl']['item'][7]['descr'] = gettext("Maximum incoming TCP datagram size");
$config['sysctl']['item'][7]['value'] = "default";
$config['sysctl']['item'][8]['tunable'] = "net.inet.tcp.sendspace";
- $config['sysctl']['item'][8]['descr'] = "Maximum outgoing TCP datagram size";
+ $config['sysctl']['item'][8]['descr'] = gettext("Maximum outgoing TCP datagram size");
$config['sysctl']['item'][8]['value'] = "default";
$config['sysctl']['item'][9]['tunable'] = "net.inet.ip.fastforwarding";
- $config['sysctl']['item'][9]['descr'] = "Fastforwarding (see http://lists.freebsd.org/pipermail/freebsd-net/2004-January/002534.html)";
+ $config['sysctl']['item'][9]['descr'] = gettext("Fastforwarding (see http://lists.freebsd.org/pipermail/freebsd-net/2004-January/002534.html)");
$config['sysctl']['item'][9]['value'] = "default";
$config['sysctl']['item'][10]['tunable'] = "net.inet.tcp.delayed_ack";
- $config['sysctl']['item'][10]['descr'] = "Do not delay ACK to try and piggyback it onto a data packet";
+ $config['sysctl']['item'][10]['descr'] = gettext("Do not delay ACK to try and piggyback it onto a data packet");
$config['sysctl']['item'][10]['value'] = "default";
$config['sysctl']['item'][11]['tunable'] = "net.inet.udp.maxdgram";
- $config['sysctl']['item'][11]['descr'] = "Maximum outgoing UDP datagram size";
+ $config['sysctl']['item'][11]['descr'] = gettext("Maximum outgoing UDP datagram size");
$config['sysctl']['item'][11]['value'] = "default";
$config['sysctl']['item'][12]['tunable'] = "net.link.bridge.pfil_onlyip";
- $config['sysctl']['item'][12]['descr'] = "Handling of non-IP packets which are not passed to pfil (see if_bridge(4))";
+ $config['sysctl']['item'][12]['descr'] = gettext("Handling of non-IP packets which are not passed to pfil (see if_bridge(4))");
$config['sysctl']['item'][12]['value'] = "default";
$config['sysctl']['item'][13]['tunable'] = "net.link.tap.user_open";
- $config['sysctl']['item'][13]['descr'] = "Allow unprivileged access to tap(4) device nodes";
+ $config['sysctl']['item'][13]['descr'] = gettext("Allow unprivileged access to tap(4) device nodes");
$config['sysctl']['item'][13]['value'] = "default";
$config['sysctl']['item'][15]['tunable'] = "kern.randompid";
- $config['sysctl']['item'][15]['descr'] = "Randomize PID's (see src/sys/kern/kern_fork.c: sysctl_kern_randompid())";
+ $config['sysctl']['item'][15]['descr'] = gettext("Randomize PID's (see src/sys/kern/kern_fork.c: sysctl_kern_randompid())");
$config['sysctl']['item'][15]['value'] = "default";
$config['sysctl']['item'][16]['tunable'] = "net.inet.tcp.inflight.enable";
- $config['sysctl']['item'][16]['descr'] = "The system will attempt to calculate the bandwidth delay product for each connection and limit the amount of data queued to the network to just the amount required to maintain optimum throughput. ";
+ $config['sysctl']['item'][16]['descr'] = gettext("The system will attempt to calculate the bandwidth delay product for each connection and limit the amount of data queued to the network to just the amount required to maintain optimum throughput. ");
$config['sysctl']['item'][16]['value'] = "default";
$config['sysctl']['item'][17]['tunable'] = "net.inet.icmp.icmplim";
- $config['sysctl']['item'][17]['descr'] = "Set ICMP Limits";
+ $config['sysctl']['item'][17]['descr'] = gettext("Set ICMP Limits");
$config['sysctl']['item'][17]['value'] = "default";
$config['sysctl']['item'][18]['tunable'] = "net.inet.tcp.tso";
- $config['sysctl']['item'][18]['descr'] = "TCP Offload engine";
+ $config['sysctl']['item'][18]['descr'] = gettext("TCP Offload engine");
$config['sysctl']['item'][18]['value'] = "default";
$config['sysctl']['item'][19]['tunable'] = "net.inet.ip.portrange.first";
@@ -739,10 +739,10 @@ function upgrade_042_to_043() {
$config['gateways']['gateway_item'][$i] = array();
if(is_ipaddr($config['interfaces'][$ifname]['gateway'])) {
$config['gateways']['gateway_item'][$i]['gateway'] = $config['interfaces'][$ifname]['gateway'];
- $config['gateways']['gateway_item'][$i]['descr'] = "Interface $ifname Static Gateway";
+ $config['gateways']['gateway_item'][$i]['descr'] = sprintf(gettext("Interface %s Static Gateway"), $ifname);
} else {
$config['gateways']['gateway_item'][$i]['gateway'] = "dynamic";
- $config['gateways']['gateway_item'][$i]['descr'] = "Interface $ifname Dynamic Gateway";
+ $config['gateways']['gateway_item'][$i]['descr'] = sprintf(gettext("Interface %s Dynamic Gateway"), $ifname);
}
$config['gateways']['gateway_item'][$i]['interface'] = $ifname;
$config['gateways']['gateway_item'][$i]['name'] = "GW_" . strtoupper($ifname);
@@ -807,7 +807,7 @@ function upgrade_043_to_044() {
$gwmap[$sroute['gateway']] = $gateway['name'];
$gateway['gateway'] = $sroute['gateway'];
$gateway['interface'] = $sroute['interface'];
- $gateway['descr'] = "Upgraded static route for {$sroute['network']}";
+ $gateway['descr'] = sprintf(gettext("Upgraded static route for %s"), $sroute['network']);
if (!is_array($config['gateways']['gateway_item']))
$config['gateways']['gateway_item'] = array();
$config['gateways']['gateway_item'][] = $gateway;
@@ -904,7 +904,7 @@ function upgrade_045_to_046() {
$pool['type'] = 'server';
$pool['behaviour'] = 'balance';
$pool['name'] = "{$vs_a[$i]['name']}-sitedown";
- $pool['descr'] = "Sitedown pool for VS: {$vs_a[$i]['name']}";
+ $pool['descr'] = sprintf(gettext("Sitedown pool for VS: %s"), $vs_a[$i]['name']);
$pool['port'] = $pools[$vs_a[$i]['pool']]['port'];
$pool['servers'] = array();
$pool['servers'][] = $vs_a[$i]['sitedown'];
@@ -1057,7 +1057,7 @@ function upgrade_046_to_047() {
if (isset($tunnel['disabled']))
$ph1ent['disabled'] = $tunnel['disabled'];
- $ph2ent['descr'] = "phase2 for ".$tunnel['descr'];
+ $ph2ent['descr'] = sprintf(gettext("phase2 for %s"), $tunnel['descr']);
$type = "lan";
if ($tunnel['local-subnet']['network'])
@@ -1284,7 +1284,7 @@ function upgrade_047_to_048() {
$tempdyn['host'] = $config['dyndns'][0]['host'];
$tempdyn['mx'] = $config['dyndns'][0]['mx'];
$tempdyn['interface'] = "wan";
- $tempdyn['descr'] = "Upgraded Dyndns {$tempdyn['type']}";
+ $tempdyn['descr'] = sprintf(gettext("Upgraded Dyndns %s"), $tempdyn['type']);
$config['dyndnses']['dyndns'][] = $tempdyn;
}
unset($config['dyndns']);
@@ -1336,7 +1336,7 @@ function upgrade_048_to_049() {
/* setup new all users group */
$all = array();
$all['name'] = "all";
- $all['description'] = "All Users";
+ $all['description'] = gettext("All Users");
$all['scope'] = "system";
$all['gid'] = 1998;
$all['member'] = array();
@@ -1468,7 +1468,7 @@ function upgrade_050_to_051() {
if (isset($intf['bridge']) && $intf['bridge'] <> "") {
$nbridge = array();
$nbridge['members'] = "{$ifr},{$intf['bridge']}";
- $nbridge['descr'] = "Converted bridged {$ifr}";
+ $nbridge['descr'] = sprintf(gettext("Converted bridged %s"), $ifr);
$nbridge['bridgeif'] = "bridge{$i}";
$config['bridges']['bridged'][] = $nbridge;
unset($intf['bridge']);
@@ -1794,7 +1794,7 @@ function upgrade_051_to_052() {
$ovpnrule['destination'] = array();
$ovpnrule['source']['any'] = true;
$ovpnrule['destination']['any'] = true;
- $ovpnrule['descr'] = "Auto added OpenVPN rule from config upgrade.";
+ $ovpnrule['descr'] = gettext("Auto added OpenVPN rule from config upgrade.");
$config['filter']['rule'][] = $ovpnrule;
}
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 2fb8d8f..5582ed1 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -96,7 +96,7 @@ function mark_subsystem_dirty($subsystem = "") {
global $g;
if (!file_put_contents("{$g['varrun_path']}/{$subsystem}.dirty", "DIRTY"))
- log_error("WARNING: Could not mark subsystem: {$subsytem} dirty");
+ log_error(sprintf(gettext("WARNING: Could not mark subsystem: %s dirty"), $subsystem));
}
function clear_subsystem_dirty($subsystem = "") {
@@ -116,7 +116,7 @@ function config_unlock() {
function lock($lock, $op = LOCK_SH) {
global $g, $cfglckkeyconsumers;
if (!$lock)
- die("WARNING: You must give a name as parameter to lock() function.");
+ die(gettext("WARNING: You must give a name as parameter to lock() function."));
if (!file_exists("{$g['tmp_path']}/{$lock}.lock"))
@touch("{$g['tmp_path']}/{$lock}.lock");
$cfglckkeyconsumers++;
@@ -205,7 +205,7 @@ function refcount_unreference($reference) {
$shm_data = intval($shm_data) - 1;
if ($shm_data < 0) {
//debug_backtrace();
- log_error("Reference {$reference} is going negative, not doing unreference.");
+ log_error(sprintf(gettext("Reference %s is going negative, not doing unreference."), $reference));
} else
shmop_write($shmid, $shm_data, 0);
shmop_close($shmid);
@@ -912,7 +912,7 @@ function mwexec($command, $mute = false) {
$mute = false;
if(($retval <> 0) && ($mute === false)) {
$output = implode(" ", $oarr);
- log_error("The command '$command' returned exit code '$retval', the output was '$output' ");
+ log_error(sprintf(gettext("The command '%1\$s' returned exit code '%2\$d', the output was '%3\$s' "), $command, $retval, $output));
}
return $retval;
}
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index 374ec70..dc95092 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -358,7 +358,7 @@ function voucher_auth($voucher_received, $test = 0) {
list($timestamp,$minutes) = explode(",", $active_vouchers[$roll][$voucher]);
// we have an already active voucher here.
$remaining = intval((($timestamp + (60*$minutes)) - time())/60);
- $test_result[] = "$voucher ($roll/$nr) active and good for $remaining Minutes";
+ $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) active and good for %4$d Minutes'), $voucher, $roll, $nr, $remaining);
$total_minutes += $remaining;
} else {
// voucher not used. Check if ticket Id is on the roll (not too high)
@@ -395,9 +395,9 @@ function voucher_auth($voucher_received, $test = 0) {
// if this was a test call, we're done. Return the result.
if ($test) {
if ($error) {
- $test_result[] = "Access denied!";
+ $test_result[] = gettext("Access denied!");
} else {
- $test_result[] = "Access granted for $total_minutes Minutes in total.";
+ $test_result[] = sprintf(gettext("Access granted for %d Minutes in total."),$total_minutes);
}
unlock($voucherlck);
@@ -482,7 +482,7 @@ function voucher_configure($sync = false) {
/* write config file used by voucher binary to decode vouchers */
$fd = fopen("{$g['varetc_path']}/voucher.cfg", "w");
if (!$fd) {
- printf("Error: cannot write voucher.cfg\n");
+ printf(gettext("Error: cannot write voucher.cfg") . "\n");
unlock($voucherlck);
return 1;
}
@@ -535,7 +535,7 @@ function voucher_write_used_db($roll, $vdb) {
fwrite($fd, $vdb . "\n");
fclose($fd);
} else
- voucher_log(LOG_ERR, "cant write {$g['vardb_path']}/voucher_used_$roll.db");
+ voucher_log(LOG_ERR, sprintf(gettext('cant write %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
}
/* return assoc array of active vouchers with activation timestamp
@@ -614,7 +614,7 @@ function voucher_read_used_db($roll) {
$vdb = trim(fgets($fd));
fclose($fd);
} else {
- voucher_log(LOG_ERR, "cant read {$g['vardb_path']}/voucher_used_$roll.db");
+ voucher_log(LOG_ERR, sprintf(gettext('cant read %1$s/voucher_used_%2$s.db'), $g['vardb_path'], $roll));
}
}
return base64_decode($vdb);
@@ -632,7 +632,7 @@ function voucher_log($priority, $message) {
define_syslog_variables();
$message = trim($message);
openlog("logportalauth", LOG_PID, LOG_LOCAL4);
- syslog($priority, "Voucher: " . $message);
+ syslog($priority, gettext("Voucher: ") . $message);
closelog();
}
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 10f2fc1..1e6780f 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -121,7 +121,7 @@ function vpn_ipsec_configure($ipchg = false)
mwexec("/sbin/sysctl net.inet.ip.ipsec_in_use=1");
if ($g['booting'])
- echo "Configuring IPsec VPN... ";
+ echo gettext("Configuring IPsec VPN... ");
/* fastforwarding is not compatible with ipsec tunnels */
mwexec("/sbin/sysctl net.inet.ip.fastforwarding=0");
@@ -228,18 +228,18 @@ function vpn_ipsec_configure($ipchg = false)
if (is_array($config['ca']) && count($config['ca'])) {
foreach ($config['ca'] as $ca) {
if (!isset($ca['crt'])) {
- log_error("Error: Invalid certificate info for {$ca['descr']}");
+ log_error(sprintf(gettext("Error: Invalid certificate info for %s"), $ca['descr']));
continue;
}
$cert = base64_decode($ca['crt']);
$x509cert = openssl_x509_parse(openssl_x509_read($cert));
if (!is_array($x509cert) || !isset($x509cert['hash'])) {
- log_error("Error: Invalid certificate hash info for {$ca['descr']}");
+ log_error(sprintf(gettext("Error: Invalid certificate hash info for %s"), $ca['descr']));
continue;
}
$fname = $g['varetc_path']."/".$x509cert['hash'].".0";
if (!file_put_contents($fname, $cert)) {
- log_error("Error: Cannot write IPsec CA file for {$ca['descr']}");
+ log_error(sprintf(gettext("Error: Cannot write IPsec CA file for %s"), $ca['descr']));
continue;
}
}
@@ -248,7 +248,7 @@ function vpn_ipsec_configure($ipchg = false)
/* generate psk.txt */
$fd = fopen("{$g['varetc_path']}/psk.txt", "w");
if (!$fd) {
- printf("Error: cannot open psk.txt in vpn_ipsec_configure().\n");
+ printf(gettext("Error: cannot open psk.txt in vpn_ipsec_configure().") . "\n");
return 1;
}
@@ -311,7 +311,7 @@ function vpn_ipsec_configure($ipchg = false)
$fd = fopen("{$g['varetc_path']}/racoon.conf", "w");
if (!$fd) {
- printf("Error: cannot open racoon.conf in vpn_ipsec_configure().\n");
+ printf(gettext("Error: cannot open racoon.conf in vpn_ipsec_configure().") . "\n");
return 1;
}
@@ -403,7 +403,7 @@ function vpn_ipsec_configure($ipchg = false)
$fn = "{$g['varetc_path']}/racoon.motd";
$fd1 = fopen($fn, "w");
if (!$fd1) {
- printf("Error: cannot open server{$fn} in vpn.\n");
+ printf(gettext("Error: cannot open server %s in vpn.%s"). $fn, "\n");
return 1;
}
@@ -534,7 +534,7 @@ function vpn_ipsec_configure($ipchg = false)
if (!$cert)
{
- log_error("Error: Invalid phase1 certificate reference for {$ph1ent['name']}");
+ log_error(sprintf(gettext("Error: Invalid phase1 certificate reference for %s"), $ph1ent['name']));
continue;
}
@@ -543,7 +543,7 @@ function vpn_ipsec_configure($ipchg = false)
if (!file_put_contents($certpath, base64_decode($cert['crt'])))
{
- log_error("Error: Cannot write phase1 certificate file for {$ph1ent['name']}");
+ log_error(sprintf(gettext("Error: Cannot write phase1 certificate file for %s"), $ph1ent['name']));
continue;
}
@@ -554,7 +554,7 @@ function vpn_ipsec_configure($ipchg = false)
if (!file_put_contents($keypath, base64_decode($cert['prv'])))
{
- log_error("Error: Cannot write phase1 key file for {$ph1ent['name']}");
+ log_error(sprintf(gettext("Error: Cannot write phase1 key file for %s"), $ph1ent['name']));
continue;
}
@@ -567,7 +567,7 @@ function vpn_ipsec_configure($ipchg = false)
if (!file_put_contents($capath, base64_decode($ca['crt'])))
{
- log_error("Error: Cannot write phase1 CA certificate file for {$ph1ent['name']}");
+ log_error(sprintf(gettext("Error: Cannot write phase1 CA certificate file for %s"), $ph1ent['name']));
continue;
}
@@ -800,7 +800,7 @@ EOD;
/* generate spd.conf */
$fd = fopen("{$g['varetc_path']}/spd.conf", "w");
if (!$fd) {
- printf("Error: cannot open spd.conf in vpn_ipsec_configure().\n");
+ printf(gettext("Error: cannot open spd.conf in vpn_ipsec_configure().") . "\n");
return 1;
}
@@ -985,7 +985,7 @@ function vpn_ipsec_force_reload() {
/* if ipsec is enabled, start up again */
if (isset($ipseccfg['enable'])) {
- log_error("Forcefully reloading IPsec racoon daemon");
+ log_error(gettext("Forcefully reloading IPsec racoon daemon"));
vpn_ipsec_configure();
}
@@ -1024,7 +1024,7 @@ function vpn_pptpd_configure() {
if (!$pptpdcfg['mode'] || ($pptpdcfg['mode'] == "off"))
return 0;
- echo "Configuring PPTP VPN service... ";
+ echo gettext("Configuring PPTP VPN service... ");
} else {
/* kill mpd */
killbypid("{$g['varrun_path']}/pptp-vpn.pid");
@@ -1034,7 +1034,7 @@ function vpn_pptpd_configure() {
if (is_process_running("mpd -b")) {
killbypid("{$g['varrun_path']}/pptp-vpn.pid");
- log_error("Could not kill mpd within 3 seconds. Trying again.");
+ log_error(gettext("Could not kill mpd within 3 seconds. Trying again."));
}
/* remove mpd.conf, if it exists */
@@ -1052,7 +1052,7 @@ function vpn_pptpd_configure() {
/* write mpd.conf */
$fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open mpd.conf in vpn_pptpd_configure().\n");
+ printf(gettext("Error: cannot open mpd.conf in vpn_pptpd_configure().") . "\n");
return 1;
}
@@ -1165,7 +1165,7 @@ EOD;
/* write mpd.links */
$fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.links", "w");
if (!$fd) {
- printf("Error: cannot open mpd.links in vpn_pptpd_configure().\n");
+ printf(gettext("Error: cannot open mpd.links in vpn_pptpd_configure().") . "\n");
return 1;
}
@@ -1189,7 +1189,7 @@ EOD;
/* write mpd.secret */
$fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.secret", "w");
if (!$fd) {
- printf("Error: cannot open mpd.secret in vpn_pptpd_configure().\n");
+ printf(gettext("Error: cannot open mpd.secret in vpn_pptpd_configure().") . "\n");
return 1;
}
@@ -1243,7 +1243,7 @@ function vpn_pppoe_configure(&$pppoecfg) {
if (!$pppoecfg['mode'] || ($pppoecfg['mode'] == "off"))
return 0;
- echo "Configuring PPPoE VPN service... ";
+ echo gettext("Configuring PPPoE VPN service... ");
} else {
/* kill mpd */
killbypid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid");
@@ -1267,7 +1267,7 @@ function vpn_pppoe_configure(&$pppoecfg) {
/* write mpd.conf */
$fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open mpd.conf in vpn_pppoe_configure().\n");
+ printf(gettext("Error: cannot open mpd.conf in vpn_pppoe_configure().") . "\n");
return 1;
}
$mpdconf = "\n\n";
@@ -1370,7 +1370,7 @@ EOD;
/* write mpd.links */
$fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.links", "w");
if (!$fd) {
- printf("Error: cannot open mpd.links in vpn_pppoe_configure().\n");
+ printf(gettext("Error: cannot open mpd.links in vpn_pppoe_configure().") . "\n");
return 1;
}
@@ -1396,7 +1396,7 @@ EOD;
/* write mpd.secret */
$fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", "w");
if (!$fd) {
- printf("Error: cannot open mpd.secret in vpn_pppoe_configure().\n");
+ printf(gettext("Error: cannot open mpd.secret in vpn_pppoe_configure().") . "\n");
return 1;
}
@@ -1424,7 +1424,7 @@ EOD;
}
if ($g['booting'])
- echo "done\n";
+ echo gettext("done") . "\n";
return 0;
}
@@ -1443,7 +1443,7 @@ function vpn_l2tp_configure() {
if (!$l2tpcfg['mode'] || ($l2tpcfg['mode'] == "off"))
return 0;
- echo "Configuring l2tp VPN service... ";
+ echo gettext("Configuring l2tp VPN service... ");
} else {
/* kill mpd */
killbypid("{$g['varrun_path']}/l2tp-vpn.pid");
@@ -1468,7 +1468,7 @@ function vpn_l2tp_configure() {
/* write mpd.conf */
$fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open mpd.conf in vpn_l2tp_configure().\n");
+ printf(gettext("Error: cannot open mpd.conf in vpn_l2tp_configure().") . "\n");
return 1;
}
$mpdconf = "\n\n";
@@ -1561,7 +1561,7 @@ EOD;
/* write mpd.links */
$fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.links", "w");
if (!$fd) {
- printf("Error: cannot open mpd.links in vpn_l2tp_configure().\n");
+ printf(gettext("Error: cannot open mpd.links in vpn_l2tp_configure().") . "\n");
return 1;
}
@@ -1586,7 +1586,7 @@ EOD;
/* write mpd.secret */
$fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.secret", "w");
if (!$fd) {
- printf("Error: cannot open mpd.secret in vpn_l2tp_configure().\n");
+ printf(gettext("Error: cannot open mpd.secret in vpn_l2tp_configure().") . "\n");
return 1;
}
@@ -1733,15 +1733,15 @@ function reload_tunnel_spd_policy($phase1, $phase2, $old_phase1, $old_phase2) {
$rgip = $phase1['remote-gateway'];
}
if (!$ep) {
- log_error("Could not determine VPN endpoint for '{$phase1['descr']}'");
+ log_error(sprintf(gettext("Could not determine VPN endpoint for '%s'"), $phase1['descr']));
return false;
}
if((!is_ipaddr($old_ep)) || (! is_ipaddr($ep))) {
- log_error("IPSEC: ERROR: One of the endpoints is not a IP address. Old EP '{$old_ep}' new EP '{$ep}'");
+ log_error(sprintf(gettext("IPSEC: ERROR: One of the endpoints is not a IP address. Old EP '%1\$s' new EP '%2\$s'"), $old_ep, $ep));
}
if((! is_ipaddr($rgip)) || (! is_ipaddr($old_gw))) {
- log_error("IPSEC: ERROR: One of the remote endpoints is not a IP address. Old RG '{$old_gw}' new RG '{$rgip}'");
+ log_error(sprintf(gettext("IPSEC: ERROR: One of the remote endpoints is not a IP address. Old RG '%1\$s' new RG '%2\$s'"), $old_gw, $rgip));
}
$spdconf = "";
@@ -1797,7 +1797,7 @@ function reload_tunnel_spd_policy($phase1, $phase2, $old_phase1, $old_phase2) {
"{$phase2['protocol']}/tunnel/{$rgip}-" .
"{$ep}/unique;\n";
- log_error("Reloading IPsec tunnel '{$phase1['descr']}'. Previous IP '{$old_gw}', current IP '{$rgip}'. Reloading policy");
+ log_error(sprintf(gettext("Reloading IPsec tunnel '%1\$s'. Previous IP '%2\$s', current IP '%3\$s'. Reloading policy"), $phase1['descr'], $old_gw, $rgip));
$now = time();
$spdfile = tempnam("{$g['tmp_path']}", "spd.conf.reload.{$now}.");
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index 5fa51c3..49ebb0e 100644
--- a/etc/inc/xmlparse.inc
+++ b/etc/inc/xmlparse.inc
@@ -82,7 +82,7 @@ function startElement($parser, $name, $attrs) {
} else if (isset($ptr)) {
/* multiple entries not allowed for this element, bail out */
- die(sprintf("XML error: %s at line %d cannot occur more than once\n",
+ die(sprintf(gettext('XML error: %1$s at line %2$d cannot occur more than once') . "\n",
$name,
xml_get_current_line_number($parser)));
}
@@ -173,13 +173,13 @@ function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE, 1);
if (!($fp = fopen($cffile, "r"))) {
- log_error("Error: could not open XML input\n");
+ log_error(gettext("Error: could not open XML input") . "\n");
return -1;
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
- log_error(sprintf("XML error: %s at line %d in %s\n",
+ log_error(sprintf(gettext('XML error: %1$s at line %2$d in %3$s') . "\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser),
$cffile));
@@ -195,7 +195,7 @@ function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
break;
if (!$parsedcfg[$rootobj_name]) {
- log_error("XML error: no $rootobj_name object found!\n");
+ log_error(sprintf(gettext("XML error: no %s object found!") . "\n", $rootobj));
return -1;
}
diff --git a/etc/inc/xmlparse_attr.inc b/etc/inc/xmlparse_attr.inc
index 802d335..933caba 100644
--- a/etc/inc/xmlparse_attr.inc
+++ b/etc/inc/xmlparse_attr.inc
@@ -75,7 +75,7 @@ function startElement_attr($parser, $name, $attrs) {
} else if (isset($ptr)) {
/* multiple entries not allowed for this element, bail out */
- die(sprintf("XML error: %s at line %d cannot occur more than once\n",
+ die(sprintf(gettext('XML error: %1$s at line %2$d cannot occur more than once') . "\n",
$name,
xml_get_current_line_number($parser)));
} else if (isset($writeattrs)) {
@@ -184,7 +184,7 @@ function parse_xml_config_raw_attr($cffile, $rootobj, &$parsed_attributes, $isst
xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE, 1);
if (!($fp = fopen($cffile, "r"))) {
- log_error("Error: could not open XML input\n");
+ log_error(gettext("Error: could not open XML input") . "\n");
if (isset($parsed_attributes)) {
$parsed_attributes = array();
unset($parsedattrs);
@@ -194,7 +194,7 @@ function parse_xml_config_raw_attr($cffile, $rootobj, &$parsed_attributes, $isst
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
- log_error(sprintf("XML error: %s at line %d\n",
+ log_error(sprintf(gettext('XML error: %1$s at line %2$d') . "\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
if (isset($parsed_attributes)) {
@@ -207,7 +207,7 @@ function parse_xml_config_raw_attr($cffile, $rootobj, &$parsed_attributes, $isst
xml_parser_free($xml_parser);
if (!$parsedcfg[$rootobj]) {
- log_error("XML error: no $rootobj object found!\n");
+ log_error(sprintf(gettext("XML error: no %s object found!") . "\n", $rootobj));
if (isset($parsed_attributes)) {
$parsed_attributes = array();
unset($parsedattrs);
@@ -224,4 +224,4 @@ function parse_xml_config_raw_attr($cffile, $rootobj, &$parsed_attributes, $isst
return $parsedcfg[$rootobj];
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/xmlreader.inc b/etc/inc/xmlreader.inc
index ce0289b..1caa6ea 100644
--- a/etc/inc/xmlreader.inc
+++ b/etc/inc/xmlreader.inc
@@ -126,7 +126,7 @@ function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
add_elements($parsedcfg, $par);
$par->close();
} else
- log_error("Error returned while trying to parse {$cffile}");
+ log_error(sprintf(gettext("Error returned while trying to parse %s"), $cffile));
if (!is_array($rootobj))
$rootobj = array($rootobj);
diff --git a/etc/inc/xmlrpc_client.inc b/etc/inc/xmlrpc_client.inc
index 39d6d70..a192815 100644
--- a/etc/inc/xmlrpc_client.inc
+++ b/etc/inc/xmlrpc_client.inc
@@ -149,13 +149,13 @@ $GLOBALS['XML_RPC_err'] = array(
* @global array $GLOBALS['XML_RPC_str']
*/
$GLOBALS['XML_RPC_str'] = array(
- 'unknown_method' => 'Unknown method',
- 'invalid_return' => 'Invalid return payload: enable debugging to examine incoming payload',
- 'incorrect_params' => 'Incorrect parameters passed to method',
- 'introspect_unknown' => 'Can\'t introspect: method unknown',
- 'http_error' => 'Didn\'t receive 200 OK from remote server.',
- 'not_response_object' => 'The requested method didn\'t return an XML_RPC_Response object.',
- 'invalid_request' => 'Invalid request payload',
+ 'unknown_method' => gettext("Unknown method"),
+ 'invalid_return' => gettext("Invalid return payload: enable debugging to examine incoming payload"),
+ 'incorrect_params' => gettext("Incorrect parameters passed to method"),
+ 'introspect_unknown' => gettext("Can't introspect: method unknown"),
+ 'http_error' => gettext("Didn't receive 200 OK from remote server."),
+ 'not_response_object' => gettext("The requested method didn't return an XML_RPC_Response object."),
+ 'invalid_request' => gettext("Invalid request payload"),
);
@@ -257,7 +257,7 @@ function XML_RPC_se($parser_resource, $name, $attrs)
if (count($XML_RPC_xh[$parser]['stack']) == 0) {
if ($name != 'METHODRESPONSE' && $name != 'METHODCALL') {
$XML_RPC_xh[$parser]['isf'] = 2;
- $XML_RPC_xh[$parser]['isf_reason'] = 'missing top level xmlrpc element';
+ $XML_RPC_xh[$parser]['isf_reason'] = gettext('missing top level xmlrpc element');
return;
}
} else {
@@ -265,7 +265,7 @@ function XML_RPC_se($parser_resource, $name, $attrs)
if (!in_array($XML_RPC_xh[$parser]['stack'][0], $XML_RPC_valid_parents[$name])) {
$name = preg_replace('@[^a-zA-Z0-9._-]@', '', $name);
$XML_RPC_xh[$parser]['isf'] = 2;
- $XML_RPC_xh[$parser]['isf_reason'] = "xmlrpc element $name cannot be child of {$XML_RPC_xh[$parser]['stack'][0]}";
+ $XML_RPC_xh[$parser]['isf_reason'] = sprintf(gettext('xmlrpc element %1$s cannot be child of %2$s'), $name, $XML_RPC_xh[$parser]['stack'][0]);
return;
}
}
@@ -428,7 +428,7 @@ function XML_RPC_ee($parser_resource, $name)
// we have an I4, INT or a DOUBLE
// we must check that only 0123456789-.<space> are characters here
if (!preg_match("@^[+-]?[0123456789 \t\.]+$@", $XML_RPC_xh[$parser]['ac'])) {
- XML_RPC_Base::raiseError('Non-numeric value received in INT or DOUBLE',
+ XML_RPC_Base::raiseError(gettext('Non-numeric value received in INT or DOUBLE'),
XML_RPC_ERROR_NON_NUMERIC_FOUND);
$XML_RPC_xh[$parser]['value'] = XML_RPC_ERROR_NON_NUMERIC_FOUND;
} else {
@@ -853,8 +853,10 @@ class XML_RPC_Client extends XML_RPC_Base {
function send($msg, $timeout = 0)
{
if (!is_a($msg, 'XML_RPC_Message')) {
- $this->errstr = 'send()\'s $msg parameter must be an'
- . ' XML_RPC_Message object.';
+ $this->errstr = sprintf(
+ gettext(
+ "send()'s %s parameter must be an XML_RPC_Message object."
+ ), $msg);
$this->raiseError($this->errstr, XML_RPC_ERROR_PROGRAMMING);
return 0;
}
@@ -944,15 +946,15 @@ class XML_RPC_Client extends XML_RPC_Base {
* but keep it here for backwards compatibility.
*/
if (!$fp && $this->proxy) {
- $this->raiseError('Connection to proxy server '
+ $this->raiseError(gettext('Connection to proxy server ')
. $this->proxy . ':' . $this->proxy_port
- . ' failed. ' . $this->errstr,
+ . gettext(' failed. ') . $this->errstr,
XML_RPC_ERROR_CONNECTION_FAILED);
return 0;
} elseif (!$fp) {
- $this->raiseError('Connection to RPC server '
+ $this->raiseError(gettext('Connection to RPC server ')
. $server . ':' . $port
- . ' failed. ' . $this->errstr,
+ . gettext(' failed. ') . $this->errstr,
XML_RPC_ERROR_CONNECTION_FAILED);
return 0;
}
@@ -1323,7 +1325,7 @@ class XML_RPC_Message extends XML_RPC_Base
if (isset($this->params[$i])) {
return $this->params[$i];
} else {
- $this->raiseError('The submitted request did not contain this parameter',
+ $this->raiseError(gettext('The submitted request did not contain this parameter'),
XML_RPC_ERROR_INCORRECT_PARAMS);
return new XML_RPC_Response(0, $XML_RPC_err['incorrect_params'],
$XML_RPC_str['incorrect_params']);
@@ -1354,7 +1356,7 @@ class XML_RPC_Message extends XML_RPC_Base
function setConvertPayloadEncoding($in)
{
if ($in && !function_exists('mb_convert_encoding')) {
- return $this->raiseError('mb_convert_encoding() is not available',
+ return $this->raiseError(gettext('mb_convert_encoding() is not available'),
XML_RPC_ERROR_PROGRAMMING);
}
$this->convert_payload_encoding = $in;
@@ -1463,7 +1465,7 @@ class XML_RPC_Message extends XML_RPC_Base
!preg_match('@^HTTP/[0-9\.]+ 10[0-9]([A-Z ]+)?[\r\n]+HTTP/[0-9\.]+ 200@', $data))
{
$errstr = substr($data, 0, strpos($data, "\n") - 1);
- error_log('HTTP error, got response: ' . $errstr);
+ error_log(gettext("HTTP error, got response: ") . $errstr);
$r = new XML_RPC_Response(0, $XML_RPC_err['http_error'],
$XML_RPC_str['http_error'] . ' (' .
$errstr . ')');
@@ -1489,7 +1491,7 @@ class XML_RPC_Message extends XML_RPC_Base
if (!xml_parse($parser_resource, $data, sizeof($data))) {
// thanks to Peter Kocks <peter.kocks@baygate.com>
if (xml_get_current_line_number($parser_resource) == 1) {
- $errstr = 'XML error at line 1, check URL';
+ $errstr = gettext("XML error at line 1, check URL");
} else {
$errstr = sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($parser_resource)),
@@ -1584,14 +1586,15 @@ class XML_RPC_Value extends XML_RPC_Base
function addScalar($val, $type = 'string')
{
if ($this->mytype == 1) {
- $this->raiseError('Scalar can have only one value',
+ $this->raiseError(gettext('Scalar can have only one value'),
XML_RPC_ERROR_INVALID_TYPE);
return 0;
}
$typeof = $GLOBALS['XML_RPC_Types'][$type];
if ($typeof != 1) {
- $this->raiseError("Not a scalar type (${typeof})",
- XML_RPC_ERROR_INVALID_TYPE);
+ $this->raiseError(
+ sprintf(gettext("Not a scalar type (%s)"), $typeof),
+ XML_RPC_ERROR_INVALID_TYPE);
return 0;
}
@@ -1626,7 +1629,7 @@ class XML_RPC_Value extends XML_RPC_Base
{
if ($this->mytype != 0) {
$this->raiseError(
- 'Already initialized as a [' . $this->kindOf() . ']',
+ sprintf(gettext('Already initialized as a [%s]'), $this->kindOf()),
XML_RPC_ERROR_ALREADY_INITIALIZED);
return 0;
}
@@ -1642,7 +1645,7 @@ class XML_RPC_Value extends XML_RPC_Base
{
if ($this->mytype != 0) {
$this->raiseError(
- 'Already initialized as a [' . $this->kindOf() . ']',
+ sprintf(gettext('Already initialized as a [%s]'), $this->kindOf()),
XML_RPC_ERROR_ALREADY_INITIALIZED);
return 0;
}
diff --git a/etc/inc/xmlrpc_server.inc b/etc/inc/xmlrpc_server.inc
index a8e6ae3..10b8beb 100644
--- a/etc/inc/xmlrpc_server.inc
+++ b/etc/inc/xmlrpc_server.inc
@@ -45,8 +45,8 @@ $GLOBALS['XML_RPC_Server_listMethods_sig'] = array(
* docstring for system.listMethods
* @global string $GLOBALS['XML_RPC_Server_listMethods_doc']
*/
-$GLOBALS['XML_RPC_Server_listMethods_doc'] = 'This method lists all the'
- . ' methods that the XML-RPC server knows how to dispatch';
+$GLOBALS['XML_RPC_Server_listMethods_doc'] = gettext('This method lists all the'
+ . ' methods that the XML-RPC server knows how to dispatch');
/**
* signature for system.methodSignature: return = array,
@@ -63,10 +63,10 @@ $GLOBALS['XML_RPC_Server_methodSignature_sig'] = array(
* docstring for system.methodSignature
* @global string $GLOBALS['XML_RPC_Server_methodSignature_doc']
*/
-$GLOBALS['XML_RPC_Server_methodSignature_doc'] = 'Returns an array of known'
+$GLOBALS['XML_RPC_Server_methodSignature_doc'] = gettext('Returns an array of known'
. ' signatures (an array of arrays) for the method name passed. If'
. ' no signatures are known, returns a none-array (test for type !='
- . ' array to detect missing signature)';
+ . ' array to detect missing signature)');
/**
* signature for system.methodHelp: return = string,
@@ -83,8 +83,8 @@ $GLOBALS['XML_RPC_Server_methodHelp_sig'] = array(
* docstring for methodHelp
* @global string $GLOBALS['XML_RPC_Server_methodHelp_doc']
*/
-$GLOBALS['XML_RPC_Server_methodHelp_doc'] = 'Returns help text if defined'
- . ' for the method passed, otherwise returns an empty string';
+$GLOBALS['XML_RPC_Server_methodHelp_doc'] = gettext('Returns help text if defined'
+ . ' for the method passed, otherwise returns an empty string');
/**
* dispatch map for the automatically declared XML-RPC methods.
diff --git a/etc/inc/zeromq.inc b/etc/inc/zeromq.inc
index 3cb1843..fe39e82 100644
--- a/etc/inc/zeromq.inc
+++ b/etc/inc/zeromq.inc
@@ -306,4 +306,4 @@ function get_notices_zeromq($raw_params) {
return serialize($toreturn);
}
-?> \ No newline at end of file
+?>
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize
index 6e17737..c64acd4 100755
--- a/etc/rc.filter_synchronize
+++ b/etc/rc.filter_synchronize
@@ -272,7 +272,7 @@ global $g;
if (file_exists("{$g['varrun_path']}/booting") || $g['booting'])
return;
-if (is_array($config['installedpackages']['carpsettings']['config'])) {
+if (is_array($config['installedpackages']['carpsettings']) && is_array($config['installedpackages']['carpsettings']['config'])) {
update_filter_reload_status("Building CARP sync information");
foreach($config['installedpackages']['carpsettings']['config'] as $carp) {
if (empty($carp['synchronizetoip'])) {
diff --git a/etc/rc.initial.firmware_update b/etc/rc.initial.firmware_update
index 8d16098..f4363c6 100755
--- a/etc/rc.initial.firmware_update
+++ b/etc/rc.initial.firmware_update
@@ -93,7 +93,7 @@ switch ($command) {
exec("fetch -1 -w15 -a -v -o /root/firmware.tgz.md5 \"$url.md5\"");
} else {
echo "\n\nWARNING.\n";
- echo "\nCould not locate a MD5 file. We cannot verify the download once its done.\n\n";
+ echo "\nCould not locate a MD5 file. We cannot verify the download once completed.\n\n";
sleep(15);
}
if(file_exists("/root/firmware.tgz.md5")) {
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index 7dfcddd..77b9375 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -192,7 +192,7 @@ fi
# Read in dynamodules
if [ -d /etc/php_dynamodules ]; then
- DYNA_MODULES=`/bin/ls /etc/php_dynamodules/`
+ DYNA_MODULES=`/bin/ls -Utr /etc/php_dynamodules/`
PHPMODULES="$PHPMODULES $DYNA_MODULES"
fi
diff --git a/etc/rc.stop_packages b/etc/rc.stop_packages
index f20fa04..f20fa04 100644..100755
--- a/etc/rc.stop_packages
+++ b/etc/rc.stop_packages
OpenPOWER on IntegriCloud