contrib: fix check-code to be able to detect missing _() with bytestrings
authorAugie Fackler <augie@google.com>
Sun, 06 Oct 2019 10:20:17 -0400
changeset 43081 e65e7290041e
parent 43080 86e4daa2d54c
child 43082 fdfe5cfb3723
contrib: fix check-code to be able to detect missing _() with bytestrings Differential Revision: https://phab.mercurial-scm.org/D6997
contrib/check-code.py
--- a/contrib/check-code.py	Sun Oct 06 10:51:16 2019 -0400
+++ b/contrib/check-code.py	Sun Oct 06 10:20:17 2019 -0400
@@ -508,7 +508,7 @@
          [ \t\n#]*
          (?# any strings/comments might precede a string, which
            # contains translatable message)
-         ((['"]|\'\'\'|""")[ \npq%bAPMxno]*(['"]|\'\'\'|""")[ \t\n#]+)*
+         b?((['"]|\'\'\'|""")[ \npq%bAPMxno]*(['"]|\'\'\'|""")[ \t\n#]+)*
          (?# sequence consisting of below might precede translatable message
            # - formatting string: "% 10s", "%05d", "% -3.2f", "%*s", "%%" ...
            # - escaped character: "\\", "\n", "\0" ...