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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user