fix: replace bare translate() with I18n.translate() in ECR templates and routes

This commit is contained in:
Richard Lora 2026-05-23 20:48:51 +00:00
parent 3ab75a1ab3
commit 623f715a8c
4 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ module Invidious::Routes::Search
if search_disabled
user = env.get?("user")
if !user
return error_template(403, translate(locale, "search_subscriptions_login_required"))
return error_template(403, I18n.translate(locale, "search_subscriptions_login_required"))
end
user = user.as(User)

View File

@ -7,7 +7,7 @@
<% if subscription_only %>
<div class="h-box" style="margin-bottom: 0.5em;">
<p style="color: var(--text-color-muted, #888);"><i class="icon ion-ios-lock"></i> <%= translate(locale, "search_subscriptions_mode_notice") %></p>
<p style="color: var(--text-color-muted, #888);"><i class="icon ion-ios-lock"></i> <%= I18n.translate(locale, "search_subscriptions_mode_notice") %></p>
</div>
<hr/>
<% else %>

View File

@ -20,7 +20,7 @@
<% if !CONFIG.page_enabled?("search") %>
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-12-24" style="text-align: center; margin-top: 0.5em;">
<p style="color: #888;"><%= translate(locale, "search_subscriptions_hint") %></p>
<p style="color: #888;"><%= I18n.translate(locale, "search_subscriptions_hint") %></p>
</div>
<div class="pure-u-1-4"></div>
<% end %>

View File

@ -315,7 +315,7 @@
</div>
<div class="pure-control-group">
<label for="search_enabled"><%= translate(locale, "preferences_search_enabled_label") %></label>
<label for="search_enabled"><%= I18n.translate(locale, "preferences_search_enabled_label") %></label>
<input name="search_enabled" id="search_enabled" type="checkbox" <% if CONFIG.page_enabled?("search") %>checked<% end %>>
</div>