Project

General

Profile

« Previous | Next » 

Revision 10e91486

Added by Carlos Eduardo Ramos almost 15 years ago

Implement gettext() calls on config.inc

View differences:

etc/inc/config.inc
88 88
	if(stristr($config_contents, "<m0n0wall>") == true) {
89 89
		if($g['booting']) echo ".";
90 90
		/* user has just upgraded to m0n0wall, replace root xml tags */
91
		log_error("Upgrading m0n0wall configuration to pfSense... ");
91
		log_error(gettext("Upgrading m0n0wall configuration to pfSense... "));
92 92
		$config_contents = str_replace("m0n0wall","pfsense", $config_contents);
93 93
		if (!config_validate("{$g['conf_path']}/config.xml"))
94
			log_error("ERROR!  Could not convert m0n0wall -> pfsense in config.xml");
94
			log_error(gettext("ERROR!  Could not convert m0n0wall -> pfsense in config.xml"));
95 95
		conf_mount_rw();
96 96
		$fd = fopen("/cf/conf/config.xml", "w");
97 97
		fwrite($fd, $config_contents);
......
121 121
				}
122 122
			}
123 123
			$cfgfstype = "msdosfs";
124
			echo "CDROM build\n";
125
			echo "   CFG: {$cfgpartition}\n";
126
			echo "  TYPE: {$cfgfstype}\n";
124
			echo gettext("CDROM build") . "\n";
125
			echo "   " . gettext("CFG:") . " {$cfgpartition}\n";
126
			echo "   " . gettext("CFG:") . " {$cfgpartition}\n";
127
			echo "  " . gettext("TYPE:") . " {$cfgfstype}\n";
127 128
		} else {
128 129
			if($g['booting']) echo ".";
129 130
			/* probe kernel known disks until we find one with config.xml */
......
138 139
						$cfgdevice = $mountdisk;
139 140
						$cfgpartition = $cfgdevice . "a";
140 141
						$cfgfstype = "ufs";
141
						echo "Found configuration on $cfgdevice.\n";
142
						printf(gettext("Found configuration on %s.%s"), $cfgdevice, "\n");
142 143
					}
143 144

  
144 145
					mwexec("/sbin/umount -f {$g['cf_path']}");
......
153 154
						$cfgdevice = $mountdisk;
154 155
						$cfgpartition = $cfgdevice . "d";
155 156
						$cfgfstype = "ufs";
156
						echo "Found configuration on $cfgdevice.\n";
157
						printf(gettext("Found configuration on %s.%s"), $cfgdevice, "\n");
157 158
					}
158 159

  
159 160
					mwexec("/sbin/umount -f {$g['cf_path']}");
......
167 168
		if (!$cfgdevice) {
168 169
			$last_backup = discover_last_backup();
169 170
			if($last_backup) {
170
				log_error("No config.xml found, attempting last known config restore.");
171
				file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
171
				log_error(gettext("No config.xml found, attempting last known config restore."));
172
				file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
172 173
				restore_backup("/cf/conf/backup/{$last_backup}");
173 174
			} else {
174
				log_error("No config.xml or config backups found, resetting to factory defaults.");
175
				log_error(gettext("No config.xml or config backups found, resetting to factory defaults."));
175 176
				restore_backup('/conf.default/config.xml');
176 177
			}
177 178
		}
......
211 212
	}
212 213
}
213 214

  
214
?>
215
?>

Also available in: Unified diff