From 4a4a92ccafd1d9fcae0c1adfdaf5d6475327794c Mon Sep 17 00:00:00 2001 From: jelveh Date: Thu, 19 Mar 2026 18:28:42 -0700 Subject: [PATCH] Simplify plan name localization in dashboard Use a single expression to derive the plan key (offering.name or 'free') and pass it to i18n when updating .bento-plan-name. This removes the previous ternary and duplicates, allowing dynamic offering names to be localized consistently. --- src/gui/src/UI/Dashboard/TabHome.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/src/UI/Dashboard/TabHome.js b/src/gui/src/UI/Dashboard/TabHome.js index 9389f0dff..c1d47fa21 100644 --- a/src/gui/src/UI/Dashboard/TabHome.js +++ b/src/gui/src/UI/Dashboard/TabHome.js @@ -260,11 +260,9 @@ const TabHome = { // Load plan data try { const hasSubscription = window.user?.subscription?.active; - const planName = hasSubscription - ? (window.user?.subscription?.offering?.name || i18n('billing.offering.pro')) - : i18n('billing.offering.free'); + const planName = window.user?.subscription?.offering?.name || 'free'; - $el_window.find('.bento-plan-name').text(planName); + $el_window.find('.bento-plan-name').text(i18n(planName)); if ( hasSubscription ) { $el_window.find('.bento-plan-badge').text('Active subscription').addClass('active');