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

Add a trailing slash to dashboard links (#29555) (#29573)

Backport #29555
This commit is contained in:
wxiaoguang
2024-03-04 13:50:55 +08:00
committed by GitHub
parent b519e4750b
commit 4ef7e496b8
5 changed files with 32 additions and 9 deletions

View File

@@ -6,7 +6,9 @@ package translation
import "fmt"
// MockLocale provides a mocked locale without any translations
type MockLocale struct{}
type MockLocale struct {
Lang, LangName string // these fields are used directly in templates: ctx.Locale.Lang
}
var _ Locale = (*MockLocale)(nil)

View File

@@ -140,7 +140,7 @@ func Match(tags ...language.Tag) language.Tag {
// locale represents the information of localization.
type locale struct {
i18n.Locale
Lang, LangName string // these fields are used directly in templates: .i18n.Lang
Lang, LangName string // these fields are used directly in templates: ctx.Locale.Lang
msgPrinter *message.Printer
}