Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0465c52

Browse files
committed
Arrange that the string "syntax error" generated by bison is translated.
1 parent14ba9fd commit0465c52

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

‎src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.6 2009/06/03 20:24:51 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.7 2009/06/10 23:11:52 petere Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -22,6 +22,12 @@
2222
*/
2323
#define base_yylex filtered_base_yylex
2424

25+
/*
26+
* This is only here so the string gets into the POT. Bison uses it
27+
* internally.
28+
*/
29+
#define bison_gettext_dummy gettext_noop("syntax error")
30+
2531
/*
2632
* Variables containing simple states.
2733
*/

‎src/interfaces/ecpg/preproc/ecpg.trailer

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.8 2009/06/03 20:24:51 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.9 2009/06/10 23:11:52 petere Exp $ */
22

33
statements: /*EMPTY*/
44
| statements statement
@@ -1987,8 +1987,9 @@ ecpg_into: INTO into_list{ $$ = EMPTY; }
19871987

19881988
void base_yyerror(const char *error)
19891989
{
1990+
/* translator: %s is typically the translation of "syntax error" */
19901991
mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
1991-
error, token_start ? token_start : yytext);
1992+
_(error), token_start ? token_start : yytext);
19921993
}
19931994

19941995
void parser_init(void)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp