Skip to content

Commit

Permalink
PLT-6935 Fixes issue when locale set to unknown (mattermost#6829)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhulen authored and enahum committed Jul 3, 2017
1 parent 1e58576 commit 83f10cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actions/global_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 83f10cd

Please sign in to comment.