mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: bistromathic: demonstrate internationalization
Currently it was only using stubs. Let's actually translate the strings using gettext. * examples/c/bistromathic/local.mk: Define LOCALEDIR, BISON_LOCALEDIR and link with libintl. * examples/c/bistromathic/parse.y: Use them. Remove useless includes. Take ENABLE_NLS into account. (error_format_string): New. (yyreport_syntax_error): Rewrite to rely on a format string, which is more appropriate for internationalization. * examples/c/bistromathic/Makefile: We no longer use Flex. We need readline and intl. * doc/bison.texi: Point to bistromathic for a better option for internationalization. * po/POTFILES.in: Add bistromathic.
This commit is contained in:
@@ -7514,7 +7514,9 @@ values, which is always less than @code{YYNTOKENS}.
|
||||
The name of the symbol whose kind is @var{symbol}, possibly translated.
|
||||
@end deftypefun
|
||||
|
||||
A custom syntax error function looks as follows.
|
||||
A custom syntax error function looks as follows. This implementation is
|
||||
inappropriate for internationalization, see the @file{c/bistromathic}
|
||||
example for a better altnative.
|
||||
|
||||
@example
|
||||
int
|
||||
@@ -10601,7 +10603,7 @@ Print the version number of Bison and exit.
|
||||
Print the name of the directory containing locale-dependent data.
|
||||
|
||||
@item --print-datadir
|
||||
Print the name of the directory containing skeletons and XSLT.
|
||||
Print the name of the directory containing skeletons, CSS and XSLT.
|
||||
|
||||
@item -u
|
||||
@item --update
|
||||
@@ -12074,7 +12076,9 @@ values, which is always less than @code{YYNTOKENS}.
|
||||
The name of the symbol whose kind is @var{symbol}, possibly translated.
|
||||
@end deftypemethod
|
||||
|
||||
A custom syntax error function looks as follows.
|
||||
A custom syntax error function looks as follows. This implementation is
|
||||
inappropriate for internationalization, see the @file{c/bistromathic}
|
||||
example for a better altnative.
|
||||
|
||||
@example
|
||||
void
|
||||
@@ -13327,6 +13331,10 @@ public void reportSyntaxError(YYParser.Context ctx) @{
|
||||
System.err.println("");
|
||||
@}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This implementation is inappropriate for internationalization, see the
|
||||
@file{c/bistromathic} example for a better altnative.
|
||||
@end deftypemethod
|
||||
|
||||
@node Java Action Features
|
||||
|
||||
Reference in New Issue
Block a user