Skip to content

A platform for community discussion. Free, open, simple.

FIX: Translate string in search 404 page (#35090)

Penar Musarajca87a301afd2
diff --git a/app/views/exceptions/not_found.html.erb b/app/views/exceptions/not_found.html.erb
index dabf8592d1f..14944fa12ed 100644
--- a/app/views/exceptions/not_found.html.erb
+++ b/app/views/exceptions/not_found.html.erb
@@ -41,7 +41,7 @@
<form action='<%= path "/search" %>' id='discourse-search'>
<label for="search-input"><%= t 'page_not_found.search_title' %></label>
<div class="search-input__wrapper">
- <input type="text" id="search-input" class="search-input" placeholder="Search topics by title or keywords…" name="q" value="<%= @slug %>">
+ <input type="text" id="search-input" class="search-input" placeholder="<%= I18n.t('page_not_found.placeholder') %>" name="q" value="<%= @slug %>">
<div class="search-input__icon" aria-hidden="true"><%= SvgSprite.raw_svg('magnifying-glass') %></div>
</div>
<button class="btn btn-primary"><%= t 'page_not_found.search_button' %></button>
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 750c9dbc79d..6155231fdde 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -4702,6 +4702,7 @@ en:
search_title: "Try searching instead?"
search_button: "Search"
home: "Take me home"
+ placeholder: "Search topics by title or keywords…"
offline:
title: "Cannot load app"