Files
NetworkCats ab7fb7c3c6 refactor: migrate templates to Askama custom i18n filter syntax
Replace all {{ t_field_name }} template variables with {{ "msgid"|t(locale) }}
filter calls across all 6 template files. This works with the #[askama::filter_fn]
defined in handlers/html.rs, which calls i18n::translate() directly.

Templates updated: index.html, error_alert.html, error_page.html,
_footer.html, _footer_lang.html, _search_form.html
2026-03-22 17:33:55 +08:00

20 lines
798 B
HTML

<form method="GET" action="/{{ lang_tag }}" class="search-form" role="search"
data-msg-invalid="{{ "Invalid IP address"|t(locale) }}"
data-msg-non-public="{{ "Only public IP addresses can be queried"|t(locale) }}">
<div class="search-input-wrap">
<label for="ip-search" class="sr-only">{{ "Search IP address"|t(locale) }}</label>
<i class="icon-magnifier search-icon" aria-hidden="true"></i>
<input
id="ip-search"
type="text"
name="ip"
placeholder="{{ "Type to search IP data"|t(locale) }}"
value="{{ query }}"
autocomplete="off"
autocapitalize="none"
spellcheck="false"
{% if autofocus %}autofocus{% endif %}
>
<p class="search-error" id="ip-error" role="alert" aria-live="polite" hidden></p>
</div>
</form>