Error message I don't find : "Error: No 'other' form found in pluralFormatPattern 0"

I tried to locate this error message but don’t find any reference.
image

Can someone help me to get information.
The error appear at the top of the screen
This is a brand new installation (just some days I am configuring it)
And I don’t habe the feeling to have seen it before today, before I upgrade to the last update.
Thanks

The error you are seeing is from the MessageFormat.prototype.precompile method: https://github.com/discourse/discourse/blob/master/lib/javascripts/messageformat.js#L1519. I am not sure what is causing the error though.

What locale are you using on your site?

Spanish language.
This is message appearing in my administrator. It doesn’t appear on basic users.
Correct. I changed to English and the message dissapear.
But I have another system also in spanish but no problem there.
Aparently the only difference is different themes. The one which is OK is standard theme.
The one with problem is another theme. I am going to try to change the standard one to check.

1 Like

Found that the error hit is the following:

I18n._compiledMFs = {
too_few_topics_and_posts_notice_MF”: function() {
return “Invalid Format: Error: No ‘other’ form found in pluralFormatPattern 0”;
},

Which in my case makes sense, it’s a newly installed instance.

Well in my case, I have changed to basic Themes and the message disappear.
Then I return to the “Material Design Theme” and message till absent…
I don’t know much about you comment then I don’t know if this make sense with @leog findings.

Got it. The parameters used for the plural treatment were also translated to spanish “one” to “uno/una” and “other” to “otros/otras”. Changing them back to english solves the issue. Tested with my instance changing the value for too_few_topics_and_posts_notice_MF to the following spanish translation:

<a href="https://blog.discourse.org/2014/08/building-a-discourse-community/">¡Comencemos la discusión!</a> Hay {currentTopics, plural, one {<strong>#</strong> tema} other {<strong>#</strong> temas}} y {currentPosts, plural, one {<strong>#</strong> publicación} other {<strong>#</strong> publicaciones}}. Los visitantes necesitan más contenido para leer y responder – nosotros recomendamos al menos {requiredTopics, plural, one {<strong>#</strong> tema} other {<strong>#</strong> temas}} y {requiredPosts, plural, one {<strong>#</strong> publicación} other {<strong>#</strong> publicaciones}}. Solo los miembros del staff pueden ver este mensaje.

Created a PR to fix this, other texts were compromised as well, not just too_few_topics_and_posts_notice_MF.

4 Likes

Thanks for the PR, but we accept translation updates only through Transifex.

@gerhard not sure how to change these already (wrongly) translated strings in Transifex. Any tutorial available?

1 Like

I marked those strings as unreviewed. Can you try again?

1 Like

Done. I think you missed other strings that needed the same changes: reached_hour_MF, reached_minute_MF, exceeded_hour_MF, exceeded_minute_MF.

3 Likes

All done. Thanks @gerhard and the other folks for pitching in to diagnose the issue.

3 Likes

OK everybody. Thanks for all this actions.
But what do I have to from my administrator side.
Just wait for next release?

I updated the translations. Rebuilding your container or upgrading via docker manager should fix the translations.

3 Likes

Great @gerhard. I understand that Rebuilding take the last modules for everything. Thanks again