summaryrefslogtreecommitdiffstats
path: root/etc/inc/xmlparse.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-17 09:34:12 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-17 09:34:12 -0300
commitada992bd115db157ef8f21090e79135b1c26c152 (patch)
tree189616d22ea433af42666cec8c4dfcbb6a224439 /etc/inc/xmlparse.inc
parentf55943aa30f4bf5f0b916454bbbdc7bd7de0e63f (diff)
downloadpfsense-ada992bd115db157ef8f21090e79135b1c26c152.zip
pfsense-ada992bd115db157ef8f21090e79135b1c26c152.tar.gz
Implement gettext() calls on xmlparse.inc
Diffstat (limited to 'etc/inc/xmlparse.inc')
-rw-r--r--etc/inc/xmlparse.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index 3d20ebb..cb01253 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: %s at line %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\n",
+ log_error(sprintf(gettext("XML error: %s at line %d") . "\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
return -1;
@@ -188,7 +188,7 @@ function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
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));
return -1;
}
OpenPOWER on IntegriCloud