[IMP] tools.translate: improved debug message for illegal values in PO terms

bzr revid: odo@openerp.com-20101116141508-jls1v2rqyvb7pf0v
This commit is contained in:
Olivier Dony 2010-11-16 15:15:08 +01:00
parent e96e07e244
commit 8472cfb7e3
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ _ = GettextAlias()
def quote(s):
"""Returns quoted PO term string, with special PO characters escaped"""
assert r"\n" not in s, "Translation terms may not include escaped newlines ('\\n'), please use only literal newlines"
assert r"\n" not in s, "Translation terms may not include escaped newlines ('\\n'), please use only literal newlines! (in '%s')" % s
return '"%s"' % s.replace('\\','\\\\') \
.replace('"','\\"') \
.replace('\n', '\\n"\n"')