From 5cd5e83cbf42201dfa58914eb067fac047edaf8b Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 9 Mar 2011 10:28:22 +0530 Subject: [PATCH] [IMP] : account,account_followup,project,project_scrum: string formatting bzr revid: rha@tinyerp.com-20110309045822-pcvetf2a2nd0o8kv --- addons/account/account.py | 2 +- addons/account/account_bank_statement.py | 3 +- addons/account/i18n/account.pot | 28 ++++---- addons/account/invoice.py | 2 +- .../i18n/account_followup.pot | 12 ++-- .../wizard/account_followup_print.py | 6 +- addons/project/i18n/project.pot | 6 ++ .../project/wizard/project_task_delegate.py | 2 +- addons/project_scrum/i18n/project_scrum.pot | 66 ++++++++----------- addons/project_scrum/project_scrum.py | 6 +- .../wizard/project_scrum_backlog_sprint.py | 4 +- 11 files changed, 64 insertions(+), 73 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index a2b8d228b1c..8289ca4f77c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2947,7 +2947,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): analitical_journal_bank = analitical_bank_ids and analitical_bank_ids[0] or False vals_journal['name']= vals['name'] - vals_journal['code']= _('BNK') + str(current_num) + vals_journal['code']= _('BNK%s') % str(current_num) vals_journal['sequence_id'] = seq_id vals_journal['type'] = line.account_type == 'cash' and 'cash' or 'bank' vals_journal['company_id'] = company_id diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 3e738d5e516..76ccad9e68a 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -303,8 +303,7 @@ class account_bank_statement(osv.osv): st = self.browse(cr, uid, st_id, context=context) if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001): raise osv.except_osv(_('Error !'), - _('The statement balance is incorrect !\n') + - _('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) + _('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index d8dbcb92c58..382fabf09fa 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -674,13 +674,6 @@ msgstr "" msgid "Partners Reconciled Today" msgstr "" -#. module: account -#: code:addons/account/account_bank_statement.py:306 -#, python-format -msgid "The statement balance is incorrect !\n" -"" -msgstr "" - #. module: account #: selection:account.payment.term.line,value:0 #: selection:account.tax.template,type:0 @@ -2459,9 +2452,10 @@ msgid "August" msgstr "" #. module: account -#: code:addons/account/account_bank_statement.py:307 +#: code:addons/account/account_bank_statement.py:306 #, python-format -msgid "The expected balance (%.2f) is different than the computed one. (%.2f)" +msgid "The statement balance is incorrect !\n" +"The expected balance (%.2f) is different than the computed one. (%.2f)" msgstr "" #. module: account @@ -2681,6 +2675,12 @@ msgstr "" msgid "View" msgstr "" +#. module: account +#: code:addons/account/account.py:2951 +#, python-format +msgid "BNK%s" +msgstr "" + #. module: account #: code:addons/account/account.py:2906 #: code:addons/account/installer.py:296 @@ -3997,12 +3997,6 @@ msgstr "" msgid "Account Balance -" msgstr "" -#. module: account -#: code:addons/account/invoice.py:989 -#, python-format -msgid "Invoice " -msgstr "" - #. module: account #: field:account.automatic.reconcile,date1:0 msgid "Starting Date" @@ -5238,9 +5232,9 @@ msgid "As soon as the reconciliation is done, the invoice's state turns to “do msgstr "" #. module: account -#: code:addons/account/invoice.py:989 +#: code:addons/account/invoice.py:997 #, python-format -msgid "is validated." +msgid "Invoice '%s' is validated." msgstr "" #. module: account diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 48e635aee53..2ce95b553fb 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -994,7 +994,7 @@ class account_invoice(osv.osv): ctx = context.copy() if obj_inv.type in ('out_invoice', 'out_refund'): ctx = self.get_log_context(cr, uid, context=ctx) - message = _('Invoice ') + " '" + name + "' "+ _("is validated.") + message = _("Invoice '%s' is validated.") % name self.log(cr, uid, inv_id, message, context=ctx) return True diff --git a/addons/account_followup/i18n/account_followup.pot b/addons/account_followup/i18n/account_followup.pot index b6af6aad958..ea2f84c6ed3 100644 --- a/addons/account_followup/i18n/account_followup.pot +++ b/addons/account_followup/i18n/account_followup.pot @@ -54,13 +54,13 @@ msgid "Group By..." msgstr "" #. module: account_followup -#: code:addons/account_followup/wizard/account_followup_print.py:287 +#: code:addons/account_followup/wizard/account_followup_print.py:290 #, python-format msgid "\n" "\n" "E-Mail sent to following Partners successfully. !\n" "\n" -"" +"%s" msgstr "" #. module: account_followup @@ -430,11 +430,11 @@ msgid "Send email confirmation" msgstr "" #. module: account_followup -#: code:addons/account_followup/wizard/account_followup_print.py:284 +#: code:addons/account_followup/wizard/account_followup_print.py:287 #, python-format msgid "All E-mails have been successfully sent to Partners:.\n" "\n" -"" +"%s" msgstr "" #. module: account_followup @@ -615,11 +615,11 @@ msgid "Maturity" msgstr "" #. module: account_followup -#: code:addons/account_followup/wizard/account_followup_print.py:286 +#: code:addons/account_followup/wizard/account_followup_print.py:289 #, python-format msgid "E-Mail not sent to following Partners, Email not available !\n" "\n" -"" +"%s" msgstr "" #. module: account_followup diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 5d9c2da860f..483925add3a 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -284,10 +284,10 @@ class account_followup_print_all(osv.osv_memory): msg += partner.name + '\n' msg_unsent += msg if not msg_unsent: - summary = _("All E-mails have been successfully sent to Partners:.\n\n") + msg_sent + summary = _("All E-mails have been successfully sent to Partners:.\n\n%s") % msg_sent else: - msg_unsent = _("E-Mail not sent to following Partners, Email not available !\n\n") + msg_unsent - msg_sent = msg_sent and _("\n\nE-Mail sent to following Partners successfully. !\n\n") + msg_sent + msg_unsent = _("E-Mail not sent to following Partners, Email not available !\n\n%s") % msg_unsent + msg_sent = msg_sent and _("\n\nE-Mail sent to following Partners successfully. !\n\n%s") % msg_sent line = '==========================================================================' summary = msg_unsent + line + msg_sent context.update({'summary': summary}) diff --git a/addons/project/i18n/project.pot b/addons/project/i18n/project.pot index 83049c55241..3566e54b5aa 100644 --- a/addons/project/i18n/project.pot +++ b/addons/project/i18n/project.pot @@ -58,6 +58,12 @@ msgstr "" msgid "Operation Not Permitted !" msgstr "" +#. module: project +#: code:addons/project/wizard/project_task_delegate.py:67 +#, python-format +msgid "CHECK: %s" +msgstr "" + #. module: project #: code:addons/project/wizard/project_task_delegate.py:55 #: code:addons/project/wizard/project_task_delegate.py:56 diff --git a/addons/project/wizard/project_task_delegate.py b/addons/project/wizard/project_task_delegate.py index 99dfa3b4d5a..2b47df9bca0 100644 --- a/addons/project/wizard/project_task_delegate.py +++ b/addons/project/wizard/project_task_delegate.py @@ -64,7 +64,7 @@ class project_task_delegate(osv.osv_memory): newname = tools.ustr(task_name).replace(_('CHECK: '), '') else: newname = tools.ustr(task_name or '') - prefix = _('CHECK: ') + newname + prefix = _('CHECK: %s') % newname res.update({'prefix': prefix}) if 'new_task_description' in fields: res.update({'new_task_description': task.description}) diff --git a/addons/project_scrum/i18n/project_scrum.pot b/addons/project_scrum/i18n/project_scrum.pot index 07a922fd2e9..9cf44c0dc89 100644 --- a/addons/project_scrum/i18n/project_scrum.pot +++ b/addons/project_scrum/i18n/project_scrum.pot @@ -219,6 +219,18 @@ msgstr "" msgid "Scrum Meeting of %s" msgstr "" +#. module: project_scrum +#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:57 +#, python-format +msgid "Product Backlog '%s' is converted into Task %d." +msgstr "" + +#. module: project_scrum +#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:62 +#, python-format +msgid "Product Backlog '%s' is assigned sprint:%s" +msgstr "" + #. module: project_scrum #: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:57 #: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:62 @@ -253,12 +265,6 @@ msgstr "" msgid "None" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:325 -#, python-format -msgid "*Blocks encountered:" -msgstr "" - #. module: project_scrum #: view:project.scrum.product.backlog:0 msgid "Change Stage" @@ -390,12 +396,6 @@ msgstr "" msgid "Daily Scrum" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:324 -#, python-format -msgid "for the Sprint" -msgstr "" - #. module: project_scrum #: view:project.scrum.backlog.create.task:0 msgid "C_onvert" @@ -433,12 +433,6 @@ msgstr "" msgid "Scrum" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:324 -#, python-format -msgid "Hello " -msgstr "" - #. module: project_scrum #: field:project.scrum.meeting,question_today:0 msgid "Tasks for today" @@ -601,12 +595,6 @@ msgstr "" msgid "The person who is responsible for the product" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:325 -#, python-format -msgid "*Tasks since yesterday:" -msgstr "" - #. module: project_scrum #: view:project.scrum.meeting:0 #: view:project.scrum.sprint:0 @@ -745,12 +733,6 @@ msgstr "" msgid "View sprint backlog" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:325 -#, python-format -msgid "No Blocks" -msgstr "" - #. module: project_scrum #: field:project.scrum.meeting,question_backlog:0 msgid "Backlog Accurate" @@ -922,7 +904,23 @@ msgstr "" #. module: project_scrum #: code:addons/project_scrum/project_scrum.py:324 #, python-format -msgid "I am sending you Daily Meeting Details of date" +msgid "Hello %s,\n" +" \n" +"I am sending you Daily Meeting Details of date %s for the Sprint %s\n" +"" +msgstr "" + +#. module: project_scrum +#: code:addons/project_scrum/project_scrum.py:325 +#, python-format +msgid "\n" +"*Tasks since yesterday:\n" +"_______________________%s\n" +"*Task for Today:\n" +"_______________________ %s\n" +"\n" +"*Blocks encountered:\n" +"_______________________ %s" msgstr "" #. module: project_scrum @@ -970,12 +968,6 @@ msgstr "" msgid "This wizard merge backlogs and create one new backlog with draft state (Old backlogs Will be deleted). And it also merge old tasks from backlogs" msgstr "" -#. module: project_scrum -#: code:addons/project_scrum/project_scrum.py:325 -#, python-format -msgid "*Task for Today:" -msgstr "" - #. module: project_scrum #: code:addons/project_scrum/project_scrum.py:303 #, python-format diff --git a/addons/project_scrum/project_scrum.py b/addons/project_scrum/project_scrum.py index 7d1d071a7c3..4d67b875c04 100644 --- a/addons/project_scrum/project_scrum.py +++ b/addons/project_scrum/project_scrum.py @@ -321,9 +321,9 @@ class project_scrum_meeting(osv.osv): meeting_id = self.browse(cr, uid, ids, context=context)[0] user = self.pool.get('res.users').browse(cr, uid, uid, context=context) user_email = email_from or user.address_id.email or email_from - body = _('Hello ') + meeting_id.sprint_id.scrum_master_id.name + ",\n" + " \n" +_('I am sending you Daily Meeting Details of date')+ ' %s ' % (meeting_id.date)+ _('for the Sprint')+ ' %s\n' % (meeting_id.sprint_id.name) - body += "\n"+ _('*Tasks since yesterday:')+ '\n_______________________%s' % (meeting_id.question_yesterday) + '\n' +_("*Task for Today:")+ '\n_______________________ %s\n' % (meeting_id.question_today )+ '\n' +_('*Blocks encountered:') +'\n_______________________ %s' % (meeting_id.question_blocks or _('No Blocks')) - body += "\n\n"+_('Thank you')+",\n"+ user.name + body = _("Hello %s,\n \nI am sending you Daily Meeting Details of date %s for the Sprint %s\n") %(meeting_id.sprint_id.scrum_master_id.name, meeting_id.date, meeting_id.sprint_id.name) + body += _('\n*Tasks since yesterday:\n_______________________%s\n*Task for Today:\n_______________________ %s\n\n*Blocks encountered:\n_______________________ %s') %(meeting_id.question_yesterday,meeting_id.question_today, meeting_id.question_blocks or _('No Blocks')) + body += _("\n\nThank you,\n%s") % user.name sub_name = meeting_id.name or _('Scrum Meeting of %s') % meeting_id.date flag = tools.email_send(user_email , [email], sub_name, body, reply_to=None, openobject_id=str(meeting_id.id)) if not flag: diff --git a/addons/project_scrum/wizard/project_scrum_backlog_sprint.py b/addons/project_scrum/wizard/project_scrum_backlog_sprint.py index 591e1d5da62..a95a8f56c4a 100644 --- a/addons/project_scrum/wizard/project_scrum_backlog_sprint.py +++ b/addons/project_scrum/wizard/project_scrum_backlog_sprint.py @@ -54,12 +54,12 @@ class backlog_sprint_assign(osv.osv_memory): 'planned_hours':backlog.expected_hours, 'remaining_hours':backlog.expected_hours, }) - message = _('Product Backlog') + " '" + backlog.name + "' "+ _("is converted into Task %d."%(task_id,)) + message = _("Product Backlog '%s' is converted into Task %d.") %(backlog.name, task_id) self.log(cr, uid, backlog.id, message) if data['state_open'] and backlog.state == "draft": backlog_obj.write(cr, uid, backlog.id, {'state':'open'}) sprint = sprint_obj.browse(cr, uid, data['sprint_id'], context=context) - message = _('Product Backlog') + " '" + backlog.name + "' "+ _("is assigned sprint:%s"%(sprint.name)) + message = _("Product Backlog '%s' is assigned sprint:%s") %(backlog.name, sprint.name) self.log(cr, uid, backlog.id, message) backlog_obj.write(cr, uid, backlog_ids, {'sprint_id': data['sprint_id']}, context=context) return {'type': 'ir.actions.act_window_close'}