mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-14 06:50:25 +00:00
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>
31 lines
1.4 KiB
Go HTML Template
31 lines
1.4 KiB
Go HTML Template
<a class="ui icon tw-px-4 tw-py-2 show-modal" data-modal="#search-syntax-modal">{{svg "octicon-question"}}</a>
|
|
<dialog id="search-syntax-modal">
|
|
<article>
|
|
<header>{{ctx.Locale.Tr "search.syntax"}}</header>
|
|
<div class="content">
|
|
<table class="tw-table-auto">
|
|
<tbody>
|
|
{{range $filter, $tr :=
|
|
dict
|
|
"is:open" (ctx.Locale.TrString "repo.issues.open_title")
|
|
"is:closed" (ctx.Locale.TrString "repo.issues.closed_title")
|
|
"is:all" (ctx.Locale.TrString "repo.issues.all_title")
|
|
"author:<username>" (ctx.Locale.TrString "repo.issues.filter_poster.hint")
|
|
"assignee:<username>" (ctx.Locale.TrString "repo.issues.filter_assignee.hint")
|
|
"review:<username>" (ctx.Locale.TrString "repo.issues.filter_reviewers.hint")
|
|
"mentions:<username>" (ctx.Locale.TrString "repo.issues.filter_mention.hint")
|
|
"sort:<by>:[asc|desc]" (ctx.Locale.Tr "repo.issues.filter_sort.hint_with_placeholder" (HTMLFormat "<code>created|comments|updated|deadline</code>"))
|
|
"modified:[>|<]<date>" (ctx.Locale.TrString "repo.issues.filter_modified.hint")}}
|
|
<tr>
|
|
<th class="tw-p-2"><code>{{$filter}}</code></th>
|
|
<td class="tw-p-2">{{$tr}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<footer class="actions">
|
|
<button class="secondary button cancel">{{ctx.Locale.Tr "settings.cancel"}}</button>
|
|
</footer>
|
|
</article>
|
|
</dialog>
|