diff options
author | 6543 <6543@obermui.de> | 2021-03-21 16:11:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 16:11:36 +0100 |
commit | 24f7bd589945c8fc22c9cfc00bc21fca679da9d0 (patch) | |
tree | eb53dbc3679638b491b11eda5f1c4e231e60f7fa /vendor/github.com | |
parent | 17731e05ff47c72013fb52d1fc2236b4d7da269b (diff) | |
download | gitea-24f7bd589945c8fc22c9cfc00bc21fca679da9d0.tar.gz gitea-24f7bd589945c8fc22c9cfc00bc21fca679da9d0.zip |
Use i18n.Reset to reload locales (#15073)
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/unknwon/i18n/i18n.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/unknwon/i18n/i18n.go b/vendor/github.com/unknwon/i18n/i18n.go index cfe982f5f7..bdb8ee7923 100644 --- a/vendor/github.com/unknwon/i18n/i18n.go +++ b/vendor/github.com/unknwon/i18n/i18n.go @@ -174,6 +174,11 @@ func SetMessageWithDesc(lang, langDesc string, localeFile interface{}, otherLoca return err } +// Reset resets locale store. +func Reset() { + locales = &localeStore{store: make(map[string]*locale)} +} + // SetMessage sets the message file for localization. func SetMessage(lang string, localeFile interface{}, otherLocaleFiles ...interface{}) error { return SetMessageWithDesc(lang, lang, localeFile, otherLocaleFiles...) |