mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
java: move away from _ for internationalization
The "_" is becoming a keyword in Java, which causes tons of warnings currently in our test suite. GNU Gettext is now using "i18n" instead of "_" (https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=e89fea36545f27487d9652a13e6a0adbea1117d0). * data/skeletons/java.m4: Use "i18n", not "_". * examples/java/calc/Calc.y, tests/calc.at: Adjust.
This commit is contained in:
@@ -479,6 +479,8 @@ m4_define([b4_token_enums_defines],
|
||||
|
||||
# b4_symbol_translate(STRING)
|
||||
# ---------------------------
|
||||
# Used by "bison" in the array of symbol names to mark those that
|
||||
# require translation.
|
||||
m4_define([b4_symbol_translate],
|
||||
[[N_($1)]])
|
||||
|
||||
|
||||
@@ -229,15 +229,17 @@ m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])])
|
||||
|
||||
# b4_symbol_translate(STRING)
|
||||
# ---------------------------
|
||||
# Used by "bison" in the array of symbol names to mark those that
|
||||
# require translation.
|
||||
m4_define([b4_symbol_translate],
|
||||
[[_($1)]])
|
||||
[[i18n($1)]])
|
||||
|
||||
|
||||
# b4_trans(STRING)
|
||||
# ----------------
|
||||
# Translate a symbol. Avoid collision with b4_translate.
|
||||
# Translate a string if i18n is enabled. Avoid collision with b4_translate.
|
||||
m4_define([b4_trans],
|
||||
[m4_if(b4_has_translations, 0, [$1], [_($1)])])
|
||||
[m4_if(b4_has_translations, 0, [$1], [i18n($1)])])
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user