feat(ui): localize theme names (#7168)

Allow translating theme names. Not even for i18n reasons but because this way the menu is clearer and cleaner.

The number of translated entries is kept minimal for now. It is easy to pollute locales with these names otherwise.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7168
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
0ko 2025-03-09 15:12:30 +00:00 committed by David Rotermund
parent 2108fdadfd
commit 540474b649
7 changed files with 35 additions and 9 deletions

View file

@ -39,6 +39,10 @@ func (l MockLocale) TrSize(s int64) ReadableSize {
return ReadableSize{fmt.Sprint(s), ""}
}
func (l MockLocale) HasKey(key string) bool {
return true
}
func (l MockLocale) PrettyNumber(v any) string {
return fmt.Sprint(v)
}