##// END OF EJS Templates
py3: make i18n/hggettext use print_function
Pulkit Goyal -
r29171:de28dedd default
parent child Browse files
Show More
@@ -20,7 +20,7 b' Use xgettext like normal to extract stri'
20 join the message cataloges to get the final catalog.
20 join the message cataloges to get the final catalog.
21 """
21 """
22
22
23 from __future__ import absolute_import
23 from __future__ import absolute_import, print_function
24
24
25 import inspect
25 import inspect
26 import os
26 import os
@@ -99,7 +99,7 b' def docstrings(path):'
99 if mod.__doc__:
99 if mod.__doc__:
100 src = open(path).read()
100 src = open(path).read()
101 lineno = 1 + offset(src, mod.__doc__, path, 7)
101 lineno = 1 + offset(src, mod.__doc__, path, 7)
102 print poentry(path, lineno, mod.__doc__)
102 print(poentry(path, lineno, mod.__doc__))
103
103
104 functions = list(getattr(mod, 'i18nfunctions', []))
104 functions = list(getattr(mod, 'i18nfunctions', []))
105 functions = [(f, True) for f in functions]
105 functions = [(f, True) for f in functions]
@@ -119,12 +119,12 b' def docstrings(path):'
119 if rstrip:
119 if rstrip:
120 doc = doc.rstrip()
120 doc = doc.rstrip()
121 lineno += offset(src, doc, name, 1)
121 lineno += offset(src, doc, name, 1)
122 print poentry(path, lineno, doc)
122 print(poentry(path, lineno, doc))
123
123
124
124
125 def rawtext(path):
125 def rawtext(path):
126 src = open(path).read()
126 src = open(path).read()
127 print poentry(path, 1, src)
127 print(poentry(path, 1, src))
128
128
129
129
130 if __name__ == "__main__":
130 if __name__ == "__main__":
General Comments 0
You need to be logged in to leave comments. Login now