The discussion revolves around an issue where some parameters cause English strings to appear in localized versions of Discourse. rizka reported that after updating to version 2.2, the moderator post contains the word “topic” in Finnish, despite it being hardcoded in English.
Additionally, rizka mentioned that the “Category” attribute name is not translated and appears in error prompts. gerhard confirmed that the issue is due to hardcoded values and attribute names not being translated.
gerhard subsequently fixed both issues with commits to the Discourse repository. rizka thanked gerhard and implemented a temporary override for the faulty strings on their stable branch.
It comes from move_posts.existing_topic_moderator_post. Where is that %{entity} supposed to come from? Seems that it won’t work anyway.
English:
A post was split to a new %{entity}: %{topic_link}
Finnish:
Viesti siirrettiin uuteen %{entity}: %{topic_link}
Furthermore, I got a report that the Uncategorized category is visible to regular users now and they can even try to create topics there. I’m not sure what has changed, though, but clearly something. Anyway, when he tried to create a topic there he couldn’t, because we have prevented that by disabling allow uncategorized topics. The error prompt he received was:
Category on varattu
That one comes from errors.messages.exclusion which is somewhat different as there is not even a parameter in that string. Not sure where the word “Category” comes from. Maybe it’s hardcoded?
You are right. “message” or “topic” are hardcoded values for %{entity}. I’m going to fix that.
Yeah, that’s the attribute name that caused the validation error. Most of them aren’t translated. I think it should be enough to add a new translation for activerecord.attributes.category. I’ll see what I can do.
As we are running the stable branch, I overrode those strings featuring the faulty entity. They will now say the posts were moved into a topic (ketju) even if they would be moved into a message. We can live with that. Especially since I don’t think any post has ever been moved into a message.