diff --git a/common/phrases.go b/common/phrases.go index bb248ba0..1bba07a3 100644 --- a/common/phrases.go +++ b/common/phrases.go @@ -46,7 +46,7 @@ type LanguagePack struct { UserAgents map[string]string OperatingSystems map[string]string HumanLanguages map[string]string - Errors map[string]map[string]string // map[category]map[name]value + Errors map[string]string NoticePhrases map[string]string PageTitles map[string]string TmplPhrases map[string]string @@ -205,12 +205,12 @@ func GetHumanLangPhrase(name string) (string, bool) { } // TODO: Does comma ok work with multi-dimensional maps? -func GetErrorPhrase(category string, name string) string { - res, ok := currentLangPack.Load().(*LanguagePack).Errors[category][name] +func GetErrorPhrase(name string) (string, bool) { + res, ok := currentLangPack.Load().(*LanguagePack).Errors[name] if !ok { - return getPhrasePlaceholder("error", name) + return getPhrasePlaceholder("error", name), false } - return res + return res, true } func GetNoticePhrase(name string) string { diff --git a/langs/english.json b/langs/english.json index 86b91c9b..7452a9c1 100644 --- a/langs/english.json +++ b/langs/english.json @@ -70,8 +70,6 @@ }, "Errors": { - "NoPerms": { - } }, "PageTitles": {