[IMP] : base_module_quality, crm, email_template, mail_gateway, sale_crm, share: string formatting

bzr revid: rha@tinyerp.com-20110308112208-40jbv5er9w21xiw0
This commit is contained in:
Rifakat Haradwala (Open ERP)
2011-03-08 16:52:08 +05:30
parent 285ef6b2c1
commit 64f9d7e94f
12 changed files with 30 additions and 28 deletions
@@ -351,10 +351,9 @@ msgid "Error! Module is not properly loaded/installed"
msgstr ""
#. module: base_module_quality
#: code:addons/base_module_quality/speed_test/speed_test.py:115
#: code:addons/base_module_quality/speed_test/speed_test.py:116
#, python-format
msgid "Error in Read method"
msgid "Error in Read method: %s"
msgstr ""
#. module: base_module_quality
@@ -113,7 +113,7 @@ This test checks the speed of the module. Note that at least 5 demo data is need
except Exception, e:
self.log.warning('Error in read method', exc_info=True)
list2 = [obj, _("Error in Read method")]
speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Error in Read method") + ": %s " % e]
speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Error in Read method: %s") % e]
else:
if size < 5:
speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Warning! Not enough demo data")]
+1 -1
View File
@@ -279,7 +279,7 @@ class crm_lead(crm_case, osv.osv):
if 'stage_id' in vals and vals['stage_id']:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name, details=_("Changed Stage to: ") + stage_obj.name)
self.history(cr, uid, ids, _("Changed Stage to: %s") % stage_obj.name, details=_("Changed Stage to: %s") % stage_obj.name)
message=''
for case in self.browse(cr, uid, ids, context=context):
if case.type == 'lead' or context.get('stage_type',False)=='lead':
+6
View File
@@ -2267,6 +2267,12 @@ msgstr ""
msgid "The stage of opportunity '%s' has been changed to '%s'."
msgstr ""
#. module: crm
#: code:addons/crm/crm_lead.py:282
#, python-format
msgid "Changed Stage to: %s"
msgstr ""
#. module: crm
#: selection:crm.segmentation.line,operator:0
msgid "Mandatory Expression"
+2 -2
View File
@@ -36,7 +36,7 @@ try:
TEMPLATE_ENGINES.append(('mako', 'Mako Templates'))
except ImportError:
logging.getLogger('init').warning("module email_template: Mako templates not installed")
try:
from django.template import Context, Template as DjangoTemplate
#Workaround for bug:
@@ -316,7 +316,7 @@ This is useful for CRM leads for example"),
default = {}
default = default.copy()
old = self.read(cr, uid, id, ['name'], context=context)
new_name = _("Copy of template ") + old.get('name', 'No Name')
new_name = _("Copy of template %s") % old.get('name', 'No Name')
check = self.search(cr, uid, [('name', '=', new_name)], context=context)
if check:
new_name = new_name + '_' + random.choice('abcdefghij') + random.choice('lmnopqrs') + random.choice('tuvwzyz')
@@ -856,7 +856,7 @@ msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:319
#, python-format
msgid "Copy of template "
msgid "Copy of template %s"
msgstr ""
#. module: email_template
+4 -4
View File
@@ -113,9 +113,9 @@ msgid "Partner"
msgstr ""
#. module: mail_gateway
#: code:addons/mail_gateway/mail_gateway.py:242
#: code:addons/mail_gateway/mail_gateway.py:250
#, python-format
msgid " wrote on "
msgid " wrote on %s:\n"
msgstr ""
#. module: mail_gateway
@@ -286,9 +286,9 @@ msgid "Cc"
msgstr ""
#. module: mail_gateway
#: code:addons/mail_gateway/mail_gateway.py:246
#: code:addons/mail_gateway/mail_gateway.py:254
#, python-format
msgid " on "
msgid " on %s:\n"
msgstr ""
#. module: mail_gateway
+4 -4
View File
@@ -169,7 +169,7 @@ class mailgate_thread(osv.osv):
'message_id': message_id,
'attachment_ids': [(6, 0, attachments)]
}
obj.create(cr, uid, data, context=context)
return True
mailgate_thread()
@@ -221,7 +221,7 @@ class mailgate_message(osv.osv):
action_data = False
action_pool = self.pool.get('ir.actions.act_window')
message_pool = self.browse(cr ,uid, ids, context=context)[0]
att_ids = [x.id for x in message_pool.attachment_ids]
att_ids = [x.id for x in message_pool.attachment_ids]
action_ids = action_pool.search(cr, uid, [('res_model', '=', 'ir.attachment')])
if action_ids:
action_data = action_pool.read(cr, uid, action_ids[0], context=context)
@@ -247,11 +247,11 @@ class mailgate_message(osv.osv):
for message in self.browse(cr, uid, ids, context=context):
msg_txt = ''
if message.history:
msg_txt += (message.email_from or '/') + _(' wrote on ') + format_date_tz(message.date, tz) + ':\n\t'
msg_txt += (message.email_from or '/') + _(' wrote on %s:\n\t') % format_date_tz(message.date, tz)
if message.description:
msg_txt += self.truncate_data(cr, uid, message.description, context=context)
else:
msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
msg_txt = (message.user_id.name or '/') + _(' on %s:\n\t') % format_date_tz(message.date, tz)
msg_txt += message.name
result[message.id] = msg_txt
return result
+2 -7
View File
@@ -28,9 +28,10 @@ msgstr ""
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:108
#, python-format
msgid "is converted to Quotation."
msgid "Opportunity '%s' is converted to Quotation."
msgstr ""
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:89
#, python-format
@@ -94,12 +95,6 @@ msgstr ""
msgid "Converted to Sales Quotation(id: %s)."
msgstr ""
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:108
#, python-format
msgid "Opportunity "
msgstr ""
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:92
#, python-format
+1 -1
View File
@@ -105,7 +105,7 @@ class crm_make_sale(osv.osv_memory):
new_id = sale_obj.create(cr, uid, vals)
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
new_ids.append(new_id)
message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Quotation.")
message = _("Opportunity '%s' is converted to Quotation.") % (case.name)
self.log(cr, uid, case.id, message)
case_obj._history(cr, uid, [case], _("Converted to Sales Quotation(id: %s).") % (new_id))
+5 -3
View File
@@ -61,10 +61,12 @@ msgid "Share Access Rules"
msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:425
#: code:addons/share/wizard/share_wizard.py:453
#, python-format
msgid "Dear,\n"
"\n"
"%s\n"
"\n"
""
msgstr ""
@@ -116,9 +118,9 @@ msgid "Generic Share Access URL"
msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:429
#: code:addons/share/wizard/share_wizard.py:457
#, python-format
msgid "You may use the following login and password to get access to this protected area:"
msgid "You may use the following login and password to get access to this protected area:\n"
msgstr ""
#. module: share
+2 -2
View File
@@ -450,11 +450,11 @@ class share_create(osv.osv_memory):
for result_line in wizard_data.result_line_ids:
email_to = result_line.login
subject = _('%s has shared OpenERP %s information with you') % (user.name, wizard_data.action_id.name)
body = _("Dear,\n\n") + subject + "\n\n"
body = _("Dear,\n\n%s\n\n") % subject
body += _("To access it, you can go to the following URL:\n %s") % result_line.share_url
body += "\n\n"
if result_line.newly_created:
body += _("You may use the following login and password to get access to this protected area:") + "\n"
body += _("You may use the following login and password to get access to this protected area:\n")
body += "%s: %s" % (_("Username"), result_line.login) + "\n"
body += "%s: %s" % (_("Password"), result_line.password) + "\n"
body += "%s: %s" % (_("Database"), cr.dbname) + "\n"