[I18N] gamification: ensure translation of orig motivational messages

For some reason the demo data for some of the ranking motivational
messages is different from their default motivational message (in data).
Because of the way the `translate=html_translate` works, when the demo
data was installed, the original motivational message was overwritten
and therefore not exported in the .pot file so it could never be
translated. Since we want both the demo and original messages
translated, it's best that we add the original messages into the demo
data so that it's not visible to users, but is still exported to the
.pot file.

closes odoo/odoo#150306

X-original-commit: 2f3aafe55ee39a3661477934f63b2a5c90f724a5
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
This commit is contained in:
Tiffany Chang (tic)
2024-01-20 10:46:54 +00:00
parent 865c08ec4d
commit 04e5bfe61e
2 changed files with 25 additions and 0 deletions
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo><data noupdate="1">
<!--Ranks-->
<!-- note that original motivational messages are duplicated+hidden to ensure they are included in .pot export when demo data installed -->
<record id="rank_student" model="gamification.karma.rank">
<field name="description_motivational" type="html">
<div hidden="true">Reach the next rank to show the rest of the world you exist.</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice mug!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/>
@@ -12,6 +14,7 @@
<record id="rank_bachelor" model="gamification.karma.rank">
<field name="description_motivational" type="html">
<div hidden="true">Reach the next rank to improve your status!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very magic wand!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/>
@@ -21,6 +24,7 @@
<record id="rank_master" model="gamification.karma.rank">
<field name="description_motivational" type="html">
<div hidden="true">Reach the next rank and become a Master!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice hat!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/>
@@ -30,6 +34,7 @@
<record id="rank_doctor" model="gamification.karma.rank">
<field name="description_motivational" type="html">
<div hidden="true">Reach the next rank and become a powerful user!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice unicorn!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
+20
View File
@@ -1815,6 +1815,16 @@ msgstr ""
msgid "Ranks List"
msgstr ""
#. module: gamification
#: model_terms:gamification.karma.rank,description_motivational:gamification.rank_master
msgid "Reach the next rank and become a Master!"
msgstr ""
#. module: gamification
#: model_terms:gamification.karma.rank,description_motivational:gamification.rank_doctor
msgid "Reach the next rank and become a powerful user!"
msgstr ""
#. module: gamification
#: model_terms:gamification.karma.rank,description_motivational:gamification.rank_bachelor
msgid "Reach the next rank and gain a very magic wand!"
@@ -1835,6 +1845,16 @@ msgstr ""
msgid "Reach the next rank and gain a very nice unicorn!"
msgstr ""
#. module: gamification
#: model_terms:gamification.karma.rank,description_motivational:gamification.rank_bachelor
msgid "Reach the next rank to improve your status!"
msgstr ""
#. module: gamification
#: model_terms:gamification.karma.rank,description_motivational:gamification.rank_student
msgid "Reach the next rank to show the rest of the world you exist."
msgstr ""
#. module: gamification
#: model:ir.model.fields.selection,name:gamification.selection__gamification_goal__state__reached
msgid "Reached"