mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Remove legacy unmaintained packages, refactor to support change default locale (#19308)
Remove two unmaintained vendor packages `i18n` and `paginater`. Changes: * Rewrite `i18n` package with a more clear fallback mechanism. Fix an unstable `Tr` behavior, add more tests. * Refactor the legacy `Paginater` to `Paginator`, test cases are kept unchanged. Trivial enhancement (no breaking for end users): * Use the first locale in LANGS setting option as the default, add a log to prevent from surprising users.
This commit is contained in:
		| @@ -997,7 +997,8 @@ Default templates for project boards: | ||||
|  | ||||
| ## i18n (`i18n`) | ||||
|  | ||||
| - `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**: List of locales shown in language selector | ||||
| - `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**: | ||||
|      List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list. | ||||
| - `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,Português de Portugal,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,ελληνικά,فارسی,magyar nyelv,bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales | ||||
|  | ||||
| ## U2F (`U2F`) **DEPRECATED** | ||||
|   | ||||
| @@ -299,6 +299,8 @@ LANGS = en-US,foo-BAR | ||||
| NAMES = English,FooBar | ||||
| ``` | ||||
|  | ||||
| The first locale will be used as the default if user browser's language doesn't match any locale in the list. | ||||
|  | ||||
| Locales may change between versions, so keeping track of your customized locales is highly encouraged. | ||||
|  | ||||
| ### Readmes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user