diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-04-19 09:13:47 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-04-24 19:03:12 +0200 |
commit | b42702d738bff79b16d96b102166dd19d27760a9 (patch) | |
tree | 0d0d66d7e098c536bc4e777e472485d486ed7572 /doc | |
parent | 401e7c5c36af9b09154c9af8c6e0626923529cbd (diff) | |
download | bison-b42702d738bff79b16d96b102166dd19d27760a9.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bison.texi | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/bison.texi b/doc/bison.texi index 3ed36098..141fcb0c 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -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 |