diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-08-22 08:49:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 08:49:35 (GMT) |
commit | dd0a1f9da283bd784e2c88efec0a45cef978516a (patch) | |
tree | 0d79879ecc4e266adada5aa68a061f782002489a /Tools/i18n | |
parent | cc42182c978cf9e304c1b03f94486c0a0785a477 (diff) | |
download | cpython-dd0a1f9da283bd784e2c88efec0a45cef978516a.zip cpython-dd0a1f9da283bd784e2c88efec0a45cef978516a.tar.gz cpython-dd0a1f9da283bd784e2c88efec0a45cef978516a.tar.bz2 |
[3.11] gh-102507 Remove invisible pagebreak characters (GH-102531) (#108266)
gh-102507 Remove invisible pagebreak characters (GH-102531)
(cherry picked from commit b097925858c6975c73e989226cf278cc382c0416)
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
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 |