The personal finance app for everyone (by everyone)
Ruby
Missing translation fallback for account subtypes (#1325)
Juan José Mata43d617661fdd
diff --git a/app/controllers/lunchflow_items_controller.rb b/app/controllers/lunchflow_items_controller.rbindex fce4c57506..0fe018a554 100644--- a/app/controllers/lunchflow_items_controller.rb+++ b/app/controllers/lunchflow_items_controller.rb@@ -535,7 +535,7 @@ class LunchflowItemsController < ApplicationController# Helper to translate subtype optionstranslate_subtypes = ->(type_key, subtypes_hash) {- subtypes_hash.keys.map { |k| [ t(".subtypes.#{type_key}.#{k}"), k ] }+ subtypes_hash.map { |k, v| [ t(".subtypes.#{type_key}.#{k}", default: v[:long] || k.humanize), k ] }}# Subtype options for each account type (only include supported types)diff --git a/app/controllers/mercury_items_controller.rb b/app/controllers/mercury_items_controller.rbindex d02948c74c..14e34ca0f3 100644--- a/app/controllers/mercury_items_controller.rb+++ b/app/controllers/mercury_items_controller.rb@@ -539,7 +539,7 @@ class MercuryItemsController < ApplicationController# Helper to translate subtype optionstranslate_subtypes = ->(type_key, subtypes_hash) {- subtypes_hash.keys.map { |k| [ t(".subtypes.#{type_key}.#{k}"), k ] }+ subtypes_hash.map { |k, v| [ t(".subtypes.#{type_key}.#{k}", default: v[:long] || k.humanize), k ] }}# Subtype options for each account type (only include supported types)diff --git a/app/models/user.rb b/app/models/user.rbindex 8d7ed84144..02320aa8da 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -333,7 +333,7 @@ class User < ApplicationRecordenddef dashboard_two_column?- preferences&.dig("dashboard_two_column") != false+ preferences&.dig("dashboard_two_column") == trueenddef update_transactions_preferences(prefs)