diff options
Diffstat (limited to 'etc')
37 files changed, 1356 insertions, 1308 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 805ea44..6942223 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -88,7 +88,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; @@ -291,7 +291,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); @@ -311,7 +311,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); @@ -375,7 +375,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); @@ -402,7 +402,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); @@ -447,7 +447,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() */ @@ -578,7 +578,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); } @@ -590,7 +590,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); } @@ -624,7 +624,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; } @@ -666,7 +666,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; } @@ -719,7 +719,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; } @@ -733,7 +733,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; } @@ -744,12 +744,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; } @@ -844,7 +844,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; } @@ -854,12 +854,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; } @@ -943,10 +943,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; } @@ -964,7 +964,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; } @@ -978,7 +978,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; } @@ -995,11 +995,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 @@ -1010,7 +1010,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); @@ -1026,18 +1026,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); @@ -1068,7 +1068,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 @@ -1079,7 +1079,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) @@ -1131,7 +1131,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() { @@ -1146,7 +1146,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; } @@ -1216,7 +1216,7 @@ function session_auth() { $_SESSION['Logged_In'] = "True"; $_SESSION['Username'] = $_POST['usernamefld']; $_SESSION['last_access'] = time(); - 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'])) return true; @@ -1269,9 +1269,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 ee98f1c..44fcb1c 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(gettext("showajaxmessage('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(gettext("showajaxmessage('This device is currently being maintained by: %s.');"), $whom); } } exit; @@ -232,14 +232,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> @@ -261,4 +261,4 @@ if($config['virtualip']) <?php } // end function -?>
\ No newline at end of file +?> diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 3d4b61a..4a3b80d 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -425,7 +425,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"); @@ -1308,7 +1308,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 9005b79..536c976 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", $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"; if ($lanif != "") echo "LAN -> " . $lanif . "\n"; @@ -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 8a58d92..b01fa13 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -95,10 +95,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); @@ -128,9 +128,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 */ @@ -145,7 +146,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']}"); @@ -160,7 +161,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']}"); @@ -174,11 +175,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'); } } @@ -218,4 +219,4 @@ if($config_parsed == true) { } } -?>
\ No newline at end of file +?> diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 1e584f2..9f0b736 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.")); } } @@ -120,6 +120,35 @@ function parse_config($parse = false) { if(!$parse) { if (file_exists($g['tmp_path'] . '/config.cache')) { $config = unserialize(file_get_contents($g['tmp_path'] . '/config.cache')); +<<<<<<< HEAD + if(is_null($config)) { + unlock($lockkey); + parse_config(true); + $lockkey = lock('config'); + } + } else { + if(!file_exists($g['conf_path'] . "/config.xml")) { + 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", ""); + $last_backup = discover_last_backup(); + if ($last_backup) + restore_backup("/cf/conf/backup/{$last_backup}"); + else { + log_error(gettext("Could not restore config.xml.")); + unlock($lockkey); + die(gettext("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup.")); + } + } + unlock($lockkey); + $config = parse_config(true); + $lockkey = lock('config'); + } + } else { + if(!file_exists($g['conf_path'] . "/config.xml")) { + if($g['booting']) echo "."; + 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", ""); +======= if (is_null($config)) $parse = true; } else @@ -131,13 +160,14 @@ function parse_config($parse = false) { echo "."; 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", ""); +>>>>>>> master $last_backup = discover_last_backup(); 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 +237,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 +260,33 @@ 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")) { +<<<<<<< HEAD + echo sprintf(gettext("XML configuration file not found. %s cannot continue booting."), $g['product_name']) . "\n"; +======= echo "XML configuration file not found. {$g['product_name']} cannot continue booting.\n"; unlock($lockkey); +>>>>>>> master 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 +297,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 +348,7 @@ function conf_mount_rw() { $status = mwexec("/sbin/mount -u -w {$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 {$g['cf_path']}"); } @@ -325,7 +359,7 @@ function conf_mount_rw() { $status = mwexec("/sbin/mount -u -w /"); /* 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 /"); } @@ -374,7 +408,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 */ @@ -384,8 +418,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")); } } } @@ -409,10 +443,17 @@ 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']) +<<<<<<< HEAD + write_config(sprintf(gettext('Upgraded config version level from %1$s to %2$s'), $prev_version, $config['version'])); + + if($g['booting']) + echo gettext("Loading new configuration..."); +======= write_config("Upgraded config version level from {$prev_version} to {$config['version']}"); +>>>>>>> master } /****f* config/safe_write_file @@ -479,8 +520,13 @@ function write_config($desc="Unknown", $backup = true) { * for now, since it was preventing config saving. */ // $config = parse_config(true, false, false); +<<<<<<< HEAD + if($g['bootup']) + log_error(gettext("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml")); +======= if($g['booting']) log_error("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml"); +>>>>>>> master $username = empty($_SESSION["Username"]) ? "(system)" : $_SESSION['Username']; @@ -495,7 +541,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; @@ -508,9 +554,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; } @@ -612,7 +658,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; } @@ -627,9 +673,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); @@ -680,13 +726,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; @@ -732,9 +778,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'] == "") @@ -843,4 +889,4 @@ function set_device_perms() { } } -?>
\ No newline at end of file +?> diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc index c62f76b..96864b1 100644 --- a/etc/inc/easyrule.inc +++ b/etc/inc/easyrule.inc @@ -112,7 +112,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"); $a_filter[] = $filterent; @@ -161,15 +161,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 */ @@ -244,7 +244,7 @@ function easyrule_pass_rule_add($int, $proto, $srchost, $dsthost, $dstport) { $filterent = array(); $filterent['type'] = 'pass'; $filterent['interface'] = $int; - $filterent['descr'] = "Easy Rule: Passed from Firewall Log View"; + $filterent['descr'] = gettext("Easy Rule: Passed from Firewall Log View"); if ($proto != "any") $filterent['protocol'] = $proto; @@ -274,21 +274,21 @@ function easyrule_pass_rule_add($int, $proto, $srchost, $dsthost, $dstport) { function easyrule_parse_block($int, $src) { 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) { /* Check for valid int, srchost, dsthost, dstport, and proto */ @@ -297,37 +297,37 @@ function easyrule_parse_pass($int, $proto, $src, $dst, $dstport = 0) { 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)) { - 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."); } -?>
\ No newline at end of file +?> diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 47b5cda..6de6425 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -190,7 +190,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); @@ -202,45 +202,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; } @@ -252,7 +252,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; @@ -588,7 +589,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(); @@ -618,14 +619,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) { @@ -860,7 +861,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'])) { @@ -914,7 +915,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) @@ -1160,7 +1161,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 = ""; @@ -1230,7 +1231,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 = $obent['source']['network']; if(isset($obent['destination']['not']) && !isset($obent['destination']['any'])) $dst = "!" . $obent['destination']['address']; @@ -1263,7 +1264,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; @@ -1349,7 +1350,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 */ @@ -1367,7 +1368,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"; @@ -1407,7 +1408,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; @@ -1540,7 +1541,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; @@ -1623,7 +1624,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)) { @@ -1724,7 +1725,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($rule['disablereplyto'])) { @@ -1733,7 +1734,7 @@ function filter_generate_user_rule($rule) { $aline['reply'] = "reply-to ( {$ifcfg['if']} {$rg} ) "; } else { if($rule['interface'] <> "pptp") { - log_error("Could not find gateway for interface({$rule['interface']})."); + log_error(sprintf(gettext("Could not find gateway for interface (%s)."), $rule['interface'])); } } } @@ -1743,7 +1744,7 @@ function filter_generate_user_rule($rule) { /* Add the load balanced gateways */ $aline['route'] = " \$GW{$rule['gateway']} "; else - log_error("The gateway: {$rule['gateway']} is invalid/unkown not using it."); + log_error(sprintf(gettext("The gateway: %s is invalid/unkown not using it."), $rule['gateway'])); } if(isset($rule['protocol'])) { @@ -1757,7 +1758,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"); @@ -1963,7 +1964,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"; @@ -2243,7 +2244,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")); } } @@ -2320,7 +2321,7 @@ EOD; } } - update_filter_reload_status("Creating IPsec rules..."); + update_filter_reload_status(gettext("Creating IPsec rules...")); $ipfrules .= filter_generate_ipsec_rules(); $ipfrules .= <<<EOD @@ -2346,7 +2347,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); } @@ -2391,7 +2392,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; @@ -2748,17 +2749,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 ed4b311..9fe6b6d 100644 --- a/etc/inc/filter_log.inc +++ b/etc/inc/filter_log.inc @@ -159,7 +159,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 ""; } @@ -203,7 +203,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); } @@ -279,4 +279,4 @@ function handle_ajax($nentries, $tail = 50) { } } -?>
\ No newline at end of file +?> diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index a192bd3..1dcd6c1 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -210,7 +210,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); @@ -385,15 +385,15 @@ function return_gateway_groups_array() { $status = $gateways_status[$gwname]; $gwdown = false; if (stristr($status['status'], "down")) { - $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; } 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) { @@ -408,7 +408,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); } @@ -461,7 +461,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) { @@ -532,4 +532,4 @@ function get_interface_gateway($interface, &$dynamic = false) { return ($gw); } -?>
\ No newline at end of file +?> diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3a309eb..60201bd 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -47,7 +47,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; } @@ -165,18 +165,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'])) @@ -186,14 +186,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']; @@ -201,7 +201,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; } @@ -235,14 +235,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); @@ -303,7 +303,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?! */ @@ -311,14 +311,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; } @@ -326,7 +326,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; } @@ -347,7 +347,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'])) @@ -361,7 +361,7 @@ function interfaces_create_wireless_clones() { } } if($g['booting']) - echo " done.\n"; + echo " " . gettext("done.") . "\n"; } function interfaces_bridge_configure() { @@ -386,7 +386,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; } @@ -450,7 +450,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 */ @@ -563,7 +563,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; } @@ -597,7 +597,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) { @@ -609,7 +609,7 @@ function interfaces_lagg_configure() } } if($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } function interface_lagg_configure(&$lagg) { @@ -731,7 +731,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']}"); @@ -767,7 +767,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']); @@ -786,7 +786,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")); /* XXX: Needed?! */ //mwexec("/sbin/route add {$gif['tunnel-remote-addr']}/{$gif['tunnel-remote-net']} -iface {$gifif}"); @@ -831,12 +831,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"; } } @@ -851,14 +851,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 */ @@ -866,14 +866,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"; } /* bring up vip interfaces */ @@ -1163,7 +1163,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']; @@ -1211,7 +1211,7 @@ function interface_ppps_configure($interface) { $localips[$pid] = get_interface_ip($port); // try to get the interface IP from the port if(!is_ipaddr($localips[$pid])){ - log_error("Could not get a Local IP address for PPTP/L2TP link on {$port} in interfaces_ppps_configure."); + log_error(sprintf(gettext("Could not get a Local IP address for PPTP/L2TP link on %s in interfaces_ppps_configure."), $port)); return 0; } /* XXX: This needs to go away soon! [It's commented out!] */ @@ -1226,19 +1226,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; } } @@ -1503,7 +1503,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 @@ -1555,7 +1555,7 @@ function interfaces_carp_setup() { $cmdchain = new CmdCHAIN(); if ($g['booting']) { - echo "Configuring CARP settings..."; + echo gettext("Configuring CARP settings..."); mute_kernel_msgs(); } @@ -1575,14 +1575,14 @@ function interfaces_carp_setup() { unset($pfsyncenabled); } - $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); 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); @@ -1598,22 +1598,22 @@ 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); 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 @@ -1623,7 +1623,7 @@ function interfaces_carp_setup() { if ($g['booting']) { unmute_kernel_msgs(); - echo "done.\n"; + echo gettext("done.") . "\n"; } } @@ -1807,7 +1807,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; } @@ -1815,7 +1815,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; } @@ -1864,7 +1864,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; } @@ -1910,7 +1910,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}"); } @@ -1943,15 +1943,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 { @@ -1963,12 +1963,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]); @@ -2528,13 +2528,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"); } } @@ -2703,7 +2703,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; } @@ -2718,7 +2718,7 @@ function interface_dhcp_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; } @@ -2731,7 +2731,7 @@ function interface_dhcp_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 = ""; @@ -2766,7 +2766,7 @@ EOD; if($wanif) interfaces_bring_up($wanif); else - log_error("Could not bring up {$wanif} interface in interface_dhcp_configure()"); + 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 2653297..109bf18 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 ) ), @@ -219,9 +219,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 0cbf5fd..b0e95c5 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(printf(gettext("New alert found: %s"), $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 496b8bc..9101c04 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 5d948de..b6755c8 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; @@ -713,10 +713,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()); @@ -809,7 +809,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); @@ -817,10 +817,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(); @@ -926,7 +926,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) { @@ -1071,7 +1071,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; } } @@ -1179,7 +1179,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'])) @@ -1219,8 +1219,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]; @@ -1255,13 +1255,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; } } @@ -1372,7 +1372,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 { @@ -1557,11 +1557,11 @@ function update_alias_names_upon_change($section, $subsection, $fielda, $fieldb, if($debug) fwrite($fd, print_r($pconfig, true)); if($fieldb) { - if($debug) fwrite($fd, "fieldb exists\n"); + if($debug) fwrite($fd, sprintf(gettext("fieldb exists%s"), "\n")); for ($i = 0; isset($config["$section"]["$subsection"][$i]["$fielda"]); $i++) { if($debug) fwrite($fd, "$i\n"); if($config["$section"]["$subsection"][$i]["$fielda"]["$fieldb"] == $origname) { - if($debug) fwrite($fd, "Setting old alias value $origname to $new_alias_name\n"); + if($debug) fwrite($fd, sprintf(gettext('Setting old alias value %1$s to %2$s%3$s'), $origname, $new_alias_name, "\n")); $config["$section"]["$subsection"][$i]["$fielda"]["$fieldb"] = $new_alias_name; } } @@ -1570,7 +1570,7 @@ function update_alias_names_upon_change($section, $subsection, $fielda, $fieldb, for ($i = 0; isset($config["$section"]["$subsection"][$i]["$fielda"]); $i++) { if($config["$section"]["$subsection"][$i]["$fielda"] == $origname) { $config["$section"]["$subsection"][$i]["$fielda"] = $new_alias_name; - if($debug) fwrite($fd, "Setting old alias value $origname to $new_alias_name\n"); + if($debug) fwrite($fd, sprintf(gettext('Setting old alias value %1$s to %2$s%3$s'), $origname, $new_alias_name, "\n")); } } } @@ -2132,4 +2132,4 @@ function filter_rules_compare($a, $b) { return compare_interface_friendly_names($a['interface'], $b['interface']); } -?>
\ No newline at end of file +?> diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 3a2984a..eb54b6d 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -193,7 +193,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; @@ -213,7 +213,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) @@ -255,7 +255,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']}."); @@ -279,7 +279,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; @@ -378,7 +378,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; } @@ -411,7 +411,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) { @@ -522,44 +522,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'); @@ -571,16 +571,16 @@ 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); - $static_output .= "Starting service.\n"; + $static_output .= gettext("Starting service.") . "\n"; update_output_window($static_output); if($pkg_info['after_install_info']) update_output_window($pkg_info['after_install_info']); @@ -613,7 +613,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>"; @@ -628,8 +628,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); @@ -641,7 +641,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>"; @@ -654,30 +654,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) { @@ -702,20 +702,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 @@ -724,7 +724,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'])) @@ -739,7 +739,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'])) @@ -748,12 +748,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'])) @@ -762,12 +762,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'])) @@ -776,39 +776,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>"; @@ -853,12 +853,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); } @@ -887,7 +887,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>"; @@ -898,8 +898,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']; @@ -911,7 +911,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) { @@ -923,12 +923,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) { @@ -940,12 +940,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) { @@ -958,7 +958,7 @@ function delete_package_xml($pkg) { } } } - $static_output .= "done.\n"; + $static_output .= gettext("done.") . "\n"; update_output_window($static_output); } /* @@ -974,7 +974,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'])) @@ -998,36 +998,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]); @@ -1037,14 +1037,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 */ @@ -1060,10 +1060,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"); } diff --git a/etc/inc/priv.defs.inc b/etc/inc/priv.defs.inc index 6ba46d4..f16603f 100644 --- a/etc/inc/priv.defs.inc +++ b/etc/inc/priv.defs.inc @@ -7,1107 +7,1107 @@ $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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-interfaces-ppps-edit'] = array(); -$priv_list['page-interfaces-ppps-edit']['name'] = "WebCfg - Interfaces: PPP: Edit page"; -$priv_list['page-interfaces-ppps-edit']['descr'] = "Allow access to the 'Interfaces: PPP: Edit' page."; +$priv_list['page-interfaces-ppps-edit']['name'] = gettext("WebCfg - Interfaces: PPP: Edit page"); +$priv_list['page-interfaces-ppps-edit']['descr'] = gettext("Allow access to the 'Interfaces: PPP: 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-ppps'] = array(); -$priv_list['page-interfaces-ppps']['name'] = "WebCfg - Interfaces: PPP page"; -$priv_list['page-interfaces-ppps']['descr'] = "Allow access to the 'Interfaces: PPP' page."; +$priv_list['page-interfaces-ppps']['name'] = gettext("WebCfg - Interfaces: PPP page"); +$priv_list['page-interfaces-ppps']['descr'] = gettext("Allow access to the 'Interfaces: PPP' page."); $priv_list['page-interfaces-ppps']['match'] = array(); $priv_list['page-interfaces-ppps']['match'][] = "interfaces_ppps.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: 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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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 - 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-proxyarp'] = array(); -$priv_list['page-services-proxyarp']['name'] = "WebCfg - Services: Proxy ARP page"; -$priv_list['page-services-proxyarp']['descr'] = "Allow access to the 'Services: Proxy ARP' page."; +$priv_list['page-services-proxyarp']['name'] = gettext("WebCfg - Services: Proxy ARP page"); +$priv_list['page-services-proxyarp']['descr'] = gettext("Allow access to the 'Services: Proxy ARP' page."); $priv_list['page-services-proxyarp']['match'] = array(); $priv_list['page-services-proxyarp']['match'][] = "services_proxyarp.php*"; $priv_list['page-services-proxyarp-edit'] = array(); -$priv_list['page-services-proxyarp-edit']['name'] = "WebCfg - Services: Proxy ARP: Edit page"; -$priv_list['page-services-proxyarp-edit']['descr'] = "Allow access to the 'Services: Proxy ARP: Edit' page."; +$priv_list['page-services-proxyarp-edit']['name'] = gettext("WebCfg - Services: Proxy ARP: Edit page"); +$priv_list['page-services-proxyarp-edit']['descr'] = gettext("Allow access to the 'Services: Proxy ARP: Edit' page."); $priv_list['page-services-proxyarp-edit']['match'] = array(); $priv_list['page-services-proxyarp-edit']['match'][] = "services_proxyarp_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-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-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-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-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-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-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-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-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-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-rrdgraphs']['match'][] = "status_rrd_graph_img.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-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-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-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-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-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-sysctrl.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-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-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-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-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-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-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_addcert'] = array(); -$priv_list['page-system-usermanager_addcert']['name'] = "WebCfg - System: User Manager: Add Certificate"; -$priv_list['page-system-usermanager_addcert']['descr'] = "Allow access to the 'User Manager: Add Certificate' page."; +$priv_list['page-system-usermanager_addcert']['name'] = gettext("WebCfg - System: User Manager: Add Certificate"); +$priv_list['page-system-usermanager_addcert']['descr'] = gettext("Allow access to the 'User Manager: Add Certificate' page."); $priv_list['page-system-usermanager_addcert']['match'] = array(); $priv_list['page-system-usermanager_addcert']['match'][] = "system_usermanager_addcert.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-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-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-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-pppoeserver-user-edit'] = array(); -$priv_list['page-services-pppoeserver-user-edit']['name'] = "WebCfg - Services: PPPoE Server: User: Edit page"; -$priv_list['page-services-pppoeserver-user-edit']['descr'] = "Allow access to the 'Services: PPPoE Server: User: Edit' page."; +$priv_list['page-services-pppoeserver-user-edit']['name'] = gettext("WebCfg - Services: PPPoE Server: User: Edit page"); +$priv_list['page-services-pppoeserver-user-edit']['descr'] = gettext("Allow access to the 'Services: PPPoE Server: User: Edit' page."); $priv_list['page-services-pppoeserver-user-edit']['match'] = array(); $priv_list['page-services-pppoeserver-user-edit']['match'][] = "vpn_pppoe_users_edit.php*"; $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-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-users'] = array(); -$priv_list['page-services-pppoeserver-users']['name'] = "WebCfg - Services: PPPoE Server: Users page"; -$priv_list['page-services-pppoeserver-users']['descr'] = "Allow access to the 'Services: PPPoE Server: Users' page."; +$priv_list['page-services-pppoeserver-users']['name'] = gettext("WebCfg - Services: PPPoE Server: Users page"); +$priv_list['page-services-pppoeserver-users']['descr'] = gettext("Allow access to the 'Services: PPPoE Server: Users' page."); $priv_list['page-services-pppoeserver-users']['match'] = array(); $priv_list['page-services-pppoeserver-users']['match'][] = "vpn_pppoe_users.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-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-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*"; $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-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-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-diag-showbogons'] = array(); -$priv_list['page-diag-showbogons']['name'] = "WebCfg - Diagnostics: System Activity"; -$priv_list['page-diag-showbogons']['descr'] = "Allows access to the 'Diagnostics: Show Bogons' page"; +$priv_list['page-diag-showbogons']['name'] = gettext("WebCfg - Diagnostics: System Activity"); +$priv_list['page-diag-showbogons']['descr'] = gettext("Allows access to the 'Diagnostics: Show Bogons' page"); $priv_list['page-diag-showbogons']['match'] = array(); $priv_list['page-diag-showbogons']['match'][] = "diag_showbogons.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-trafficgraph']['match'][] = "bandwidth_by_ip.php*"; @@ -1115,53 +1115,53 @@ $priv_list['page-status-trafficgraph']['match'][] = "graph.php*"; $priv_list['page-status-trafficgraph']['match'][] = "traffic_graphs.widget.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*"; $priv_list['page-services-captiveportal-voucher-edit'] = array(); -$priv_list['page-services-captiveportal-voucher-edit']['name'] = "WebCfg - Services: Captive portal Voucher Rolls page"; -$priv_list['page-services-captiveportal-voucher-edit']['descr'] = "Allow access to the 'Services: Captive portal Edit Voucher Rolls' page."; +$priv_list['page-services-captiveportal-voucher-edit']['name'] = gettext("WebCfg - Services: Captive portal Voucher Rolls page"); +$priv_list['page-services-captiveportal-voucher-edit']['descr'] = gettext("Allow access to the 'Services: Captive portal Edit Voucher Rolls' page."); $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-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-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-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-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_rmvd = array(); -?>
\ No newline at end of file +?> 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 ce9797a..e928fc8 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"; @@ -243,7 +243,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")); } } } @@ -740,7 +740,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"); @@ -764,7 +764,7 @@ function enable_rrd_graphing() { } if($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } @@ -772,4 +772,4 @@ function kill_traffic_collector() { mwexec("/bin/pkill -f updaterrd.sh", true); } -?>
\ No newline at end of file +?> diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 74c923c..3c23ece 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -94,7 +94,7 @@ function services_dhcpd_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")); } } } @@ -105,14 +105,14 @@ function services_dhcpd_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_dhcpd_configure().\n"); + printf(gettext("Error: cannot open dhcpd.conf in services_dhcpd_configure().%s"), "\n"); return 1; } @@ -183,7 +183,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"; @@ -390,7 +390,7 @@ EOD; join(" ", $dhcpdifs)); if ($g['booting']) { - print "done.\n"; + print gettext("done.") . "\n"; } return 0; @@ -439,14 +439,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; } @@ -500,7 +500,7 @@ function services_dhcrelay_configure() { return 0; if ($g['booting']) - echo "Starting DHCP relay service..."; + echo gettext("Starting DHCP relay service..."); else sleep(1); @@ -627,7 +627,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']) @@ -639,7 +639,7 @@ function services_dyndns_configure($int = "") { } if ($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } return 0; @@ -660,7 +660,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); @@ -697,7 +697,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']) { @@ -724,12 +724,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; } @@ -877,7 +877,7 @@ EOD; "{$bindlan} -p {$g['varrun_path']}/snmpd.pid"); if ($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } return 0; @@ -1272,8 +1272,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) { @@ -1287,8 +1287,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"; } @@ -1328,10 +1328,10 @@ function upnp_start() { if($config['installedpackages']['miniupnpd']['config'][0]['enable']) { if($g['booting']) { - echo "Starting UPnP service... "; + echo gettext("Starting UPnP service... "); require_once('/usr/local/pkg/miniupnpd.inc'); sync_package_miniupnpd(); - echo "done.\n"; + echo gettext("done.") . "\n"; } else { upnp_action('start'); @@ -1367,15 +1367,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 85bae2b..bc4a0c2 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,19 +950,19 @@ 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['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 (!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."); } @@ -1090,64 +1090,64 @@ 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=\"name\" type=\"text\" 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\">"; $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>"; @@ -1173,23 +1173,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; @@ -1513,22 +1513,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(); @@ -1545,15 +1545,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'] <> "") { @@ -1567,19 +1567,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) { @@ -1594,11 +1594,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) { @@ -1820,7 +1820,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 .= "\">"; @@ -1828,35 +1828,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> </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() == "") @@ -1871,11 +1871,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() == "") @@ -1890,11 +1890,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() == "") @@ -1909,12 +1909,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>"; @@ -2162,24 +2162,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."); } /* @@ -2298,7 +2298,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()); @@ -2307,31 +2307,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; } @@ -2438,26 +2438,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(); @@ -2566,7 +2566,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()); @@ -2575,38 +2575,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; } @@ -2760,24 +2760,24 @@ class dummynet_class { function validate_input($data, &$input_errors) { $reqdfields[] = "bandwidth"; - $reqdfieldsn[] = "Bandwidth"; + $reqdfieldsn[] = gettext("Bandwidth"); $reqdfields[] = "bandwidthtype"; - $reqdfieldsn[] = "Bandwidthtype"; + $reqdfieldsn[] = gettext("Bandwidthtype"); $reqdfields[] = "name"; - $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"; - if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['name'])) - $input_errors[] = "Queue names must be alphanumeric and _ or - only."; + $input_errors[] = gettext("Queue limit must be an integer"); + if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['name'])) + $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); } } @@ -2871,10 +2871,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) { $this->SetQname($q['name']); @@ -2974,19 +2974,19 @@ 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=\"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() . "\">"; @@ -2994,22 +2994,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\""; @@ -3019,71 +3019,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 .= " <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 .= " ms<br> <span class=\"vexpl\">Hint: in most cases, you "; - $form .= "should specify 0 here (or leave the field empty)</span>"; + $form .= " 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 .= " <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 .= " <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 .= " 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 .= " 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; @@ -3140,7 +3139,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."); } /* @@ -3227,40 +3226,40 @@ 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 and its children</span>"; + $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue 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=\"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 .= " 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\">"; @@ -3268,51 +3267,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 .= " 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 .= " 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 .= " <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 .= " <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 .= " 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 .= " slots<br>"; - $form .= "<span class=\"vexpl\">Hint: in most cases, you "; - $form .= "should leave the field empty. It increases the hash size set."; + $form .= " " . 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\""; @@ -3445,27 +3443,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; @@ -3526,12 +3523,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() { @@ -3702,7 +3699,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.. @@ -4015,31 +4012,31 @@ function build_iface_without_this_queue($iface, $qname) { $scheduler = ": " . $altq->GetScheduler(); $form = "<tr><td width=\"20%\" >"; $form .= "<a href=\"firewall_shaper.php?interface=" . $iface . "&queue=" . $iface."&action=show\">".$iface.": ".$scheduler."</a>"; - $form .= "</td></tr>"; - $form .= "<tr><td width=\"100%\" class=\"vncellreq\">"; - $form .= "<a href=\"firewall_shaper_queues.php?interface="; - $form .= $iface . "&queue=". $qname . "&action=add\">"; - $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 .= "</td></tr>"; + $form .= "<tr><td width=\"100%\" class=\"vncellreq\">"; + $form .= "<a href=\"firewall_shaper_queues.php?interface="; + $form .= $iface . "&queue=". $qname . "&action=add\">"; + $form .= "<img src=\""; + $form .= "./themes/".$g['theme']."/images/icons/icon_plus.gif\""; + $form .= " width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("Clone shaper/queue on this interface") . "\">"; + $form .= gettext(" Clone shaper/queue on this interface") . "</a></td></tr>"; - return $form; + return $form; } $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 4a8214d..107a777 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -388,7 +388,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']]; @@ -433,7 +433,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"); @@ -472,7 +472,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"; @@ -642,7 +642,7 @@ EOD; } if ($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; return $retval; } @@ -655,7 +655,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"); @@ -665,9 +665,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; @@ -678,7 +678,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"); @@ -710,7 +710,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"); @@ -720,7 +720,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); @@ -748,9 +748,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; @@ -1064,7 +1064,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); @@ -1075,7 +1075,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); @@ -1083,7 +1083,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"; if(!(empty($ca) || (strlen(trim($ca)) == 0))) @@ -1105,7 +1105,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); @@ -1125,7 +1125,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']; @@ -1141,7 +1141,7 @@ function system_timezone_configure() { conf_mount_ro(); if ($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } function system_ntp_configure() { @@ -1152,17 +1152,17 @@ function system_ntp_configure() { /* open configuration for wrting or bail */ $fd = fopen("{$g['varetc_path']}/ntpd.conf","w"); if(!$fd) { - log_error("Could not open {$g['varetc_path']}/ntpd.conf for writing"); + log_error(sprintf(gettext("Could not open %s/ntpd.conf for writing"), $g['varetc_path'])); return; } fwrite($fd, "# \n"); - fwrite($fd, "# pfSense OpenNTPD configuration file \n"); + fwrite($fd, "# " . gettext("pfSense OpenNTPD configuration file") . " \n"); fwrite($fd, "# \n\n"); /* foreach through servers and write out to ntpd.conf */ foreach (explode(' ', $syscfg['timeservers']) as $ts) - fwrite($fd, "servers {$ts}\n"); + fwrite($fd, sprintf(gettext("servers %s\n"), $ts)); /* Setup listener(s) if the user has configured one */ if ($config['installedpackages']['openntpd']) { @@ -1211,7 +1211,7 @@ function sync_system_time() { $syscfg = $config['system']; 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(' ', $syscfg['timeservers']) as $ts) { @@ -1219,7 +1219,7 @@ function sync_system_time() { } if ($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } @@ -1316,7 +1316,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; } @@ -1337,7 +1337,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']; @@ -1349,13 +1349,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"; } } } @@ -1454,10 +1454,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') @@ -1466,10 +1466,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]); @@ -1481,7 +1481,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 0454475..c7c29c8 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]['pages'] = "ANY"; $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,79 +630,79 @@ 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'][14]['tunable'] = "kern.rndtest.verbose"; - $config['sysctl']['item'][14]['descr'] = "Verbosity of the rndtest driver (0: do not display results on console)"; + $config['sysctl']['item'][14]['descr'] = gettext("Verbosity of the rndtest driver (0: do not display results on console)"); $config['sysctl']['item'][14]['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"; @@ -743,10 +743,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); @@ -804,7 +804,7 @@ function upgrade_043_to_044() { $gateway['name'] = "SROUTE{$i}"; $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; @@ -856,7 +856,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']; @@ -1001,7 +1001,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']) @@ -1091,7 +1091,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']); @@ -1143,7 +1143,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(); @@ -1270,7 +1270,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']); @@ -1596,7 +1596,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 2dbf3ef..507e32c 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++; @@ -199,7 +199,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); @@ -839,7 +839,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 febb0f7..74d83d9 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -158,7 +158,7 @@ function voucher_auth($voucher_received, $test = 0) { list($timestamp,$minutes) = explode(",", $line); // 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) @@ -169,25 +169,25 @@ function voucher_auth($voucher_received, $test = 0) { $pos = $nr >> 3; // divide by 8 -> octet $mask = 1 << ($nr % 8); if (ord($bitstring[$roll][$pos]) & $mask) { - $test_result[] = "$voucher ($roll/$nr) already used and expired"; - captiveportal_syslog("$voucher ($roll/$nr) already used and expired"); + $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) already used and expired'), $voucher, $roll, $nr); + captiveportal_syslog(sprintf(gettext('%1$s (%2$s/%3$s) already used and expired'), $voucher, $roll, $nr)); $total_minutes = -1; // voucher expired $error++; } else { // mark bit for this voucher as used $bitstring[$roll][$pos] = chr(ord($bitstring[$roll][$pos]) | $mask); - $test_result[] = "$voucher ($roll/$nr) good for {$minutes_per_roll[$roll]} Minutes"; + $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s) good for %4$d Minutes'), $voucher, $roll, $nr, $minutes_per_roll[$roll]); $total_minutes += $minutes_per_roll[$roll]; } } } else { - $test_result[] = "$voucher ($roll/$nr): not found on any registererd Roll"; + $test_result[] = sprintf(gettext('%1$s (%2$s/%3$s): not found on any registererd Roll'), $voucher, $roll, $nr); captiveportal_syslog("$voucher ($roll/$nr): not found on any registererd Roll"); } } else { // hmm, thats weird ... not what I expected - $test_result[] = "$voucher invalid: $result !!"; - captiveportal_syslog("$voucher invalid: $result !!"); + $test_result[] = "$voucher " . gettext("invalid:") . " $result !!"; + captiveportal_syslog("$voucher " . gettext("invalid:") . " $result !!"); $error++; } } @@ -195,9 +195,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); return $test_result; @@ -263,7 +263,7 @@ function voucher_configure() { return 0; if ($g['booting']) - echo "Enabling voucher support... "; + echo gettext("Enabling voucher support... "); // start cron if we're asked to save runtime DB periodically // to XML config if it changed @@ -280,7 +280,7 @@ function voucher_configure() { $pubkey = base64_decode($config['voucher']['publickey']); $fd = fopen("{$g['varetc_path']}/voucher.public", "w"); if (!$fd) { - captiveportal_syslog("Voucher error: cannot write voucher.public\n"); + captiveportal_syslog(gettext("Voucher error: cannot write voucher.public") . "\n"); unlock($voucherlck); return 1; } @@ -291,7 +291,7 @@ function voucher_configure() { /* 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; } @@ -327,7 +327,7 @@ function voucher_configure() { } unlock($voucherlck); - echo "done\n"; + echo gettext("done") . "\n"; } return 0; @@ -344,7 +344,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 @@ -417,7 +417,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); @@ -435,7 +435,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(); } @@ -477,4 +477,4 @@ function voucher_save_db_to_config() { return; } -?>
\ No newline at end of file +?> diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 8b4421a..906fcdd 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"); @@ -207,18 +207,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; } } @@ -227,7 +227,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; } @@ -289,7 +289,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; } @@ -381,7 +381,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; } @@ -512,7 +512,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; } @@ -521,7 +521,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; } @@ -532,7 +532,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; } @@ -545,7 +545,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; } @@ -777,7 +777,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; } @@ -856,7 +856,7 @@ EOD; if(is_ipaddr($gatewayip)) { /* FIXME: does adding route-to and reply-to on the in/outbound * rules fix this? smos@ 13-01-2009 */ - log_error("IPSEC interface is not WAN but {$parentinterface}, adding static route for VPN endpoint {$rgip} via {$gatewayip}"); + log_error(sprintf(gettext('IPSEC interface is not WAN but %1$s, adding static route for VPN endpoint %2$s via %3$s'), $parentinterface, $rgip, $gatewayip)); mwexec("/sbin/route delete -host {$rgip}"); mwexec("/sbin/route add -host {$rgip} {$gatewayip}"); } @@ -949,7 +949,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(); } @@ -988,7 +988,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"); @@ -998,7 +998,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 */ @@ -1016,7 +1016,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; } @@ -1129,7 +1129,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; } @@ -1153,7 +1153,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; } @@ -1207,7 +1207,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"); @@ -1231,7 +1231,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"; @@ -1334,7 +1334,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; } @@ -1360,7 +1360,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; } @@ -1388,7 +1388,7 @@ EOD; } if ($g['booting']) - echo "done\n"; + echo gettext("done") . "\n"; return 0; } @@ -1407,7 +1407,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"); @@ -1432,7 +1432,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"; @@ -1522,7 +1522,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; } @@ -1547,7 +1547,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; } @@ -1680,22 +1680,22 @@ function reload_tunnel_spd_policy($phase1, $phase2, $old_phase1, $old_phase2) { $rgip = resolve_retry($phase1['remote-gateway']); add_hostname_to_watch($phase1['remote-gateway']); if (!$rgip) { - 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; } } else { $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 = ""; @@ -1741,7 +1741,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 a3b9cad..80bf7c8 100644 --- a/etc/inc/xmlrpc_client.inc +++ b/etc/inc/xmlrpc_client.inc @@ -166,13 +166,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"), ); @@ -295,7 +295,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 { @@ -303,7 +303,7 @@ function XML_RPC_se($parser_resource, $name, $attrs) if (!in_array($XML_RPC_xh[$parser]['stack'][0], $XML_RPC_valid_parents[$name])) { $name = $GLOBALS['XML_RPC_func_ereg_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; } } @@ -466,7 +466,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 (!$GLOBALS['XML_RPC_func_ereg']("^[+-]?[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 { @@ -889,8 +889,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; } @@ -960,15 +962,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; } @@ -1351,7 +1353,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']); @@ -1382,7 +1384,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; @@ -1491,7 +1493,7 @@ class XML_RPC_Message extends XML_RPC_Base !$GLOBALS['XML_RPC_func_ereg']('^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 . ')'); @@ -1517,7 +1519,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)), @@ -1611,14 +1613,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; } @@ -1653,7 +1656,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; } @@ -1669,7 +1672,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; } @@ -2077,4 +2080,4 @@ function XML_RPC_encode($php_val) * End: */ -?>
\ No newline at end of file +?> diff --git a/etc/inc/xmlrpc_server.inc b/etc/inc/xmlrpc_server.inc index 8887bdf..ff828e6 100644 --- a/etc/inc/xmlrpc_server.inc +++ b/etc/inc/xmlrpc_server.inc @@ -62,8 +62,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, @@ -80,10 +80,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, @@ -100,8 +100,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. @@ -685,4 +685,4 @@ class XML_RPC_Server * End: */ -?>
\ No newline at end of file +?> 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 +?> |