diff options
author | Carlos Eduardo Ramos <carlos.ramos@bluepex.com> | 2010-08-16 09:54:11 -0300 |
---|---|---|
committer | Carlos Eduardo Ramos <carlos.ramos@bluepex.com> | 2010-08-16 09:54:11 -0300 |
commit | 10e91486fa5c2d467135bcaa887aee83458442a0 (patch) | |
tree | e86f3ed2920cccf59f2335fa414120cd751e031b /etc/inc/config.inc | |
parent | 814f9e6495dad2476926738cd7b670622738b812 (diff) | |
download | pfsense-10e91486fa5c2d467135bcaa887aee83458442a0.zip pfsense-10e91486fa5c2d467135bcaa887aee83458442a0.tar.gz |
Implement gettext() calls on config.inc
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 724615a..98592c9 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -88,10 +88,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); @@ -121,9 +121,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 */ @@ -138,7 +139,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']}"); @@ -153,7 +154,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']}"); @@ -167,11 +168,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'); } } @@ -211,4 +212,4 @@ if($config_parsed == true) { } } -?>
\ No newline at end of file +?> |