Number of answers in tooltip on French Discourse incorrect

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 Likes

Translations can be corrected at Contribute a translation to Discourse

3 Likes

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 Likes

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 Like

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 Likes

Thanks so much ! It worked !

1 Like

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

3 Likes

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

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

4 Likes