aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-06-10 23:11:52 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-06-10 23:11:52 +0000
commit0465c52b00ee2e6d9f61d80fb56e8e402f0603fd (patch)
tree60a23c12395a33e7f275383a986c44ed712ffd8f /src
parent14ba9fdef67004113c430a45645be3e7db0d6ace (diff)
downloadpostgresql-0465c52b00ee2e6d9f61d80fb56e8e402f0603fd.tar.gz
postgresql-0465c52b00ee2e6d9f61d80fb56e8e402f0603fd.zip
Arrange that the string "syntax error" generated by bison is translated.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header8
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.trailer5
2 files changed, 10 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index faaf607c610..c2091d28293 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.6 2009/06/03 20:24:51 tgl Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.7 2009/06/10 23:11:52 petere Exp $ */
/* Copyright comment */
%{
@@ -23,6 +23,12 @@
#define base_yylex filtered_base_yylex
/*
+ * This is only here so the string gets into the POT. Bison uses it
+ * internally.
+ */
+#define bison_gettext_dummy gettext_noop("syntax error")
+
+/*
* Variables containing simple states.
*/
int struct_level = 0;
diff --git a/src/interfaces/ecpg/preproc/ecpg.trailer b/src/interfaces/ecpg/preproc/ecpg.trailer
index 718e74a9b30..1b287e4c65d 100644
--- a/src/interfaces/ecpg/preproc/ecpg.trailer
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.8 2009/06/03 20:24:51 tgl Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.9 2009/06/10 23:11:52 petere Exp $ */
statements: /*EMPTY*/
| statements statement
@@ -1987,8 +1987,9 @@ ecpg_into: INTO into_list { $$ = EMPTY; }
void base_yyerror(const char *error)
{
+ /* translator: %s is typically the translation of "syntax error" */
mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
- error, token_start ? token_start : yytext);
+ _(error), token_start ? token_start : yytext);
}
void parser_init(void)