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
Этот коммит содержится в:
enahum
2017-02-28 06:07:02 -03:00
коммит произвёл George Goldberg
родитель 45edfbe719
Коммит 758402311a
3 изменённых файлов: 43 добавлений и 0 удалений

Просмотреть файл

@@ -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 {