mirror of
https://github.com/we-promise/sure.git
synced 2026-05-29 15:34:58 +00:00
feat: opening_balance_date and opening_balance(i18n) (#1377)
* make default of opening_balance_date_label is TODAY
* feat(i18n): add multi-language support for opening balance label
- Use `t("valuations.show.opening_balance")` for all opening balance display (list and detail views)
- Add or update `opening_balance` translation in all major languages under `config/locales/views/valuations/`
- Now "Opening balance" will be localized in all supported languages
* revert -2.years
* Update config/locales/views/valuations/es.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
* Update config/locales/views/valuations/pt-BR.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
* Fix indentation for opening_balance in ro.yml
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
* Fix indentation for opening_balance in Turkish locale
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
* Update zh-TW.yml
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
---------
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
<%= tag.header class: "mb-4 space-y-1", id: dom_id(entry, :header) do %>
|
<%= tag.header class: "mb-4 space-y-1", id: dom_id(entry, :header) do %>
|
||||||
<span class="text-secondary text-sm">
|
<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>
|
</span>
|
||||||
|
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
|
|||||||
@@ -17,10 +17,12 @@
|
|||||||
<%= render DS::FilledIcon.new(icon: icon, size: "md", hex_color: color, rounded: true) %>
|
<%= render DS::FilledIcon.new(icon: icon, size: "md", hex_color: color, rounded: true) %>
|
||||||
|
|
||||||
<div class="truncate text-primary">
|
<div class="truncate text-primary">
|
||||||
<%= link_to entry.name,
|
<%= link_to(
|
||||||
entry_path(entry),
|
valuation.opening_anchor? ? t("valuations.show.opening_balance") : entry.name,
|
||||||
data: { turbo_frame: "drawer", turbo_prefetch: false },
|
entry_path(entry),
|
||||||
class: "hover:underline" %>
|
data: { turbo_frame: "drawer", turbo_prefetch: false },
|
||||||
|
class: "hover:underline"
|
||||||
|
) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,3 +28,4 @@ de:
|
|||||||
note_placeholder: Füge zusätzliche Details zu diesem Eintrag hinzu
|
note_placeholder: Füge zusätzliche Details zu diesem Eintrag hinzu
|
||||||
overview: Übersicht
|
overview: Übersicht
|
||||||
settings: Einstellungen
|
settings: Einstellungen
|
||||||
|
opening_balance: Eröffnungssaldo
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ en:
|
|||||||
note_placeholder: Add any additional details about this entry
|
note_placeholder: Add any additional details about this entry
|
||||||
overview: Overview
|
overview: Overview
|
||||||
settings: Settings
|
settings: Settings
|
||||||
|
opening_balance: "Opening balance"
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ es:
|
|||||||
note_placeholder: Añade cualquier detalle adicional sobre esta entrada
|
note_placeholder: Añade cualquier detalle adicional sobre esta entrada
|
||||||
overview: Resumen
|
overview: Resumen
|
||||||
settings: Configuración
|
settings: Configuración
|
||||||
|
opening_balance: Saldo inicial
|
||||||
|
|||||||
@@ -28,3 +28,4 @@ fr:
|
|||||||
note_placeholder: Ajoutez tout détail supplémentaire à ce bilan
|
note_placeholder: Ajoutez tout détail supplémentaire à ce bilan
|
||||||
overview: Aperçu
|
overview: Aperçu
|
||||||
settings: Paramètres
|
settings: Paramètres
|
||||||
|
opening_balance: Solde d'ouverture
|
||||||
|
|||||||
@@ -27,4 +27,5 @@ nb:
|
|||||||
note_label: Notater
|
note_label: Notater
|
||||||
note_placeholder: Legg til eventuelle tilleggsdetaljer om denne oppføringen
|
note_placeholder: Legg til eventuelle tilleggsdetaljer om denne oppføringen
|
||||||
overview: Oversikt
|
overview: Oversikt
|
||||||
settings: Innstillinger
|
settings: Innstillinger
|
||||||
|
opening_balance: Startsaldo
|
||||||
@@ -28,3 +28,4 @@ nl:
|
|||||||
note_placeholder: Voeg eventuele aanvullende details toe over deze invoer
|
note_placeholder: Voeg eventuele aanvullende details toe over deze invoer
|
||||||
overview: Overzicht
|
overview: Overzicht
|
||||||
settings: Instellingen
|
settings: Instellingen
|
||||||
|
opening_balance: Beginsaldo
|
||||||
|
|||||||
@@ -28,3 +28,4 @@ pt-BR:
|
|||||||
note_placeholder: Adicione detalhes adicionais sobre esta entrada
|
note_placeholder: Adicione detalhes adicionais sobre esta entrada
|
||||||
overview: Visão geral
|
overview: Visão geral
|
||||||
settings: Configurações
|
settings: Configurações
|
||||||
|
opening_balance: Saldo inicial
|
||||||
|
|||||||
@@ -24,3 +24,4 @@ ro:
|
|||||||
note_placeholder: Adaugă orice detalii suplimentare despre această înregistrare
|
note_placeholder: Adaugă orice detalii suplimentare despre această înregistrare
|
||||||
overview: Prezentare generală
|
overview: Prezentare generală
|
||||||
settings: Setări
|
settings: Setări
|
||||||
|
opening_balance: Sold inițial
|
||||||
|
|||||||
@@ -27,4 +27,5 @@ tr:
|
|||||||
note_label: Notlar
|
note_label: Notlar
|
||||||
note_placeholder: Bu girişle ilgili ek detaylar ekleyin
|
note_placeholder: Bu girişle ilgili ek detaylar ekleyin
|
||||||
overview: Genel Bakış
|
overview: Genel Bakış
|
||||||
settings: Ayarlar
|
settings: Ayarlar
|
||||||
|
opening_balance: Açılış bakiyesi
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ zh-CN:
|
|||||||
note_placeholder: 添加此记录的其他详细信息
|
note_placeholder: 添加此记录的其他详细信息
|
||||||
overview: 概览
|
overview: 概览
|
||||||
settings: 设置
|
settings: 设置
|
||||||
|
opening_balance: 初始余额
|
||||||
|
|||||||
@@ -28,3 +28,4 @@ zh-TW:
|
|||||||
note_placeholder: 加入關於此紀錄的額外資訊
|
note_placeholder: 加入關於此紀錄的額外資訊
|
||||||
overview: 概覽
|
overview: 概覽
|
||||||
settings: 設定
|
settings: 設定
|
||||||
|
opening_balance: 初始餘額
|
||||||
|
|||||||
Reference in New Issue
Block a user