diff options
| author | bwarsaw | 2001-06-28 04:08:18 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-06-28 04:08:18 +0000 |
| commit | 74f99447c703f2197e261fb20174ffab37409013 (patch) | |
| tree | b765afcf254603f7ec87f7f127f93c8fca02a31f /bin/pygettext.py | |
| parent | 5f3342e87b1ac613c5f5efe4c318c1cce9943fdd (diff) | |
| download | mailman-74f99447c703f2197e261fb20174ffab37409013.tar.gz mailman-74f99447c703f2197e261fb20174ffab37409013.tar.zst mailman-74f99447c703f2197e261fb20174ffab37409013.zip | |
Diffstat (limited to 'bin/pygettext.py')
| -rwxr-xr-x | bin/pygettext.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/pygettext.py b/bin/pygettext.py index a4bf01ff9..bd9c0bca6 100755 --- a/bin/pygettext.py +++ b/bin/pygettext.py @@ -338,11 +338,12 @@ class TokenEater: rentries = reverse[rkey] rentries.sort() for k, v in rentries: + isdocstring = 0 # If the entry was gleaned out of a docstring, then add a # comment stating so. This is to aid translators who may wish # to skip translating some unimportant docstrings. if reduce(operator.__add__, v.values()): - print >> fp, '#. docstring' + isdocstring = 1 # k is the message string, v is a dictionary-set of (filename, # lineno) tuples. We want to sort the entries in v first by # file name and then by line number. @@ -370,6 +371,8 @@ class TokenEater: locline = "#:" + s if len(locline) > 2: print >> fp, locline + if isdocstring: + print >> fp, '#, docstring' print >> fp, 'msgid', normalize(k) print >> fp, 'msgstr ""\n' |
