# HG changeset patch # User Augie Fackler # Date 1570371617 14400 # Node ID e65e7290041ed75296a9f2ad295c71ad5ce85ac3 # Parent 86e4daa2d54c6680c0dff84a731863ae05ffac12 contrib: fix check-code to be able to detect missing _() with bytestrings Differential Revision: https://phab.mercurial-scm.org/D6997 diff -r 86e4daa2d54c -r e65e7290041e 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" ...