Mercurial > hg-stable
changeset 33741:29238dbf718e
i18n: fix check-translation.py to be less broken on Python 3
These are all simple one-argument print statements, so this syntax
works the same way in 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D276
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 15 Jun 2017 13:31:33 -0400 |
parents | d880a6bcef2f |
children | c91013452b33 |
files | i18n/check-translation.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/i18n/check-translation.py Mon Jul 24 13:48:32 2017 -0400 +++ b/i18n/check-translation.py Thu Jun 15 13:31:33 2017 -0400 @@ -51,7 +51,7 @@ ... msgstr='prompt missing &sep$$missing amp$$followed by none&') >>> match(promptchoice, pe) True - >>> for e in promptchoice(pe): print e + >>> for e in promptchoice(pe): print(e) number of choices differs between msgid and msgstr msgstr has invalid choice missing '&' msgstr has invalid '&' followed by none @@ -88,19 +88,19 @@ ... msgstr= 'something (DEPRECATED)') >>> match(deprecated, pe) True - >>> for e in deprecated(pe): print e + >>> for e in deprecated(pe): print(e) >>> pe = polib.POEntry( ... msgid = 'Something (DEPRECATED)', ... msgstr= 'something (DETACERPED)') >>> match(deprecated, pe) True - >>> for e in deprecated(pe): print e + >>> for e in deprecated(pe): print(e) >>> pe = polib.POEntry( ... msgid = 'Something (DEPRECATED)', ... msgstr= 'something') >>> match(deprecated, pe) True - >>> for e in deprecated(pe): print e + >>> for e in deprecated(pe): print(e) msgstr inconsistently translated (DEPRECATED) >>> pe = polib.POEntry( ... msgid = 'Something (DEPRECATED, foo bar)', @@ -124,16 +124,16 @@ >>> pe = polib.POEntry( ... msgid ='ends with ::', ... msgstr='ends with ::') - >>> for e in taildoublecolons(pe): print e + >>> for e in taildoublecolons(pe): print(e) >>> pe = polib.POEntry( ... msgid ='ends with ::', ... msgstr='ends without double-colons') - >>> for e in taildoublecolons(pe): print e + >>> for e in taildoublecolons(pe): print(e) tail '::'-ness differs between msgid and msgstr >>> pe = polib.POEntry( ... msgid ='ends without double-colons', ... msgstr='ends with ::') - >>> for e in taildoublecolons(pe): print e + >>> for e in taildoublecolons(pe): print(e) tail '::'-ness differs between msgid and msgstr """ if pe.msgid.endswith('::') != pe.msgstr.endswith('::'): @@ -149,7 +149,7 @@ >>> pe = polib.POEntry( ... msgid =' indented text', ... msgstr=' narrowed indentation') - >>> for e in indentation(pe): print e + >>> for e in indentation(pe): print(e) initial indentation width differs betweeen msgid and msgstr """ idindent = len(pe.msgid) - len(pe.msgid.lstrip())