[IMP] tools.translate: improved debug message for illegal values in PO terms
bzr revid: odo@openerp.com-20101116141508-jls1v2rqyvb7pf0v
This commit is contained in:
parent
e96e07e244
commit
8472cfb7e3
|
@ -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"')
|
||||
|
|
Loading…
Reference in New Issue