mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Missing translation fallback for account subtypes (#1325)
* Fix missing translation fallback for account subtypes in LunchFlow and Mercury The translate_subtypes lambda called t() without a default: fallback, causing "Translation missing" for the ~39 investment subtypes not in the locale files. Now falls back to the :long label from the model's SUBTYPES hash (e.g. "457(b)", "SEP IRA", "UGMA Custodial Account"), matching the pattern used by Accountable#subtype_label_for. https://claude.ai/code/session_01HBJzNkvpky8mKrLkzv83Mm * Default to single-column dashboard --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -535,7 +535,7 @@ class LunchflowItemsController < ApplicationController
|
||||
|
||||
# Helper to translate subtype options
|
||||
translate_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)
|
||||
|
||||
@@ -539,7 +539,7 @@ class MercuryItemsController < ApplicationController
|
||||
|
||||
# Helper to translate subtype options
|
||||
translate_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)
|
||||
|
||||
Reference in New Issue
Block a user