1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 18:58:38 +00:00

Use en-US as fallback when using other default language (#21200)

Only en-US has complete translations. When use other language as
default, the en-US should still be used as fallback.

Close #21199

### Screenshot


![image](https://user-images.githubusercontent.com/2114189/190882906-b7a83958-0ea2-46c4-9084-42c4f9a239aa.png)

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
wxiaoguang
2022-09-25 07:00:16 +08:00
committed by GitHub
parent 0c8ce71188
commit bb1e0d0aa5
4 changed files with 36 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ type LocaleStore interface {
// HasLang returns whether a given language is present in the store
HasLang(langName string) bool
// AddLocaleByIni adds a new language to the store
AddLocaleByIni(langName, langDesc string, source interface{}) error
AddLocaleByIni(langName, langDesc string, source, moreSource []byte) error
}
// ResetDefaultLocales resets the current default locales