summaryrefslogtreecommitdiff
path: root/addons/gamification/models
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-01-13 14:31:02 +0100
committerMartin Trigaux <mat@odoo.com>2016-01-13 14:46:30 +0100
commitbb56e484b767aa037ec697dd11b0bd865ec31db1 (patch)
tree57377fdd4bc6048bd6488baaf4744e2e07e01944 /addons/gamification/models
parent2ace8f0270b26eae08c6fd6814605326de28da43 (diff)
[FIX] all: construction of translations lookup
When evaluated, the translation function never finds a match if a variable is integrated into the untranslated text. SHAME! :bell: :raising_hand:
Diffstat (limited to 'addons/gamification/models')
-rw-r--r--addons/gamification/models/challenge.py4
-rw-r--r--addons/gamification/models/goal.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py
index f10be1eee18..f05f2ea3a65 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -737,11 +737,11 @@ class gamification_challenge(osv.Model):
if challenge_ended:
# open chatter message
- message_body = _("The challenge %s is finished." % challenge.name)
+ message_body = _("The challenge %s is finished.") % challenge.name
if rewarded_users:
user_names = self.pool['res.users'].name_get(cr, uid, rewarded_users, context=context)
- message_body += _("<br/>Reward (badge %s) for every succeeding user was sent to %s." % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names])))
+ message_body += _("<br/>Reward (badge %s) for every succeeding user was sent to %s.") % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names]))
else:
message_body += _("<br/>Nobody has succeeded to reach every goal, no badge is rewarded for this challenge.")
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py
index 2903814f9ba..2f307e03ca0 100644
--- a/addons/gamification/models/goal.py
+++ b/addons/gamification/models/goal.py
@@ -130,7 +130,7 @@ class gamification_goal_definition(osv.Model):
obj.search(cr, uid, domain, context=context, count=True)
except (ValueError, SyntaxError), e:
msg = e.message or (e.msg + '\n' + e.text)
- raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s" % (definition.name, msg)))
+ raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s") % (definition.name, msg))
return True
def create(self, cr, uid, vals, context=None):