מספר התשובות בכלי העזר ב-Discourse הצרפתי שגוי

סיכום מבוסס בינה מלאכותית

A bug was reported in the French Discourse translation, where the number of answers to a topic is incorrectly shown as 1 in the tooltip, even for topics with no answers. patrickemin provided a screenshot of the issue, noting it doesn’t exist in the English Discourse.

Falco suggested correcting the translation at Contribute a translation to Discourse. Benjamin_D and patrickemin investigated the translation file and found it similar to the English version, but with a discrepancy in handling zero replies.

gerhard identified the problem as using “1” instead of “#” in the one case for pluralized strings. The solution was to replace “1” with “#” in the French translation. patrickemin confirmed the fix worked.

Additionally, Benjamin_D reported another affected string, and gerhard updated the linter and translations, including a pull request to update the English strings to use the “#” symbol for easier translation.

Hi, there is a bug in the French Discourse translation, the number of answers to a topic is incorrectly shown as 1 in the tooltip even for topics that have no answers:

This bug does not exists in the English Discourse.

3 לייקים

Translations can be corrected at Contribute a translation to Discourse

3 לייקים

Well once again, it’s weird :weary:
If I’m not mistaken it’s js.posts_likes_MF
which is

This topic has {count, plural, one {1 reply} other {# replies}} {ratio, select,
low {with a high like to post ratio}
med {with a very high like to post ratio}
high {with an extremely high like to post ratio}
other {}}

where zero is plural (?) and which is translated in

Ce sujet a {count, plural, one {1 réponse} other {# réponses}} {ratio, select,
low {avec un ratio élevé de J'aime par message}
med {avec un ratio très élevé de J'aime par message}
high {avec un ratio extrêmement élevé de J'aime par message}
other {}}

where for some reason zero is singular :thinking:
It’s not the accents, I tried removing them (and the ratio part)

5 לייקים

I am not a specialist but I found this translation too, it looks like it is the source of the problem but it’s the same as the English version, so, as you said, mystery… for the time being.

לייק 1

Oh, I see the problem. This is the same problem I described in Always use %{count} variable when translating pluralized strings.

It should be one {# réponse} instead of one {1 réponse}. So, replace the “1” inside the one case with “#” to make it work. The admin_js.admin.user.delete_all_posts_confirm_MF string is affected too.

You can fix the French translations at translate.discourse.org.


We should probably update the English strings to always use the # symbol in order to make it easier for translators.

https://github.com/discourse/discourse/pull/11605

6 לייקים

Thanks so much ! It worked !

לייק 1

I think js.flagging.delete_confirm_MF also is (but js.topic.read_more_MF doesn’t seem to be).

3 לייקים

Thanks for noticing. I updated our linter and two translations.

https://github.com/discourse/discourse/pull/11608

4 לייקים