Translations for Terms of Service, Privacy

Default about page is properly translated:

However, when I switch to FAQ/Guidelines, TOS or Privacy tabs, header get back to English:

I suspect, that this is potentially caused by bootstrap that was done in English - I only found out later, that you can change locale for bootstrap. Is there a way to change this after bootstrap?

Have now tested with I18n.enableVerboseLocalizationSession():
it confirms that first screenshot from above is filled from translation keys (therefore translated), while the second screenshot have hardcoded English value and no keys are added by verbose translations… :face_with_raised_eyebrow:

No, it’s not hardcoded. It uses different locale keys depending on how you access the page. I already have a fix for it, but didn’t want to commit it before the release of 2.2.

4 Likes

I can confirm this is now fixed in 2.3.0.beta2. Thanks a lot!

Are you sure? I didn’t change anything yet. :wink:
Maybe you only noticed a missing translation, but there’s still something I need to fix. :slight_smile:

Sure. Then it may be due to app.yml change I did last time (but did not rebuild app since then):

LANG: sl_SI.UTF-8
DISCOURSE_DEFAULT_LOCALE: sl

If I understand your previous post, it gets default from here, right?

This is done. From now on server and client will use the same translations.

https://github.com/discourse/discourse/commit/58f72cd439000c99bec03cd6a40099624255056

And I did some house cleaning because I noticed we had some unused translations for “Terms of Service”.

https://github.com/discourse/discourse/commit/98a17edc90114f6a7c5134d8f7313619093eb869

5 Likes