FIX: Locale mismatch at theme translations picker (#26687)

* FIX: Locale mismatch at theme translations picker

Before, the theme translations picker value was set to the
site's default locale, which mismatches from the user's locale.

This commit changes the picker value to the user locale.

relates to https://meta.discourse.org/t/locale-mismatch-at-theme-translations/302879

* DEV: Address code review feedback.

- https://github.com/discourse/discourse/pull/26687#discussion_r1572516758
- https://github.com/discourse/discourse/pull/26687#discussion_r1572524059
This commit is contained in:
Gabriel Grubba
2024-04-19 19:23:27 +02:00
committed by GitHub
parent 239eac7799
commit dc996a1e5c
4 changed files with 36 additions and 2 deletions

View File

@ -302,7 +302,11 @@ export default class AdminCustomizeThemesShowController extends Controller {
}
get locale() {
return this.get("model.locale") || this.siteSettings.default_locale;
return (
this.get("model.locale") ||
this.userLocale ||
this.siteSettings.default_locale
);
}
@action