PLT-6935 Fixes issue when locale set to unknown (#6829)
Этот коммит содержится в:
@@ -356,15 +356,15 @@ export function sendEphemeralPost(message, channelId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function newLocalizationSelected(locale) {
|
export function newLocalizationSelected(locale) {
|
||||||
if (locale === 'en') {
|
const localeInfo = I18n.getLanguageInfo(locale);
|
||||||
|
|
||||||
|
if (locale === 'en' || !localeInfo) {
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.RECEIVED_LOCALE,
|
type: ActionTypes.RECEIVED_LOCALE,
|
||||||
locale,
|
locale,
|
||||||
translations: en
|
translations: en
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const localeInfo = I18n.getLanguageInfo(locale);
|
|
||||||
|
|
||||||
Client4.getTranslations(localeInfo.url).then(
|
Client4.getTranslations(localeInfo.url).then(
|
||||||
(data, res) => {
|
(data, res) => {
|
||||||
let translations = data;
|
let translations = data;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user