[FIX] base: no line feed in translations
Revert "[FIX] ir_translation: remove control characters from translations"
This reverts commit 6d4e1cc73e
.
This was intended to clean malformed translations but it introduced the side
effect of removing all '\n' in translations.
Fixes #4092, opw 619175
This commit is contained in:
parent
27d8cb843b
commit
96d1520a5e
|
@ -20,7 +20,6 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import unicodedata
|
|
||||||
|
|
||||||
from openerp import tools
|
from openerp import tools
|
||||||
import openerp.modules
|
import openerp.modules
|
||||||
|
@ -339,8 +338,7 @@ class ir_translation(osv.osv):
|
||||||
trad = res and res[0] or u''
|
trad = res and res[0] or u''
|
||||||
if source and not trad:
|
if source and not trad:
|
||||||
return tools.ustr(source)
|
return tools.ustr(source)
|
||||||
# Remove control characters
|
return trad
|
||||||
return filter(lambda c: unicodedata.category(c) != 'Cc', tools.ustr(trad))
|
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
|
|
Loading…
Reference in New Issue