fix(ui): hardcode sort options in search syntax hint, improve look (#11381)

Followup to https://codeberg.org/forgejo/forgejo/pulls/9109

Fix issue reported by @mahlzahn that the string was confusing translators and they translated the part that wasn't meant to be translated.
Part of this fix was to replace custom IterWithTr with simple dict iteration to allow for placeholders in strings.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11381
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Reviewed-by: Ellen Εμιλία Άννα Zscheile <fogti@noreply.codeberg.org>
This commit is contained in:
0ko 2026-02-23 06:03:23 +01:00
parent 0ae6235386
commit f9a22b335e
4 changed files with 13 additions and 30 deletions

View file

@ -73,12 +73,6 @@ func (handler Handler) handleTemplateNode(fset *token.FileSet, node tmplParser.N
funcname = nodeVar.Ident[2]
}
if funcname == "IterWithTr" {
for i := 2; i < len(nodeCommand.Args); i += 2 {
handler.handleTemplateMsgid(fset, nodeCommand.Args[i])
}
}
var gotUnexpectedInvoke *int
ltf, ok := handler.LocaleTrFunctions[funcname]
if !ok {