Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/views/accounts/_account_sidebar_tabs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<summary class="flex items-center justify-between gap-2">
<div class="flex items-center gap-2">
<%= icon "triangle-alert", size: "sm", color: "warning" %>
<p class="font-medium">Missing historical data</p>
<p class="font-medium"><%= t(".missing_historical") %></p>
</div>

<%= icon("chevron-down", color: "warning", class: "group-open:transform group-open:rotate-180") %>
Expand All @@ -15,23 +15,23 @@
<p><%= product_name %> uses third party providers to fetch historical exchange rates, security prices, and more. This data is required to calculate accurate historical account balances.</p>

<p>
<%= link_to "Configure your providers here.", settings_hosting_path, class: "text-yellow-600 underline" %>
<%= link_to t(".describe_party_provider"), settings_hosting_path, class: "text-yellow-600 underline" %>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Text Key for Configuration Link

The link to configure data providers uses t(".describe_party_provider") for its text. This key contains a long descriptive paragraph, causing the link to display that full text instead of the intended short phrase "Configure your providers here.", which is in t(".configure_provider").

Fix in Cursor Fix in Web

</p>
</div>
</details>
<% end %>

<%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>
<% tabs.with_nav do |nav| %>
<% nav.with_btn(id: "all", label: "All") %>
<% nav.with_btn(id: "asset", label: "Assets") %>
<% nav.with_btn(id: "liability", label: "Debts") %>
<% nav.with_btn(id: "all", label: t(".label_all")) %>
<% nav.with_btn(id: "asset", label: t(".label_asset")) %>
<% nav.with_btn(id: "liability", label: t(".label_liability")) %>
<% end %>

<% tabs.with_panel(tab_id: "asset") do %>
<div class="space-y-2">
<%= render DS::Link.new(
text: "New asset",
text: t(".new_asset"),
variant: "ghost",
href: new_account_path(step: "method_select", classification: "asset"),
icon: "plus",
Expand All @@ -51,7 +51,7 @@
<% tabs.with_panel(tab_id: "liability") do %>
<div class="space-y-2">
<%= render DS::Link.new(
text: "New debt",
text: t(".new_debt"),
variant: "ghost",
href: new_account_path(step: "method_select", classification: "liability"),
icon: "plus",
Expand All @@ -71,7 +71,7 @@
<% tabs.with_panel(tab_id: "all") do %>
<div class="space-y-2">
<%= render DS::Link.new(
text: "New account",
text: t(".new_account"),
variant: "ghost",
full_width: true,
href: new_account_path(step: "method_select"),
Expand Down
6 changes: 3 additions & 3 deletions app/views/pages/dashboard.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% content_for :page_header do %>
<div class="space-y-1 mb-6 flex gap-4 justify-between items-center lg:items-start">
<div class="space-y-1">
<h1 class="text-xl lg:text-3xl font-medium text-primary">Welcome back, <%= Current.user.first_name %></h1>
<p class="text-sm lg:text-base text-secondary">Here's what's happening with your finances</p>
<h1 class="text-xl lg:text-3xl font-medium text-primary"><%= t(".welcome_back") %>, <%= Current.user.first_name %></h1>
<p class="text-sm lg:text-base text-secondary"><%= t(".happening_with_finance") %></p>
</div>

<%= render DS::Link.new(
icon: "plus",
text: "New",
text: t(".new"),
href: new_account_path,
frame: :modal,
class: "hidden lg:inline-flex"
Expand Down
8 changes: 4 additions & 4 deletions app/views/pages/dashboard/_cashflow_sankey.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="cashflow-sankey-chart">
<div class="flex justify-between items-center gap-4 px-4 mb-4">
<h2 class="text-lg font-medium inline-flex items-center gap-1.5">
Cashflow
<%= t(".title") %>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Fix i18n scope: relative t('.…') won’t resolve with current keys.

This partial scopes t(".…") to pages.dashboard.cashflow_sankey., but en.yml defines pages.dashboard.cashflow.. Users will see missing translations.

Apply minimal fix by using absolute keys:

-      <%= t(".title") %>
+      <%= t("pages.dashboard.cashflow.title") %>

-        <p class="text-sm font-medium text-primary"><%= t(".no_cashflow") %></p>
-        <p class="text-secondary text-sm"><%= t(".add_transactions_to_display_cashflow") %></p>
+        <p class="text-sm font-medium text-primary"><%= t("pages.dashboard.cashflow.no_cashflow") %></p>
+        <p class="text-secondary text-sm"><%= t("pages.dashboard.cashflow.add_transactions_to_display_cashflow") %></p>

-          text: t(".new"),
+          text: t("pages.dashboard.cashflow.new"),

Run a quick check that the keys exist in both locales:

Also applies to: 33-34, 36-36


🏁 Script executed:

#!/bin/bash
rg -n '^\s+cashflow:\s*$' config/locales/views/pages/en.yml
rg -n '^\s+cashflow:\s*$' config/locales/views/pages/fr.yml
rg -n '^\s+(title|no_cashflow|add_transactions_to_display_cashflow|new):' config/locales/views/pages/en.yml
rg -n '^\s+(title|no_cashflow|add_transactions_to_display_cashflow|new):' config/locales/views/pages/fr.yml

Length of output: 1117


In app/views/pages/dashboard/_cashflow_sankey.html.erb, use absolute I18n keys for cashflow translations
Relative t(".…") calls there resolve to pages.dashboard.cashflow_sankey.*, but your locale files only define pages.dashboard.cashflow.*, so these will 404.

Apply:

-      <%= t(".title") %>
+      <%= t("pages.dashboard.cashflow.title") %>

-        <p class="text-sm font-medium text-primary"><%= t(".no_cashflow") %></p>
-        <p class="text-secondary text-sm"><%= t(".add_transactions_to_display_cashflow") %></p>
+        <p class="text-sm font-medium text-primary"><%= t("pages.dashboard.cashflow.no_cashflow") %></p>
+        <p class="text-secondary text-sm"><%= t("pages.dashboard.cashflow.add_transactions_to_display_cashflow") %></p>

-          text: t(".new"),
+          text: t("pages.dashboard.cashflow.new"),

Also update the same at lines 33–34 and 36.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<%= t(".title") %>
<!-- line ~5 -->
<%= t("pages.dashboard.cashflow.title") %>
<% if cashflow.empty? %>
- <p class="text-sm font-medium text-primary"><%= t(".no_cashflow") %></p>
<p class="text-sm font-medium text-primary"><%= t("pages.dashboard.cashflow.no_cashflow") %></p>
<p class="text-secondary text-sm"><%= t("pages.dashboard.cashflow.add_transactions_to_display_cashflow") %></p>
<% else %>
<!-- ... -->
text: t("pages.dashboard.cashflow.new"),
<!-- ... -->
<% end %>
🤖 Prompt for AI Agents
In app/views/pages/dashboard/_cashflow_sankey.html.erb around lines 5, 33-34 and
36, the view uses relative I18n keys like t(".title") which resolve to
pages.dashboard.cashflow_sankey.* but the locale keys live under
pages.dashboard.cashflow.*; change each relative call to the absolute keys (e.g.
t("pages.dashboard.cashflow.title") and the corresponding keys used at lines
33–34 and 36) so they reference pages.dashboard.cashflow.* instead of the
current relative scope.

</h2>

<%= form_with url: root_path, method: :get, data: { controller: "auto-submit-form", turbo_frame: "cashflow_sankey_section" } do |form| %>
Expand Down Expand Up @@ -30,10 +30,10 @@
icon: "activity" # cashflow placeholder icon
) %>

<p class="text-sm font-medium text-primary">No cash flow data for this time period</p>
<p class="text-secondary text-sm">Add transactions to display cash flow data or expand the time period</p>
<p class="text-sm font-medium text-primary"><%= t(".no_cashflow") %></p>
<p class="text-secondary text-sm"><%= t(".add_transactions_to_display_cashflow") %></p>
<%= render DS::Link.new(
text: "Add transaction",
text: t(".new"),
icon: "plus",
href: new_transaction_path,
frame: :modal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
icon: "layers",
) %>

<p class="text-sm font-medium text-primary">No accounts yet</p>
<p class="text-secondary text-sm">Add accounts to display net worth data</p>
<p class="text-sm font-medium text-primary"><%= t(".no_account_yet") %></p>
<p class="text-secondary text-sm"><%= t(".add_account_to_display") %></p>
Comment on lines +8 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Fix i18n scope: partial name is plural, YAML key is singular.

This partial’s t(".…") resolves to pages.dashboard.no_accounts_graph_placeholder., but en.yml uses pages.dashboard.no_account_graph_placeholder.. Switch to absolute keys (minimal change).

-    <p class="text-sm font-medium text-primary"><%= t(".no_account_yet") %></p>
-    <p class="text-secondary text-sm"><%= t(".add_account_to_display") %></p>
+    <p class="text-sm font-medium text-primary"><%= t("pages.dashboard.no_account_graph_placeholder.no_account_yet") %></p>
+    <p class="text-secondary text-sm"><%= t("pages.dashboard.no_account_graph_placeholder.add_account_to_display") %></p>

-      text: t(".new"),
+      text: t("pages.dashboard.no_account_graph_placeholder.new"),

Confirm the keys exist in both en/fr locale files with ripgrep (similar to the previous script).

Also applies to: 11-11


🏁 Script executed:

#!/bin/bash
# Search for singular placeholder key in locale YAML files
rg -n "pages\\.dashboard\\.no_account_graph_placeholder" -C1 -- "*.yml"

# Search for plural placeholder key in locale YAML files
rg -n "pages\\.dashboard\\.no_accounts_graph_placeholder" -C1 -- "*.yml"

Length of output: 236


🏁 Script executed:

#!/bin/bash
# Search for singular key in the repo
rg -n "no_account_graph_placeholder" -C2 .

# Search for plural key in the repo
rg -n "no_accounts_graph_placeholder" -C2 .

Length of output: 1477


🏁 Script executed:

#!/bin/bash
sed -n '1,50p' config/locales/views/pages/en.yml
sed -n '1,50p' config/locales/views/pages/fr.yml

Length of output: 2241


Fix i18n scope mismatch in no_accounts_graph_placeholder partial
The partial’s relative calls (t(".…")) use the plural scope (pages.dashboard.no_accounts_graph_placeholder.*), but the YAML defines singular keys (pages.dashboard.no_account_graph_placeholder.*). Switch to absolute singular keys:

-    <p class="text-sm font-medium text-primary"><%= t(".no_account_yet") %></p>
+    <p class="text-sm font-medium text-primary"><%= t("pages.dashboard.no_account_graph_placeholder.no_account_yet") %></p>
-    <p class="text-secondary text-sm"><%= t(".add_account_to_display") %></p>
+    <p class="text-secondary text-sm"><%= t("pages.dashboard.no_account_graph_placeholder.add_account_to_display") %></p>
-      text: t(".new"),
+      text: t("pages.dashboard.no_account_graph_placeholder.new"),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p class="text-sm font-medium text-primary"><%= t(".no_account_yet") %></p>
<p class="text-secondary text-sm"><%= t(".add_account_to_display") %></p>
<p class="text-sm font-medium text-primary"><%= t("pages.dashboard.no_account_graph_placeholder.no_account_yet") %></p>
<p class="text-secondary text-sm"><%= t("pages.dashboard.no_account_graph_placeholder.add_account_to_display") %></p>
text: t("pages.dashboard.no_account_graph_placeholder.new"),
🤖 Prompt for AI Agents
In app/views/pages/dashboard/_no_accounts_graph_placeholder.html.erb around
lines 8 to 9, the partial uses relative translation scopes t(".no_account_yet")
and t(".add_account_to_display") which resolve to
pages.dashboard.no_accounts_graph_placeholder.* but your YAML uses the singular
scope pages.dashboard.no_account_graph_placeholder.*; update both calls to use
the absolute singular keys matching the YAML (e.g.
t("pages.dashboard.no_account_graph_placeholder.no_account_yet") and
t("pages.dashboard.no_account_graph_placeholder.add_account_to_display")) so the
translations resolve correctly.

<%= render DS::Link.new(
text: "Add account",
text: t(".new"),
icon: "plus",
href: new_account_path,
frame: :modal
Expand Down
4 changes: 4 additions & 0 deletions config/locales/mailers/invitation_mailer/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fr:
invitation_mailer:
invite_email:
subject: "%{inviter} vous a invité à rejoindre sa famille sur %{product_name} !"
21 changes: 21 additions & 0 deletions config/locales/models/account/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
fr:
activerecord:
attributes:
account:
balance: Solde
currency: Devise
family: Famille
family_id: Famille
name: Nom
subtype: Sous-type
models:
account: Compte
account/credit: Carte de Crédit
account/depository: Compte Bancaire
account/investment: Investissement
account/loan: Prêt
account/other_asset: Autre Actif
account/other_liability: Autre Passif
account/property: Immobilier
account/vehicle: Véhicule
11 changes: 11 additions & 0 deletions config/locales/models/address/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
fr:
address:
attributes:
country: Pays
line1: Adresse ligne 1
line2: Adresse ligne 2
locality: Localité
postal_code: Code Postal
region: Région
format: "%{line1} %{line2}, %{locality}, %{region} %{postal_code} %{country}"
10 changes: 10 additions & 0 deletions config/locales/models/entry/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
fr:
activerecord:
errors:
models:
entry:
attributes:
base:
invalid_sell_quantity: Vous ne pouvez pas vendre %{sell_qty} actions de %{ticker} car
vous en détenez que %{current_qty}
13 changes: 13 additions & 0 deletions config/locales/models/import/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
fr:
activerecord:
attributes:
import:
currency: Devise
number_format: Format numérique
errors:
models:
import:
attributes:
raw_file_str:
invalid_csv_format: n'est pas un format CSV valide
9 changes: 9 additions & 0 deletions config/locales/models/time_series/value/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
fr:
activemodel:
errors:
models:
time_series/value:
attributes:
value:
must_be_a_money_or_numeric: doit être un Money ou un Nombre
22 changes: 22 additions & 0 deletions config/locales/models/transfer/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
fr:
activerecord:
errors:
models:
transfer:
attributes:
base:
inflow_cannot_be_in_multiple_transfers: La transaction d'entrée ne peut pas être
partie de plusieurs transferts
must_be_from_different_accounts: Le transfert doit avoir des comptes différents
must_be_from_same_family: Le transfert doit provenir de la même famille
must_be_within_date_range: Les dates des transactions de transfert doivent être
dans une période d'4 jours
must_have_opposite_amounts: Les transactions de transfert doivent avoir des montants
opposés
must_have_single_currency: Le transfert doit avoir une seule devise
outflow_cannot_be_in_multiple_transfers: La transaction de dépense ne peut pas être
partie de plusieurs transferts
transfer:
name: Transfert vers %{to_account}
payment_name: Paiement vers %{to_account}
15 changes: 15 additions & 0 deletions config/locales/models/trend/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
fr:
activemodel:
errors:
models:
trend:
attributes:
current:
must_be_of_the_same_type_as_previous: doit être du même type que le précédent
must_be_of_type_money_numeric_or_nil: doit être de type Money, Numeric,
ou nil
previous:
must_be_of_the_same_type_as_current: doit être du même type que le courant
must_be_of_type_money_numeric_or_nil: doit être de type Money, Numeric,
ou nil
22 changes: 22 additions & 0 deletions config/locales/models/user/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
fr:
activerecord:
attributes:
user:
email: Adresse mail
family: Famille
family_id: Famille
first_name: Prénom
last_name: Nom
password: Mot de passe
password_confirmation: Confirmation du mot de passe
errors:
models:
user:
attributes:
base:
cannot_deactivate_admin_with_other_users: Un administrateur ne peut pas
désactiver son compte tant que d'autres utilisateurs sont présents.
Veuillez supprimer tous les membres en premier lieu.
profile_image:
invalid_file_size: La taille du fichier doit être inférieure à %{max_megabytes} Mo
10 changes: 10 additions & 0 deletions config/locales/views/accounts/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ en:
accounts:
account:
troubleshoot: Troubleshoot
account_sidebar_tabs:
missing_historical: Missing historical data
describe_party_provider: "%{product_name} uses third party providers to fetch historical exchange rates, security prices, and more. This data is required to calculate accurate historical account balances."
configure_provider: Configure your providers here.
label_all: All
label_asset: Assets
label_liability: Debts
new_asset: New asset
new_debt: New debt
new_account: New account
chart:
data_not_available: Data not available for the selected period
create:
Expand Down
72 changes: 72 additions & 0 deletions config/locales/views/accounts/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
fr:
accounts:
account:
troubleshoot: Dépannage
account_sidebar_tabs:
missing_historical: Manque les données historiques
describe_party_provider: "%{product_name} utilise des fournisseurs tiers pour récupérer l'historique des taux de change, des cours des titres, etc. Ces données sont nécessaires au calcul précis des soldes historiques des comptes."
configure_provider: Configurez vos fournisseurs ici.
label_all: Tout
label_asset: Comptes
label_liability: Dettes
new_asset: Nouvel actif
new_debt: Nouvelle dette
new_account: Nouveau compte
chart:
data_not_available: Données non disponibles pour le période sélectionnée
create:
success: "Compte %{type} créé"
destroy:
success: "Le compte %{type} a été préparé à la suppression"
empty:
empty_message: Ajoutez un compte via une connexion, une importation ou en entrant manuellement.
new_account: Nouveau compte
no_accounts: Aucun compte pour l'instant
form:
balance: Solde actuel
name_label: Nom du compte
name_placeholder: Nom de compte d'exemple
index:
accounts: Comptes
manual_accounts:
other_accounts: Autres comptes
new_account: Nouveau compte
sync: Synchroniser tous
new:
import_accounts: Importer des comptes
method_selector:
connected_entry: Lier un compte
connected_entry_eu: Lier un compte européen
manual_entry: Entrée du solde du compte
title: Comment voulez-vous l'ajouter ?
title: Que voudriez-vous ajouter ?
show:
activity:
amount: Montant
balance: Solde
date: Date
entries: entrées
entry: entrée
new: Nouveau
new_balance: Nouveau solde
new_transaction: Nouvelle transaction
no_entries: Aucune entrée trouvée
title: Activité
chart:
balance: Solde
owed: Montant dû
menu:
confirm_accept: Supprimer "%{name}"
confirm_body_html: "<p>En supprimant ce compte, vous effacerez son historique de valeur,
affectant divers aspects de votre solde global. Cette action aura un impact direct sur vos calculs de valeur nette et les graphiques des comptes.</p><br /> <p>Après la suppression, il n'y a aucun moyen de restaurer l'information du compte car vous aurez besoin d'en ajouter un nouveau.</p>"
confirm_title: Supprimer le compte ?
edit: Éditer
import: Importer des transactions
manage: Gérer les comptes
update:
success: "Compte %{type} mis à jour"
email_confirmations:
new:
invalid_token: Lien de confirmation invalide ou expiré.
success_login: Votre email a été confirmé. Veuillez vous identifier avec votre nouvelle adresse email.
34 changes: 34 additions & 0 deletions config/locales/views/categories/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
fr:
categories:
bootstrap:
success: Catégories par défaut créées avec succès
category:
delete: Supprimer la catégorie
edit: Éditer la catégorie
create:
success: Catégorie créée avec succès
destroy:
success: Catégorie supprimée avec succès
edit:
edit: Éditer la catégorie
form:
placeholder: Nom de la catégorie
index:
bootstrap: Utiliser les valeurs par défaut (recommandé)
categories: Catégories
categories_expenses: Catégories de dépenses
categories_incomes: Catégories de revenus
empty: Aucune catégorie trouvée
new: Nouvelle catégorie
menu:
loading: Chargement...
new:
new_category: Nouvelle catégorie
update:
success: Catégorie mise à jour avec succès
category:
dropdowns:
show:
bootstrap: Générer les catégories par défaut
empty: Aucune catégorie trouvée
14 changes: 14 additions & 0 deletions config/locales/views/category/deletions/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
fr:
category:
deletions:
create:
success: Catégorie de transaction supprimée avec succès
new:
category: Catégorie
delete_and_leave_uncategorized: Supprimer "%{category_name}" et laisser non catégorisée
delete_and_recategorize: Supprimer "%{category_name}" et attribuer une nouvelle catégorie
delete_category: Supprimer la catégorie ?
explanation: En supprimant cette catégorie, chaque transaction qui a la catégorie "%{category_name}"
sera non catégorisée. Au lieu de les laisser non catégorisées, vous pouvez également attribuer une nouvelle catégorie ci-dessous.
replacement_category_prompt: Sélectionnez la catégorie
11 changes: 11 additions & 0 deletions config/locales/views/category/dropdowns/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
fr:
category:
dropdowns:
row:
delete: Supprimer la catégorie
edit: Éditer la catégorie
show:
clear: Effacer la catégorie
no_categories: Aucune catégorie trouvée
search_placeholder: Rechercher
Loading
Loading