[FIX] website_forum: fix no_results_message translatability

1. The "unsolved", "unanswered", "answered" were not translatable.
  In another language, we would have "unsolved" appear in the middle
  of the "sentence"
2. The sentences were chunked. Like "There are no" and "results".
  This works in English, but in another language, maybe one needs
  to translate this differently from "there are no" + "unsolved" + "results'.
  If the grammar of that language is "There are no" + "results" + "unsolved"
  translating each chunk directly and keeping them at the same place won't
  be grammatically correct, if only it makes sense.

This will also have the beneficial side effect of making them more extensible.

Additionally, fix a typo.

task-3546506

closes odoo/odoo#138461

X-original-commit: 8eae73d806aec2f3b93c576ad4573b4d74510f2a
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
This commit is contained in:
Florian Charlier
2023-10-12 14:44:55 +00:00
parent 44266e757e
commit 16ea6b027a
3 changed files with 33 additions and 2 deletions
@@ -3118,6 +3118,26 @@ msgstr ""
msgid "Sorry, we could not find any <b>%s</b> result <b>%s</b> %s%s%s."
msgstr ""
#. module: website_forum
#: model_terms:ir.ui.view,arch_db:website_forum.no_results_message
msgid "Sorry, we could not find any <b>solved</b> results"
msgstr ""
#. module: website_forum
#: model_terms:ir.ui.view,arch_db:website_forum.no_results_message
msgid "Sorry, we could not find any <b>unanswered</b> results"
msgstr ""
#. module: website_forum
#: model_terms:ir.ui.view,arch_db:website_forum.no_results_message
msgid "Sorry, we could not find any <b>unsolved</b> results"
msgstr ""
#. module: website_forum
#: model_terms:ir.ui.view,arch_db:website_forum.no_results_message
msgid "Sorry, we could not find any results"
msgstr ""
#. module: website_forum
#. odoo-javascript
#: code:addons/website_forum/static/src/js/website_forum.js:0
@@ -236,7 +236,7 @@
<t t-set="btn_classes" t-value="'px-2'"/>
</t>
<a t-attf-class="#{ 'disabled' if len(tag.post_ids) == 0 else '' } btn-link #{ 'text-dark fw-bold' if tag.message_is_follower else '' }"
t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?#{ keep_query(filters='tag') }}">
t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?#{ keep_query(filters='tag') }">
<t t-out="tag.name"/>&amp;nbsp;
<span class="small">(<t t-out="tag.posts_count"/>)</span>
</a>
@@ -382,7 +382,18 @@
<h5 t-out="_no_results_title"/>
<span t-if="result_msg" t-out="result_msg"/>
<span t-else="">
Sorry, we could not find any <b t-if="filters in ['unanswered', 'solved', 'unsolved']" t-out="filters"/> results
<t t-if="filters == 'unanswered'">
Sorry, we could not find any <b>unanswered</b> results
</t>
<t t-elif="filters == 'solved'">
Sorry, we could not find any <b>solved</b> results
</t>
<t t-elif="filters == 'unsolved'">
Sorry, we could not find any <b>unsolved</b> results
</t>
<t t-else="">
Sorry, we could not find any results
</t>
<b t-if="my == 'favourites'"> in your favourites</b>
<b t-elif="my == 'mine'"> in your posts</b>
<span t-if="search">matching "<em class="fw-bold text-break" t-out="original_search or search"/>"</span>