diff options
author | JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> | 2023-03-08 13:58:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 13:58:14 (GMT) |
commit | b097925858c6975c73e989226cf278cc382c0416 (patch) | |
tree | 1adce7e2f4ad49a61832067d30a4cd3a552e553b /Tools/i18n | |
parent | 401d7a7f009ca2e282b1a0d1b880dc602afd39dc (diff) | |
download | cpython-b097925858c6975c73e989226cf278cc382c0416.zip cpython-b097925858c6975c73e989226cf278cc382c0416.tar.gz cpython-b097925858c6975c73e989226cf278cc382c0416.tar.bz2 |
gh-102507 Remove invisible pagebreak characters (#102531)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
Diffstat (limited to 'Tools/i18n')
-rwxr-xr-x | Tools/i18n/pygettext.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Tools/i18n/pygettext.py b/Tools/i18n/pygettext.py index 7ada791..3a0b27b 100755 --- a/Tools/i18n/pygettext.py +++ b/Tools/i18n/pygettext.py @@ -174,7 +174,6 @@ DEFAULTKEYWORDS = ', '.join(default_keywords) EMPTYSTRING = '' - # The normal pot-file header. msgmerge and Emacs's po-mode work better if it's # there. pot_header = _('''\ @@ -196,7 +195,7 @@ msgstr "" ''') - + def usage(code, msg=''): print(__doc__ % globals(), file=sys.stderr) if msg: @@ -204,7 +203,6 @@ def usage(code, msg=''): sys.exit(code) - def make_escapes(pass_nonascii): global escapes, escape if pass_nonascii: @@ -258,7 +256,7 @@ def normalize(s, encoding): s = '""\n"' + lineterm.join(lines) + '"' return s - + def containsAny(str, set): """Check whether 'str' contains ANY of the chars in 'set'""" return 1 in [c in str for c in set] @@ -307,7 +305,7 @@ def getFilesForName(name): return [] - + class TokenEater: def __init__(self, options): self.__options = options @@ -515,7 +513,6 @@ class TokenEater: print('msgstr ""\n', file=fp) - def main(): global default_keywords try: @@ -675,7 +672,7 @@ def main(): if closep: fp.close() - + if __name__ == '__main__': main() # some more test strings |