diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-04-03 17:46:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-03 17:46:48 +0800 |
commit | d242511e86c3a6d8a7013100845d2cdc8eb5252c (patch) | |
tree | 391b7fa946d32b44f06a274453e4b4d1a19fe8ee /modules/timeutil/since.go | |
parent | 27c34dd011cceb8232d1c3307f87b53a147c75c3 (diff) | |
download | gitea-d242511e86c3a6d8a7013100845d2cdc8eb5252c.tar.gz gitea-d242511e86c3a6d8a7013100845d2cdc8eb5252c.zip |
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.
Diffstat (limited to 'modules/timeutil/since.go')
-rw-r--r-- | modules/timeutil/since.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/timeutil/since.go b/modules/timeutil/since.go index c0240907ae..38b12829ad 100644 --- a/modules/timeutil/since.go +++ b/modules/timeutil/since.go @@ -12,8 +12,7 @@ import ( "time" "code.gitea.io/gitea/modules/setting" - - "github.com/unknwon/i18n" + "code.gitea.io/gitea/modules/translation/i18n" ) // Seconds-based time units |