Theme translation overrides only apply to the administrator's language

Following on from: Guest Gate Theme Component - #13 by davidkingham

Thanks David! I think this is maybe a bug. I tested it with Gated Topics in Category theme component and same result. If the language is same this will return the original text en.yml even if you overwritten it on admin Theme Translate section. It maybe depends the Discourse default language too. :thinking: My site default language is Hungarian.

Site Settings :arrow_down_small:
Screenshot 2022-05-12 at 15.57.20

I overwrite the Theme Translation to Hungarian :arrow_down_small:

If I set the Chrome language section to English (United States)

It will use the default en.yml text.

But If I change to other language for example English (United Kingdom)

This will use the custom text I added.

I think something like this happens on your site :slightly_smiling_face:

What do you think about this @JammyDodger? :slightly_smiling_face:

3 Likes

If you think it could be a bug @Don then I’m happy to slide it over to bug and see if we can get some people to replicate it. :+1:

3 Likes

Thanks! :slightly_smiling_face: Yes I think this might be a kind of bug. :thinking:

3 Likes

Done. :+1: Though it may need a better title. :slightly_smiling_face:

2 Likes

I think, when you override theme translations as an administrator, it only overrides the translations for whatever language you are using when you make the edits. The overrides don’t carry across to other languages. Does that line up with what you’re seeing?

The vast majority of forums use the default config, which doesn’t allow users to change their language, so this issue isn’t noticed.

It is a limitation we’re aware of, but we don’t have an ETA on improving it at the moment. Ideally, we’ll make it work the same as /admin/customize/text, so you can set overrides for each language. Certainly pr-welcome

6 Likes

That is the case David, I turned that setting on a long time ago thinking we would have more international discussions, but it didn’t pan out. So for now I’ve turned off the setting. Thanks for following up.

3 Likes