diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-02 14:31:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-02 14:31:50 +0200 |
| commit | dab53a1ef28ecc281d574b50d3433e806db375cd (patch) | |
| tree | 54970ba3fda4907b61b7e44e176a322ca29ade63 /app/views/layouts/_nav_controls.html.erb | |
| parent | 097a211bbe15127c36e93bde9c8ca2f112f7db0e (diff) | |
Keep the compared translation independent of the interface language
Diffstat (limited to 'app/views/layouts/_nav_controls.html.erb')
| -rw-r--r-- | app/views/layouts/_nav_controls.html.erb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/layouts/_nav_controls.html.erb b/app/views/layouts/_nav_controls.html.erb index bae1082b..70d5130c 100644 --- a/app/views/layouts/_nav_controls.html.erb +++ b/app/views/layouts/_nav_controls.html.erb | |||
| @@ -9,7 +9,8 @@ | |||
| 9 | <% end %> | 9 | <% end %> |
| 10 | 10 | ||
| 11 | <span class="nav_group"> | 11 | <span class="nav_group"> |
| 12 | <%= link_to url_for(locale: (:en unless I18n.locale == :en)), | 12 | <% locale_target = request.query_parameters.symbolize_keys.except(:controller, :action, :only_path, :host, :port, :protocol, :anchor, :script_name).merge(:locale => (:en unless I18n.locale == :en)) %> |
| 13 | <%= link_to url_for(locale_target), | ||
| 13 | class: "nav_toggle nav_locale", | 14 | class: "nav_toggle nav_locale", |
| 14 | "aria-label" => t(".switch_locale"), title: t(".switch_locale") do %> | 15 | "aria-label" => t(".switch_locale"), title: t(".switch_locale") do %> |
| 15 | <%= I18n.locale == :en ? "DE" : "EN" %> | 16 | <%= I18n.locale == :en ? "DE" : "EN" %> |
