The personal finance app for everyone (by everyone)
Ruby
feat: opening_balance_date and opening_balance(i18n) (#1377)
Tao Chen2a0fcd4faead
diff --git a/app/views/valuations/_header.html.erb b/app/views/valuations/_header.html.erbindex 2db8c87395..d4a3768769 100644--- a/app/views/valuations/_header.html.erb+++ b/app/views/valuations/_header.html.erb@@ -2,7 +2,8 @@<%= tag.header class: "mb-4 space-y-1", id: dom_id(entry, :header) do %><span class="text-secondary text-sm">- <%= entry.name %>+ <% valuation = entry.entryable %>+ <%= valuation.respond_to?(:opening_anchor?) && valuation.opening_anchor? ? t("valuations.show.opening_balance") : entry.name %></span><div class="flex items-center gap-4">diff --git a/app/views/valuations/_valuation.html.erb b/app/views/valuations/_valuation.html.erbindex e377eda0fe..003faf5fec 100644--- a/app/views/valuations/_valuation.html.erb+++ b/app/views/valuations/_valuation.html.erb@@ -17,10 +17,12 @@<%= render DS::FilledIcon.new(icon: icon, size: "md", hex_color: color, rounded: true) %><div class="truncate text-primary">- <%= link_to entry.name,- entry_path(entry),- data: { turbo_frame: "drawer", turbo_prefetch: false },- class: "hover:underline" %>+ <%= link_to(+ valuation.opening_anchor? ? t("valuations.show.opening_balance") : entry.name,+ entry_path(entry),+ data: { turbo_frame: "drawer", turbo_prefetch: false },+ class: "hover:underline"+ ) %></div></div></div>diff --git a/config/locales/views/valuations/de.yml b/config/locales/views/valuations/de.ymlindex cf7a480000..fc799ab441 100644--- a/config/locales/views/valuations/de.yml+++ b/config/locales/views/valuations/de.yml@@ -28,3 +28,4 @@ de:note_placeholder: Füge zusätzliche Details zu diesem Eintrag hinzuoverview: Übersichtsettings: Einstellungen+ opening_balance: Eröffnungssaldodiff --git a/config/locales/views/valuations/en.yml b/config/locales/views/valuations/en.ymlindex f4a55767c9..6a8e964a2f 100644--- a/config/locales/views/valuations/en.yml+++ b/config/locales/views/valuations/en.yml@@ -30,3 +30,4 @@ en:note_placeholder: Add any additional details about this entryoverview: Overviewsettings: Settings+ opening_balance: "Opening balance"diff --git a/config/locales/views/valuations/es.yml b/config/locales/views/valuations/es.ymlindex 9f1e6312c6..cf08162666 100644--- a/config/locales/views/valuations/es.yml+++ b/config/locales/views/valuations/es.yml@@ -30,3 +30,4 @@ es:note_placeholder: Añade cualquier detalle adicional sobre esta entradaoverview: Resumensettings: Configuración+ opening_balance: Saldo inicialdiff --git a/config/locales/views/valuations/fr.yml b/config/locales/views/valuations/fr.ymlindex d8d59a104e..ccd22d4aff 100644--- a/config/locales/views/valuations/fr.yml+++ b/config/locales/views/valuations/fr.yml@@ -28,3 +28,4 @@ fr:note_placeholder: Ajoutez tout détail supplémentaire à ce bilanoverview: Aperçusettings: Paramètres+ opening_balance: Solde d'ouverturediff --git a/config/locales/views/valuations/nb.yml b/config/locales/views/valuations/nb.ymlindex 5125b00713..f2d3113076 100644--- a/config/locales/views/valuations/nb.yml+++ b/config/locales/views/valuations/nb.yml@@ -27,4 +27,5 @@ nb:note_label: Notaternote_placeholder: Legg til eventuelle tilleggsdetaljer om denne oppføringenoverview: Oversikt- settings: Innstillinger\ No newline at end of file+ settings: Innstillinger+ opening_balance: Startsaldo\ No newline at end of filediff --git a/config/locales/views/valuations/nl.yml b/config/locales/views/valuations/nl.ymlindex 7bc507bc7d..e84eb68654 100644--- a/config/locales/views/valuations/nl.yml+++ b/config/locales/views/valuations/nl.yml@@ -28,3 +28,4 @@ nl:note_placeholder: Voeg eventuele aanvullende details toe over deze invoeroverview: Overzichtsettings: Instellingen+ opening_balance: Beginsaldodiff --git a/config/locales/views/valuations/pt-BR.yml b/config/locales/views/valuations/pt-BR.ymlindex 41d90cad16..32b6504abc 100644--- a/config/locales/views/valuations/pt-BR.yml+++ b/config/locales/views/valuations/pt-BR.yml@@ -28,3 +28,4 @@ pt-BR:note_placeholder: Adicione detalhes adicionais sobre esta entradaoverview: Visão geralsettings: Configurações+ opening_balance: Saldo inicialdiff --git a/config/locales/views/valuations/ro.yml b/config/locales/views/valuations/ro.ymlindex b607ba2067..29c406faaf 100644--- a/config/locales/views/valuations/ro.yml+++ b/config/locales/views/valuations/ro.yml@@ -24,3 +24,4 @@ ro:note_placeholder: Adaugă orice detalii suplimentare despre această înregistrareoverview: Prezentare generalăsettings: Setări+ opening_balance: Sold inițialdiff --git a/config/locales/views/valuations/tr.yml b/config/locales/views/valuations/tr.ymlindex 1eb75757b2..461876e953 100644--- a/config/locales/views/valuations/tr.yml+++ b/config/locales/views/valuations/tr.yml@@ -27,4 +27,5 @@ tr:note_label: Notlarnote_placeholder: Bu girişle ilgili ek detaylar ekleyinoverview: Genel Bakış- settings: Ayarlar\ No newline at end of file+ settings: Ayarlar+ opening_balance: Açılış bakiyesidiff --git a/config/locales/views/valuations/zh-CN.yml b/config/locales/views/valuations/zh-CN.ymlindex e6a3a37ecb..2cc6bfc63d 100644--- a/config/locales/views/valuations/zh-CN.yml+++ b/config/locales/views/valuations/zh-CN.yml@@ -30,3 +30,4 @@ zh-CN:note_placeholder: 添加此记录的其他详细信息overview: 概览settings: 设置+ opening_balance: 初始余额diff --git a/config/locales/views/valuations/zh-TW.yml b/config/locales/views/valuations/zh-TW.ymlindex b1a374afe3..af39427d91 100644--- a/config/locales/views/valuations/zh-TW.yml+++ b/config/locales/views/valuations/zh-TW.yml@@ -28,3 +28,4 @@ zh-TW:note_placeholder: 加入關於此紀錄的額外資訊overview: 概覽settings: 設定+ opening_balance: 初始餘額