Files
sure/app/views/settings/_settings_nav_link_large.html.erb
Juan José Mata 5c293b532a Translate navigation labels (main nav + settings) (#472)
* Translate main navigation labels

Move main nav item names to layout locale keys.

* Use the interpolation that corresponds with the view name
2025-12-20 19:13:40 +01:00

37 lines
1.5 KiB
Plaintext

<%# locals: path, direction, title %>
<%= link_to path, class: "hidden md:flex w-full bg-container hover:bg-container-inset rounded-xl border border-alpha-black-25 shadow-xs p-4 items-center justify-between" do %>
<% if direction == 'previous' %>
<%= icon("arrow-left") %>
<% end %>
<div class="<%= "grow" if direction == "next" %> <%= "text-right" if direction == "previous" %>">
<span class="block text-sm text-secondary"><%= t(".#{direction}") %></span>
<span class="block text-sm font-medium text-primary"><%= title %></span>
</div>
<% if direction == 'next' %>
<%= icon("arrow-right") %>
<% end %>
<% end %>
<%# Mobile version %>
<%= link_to path, class: "md:hidden w-full bg-container hover:bg-container-inset rounded-xl border border-alpha-black-25 shadow-xs py-3 px-4" do %>
<div class="flex items-center justify-between">
<% if direction == 'previous' %>
<div class="flex items-center gap-3">
<%= icon("arrow-left") %>
<span class="text-sm text-secondary"><%= t("settings.settings_nav_link_large.previous") %></span>
</div>
<div>
<span class="text-sm font-medium text-primary"><%= title %></span>
</div>
<% else %>
<div>
<span class="text-sm text-secondary"><%= t("settings.settings_nav_link_large.next") %></span>
</div>
<div class="flex items-center gap-3">
<span class="text-sm font-medium text-primary"><%= title %></span>
<%= icon("arrow-right") %>
</div>
<% end %>
</div>
<% end %>