summaryrefslogtreecommitdiffstats
path: root/etc/inc/upgrade_config.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-18 12:50:18 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-18 12:50:18 -0300
commit4d511e5b646c24ced446c528f64336bc78572a2d (patch)
tree5bf926ddda6fe4d153c6c10d8161c07a46c887eb /etc/inc/upgrade_config.inc
parentdbaf21d4944dd9616c4553a5f8380fa5d3a1fe9d (diff)
downloadpfsense-4d511e5b646c24ced446c528f64336bc78572a2d.zip
pfsense-4d511e5b646c24ced446c528f64336bc78572a2d.tar.gz
Implement gettext calls on upgrade_config.inc
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r--etc/inc/upgrade_config.inc42
1 files changed, 21 insertions, 21 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 3def794..be3ff31 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -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'];
@@ -534,7 +534,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;
}
@@ -609,7 +609,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";
@@ -628,19 +628,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";
@@ -769,10 +769,10 @@ function upgrade_042_to_043() {
}
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);
@@ -830,7 +830,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;
@@ -883,7 +883,7 @@ function upgrade_045_to_046() {
$pool['type'] = 'server';
$pool['behaviour'] = 'balance';
$pool['name'] = "{$vs_a[$i]['name']}-sitedown";
- $pool['desc'] = "Sitedown pool for VS: {$vs_a[$i]['name']}";
+ $pool['desc'] = 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'];
@@ -1028,7 +1028,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'])
@@ -1118,7 +1118,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']);
@@ -1170,7 +1170,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();
@@ -1297,7 +1297,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']);
@@ -1555,7 +1555,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;
}
OpenPOWER on IntegriCloud