comparison roundup/pygettext.py @ 8108:78bca158e1e6

fix: do not translate help text or POT header. the help text is too large to submit to translation services. I am excluding the help text from admin.py as well when I generate po files for translation. The POT header shouldn't be translated AFAICT. It is always in english.
author John Rouillard <rouilj@ieee.org>
date Wed, 07 Aug 2024 21:43:40 -0400
parents 586f76eb33e8
children 185335b2301b
comparison
equal deleted inserted replaced
8107:e01bac852ce1 8108:78bca158e1e6
35 import tokenize 35 import tokenize
36 from functools import reduce 36 from functools import reduce
37 37
38 __version__ = '1.5' 38 __version__ = '1.5'
39 39
40 __doc__ = _("""pygettext -- Python equivalent of xgettext(1) 40 __doc__ = """pygettext -- Python equivalent of xgettext(1)
41 41
42 Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the 42 Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the
43 internationalization of C programs. Most of these tools are independent of 43 internationalization of C programs. Most of these tools are independent of
44 the programming language and can be used from within Python programs. 44 the programming language and can be used from within Python programs.
45 Martin von Loewis' work[1] helps considerably in this regard. 45 Martin von Loewis' work[1] helps considerably in this regard.
168 Specify a file that contains a list of files (one per line) that 168 Specify a file that contains a list of files (one per line) that
169 should not have their docstrings extracted. This is only useful in 169 should not have their docstrings extracted. This is only useful in
170 conjunction with the -D option above. 170 conjunction with the -D option above.
171 171
172 If `inputfile' is -, standard input is read. 172 If `inputfile' is -, standard input is read.
173 """) 173 """
174 174
175 default_keywords = ['_'] 175 default_keywords = ['_']
176 DEFAULTKEYWORDS = ', '.join(default_keywords) 176 DEFAULTKEYWORDS = ', '.join(default_keywords)
177 177
178 EMPTYSTRING = '' 178 EMPTYSTRING = ''
179 179
180 # The normal pot-file header. msgmerge and Emacs's po-mode work better if it's 180 # The normal pot-file header. msgmerge and Emacs's po-mode work better if it's
181 # there. 181 # there.
182 pot_header = _('''\ 182 pot_header = '''\
183 # SOME DESCRIPTIVE TITLE. 183 # SOME DESCRIPTIVE TITLE.
184 # Copyright (C) YEAR ORGANIZATION 184 # Copyright (C) YEAR ORGANIZATION
185 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 185 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
186 # 186 #
187 msgid "" 187 msgid ""
195 "MIME-Version: 1.0\\n" 195 "MIME-Version: 1.0\\n"
196 "Content-Type: text/plain; charset=CHARSET\\n" 196 "Content-Type: text/plain; charset=CHARSET\\n"
197 "Content-Transfer-Encoding: ENCODING\\n" 197 "Content-Transfer-Encoding: ENCODING\\n"
198 "Generated-By: pygettext.py %(version)s\\n" 198 "Generated-By: pygettext.py %(version)s\\n"
199 199
200 ''') 200 '''
201 201
202 202
203 def usage(code, msg=''): 203 def usage(code, msg=''):
204 print(__doc__ % globals(), file=sys.stderr) 204 print(__doc__ % globals(), file=sys.stderr)
205 if msg: 205 if msg:

Roundup Issue Tracker: http://roundup-tracker.org/