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

translation

(Evgeny) #1

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


(Gerhard Schlager) #2

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?


(Evgeny) #3

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


(Gerhard Schlager) #4

Oh, for some reason it didn’t update all translation files. :thinking:
Update translations · discourse/discourse@10dad5d · GitHub should fix it.


(Evgeny) #5

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

1