Skip to content

fix(template): translate the search placeholder in the server-rendered header - #1585

Open
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/ssr-search-placeholder
Open

fix(template): translate the search placeholder in the server-rendered header#1585
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/ssr-search-placeholder

Conversation

@culfin

@culfin culfin commented Aug 24, 2026

Copy link
Copy Markdown

ui/template/header.html writes the placeholder literally:

<input placeholder="Search" name="q" type="search" class="placeholder-search form-control" value="">

Every other string in that file goes through translator, and the key for this
one already exists — ui.header.search.placeholder, present in all 45 language
files under i18n/. The React interface uses it; only the template does not.

The result is one English word in the middle of an otherwise translated page.
Two audiences see it: readers, until the interface takes over, and search
engines, which see nothing else.

<input placeholder="{{translator $.language "ui.header.search.placeholder"}}" …>

🤖 Generated with Claude Code

…d header

header.html writes \`placeholder="Search"\` literally. Every other string in the
same file goes through \`translator\`, and the key for this one exists in all 45
language files as \`ui.header.search.placeholder\`.

The result is an English word in the middle of an otherwise translated page —
visible to anyone reading before the interface loads, and to search engines,
which never see anything else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant