Can't override pluralized string if it is missing in the locale file

If the translation is not in the English file, the translation from the admin interface does not work.

topic_count_latest.few

Some cases can be very sensitive; this is on the central page of the site.

v2.0.0.beta5 +192

5 Likes

I consider this a minor bug. It will be fixed eventually, but it’s currently at the bottom of my list.

For the sake of completeness, here are steps to reproduce:

  • Make sure client.ru.yml doesn’t contain a translation for topic_count_latest.few.
  • Go to Admin -> Customize -> Text Content and search for topic_count_latest.

Expected: It should list all the pluralization keys for Russian (one, few, other).
Actual: It lists only the pluralization keys for English and the ones available in the Russian locale file.


Regarding the missing translation: I updated the translations today, so you should be able to see the translated strings when you update to latest.

And you shouldn’t see the [ru.topic_count_latest.few] in production mode. It should fallback to English. Are you saying this isn’t happening? Can you reproduce it on try or meta?

5 Likes

Into a file:

https://github.com/discourse/discourse/blob/master/config/locales/client.ru.yml

topic_count_latest - no.

Meta’s hard to test. The fact is that if Russian translation is not added to the database using the admin interface, the transfer is taken apparently from a file. It will show English.

I noticed on my website. But only it is necessary to add a translation through the administrator interface, then this error will appear. (not only on the Central page, but also in the search results, etc. where there - few)

Changes in the file:

https://github.com/discourse/discourse/tree/master/config/locales

4 Likes

Oh, for some reason it didn’t update all translation files. :thinking:
https://github.com/discourse/discourse/commit/10dad5de631b516d8f31929dec58d03e8ef0e4eb should fix it.

5 Likes

Thank you very much. All appeared. :+1:

1

5 Likes

Fixed in https://github.com/discourse/discourse/commit/81c329fbb8cb141335fd59c596dc5cde3bfb402a

5 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.