[IMP] crm: use %s pattern for variables in translations instead of {}, updated pot...
authorMartin Trigaux <mat@openerp.com>
Tue, 7 Jan 2014 16:58:40 +0000 (17:58 +0100)
committerMartin Trigaux <mat@openerp.com>
Tue, 7 Jan 2014 16:58:40 +0000 (17:58 +0100)
bzr revid: mat@openerp.com-20140107165840-pxc0rd5ezdnmzip7

addons/crm/crm_lead.py
addons/crm/i18n/crm.pot

index 98de0c7..800a1d8 100644 (file)
@@ -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 = "<time datetime='%s+00:00'>%s</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):
index cbdad80..024cc15 100644 (file)
@@ -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"
@@ -633,6 +633,12 @@ 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"
 msgstr ""
@@ -2681,12 +2687,6 @@ 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
 msgid "Schedule a call"
@@ -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