Fixing misspell errors (#8544)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
eb48292a3a
Коммит
014a3b6a60
@@ -50,7 +50,7 @@ func TestFindConfigFile(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestConfigFromEnviroVars(t *testing.T) {
|
||||
os.Setenv("MM_TEAMSETTINGS_SITENAME", "From Enviroment")
|
||||
os.Setenv("MM_TEAMSETTINGS_SITENAME", "From Environment")
|
||||
os.Setenv("MM_TEAMSETTINGS_CUSTOMBRANDTEXT", "Custom Brand")
|
||||
os.Setenv("MM_SERVICESETTINGS_ENABLECOMMANDS", "false")
|
||||
os.Setenv("MM_SERVICESETTINGS_READTIMEOUT", "400")
|
||||
@@ -59,20 +59,20 @@ func TestConfigFromEnviroVars(t *testing.T) {
|
||||
cfg, cfgPath, err := LoadConfig("config.json")
|
||||
require.Nil(t, err)
|
||||
|
||||
if cfg.TeamSettings.SiteName != "From Enviroment" {
|
||||
t.Fatal("Couldn't read config from enviroment var")
|
||||
if cfg.TeamSettings.SiteName != "From Environment" {
|
||||
t.Fatal("Couldn't read config from environment var")
|
||||
}
|
||||
|
||||
if *cfg.TeamSettings.CustomBrandText != "Custom Brand" {
|
||||
t.Fatal("Couldn't read config from enviroment var")
|
||||
t.Fatal("Couldn't read config from environment var")
|
||||
}
|
||||
|
||||
if *cfg.ServiceSettings.EnableCommands {
|
||||
t.Fatal("Couldn't read config from enviroment var")
|
||||
t.Fatal("Couldn't read config from environment var")
|
||||
}
|
||||
|
||||
if *cfg.ServiceSettings.ReadTimeout != 400 {
|
||||
t.Fatal("Couldn't read config from enviroment var")
|
||||
t.Fatal("Couldn't read config from environment var")
|
||||
}
|
||||
|
||||
os.Unsetenv("MM_TEAMSETTINGS_SITENAME")
|
||||
|
||||
@@ -96,7 +96,7 @@ func GetUserTranslations(locale string) i18n.TranslateFunc {
|
||||
func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.TranslateFunc, string) {
|
||||
// This is for checking against locales like pt_BR or zn_CN
|
||||
headerLocaleFull := strings.Split(r.Header.Get("Accept-Language"), ",")[0]
|
||||
// This is for checking agains locales like en, es
|
||||
// This is for checking against locales like en, es
|
||||
headerLocale := strings.Split(strings.Split(r.Header.Get("Accept-Language"), ",")[0], "-")[0]
|
||||
defaultLocale := *settings.DefaultClientLocale
|
||||
if locales[headerLocaleFull] != "" {
|
||||
|
||||
@@ -82,7 +82,7 @@ func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
|
||||
case "Password:":
|
||||
return []byte(a.password), nil
|
||||
default:
|
||||
return nil, errors.New("Unkown fromServer")
|
||||
return nil, errors.New("Unknown fromServer")
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user