]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
"&&" means no accelerator.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Mar 2002 12:16:04 +0000 (12:16 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:26:35 +0000 (01:26 +0200)
src/ChangeLog
src/msgfmt.c

index a787e89bd8e50719e24a2459bdc8ad055a188950..9b8d00028f0695471c34d6645d9afe4e986d96d1 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-02  Bruno Haible  <bruno@clisp.org>
+
+       * msgfmt.c (check_pair): Don't count "&&" as an accelerator designator,
+       for consistency with Qt and KDE.
+
 2002-02-24  Bruno Haible  <bruno@clisp.org>
 
        * po-lex.c: Include libstdarg.h.
index be5c2dc06685ab4262beaa9810e6489c3c555508..5b2ca40ec83bfb8fe6e3e8215513ab3635ccdfb2 100644 (file)
@@ -1181,11 +1181,14 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos,
       p = strchr (msgid, accelerator_char);
       if (p != NULL && strchr (p + 1, accelerator_char) == NULL)
        {
-         /* Count the number of '&' in msgstr.  */
+         /* Count the number of '&' in msgstr, but ignore '&&'.  */
          unsigned int count = 0;
 
          for (p = msgstr; (p = strchr (p, accelerator_char)) != NULL; p++)
-           count++;
+           if (p[1] == accelerator_char)
+             p++;
+           else
+             count++;
 
          if (count == 0)
            {