Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Translate navigation labels (main nav + settings) (#472)

Juan José Mata5c293b532a4b
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index ce6f549433..5741ff2410 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,9 +1,9 @@
<% mobile_nav_items = [
- { name: "Home", path: root_path, icon: "pie-chart", icon_custom: false, active: page_active?(root_path) },
- { name: "Transactions", path: transactions_path, icon: "credit-card", icon_custom: false, active: page_active?(transactions_path) },
- { name: "Reports", path: reports_path, icon: "chart-bar", icon_custom: false, active: page_active?(reports_path) },
- { name: "Budgets", path: budgets_path, icon: "map", icon_custom: false, active: page_active?(budgets_path) },
- { name: "Assistant", path: chats_path, icon: "icon-assistant", icon_custom: true, active: page_active?(chats_path), mobile_only: true }
+ { name: t(".nav.home"), path: root_path, icon: "pie-chart", icon_custom: false, active: page_active?(root_path) },
+ { name: t(".nav.transactions"), path: transactions_path, icon: "credit-card", icon_custom: false, active: page_active?(transactions_path) },
+ { name: t(".nav.reports"), path: reports_path, icon: "chart-bar", icon_custom: false, active: page_active?(reports_path) },
+ { name: t(".nav.budgets"), path: budgets_path, icon: "map", icon_custom: false, active: page_active?(budgets_path) },
+ { name: t(".nav.assistant"), path: chats_path, icon: "icon-assistant", icon_custom: true, active: page_active?(chats_path), mobile_only: true }
] %>
<% desktop_nav_items = mobile_nav_items.reject { |item| item[:mobile_only] } %>
diff --git a/app/views/settings/_settings_nav.html.erb b/app/views/settings/_settings_nav.html.erb
index 20ac659cd5..2405fcc992 100644
--- a/app/views/settings/_settings_nav.html.erb
+++ b/app/views/settings/_settings_nav.html.erb
@@ -48,7 +48,7 @@ nav_sections = [
<div class="space-y-4">
<div class="hidden lg:flex items-center gap-2 p-1.5">
<%= render DS::Link.new(
- text: "Back",
+ text: t("settings.settings_nav_link_large.previous"),
icon: "chevron-left",
href: previous_path,
variant: "ghost",
@@ -85,7 +85,7 @@ nav_sections = [
<ul class="flex space-y-1">
<li>
<%= render DS::Link.new(
- text: "Back",
+ text: t("settings.settings_nav_link_large.previous"),
icon: "chevron-left",
href: previous_path,
variant: "ghost",
diff --git a/app/views/settings/_settings_nav_link_large.html.erb b/app/views/settings/_settings_nav_link_large.html.erb
index 73265aed61..21811203a5 100644
--- a/app/views/settings/_settings_nav_link_large.html.erb
+++ b/app/views/settings/_settings_nav_link_large.html.erb
@@ -18,14 +18,14 @@
<% if direction == 'previous' %>
<div class="flex items-center gap-3">
<%= icon("arrow-left") %>
- <span class="text-sm text-secondary">Back</span>
+ <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">Next</span>
+ <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>
diff --git a/config/locales/views/layout/ca.yml b/config/locales/views/layout/ca.yml
index 66e260d7a2..203d74edae 100644
--- a/config/locales/views/layout/ca.yml
+++ b/config/locales/views/layout/ca.yml
@@ -1,6 +1,13 @@
---
ca:
layouts:
+ application:
+ nav:
+ assistant: Assistent
+ budgets: Pressupostos
+ home: Inici
+ reports: Informes
+ transactions: Transaccions
auth:
existing_account: Ja tens un compte?
no_account: Nou a %{product_name}?
@@ -10,4 +17,3 @@ ca:
footer:
privacy_policy: Política de privacitat
terms_of_service: Termes del servei
-
diff --git a/config/locales/views/layout/de.yml b/config/locales/views/layout/de.yml
index 16b76665bd..34d7cd4c57 100644
--- a/config/locales/views/layout/de.yml
+++ b/config/locales/views/layout/de.yml
@@ -1,6 +1,13 @@
---
de:
layouts:
+ application:
+ nav:
+ assistant: Assistent
+ budgets: Budgets
+ home: Startseite
+ reports: Berichte
+ transactions: Transaktionen
auth:
existing_account: Du hast bereits ein Konto?
no_account: Neu bei %{product_name}?
@@ -10,4 +17,4 @@ de:
shared:
footer:
privacy_policy: Datenschutzrichtlinie
- terms_of_service: Nutzungsbedingungen
\ No newline at end of file
+ terms_of_service: Nutzungsbedingungen
diff --git a/config/locales/views/layout/en.yml b/config/locales/views/layout/en.yml
index 1a6ac3bb4d..d42543c4f6 100644
--- a/config/locales/views/layout/en.yml
+++ b/config/locales/views/layout/en.yml
@@ -1,6 +1,13 @@
---
en:
layouts:
+ application:
+ nav:
+ assistant: Assistant
+ budgets: Budgets
+ home: Home
+ reports: Reports
+ transactions: Transactions
auth:
existing_account: Already have an account?
no_account: New to %{product_name}?
diff --git a/config/locales/views/layout/es.yml b/config/locales/views/layout/es.yml
index 37ffbe463b..4baf66e919 100644
--- a/config/locales/views/layout/es.yml
+++ b/config/locales/views/layout/es.yml
@@ -1,6 +1,13 @@
---
es:
layouts:
+ application:
+ nav:
+ assistant: Asistente
+ budgets: Presupuestos
+ home: Inicio
+ reports: Informes
+ transactions: Transacciones
auth:
existing_account: ¿Ya tienes una cuenta?
no_account: ¿Nuevo en %{product_name}?
diff --git a/config/locales/views/layout/nb.yml b/config/locales/views/layout/nb.yml
index 0dde7d43d0..6fa400af8b 100644
--- a/config/locales/views/layout/nb.yml
+++ b/config/locales/views/layout/nb.yml
@@ -1,6 +1,13 @@
---
nb:
layouts:
+ application:
+ nav:
+ assistant: Assistent
+ budgets: Budsjett
+ home: Hjem
+ reports: Rapporter
+ transactions: Transaksjoner
auth:
existing_account: Har du allerede en konto?
no_account: Ny hos %{product_name}?
@@ -9,4 +16,4 @@ nb:
shared:
footer:
privacy_policy: Personvernerklæring
- terms_of_service: Vilkår for bruk
\ No newline at end of file
+ terms_of_service: Vilkår for bruk
diff --git a/config/locales/views/layout/pt-BR.yml b/config/locales/views/layout/pt-BR.yml
index 8f499ac1c5..0274a9b694 100644
--- a/config/locales/views/layout/pt-BR.yml
+++ b/config/locales/views/layout/pt-BR.yml
@@ -1,6 +1,13 @@
---
pt-BR:
layouts:
+ application:
+ nav:
+ assistant: Assistente
+ budgets: Orçamentos
+ home: Início
+ reports: Relatórios
+ transactions: Transações
auth.sign_up:
existing_account: Já tem uma conta?
no_account: Novo no %{product_name}?
diff --git a/config/locales/views/layout/ro.yml b/config/locales/views/layout/ro.yml
index 97571bd7f8..77f6722e46 100644
--- a/config/locales/views/layout/ro.yml
+++ b/config/locales/views/layout/ro.yml
@@ -1,6 +1,13 @@
---
ro:
layouts:
+ application:
+ nav:
+ assistant: Asistent
+ budgets: Bugete
+ home: Acasă
+ reports: Rapoarte
+ transactions: Tranzacții
auth:
existing_account: Ai deja un cont?
no_account: Ești nou pe %{product_name}?
diff --git a/config/locales/views/layout/tr.yml b/config/locales/views/layout/tr.yml
index eb60b1a27e..7e1abb335a 100644
--- a/config/locales/views/layout/tr.yml
+++ b/config/locales/views/layout/tr.yml
@@ -1,6 +1,13 @@
---
tr:
layouts:
+ application:
+ nav:
+ assistant: Asistan
+ budgets: Bütçeler
+ home: Ana Sayfa
+ reports: Raporlar
+ transactions: İşlemler
auth:
existing_account: Zaten bir hesabınız var mı?
no_account: "%{product_name}'ye yeni misiniz?"
@@ -9,4 +16,4 @@ tr:
shared:
footer:
privacy_policy: Gizlilik Politikası
- terms_of_service: Hizmet Şartları
\ No newline at end of file
+ terms_of_service: Hizmet Şartları