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

**URL:** https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739
**Category:** Bug
**Tags:** translation
**Created:** [6 באפריל,‏ 2018,‏ 3:43pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739 "2018-04-06T15:43:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)
#### Post date: [6 באפריל,‏ 2018,‏ 3:43pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/1 "2018-04-06T15:43:18Z")

</div>

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

topic\_count\_latest. **few**

![333](https://global.discourse-cdn.com/meta/original/3X/9/3/930f03f9703d3812b277e21a409fc85c7d4a31e6.jpg)

 ![2222](https://global.discourse-cdn.com/meta/original/3X/3/0/30ebfc83d6e884a20abb78a4e8708c9216cbb4a3.jpg)

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

_v2.0.0.beta5 +192_

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [6 באפריל,‏ 2018,‏ 4:21pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/2 "2018-04-06T16:21:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)
#### Post date: [6 באפריל,‏ 2018,‏ 4:47pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/3 "2018-04-06T16:47:23Z")

</div>

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:

 ![ru](https://global.discourse-cdn.com/meta/original/3X/d/3/d3cd8258881bbd9b0f20eef27e36afa7bddebc0e.jpg)

[https://github.com/discourse/discourse/tree/master/config/locales](https://github.com/discourse/discourse/tree/master/config/locales)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [6 באפריל,‏ 2018,‏ 4:59pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/4 "2018-04-06T16:59:50Z")

</div>

Oh, for some reason it didn’t update all translation files. 🤔  
[Update translations · discourse/discourse@10dad5d · GitHub](https://github.com/discourse/discourse/commit/10dad5de631b516d8f31929dec58d03e8ef0e4eb) should fix it.

---

<div class="post-metadata">

### Author: ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)
#### Post date: [6 באפריל,‏ 2018,‏ 5:21pm UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/5 "2018-04-06T17:21:41Z")

</div>

Thank you very much. All appeared. 👍

 ![1](https://global.discourse-cdn.com/meta/original/3X/e/b/eb6648728fbe8bcfb6f0baaeb79f61d535412a70.jpg)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [13 במאי,‏ 2019,‏ 8:11am UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/6 "2019-05-13T08:11:38Z")

</div>

Fixed in [FIX: Customizing missing pluralized translations didn't work · discourse/discourse@81c329f · GitHub](https://github.com/discourse/discourse/commit/81c329fbb8cb141335fd59c596dc5cde3bfb402a)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [15 במאי,‏ 2019,‏ 8:11am UTC](https://meta.discourse.org/t/cant-override-pluralized-string-if-it-is-missing-in-the-locale-file/84739/7 "2019-05-15T08:11:45Z")

</div>

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