Project

General

Profile

« Previous | Next » 

Revision f55943aa

Added by Renato Botelho almost 15 years ago

Implement gettext() calls on xmlparse_attr.inc

View differences:

etc/inc/xmlparse_attr.inc
75 75

  
76 76
	} else if (isset($ptr)) {
77 77
		/* multiple entries not allowed for this element, bail out */
78
		die(sprintf("XML error: %s at line %d cannot occur more than once\n",
78
		die(sprintf(gettext("XML error: %s at line %d cannot occur more than once") . "\n",
79 79
				$name,
80 80
				xml_get_current_line_number($parser)));
81 81
	} else if (isset($writeattrs)) {
......
184 184
	xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE, 1); 
185 185

  
186 186
	if (!($fp = fopen($cffile, "r"))) {
187
		log_error("Error: could not open XML input\n");
187
		log_error(gettext("Error: could not open XML input") . "\n");
188 188
		if (isset($parsed_attributes)) {
189 189
			$parsed_attributes = array();
190 190
			unset($parsedattrs);
......
194 194

  
195 195
	while ($data = fread($fp, 4096)) {
196 196
		if (!xml_parse($xml_parser, $data, feof($fp))) {
197
			log_error(sprintf("XML error: %s at line %d\n",
197
			log_error(sprintf(gettext("XML error: %s at line %d") . "\n",
198 198
						xml_error_string(xml_get_error_code($xml_parser)),
199 199
						xml_get_current_line_number($xml_parser)));
200 200
			if (isset($parsed_attributes)) {
......
207 207
	xml_parser_free($xml_parser);
208 208

  
209 209
	if (!$parsedcfg[$rootobj]) {
210
		log_error("XML error: no $rootobj object found!\n");
210
		log_error(sprintf(gettext("XML error: no %s object found!") . "\n", $rootobj));
211 211
		if (isset($parsed_attributes)) {
212 212
			$parsed_attributes = array();
213 213
			unset($parsedattrs);

Also available in: Unified diff