Fixed the default locale issue.
This commit is contained in:
parent
b8684d74d6
commit
864e71798d
@ -183,23 +183,22 @@ class ApplicationMenu extends BaseMenu {
|
||||
</div>
|
||||
<div className={styles.col}>
|
||||
<label aria-labelledby="changeLangLabel" className={cx(styles.formElement, styles.pullContentRight)}>
|
||||
<select
|
||||
defaultValue={this.formatLocale(this.state.settings.locale)}
|
||||
className={styles.select}
|
||||
onChange={this.handleSelectChange.bind(this, 'locale', availableLocales)}
|
||||
>
|
||||
<option disabled>
|
||||
{ availableLocales &&
|
||||
availableLocales.length ?
|
||||
intl.formatMessage(intlMessages.languageOptionLabel) :
|
||||
intl.formatMessage(intlMessages.noLocaleOptionLabel) }
|
||||
</option>
|
||||
{availableLocales ? availableLocales.map((locale, index) =>
|
||||
(<option key={index} value={locale.locale}>
|
||||
{locale.name}
|
||||
</option>),
|
||||
) : null }
|
||||
</select>
|
||||
{ availableLocales && availableLocales.length > 0 ?
|
||||
<select
|
||||
defaultValue={this.formatLocale(this.state.settings.locale)}
|
||||
className={styles.select}
|
||||
onChange={this.handleSelectChange.bind(this, 'locale', availableLocales)}
|
||||
>
|
||||
<option disabled>
|
||||
{ intl.formatMessage(intlMessages.languageOptionLabel) }
|
||||
</option>
|
||||
{ availableLocales.map((locale, index) =>
|
||||
(<option key={index} value={locale.locale}>
|
||||
{locale.name}
|
||||
</option>),
|
||||
) }
|
||||
</select>
|
||||
: null }
|
||||
</label>
|
||||
<div
|
||||
id="changeLangLabel"
|
||||
|
Loading…
Reference in New Issue
Block a user