File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,11 +338,12 @@ def write(self, fp):
338338 rentries = reverse [rkey ]
339339 rentries .sort ()
340340 for k , v in rentries :
341+ isdocstring = 0
341342 # If the entry was gleaned out of a docstring, then add a
342343 # comment stating so. This is to aid translators who may wish
343344 # to skip translating some unimportant docstrings.
344345 if reduce (operator .__add__ , v .values ()):
345- print >> fp , '#, docstring'
346+ isdocstring = 1
346347 # k is the message string, v is a dictionary-set of (filename,
347348 # lineno) tuples. We want to sort the entries in v first by
348349 # file name and then by line number.
@@ -370,6 +371,8 @@ def write(self, fp):
370371 locline = "#:" + s
371372 if len (locline ) > 2 :
372373 print >> fp , locline
374+ if isdocstring :
375+ print >> fp , '#, docstring'
373376 print >> fp , 'msgid' , normalize (k )
374377 print >> fp , 'msgstr ""\n '
375378
You can’t perform that action at this time.
0 commit comments