mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6935 Fixes issue when locale set to unknown (#6829)
This commit is contained in:
@@ -356,15 +356,15 @@ export function sendEphemeralPost(message, channelId) {
|
||||
}
|
||||
|
||||
export function newLocalizationSelected(locale) {
|
||||
if (locale === 'en') {
|
||||
const localeInfo = I18n.getLanguageInfo(locale);
|
||||
|
||||
if (locale === 'en' || !localeInfo) {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_LOCALE,
|
||||
locale,
|
||||
translations: en
|
||||
});
|
||||
} else {
|
||||
const localeInfo = I18n.getLanguageInfo(locale);
|
||||
|
||||
Client4.getTranslations(localeInfo.url).then(
|
||||
(data, res) => {
|
||||
let translations = data;
|
||||
|
||||
Reference in New Issue
Block a user