File tree Expand file tree Collapse file tree
github.com/unknwon/i18n Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ require (
120120 github.com/tstranex/u2f v1.0.0
121121 github.com/ulikunitz/xz v0.5.10 // indirect
122122 github.com/unknwon/com v1.0.1
123- github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c
123+ github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44
124124 github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
125125 github.com/unrolled/render v1.0.3
126126 github.com/urfave/cli v1.22.5
Original file line number Diff line number Diff line change @@ -1111,8 +1111,8 @@ github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o
11111111github.1485827954.workers.dev/unknwon/com v0.0.0-20190804042917-757f69c95f3e /go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM =
11121112github.1485827954.workers.dev/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs =
11131113github.1485827954.workers.dev/unknwon/com v1.0.1 /go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM =
1114- github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c h1:679/gJXwrsHC3RATr0YYjZvDMJPYN7W9FGSGNoLmKxM =
1115- github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c /go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ =
1114+ github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44 h1:7bSo/vjZKVYUoZfxpYh9Y9JV+9hi1gYJp4WIykhrZag =
1115+ github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44 /go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ =
11161116github.1485827954.workers.dev/unknwon/paginater v0.0.0-20200328080006-042474bd0eae h1:ihaXiJkaca54IaCSnEXtE/uSZOmPxKZhDfVLrzZLFDs =
11171117github.1485827954.workers.dev/unknwon/paginater v0.0.0-20200328080006-042474bd0eae /go.mod h1:1fdkY6xxl6ExVs2QFv7R0F5IRZHKA8RahhB9fMC9RvM =
11181118github.1485827954.workers.dev/unrolled/render v1.0.3 h1:baO+NG1bZSF2WR4zwh+0bMWauWky7DVrTOfvE2w+aFo =
Original file line number Diff line number Diff line change 55package translation
66
77import (
8- "errors"
9-
108 "code.gitea.io/gitea/modules/log"
119 "code.gitea.io/gitea/modules/options"
1210 "code.gitea.io/gitea/modules/setting"
@@ -38,6 +36,7 @@ func AllLangs() []LangType {
3836
3937// InitLocales loads the locales
4038func InitLocales () {
39+ i18n .Reset ()
4140 localeNames , err := options .Dir ("locale" )
4241 if err != nil {
4342 log .Fatal ("Failed to list locale files: %v" , err )
@@ -60,12 +59,7 @@ func InitLocales() {
6059 for i := range setting .Names {
6160 key := "locale_" + setting .Langs [i ] + ".ini"
6261 if err = i18n .SetMessageWithDesc (setting .Langs [i ], setting .Names [i ], localFiles [key ]); err != nil {
63- if errors .Is (err , i18n .ErrLangAlreadyExist ) {
64- // just log if lang is already loaded since we can not reload it
65- log .Warn ("Can not load language '%s' since already loaded" , setting .Langs [i ])
66- } else {
67- log .Error ("Failed to set messages to %s: %v" , setting .Langs [i ], err )
68- }
62+ log .Error ("Failed to set messages to %s: %v" , setting .Langs [i ], err )
6963 }
7064 }
7165 i18n .SetDefaultLang ("en-US" )
Original file line number Diff line number Diff line change @@ -772,7 +772,7 @@ github.com/ulikunitz/xz/lzma
772772# github.com/unknwon/com v1.0.1
773773## explicit
774774github.1485827954.workers.dev/unknwon/com
775- # github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c
775+ # github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44
776776## explicit
777777github.1485827954.workers.dev/unknwon/i18n
778778# github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
You can’t perform that action at this time.
0 commit comments