From 741cf3278547faf21c252236992f8bb41a972d35 Mon Sep 17 00:00:00 2001 From: Dhruti Shastri <> Date: Tue, 20 Nov 2012 14:47:18 +0530 Subject: [PATCH 1/2] [FIX]anonymization: Added missing translation bzr revid: mma@tinyerp.com-20121120091718-kkw841nzukzxuudp --- addons/anonymization/anonymization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 2326a4184ae..3a1dcfd1462 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -297,7 +297,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): res['name'] = '.pickle' res['summary'] = self._get_summary_value(cr, uid, context) res['state'] = self._get_state_value(cr, uid, context) - res['msg'] = """Before executing the anonymization process, you should make a backup of your database.""" + res['msg'] = _("""Before executing the anonymization process, you should make a backup of your database.""") return res From 3e365eb3d7c85bee6f296bf07a4ab53849701d65 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Tue, 20 Nov 2012 15:58:08 +0530 Subject: [PATCH 2/2] [FIX]anonymization: Added missing translation bzr revid: mma@tinyerp.com-20121120102808-uj0p2sdhuipopcj9 --- addons/anonymization/anonymization.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 3a1dcfd1462..aab177a60a6 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -88,8 +88,8 @@ class ir_model_fields_anonymization(osv.osv): if global_state == 'anonymized': raise osv.except_osv('Error !', "The database is currently anonymized, you cannot create, modify or delete fields.") elif global_state == 'unstable': - msg = "The database anonymization is currently in an unstable state. Some fields are anonymized," + \ - " while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields." + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + " while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.") raise osv.except_osv('Error !', msg) return True @@ -355,8 +355,8 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # remove the placeholer: eview.remove(placeholder) else: - msg = "The database anonymization is currently in an unstable state. Some fields are anonymized," + \ - " while some fields are not anonymized. You should try to solve this problem before trying to do anything else." + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + " while some fields are not anonymized. You should try to solve this problem before trying to do anything else.") raise osv.except_osv('Error !', msg) res['arch'] = etree.tostring(eview) @@ -386,10 +386,10 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # check that all the defined fields are in the 'clear' state state = self.pool.get('ir.model.fields.anonymization')._get_global_state(cr, uid, context=context) if state == 'anonymized': - self._raise_after_history_update(cr, uid, history_id, 'Error !', "The database is currently anonymized, you cannot anonymize it again.") + self._raise_after_history_update(cr, uid, history_id, _('Error !'), _("The database is currently anonymized, you cannot anonymize it again.")) elif state == 'unstable': - msg = "The database anonymization is currently in an unstable state. Some fields are anonymized," + \ - " while some fields are not anonymized. You should try to solve this problem before trying to do anything." + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") self._raise_after_history_update(cr, uid, history_id, 'Error !', msg) # do the anonymization: @@ -441,11 +441,11 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): elif field_type == 'integer': anonymized_value = 0 elif field_type in ['binary', 'many2many', 'many2one', 'one2many', 'reference']: # cannot anonymize these kind of fields - msg = "Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference." + msg = _("Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference.") self._raise_after_history_update(cr, uid, history_id, 'Error !', msg) if anonymized_value is None: - self._raise_after_history_update(cr, uid, history_id, 'Error !', "Anonymized value is None. This cannot happens.") + self._raise_after_history_update(cr, uid, history_id, _('Error !'), _("Anonymized value is None. This cannot happens.")) sql = "update %(table)s set %(field)s = %%(anonymized_value)s where id = %%(id)s" % { 'table': table_name, @@ -521,16 +521,16 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # check that all the defined fields are in the 'anonymized' state state = ir_model_fields_anonymization_model._get_global_state(cr, uid, context=context) if state == 'clear': - raise osv.except_osv('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.") + raise osv.except_osv_('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.") elif state == 'unstable': - msg = "The database anonymization is currently in an unstable state. Some fields are anonymized," + \ - " while some fields are not anonymized. You should try to solve this problem before trying to do anything." + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") raise osv.except_osv('Error !', msg) wizards = self.browse(cr, uid, ids, context=context) for wizard in wizards: if not wizard.file_import: - msg = "It is not possible to reverse the anonymization process without supplying the anonymization export file." + msg = _("It is not possible to reverse the anonymization process without supplying the anonymization export file.") self._raise_after_history_update(cr, uid, history_id, 'Error !', msg) # reverse the anonymization: