Mercurial > hg
comparison i18n/posplit @ 29153:90d84e1e427a
py3: make i18n/posplit use print_function
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 13 May 2016 03:09:30 +0530 |
parents | c5057b7780dc |
children | d0e8933d6dad |
comparison
equal
deleted
inserted
replaced
29152:c5057b7780dc | 29153:90d84e1e427a |
---|---|
3 # posplit - split messages in paragraphs on .po/.pot files | 3 # posplit - split messages in paragraphs on .po/.pot files |
4 # | 4 # |
5 # license: MIT/X11/Expat | 5 # license: MIT/X11/Expat |
6 # | 6 # |
7 | 7 |
8 from __future__ import absolute_import | 8 from __future__ import absolute_import, print_function |
9 | 9 |
10 import polib | 10 import polib |
11 import re | 11 import re |
12 import sys | 12 import sys |
13 | 13 |
67 # only rst syntax, nothing to translate | 67 # only rst syntax, nothing to translate |
68 delta += 2 | 68 delta += 2 |
69 continue | 69 continue |
70 else: | 70 else: |
71 # lines following directly, unexpected | 71 # lines following directly, unexpected |
72 print 'Warning: text follows line with directive' \ | 72 print('Warning: text follows line with directive' \ |
73 ' %s' % directive | 73 ' %s' % directive) |
74 comment = 'do not translate: .. %s::' % directive | 74 comment = 'do not translate: .. %s::' % directive |
75 if not newentry.comment: | 75 if not newentry.comment: |
76 newentry.comment = comment | 76 newentry.comment = comment |
77 elif comment not in newentry.comment: | 77 elif comment not in newentry.comment: |
78 newentry.comment += '\n' + comment | 78 newentry.comment += '\n' + comment |