##// END OF EJS Templates
i18n: fix check-translation.py to be less broken on Python 3...
Augie Fackler -
r33681:29238dbf default
parent child Browse files
Show More
@@ -51,7 +51,7 b' def promptchoice(pe):'
51 ... msgstr='prompt missing &sep$$missing amp$$followed by none&')
51 ... msgstr='prompt missing &sep$$missing amp$$followed by none&')
52 >>> match(promptchoice, pe)
52 >>> match(promptchoice, pe)
53 True
53 True
54 >>> for e in promptchoice(pe): print e
54 >>> for e in promptchoice(pe): print(e)
55 number of choices differs between msgid and msgstr
55 number of choices differs between msgid and msgstr
56 msgstr has invalid choice missing '&'
56 msgstr has invalid choice missing '&'
57 msgstr has invalid '&' followed by none
57 msgstr has invalid '&' followed by none
@@ -88,19 +88,19 b' def deprecated(pe):'
88 ... msgstr= 'something (DEPRECATED)')
88 ... msgstr= 'something (DEPRECATED)')
89 >>> match(deprecated, pe)
89 >>> match(deprecated, pe)
90 True
90 True
91 >>> for e in deprecated(pe): print e
91 >>> for e in deprecated(pe): print(e)
92 >>> pe = polib.POEntry(
92 >>> pe = polib.POEntry(
93 ... msgid = 'Something (DEPRECATED)',
93 ... msgid = 'Something (DEPRECATED)',
94 ... msgstr= 'something (DETACERPED)')
94 ... msgstr= 'something (DETACERPED)')
95 >>> match(deprecated, pe)
95 >>> match(deprecated, pe)
96 True
96 True
97 >>> for e in deprecated(pe): print e
97 >>> for e in deprecated(pe): print(e)
98 >>> pe = polib.POEntry(
98 >>> pe = polib.POEntry(
99 ... msgid = 'Something (DEPRECATED)',
99 ... msgid = 'Something (DEPRECATED)',
100 ... msgstr= 'something')
100 ... msgstr= 'something')
101 >>> match(deprecated, pe)
101 >>> match(deprecated, pe)
102 True
102 True
103 >>> for e in deprecated(pe): print e
103 >>> for e in deprecated(pe): print(e)
104 msgstr inconsistently translated (DEPRECATED)
104 msgstr inconsistently translated (DEPRECATED)
105 >>> pe = polib.POEntry(
105 >>> pe = polib.POEntry(
106 ... msgid = 'Something (DEPRECATED, foo bar)',
106 ... msgid = 'Something (DEPRECATED, foo bar)',
@@ -124,16 +124,16 b' def taildoublecolons(pe):'
124 >>> pe = polib.POEntry(
124 >>> pe = polib.POEntry(
125 ... msgid ='ends with ::',
125 ... msgid ='ends with ::',
126 ... msgstr='ends with ::')
126 ... msgstr='ends with ::')
127 >>> for e in taildoublecolons(pe): print e
127 >>> for e in taildoublecolons(pe): print(e)
128 >>> pe = polib.POEntry(
128 >>> pe = polib.POEntry(
129 ... msgid ='ends with ::',
129 ... msgid ='ends with ::',
130 ... msgstr='ends without double-colons')
130 ... msgstr='ends without double-colons')
131 >>> for e in taildoublecolons(pe): print e
131 >>> for e in taildoublecolons(pe): print(e)
132 tail '::'-ness differs between msgid and msgstr
132 tail '::'-ness differs between msgid and msgstr
133 >>> pe = polib.POEntry(
133 >>> pe = polib.POEntry(
134 ... msgid ='ends without double-colons',
134 ... msgid ='ends without double-colons',
135 ... msgstr='ends with ::')
135 ... msgstr='ends with ::')
136 >>> for e in taildoublecolons(pe): print e
136 >>> for e in taildoublecolons(pe): print(e)
137 tail '::'-ness differs between msgid and msgstr
137 tail '::'-ness differs between msgid and msgstr
138 """
138 """
139 if pe.msgid.endswith('::') != pe.msgstr.endswith('::'):
139 if pe.msgid.endswith('::') != pe.msgstr.endswith('::'):
@@ -149,7 +149,7 b' def indentation(pe):'
149 >>> pe = polib.POEntry(
149 >>> pe = polib.POEntry(
150 ... msgid =' indented text',
150 ... msgid =' indented text',
151 ... msgstr=' narrowed indentation')
151 ... msgstr=' narrowed indentation')
152 >>> for e in indentation(pe): print e
152 >>> for e in indentation(pe): print(e)
153 initial indentation width differs betweeen msgid and msgstr
153 initial indentation width differs betweeen msgid and msgstr
154 """
154 """
155 idindent = len(pe.msgid) - len(pe.msgid.lstrip())
155 idindent = len(pe.msgid) - len(pe.msgid.lstrip())
General Comments 0
You need to be logged in to leave comments. Login now