From aefcacf1f3df6f4f3f85b732a1b566ad7ea46376 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 7 Jan 2014 17:58:40 +0100 Subject: [PATCH] [IMP] crm: use %s pattern for variables in translations instead of {}, updated pot file bzr revid: mat@openerp.com-20140107165840-pxc0rd5ezdnmzip7 --- addons/crm/crm_lead.py | 6 +++--- addons/crm/i18n/crm.pot | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 98de0c795f8..800a1d8b2c4 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -1061,13 +1061,13 @@ class crm_lead(base_stage, format_address, osv.osv): def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None): phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0] if action == 'log': - message = _('Logged a call for {date}. {description}') + message = _('Logged a call for %(date)s. %(description)s') else: - message = _('Scheduled a call for {date}. {description}') + message = _('Scheduled a call for %(date)s. %(description)s') phonecall_date = datetime.strptime(phonecall.date, tools.DEFAULT_SERVER_DATETIME_FORMAT) phonecall_usertime = fields.datetime.context_timestamp(cr, uid, phonecall_date, context=context).strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT) html_time = "" % (phonecall.date, phonecall_usertime) - message = message.format(date=html_time, description=phonecall.description) + message = message % dict(date=html_time, description=phonecall.description) return self.message_post(cr, uid, ids, body=message, context=context) def log_meeting(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None): diff --git a/addons/crm/i18n/crm.pot b/addons/crm/i18n/crm.pot index cbdad80fa4a..024cc152eff 100644 --- a/addons/crm/i18n/crm.pot +++ b/addons/crm/i18n/crm.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-07 15:37+0000\n" -"PO-Revision-Date: 2014-01-07 15:37+0000\n" +"POT-Creation-Date: 2014-01-07 16:56+0000\n" +"PO-Revision-Date: 2014-01-07 16:56+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -632,6 +632,12 @@ msgstr "" msgid "Partner Segmentation" msgstr "" +#. module: crm +#: code:addons/crm/crm_lead.py:1064 +#, python-format +msgid "Logged a call for %(date)s. %(description)s" +msgstr "" + #. module: crm #: field:crm.lead,company_currency:0 msgid "Currency" @@ -2680,12 +2686,6 @@ msgstr "" msgid "Unassigned" msgstr "" -#. module: crm -#: code:addons/crm/crm_lead.py:1064 -#, python-format -msgid "Logged a call for {date}. {description}" -msgstr "" - #. module: crm #: selection:crm.opportunity2phonecall,action:0 #: selection:crm.phonecall2phonecall,action:0 @@ -2814,7 +2814,7 @@ msgstr "" #. module: crm #: code:addons/crm/crm_lead.py:1066 #, python-format -msgid "Scheduled a call for {date}. {description}" +msgid "Scheduled a call for %(date)s. %(description)s" msgstr "" #. module: crm