Realm translations are being added to the account console. (#10329)

For the account console translations are being fetched from the realm translations as well as from the theme properties.

Closes #10328
This commit is contained in:
Alexander Volkov 2022-02-23 14:35:10 +01:00 committed by GitHub
parent 209df44641
commit 91a51d276f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,6 +115,7 @@ public class AccountConsole {
Locale locale = session.getContext().resolveLocale(user); Locale locale = session.getContext().resolveLocale(user);
map.put("locale", locale.toLanguageTag()); map.put("locale", locale.toLanguageTag());
Properties messages = theme.getMessages(locale); Properties messages = theme.getMessages(locale);
messages.putAll(realm.getRealmLocalizationTextsByLocale(locale.toLanguageTag()));
map.put("msg", new MessageFormatterMethod(locale, messages)); map.put("msg", new MessageFormatterMethod(locale, messages));
map.put("msgJSON", messagesToJsonString(messages)); map.put("msgJSON", messagesToJsonString(messages));
map.put("supportedLocales", supportedLocales(messages)); map.put("supportedLocales", supportedLocales(messages));