Add an trailing slash to dashboard links (#29555)

Fix #29533, and add some tests for "base/paginate.tmpl"

(cherry picked from commit 8553b4600e3035b6f6ad6907c37cebd013fa4d64)

Conflicts:
	services/contexttest/context_tests.go
	trivial conflict because
	"Improve user experience for outdated comments" was skipped
This commit is contained in:
wxiaoguang 2024-03-04 09:02:51 +08:00 committed by Earl Warren
parent cfce4e089e
commit de6768ed54
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 33 additions and 10 deletions

View file

@ -9,7 +9,9 @@ import (
)
// 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

@ -144,7 +144,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
}