提交 0465c52b 编写于 作者: P Peter Eisentraut

Arrange that the string "syntax error" generated by bison is translated.

上级 14ba9fde
/* $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 */ /* Copyright comment */
%{ %{
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
*/ */
#define base_yylex filtered_base_yylex #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. * Variables containing simple states.
*/ */
......
/* $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: /*EMPTY*/
| statements statement | statements statement
...@@ -1987,8 +1987,9 @@ ecpg_into: INTO into_list { $$ = EMPTY; } ...@@ -1987,8 +1987,9 @@ ecpg_into: INTO into_list { $$ = EMPTY; }
void base_yyerror(const char *error) 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\"", 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) void parser_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册