|
1 | 1 | #! /usr/bin/env python3 |
| 2 | +# -*- coding: iso-8859-1 -*- |
2 | 3 | # Originally written by Barry Warsaw <[email protected]> |
3 | 4 | # |
4 | 5 | # Minimally patched to make it even more xgettext compatible |
5 | 6 | # by Peter Funk <[email protected]> |
6 | 7 | # |
7 | | -# 2002-11-22 Jürgen Hermann <[email protected]> |
| 8 | +# 2002-11-22 J�rgen Hermann <[email protected]> |
8 | 9 | # Added checks that _() only contains string literals, and |
9 | 10 | # command line args are resolved to module lists, i.e. you |
10 | 11 | # can now pass a filename, a module or package name, or a |
@@ -206,7 +207,7 @@ def make_escapes(pass_nonascii): |
206 | 207 | global escapes, escape |
207 | 208 | if pass_nonascii: |
208 | 209 | # Allow non-ascii characters to pass through so that e.g. 'msgid |
209 | | - # "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we |
| 210 | + # "H�he"' would result not result in 'msgid "H\366he"'. Otherwise we |
210 | 211 | # escape any character outside the 32..126 range. |
211 | 212 | mod = 128 |
212 | 213 | escape = escape_ascii |
@@ -323,6 +324,10 @@ def __init__(self, options): |
323 | 324 | self.__prev_token = None |
324 | 325 |
|
325 | 326 | def __call__(self, ttype, tstring, stup, etup, line): |
| 327 | + # dispatch |
| 328 | +## import token |
| 329 | +## print('ttype:', token.tok_name[ttype], 'tstring:', tstring, |
| 330 | +## file=sys.stderr) |
326 | 331 | self.__state(ttype, tstring, stup[0]) |
327 | 332 | self.__prev_token = (ttype, tstring, stup, etup, line) |
328 | 333 |
|
|
0 commit comments