[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 unicodedata
|
||||
|
||||
from openerp import tools
|
||||
import openerp.modules
|
||||
|
@ -339,8 +338,7 @@ class ir_translation(osv.osv):
|
|||
trad = res and res[0] or u''
|
||||
if source and not trad:
|
||||
return tools.ustr(source)
|
||||
# Remove control characters
|
||||
return filter(lambda c: unicodedata.category(c) != 'Cc', tools.ustr(trad))
|
||||
return trad
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if context is None:
|
||||
|
|
Loading…
Reference in New Issue