[FIX] ir_translation: don't insert translate values if empty

Don't need to add the empty value because ir_translation generate missing values automatically.
(bug e.g.: Link with empty string can't be clicked)
This commit is contained in:
Christophe Matthieu
2015-09-24 09:36:41 +02:00
parent ed9e91c54a
commit 69810ab9dd
+4 -1
View File
@@ -56,7 +56,10 @@ class ir_translation_import_cursor(object):
def push(self, trans_dict):
"""Feed a translation, as a dictionary, into the cursor
"""
params = dict(trans_dict, state="translated" if trans_dict['value'] else "to_translate")
if not trans_dict['value']:
return
params = dict(trans_dict, state="translated")
if params['type'] == 'view':
# ugly hack for QWeb views - pending refactoring of translations in master