From dd9ad10d705fdbd7fbfa7323e6560b69021a2950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 8 Jan 2018 19:13:24 +0100 Subject: [PLT-6936] Translate AppError.Message automatically by default (#8063) --- utils/config.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'utils/config.go') diff --git a/utils/config.go b/utils/config.go index d75ec732b..83785f045 100644 --- a/utils/config.go +++ b/utils/config.go @@ -268,10 +268,6 @@ func DisableConfigWatch() { } func InitAndLoadConfig(filename string) error { - if err := TranslationsPreInit(); err != nil { - return err - } - LoadGlobalConfig(filename) InitializeConfigWatch() EnableConfigWatch() @@ -381,13 +377,12 @@ func LoadGlobalConfig(fileName string) *model.Config { config.SetDefaults() if err := config.IsValid(); err != nil { - panic(T(err.Id)) + panic(err.Message) } if needSave { cfgMutex.Unlock() if err := SaveConfig(CfgFileName, config); err != nil { - err.Translate(T) l4g.Warn(err.Error()) } cfgMutex.Lock() @@ -396,7 +391,6 @@ func LoadGlobalConfig(fileName string) *model.Config { if err := ValidateLocales(config); err != nil { cfgMutex.Unlock() if err := SaveConfig(CfgFileName, config); err != nil { - err.Translate(T) l4g.Warn(err.Error()) } cfgMutex.Lock() -- cgit v1.2.3-1-g7c22