Changed default LocalizationSettings.AvailableLocales to include all locales (#3280)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3a6694cc6b
Коммит
ce5f3aeee1
@@ -6,6 +6,7 @@ package model
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -35,6 +36,15 @@ const (
|
|||||||
FAKE_SETTING = "********************************"
|
FAKE_SETTING = "********************************"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// should match the values in webapp/i18n/i18n.jsx
|
||||||
|
var LOCALES = []string{
|
||||||
|
"en",
|
||||||
|
"es",
|
||||||
|
"fr",
|
||||||
|
"ja",
|
||||||
|
"pt-BR",
|
||||||
|
}
|
||||||
|
|
||||||
type ServiceSettings struct {
|
type ServiceSettings struct {
|
||||||
ListenAddress string
|
ListenAddress string
|
||||||
MaximumLoginAttempts int
|
MaximumLoginAttempts int
|
||||||
@@ -541,7 +551,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.LocalizationSettings.AvailableLocales == nil {
|
if o.LocalizationSettings.AvailableLocales == nil {
|
||||||
o.LocalizationSettings.AvailableLocales = new(string)
|
o.LocalizationSettings.AvailableLocales = new(string)
|
||||||
*o.LocalizationSettings.AvailableLocales = *o.LocalizationSettings.DefaultClientLocale
|
*o.LocalizationSettings.AvailableLocales = strings.Join(LOCALES, ",")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import frLocaleData from 'react-intl/locale-data/fr';
|
|||||||
import jaLocaleData from 'react-intl/locale-data/ja';
|
import jaLocaleData from 'react-intl/locale-data/ja';
|
||||||
import ptLocaleData from 'react-intl/locale-data/pt';
|
import ptLocaleData from 'react-intl/locale-data/pt';
|
||||||
|
|
||||||
|
// should match the values in model/config.go
|
||||||
const languages = {
|
const languages = {
|
||||||
en: {
|
en: {
|
||||||
value: 'en',
|
value: 'en',
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user