bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scanner: simplify use of gettext


From: Akim Demaille
Subject: scanner: simplify use of gettext
Date: Sat, 10 Nov 2018 15:22:23 +0100

Hi Paul,

You introduce unexpected_end in 4febdd9667393ee2f1345540c30185bba337d52c 
(https://lists.gnu.org/archive/html/bison-patches/2004-05/msg00001.html) with 
two calls for internationalization: N_ in the caller (well, pseudo call), and _ 
in the callee.  I don’t see what it buys to have two instead of one call only, 
have I missed something?

commit 142066dad5dde7a67bd8c37b5340088f74a57d18
Author: Akim Demaille <address@hidden>
Date:   Sat Nov 10 15:14:48 2018 +0100

    scanner: simplify use of gettext
    
    * src/scan-gram.l (unexpected_end): Leave the actual call to gettext
    to the caller.

diff --git a/src/scan-gram.l b/src/scan-gram.l
index 8998c60a..f508edca 100644
--- a/src/scan-gram.l
+++ b/src/scan-gram.l
@@ -969,7 +969,7 @@ unexpected_end (boundary start, char const *msgid, char 
const *token_end)
   /* Instead of '\'', display "'".  */
   if (STREQ (token_end, "'\\''"))
     token_end = "\"'\"";
-  complain (&loc, complaint, _(msgid), token_end);
+  complain (&loc, complaint, msgid, token_end);
 }
 
 
@@ -982,7 +982,7 @@ unexpected_end (boundary start, char const *msgid, char 
const *token_end)
 static void
 unexpected_eof (boundary start, char const *token_end)
 {
-  unexpected_end (start, N_("missing %s at end of file"), token_end);
+  unexpected_end (start, _("missing %s at end of file"), token_end);
 }
 
 
@@ -993,7 +993,7 @@ unexpected_eof (boundary start, char const *token_end)
 static void
 unexpected_newline (boundary start, char const *token_end)
 {
-  unexpected_end (start, N_("missing %s at end of line"), token_end);
+  unexpected_end (start, _("missing %s at end of line"), token_end);
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]