aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-24 19:12:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-24 19:12:49 +0000
commit32b58d0220de9ea13670a2a9fff61360abfa36bc (patch)
tree4491eac04c81b46d7ed5691d7809f97b5896c3a1 /src/backend/utils/adt/xml.c
parent3da2a4b899dc5005ead9b6d33198d76f4d7ed5c7 (diff)
downloadpostgresql-32b58d0220de9ea13670a2a9fff61360abfa36bc.tar.gz
postgresql-32b58d0220de9ea13670a2a9fff61360abfa36bc.zip
Fix various infelicities that have snuck into usage of errdetail() and
friends. Avoid double translation of some messages, ensure other messages are exposed for translation (and make them follow the style guidelines), avoid unsafe passing of an unpredictable message text as a format string.
Diffstat (limited to 'src/backend/utils/adt/xml.c')
-rw-r--r--src/backend/utils/adt/xml.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 95b147b09f1..f0a668b2927 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.69 2008/03/01 02:46:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.70 2008/03/24 19:12:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1401,25 +1401,25 @@ xml_ereport_by_code(int level, int sqlcode,
switch (code)
{
case XML_ERR_INVALID_CHAR:
- det = "Invalid character value";
+ det = gettext_noop("Invalid character value.");
break;
case XML_ERR_SPACE_REQUIRED:
- det = "Space required";
+ det = gettext_noop("Space required.");
break;
case XML_ERR_STANDALONE_VALUE:
- det = "standalone accepts only 'yes' or 'no'";
+ det = gettext_noop("standalone accepts only 'yes' or 'no'.");
break;
case XML_ERR_VERSION_MISSING:
- det = "Malformed declaration expecting version";
+ det = gettext_noop("Malformed declaration: missing version.");
break;
case XML_ERR_MISSING_ENCODING:
- det = "Missing encoding in text declaration";
+ det = gettext_noop("Missing encoding in text declaration.");
break;
case XML_ERR_XMLDECL_NOT_FINISHED:
- det = "Parsing XML declaration: '?>' expected";
+ det = gettext_noop("Parsing XML declaration: '?>' expected.");
break;
default:
- det = "Unrecognized libxml error code: %d";
+ det = gettext_noop("Unrecognized libxml error code: %d.");
break;
}