PLT-5548 Prevent server start if defaultLocate is not available (#5532)
* PLT-5548 Prevent server start if defaultLocate is not available * Add validation for supported locales
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
45edfbe719
Коммит
758402311a
@@ -94,6 +94,10 @@ func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.Tran
|
||||
return translations, model.DEFAULT_LOCALE
|
||||
}
|
||||
|
||||
func GetSupportedLocales() map[string]string {
|
||||
return locales
|
||||
}
|
||||
|
||||
func TfuncWithFallback(pref string) i18n.TranslateFunc {
|
||||
t, _ := i18n.Tfunc(pref)
|
||||
return func(translationID string, args ...interface{}) string {
|
||||
|
||||
Ссылка в новой задаче
Block a user