From f6fee24f99fc60e7829abbcfb0b2af528f3e9ed7 Mon Sep 17 00:00:00 2001 From: plind <59729252+plind-junior@users.noreply.github.com> Date: Tue, 12 May 2026 12:19:03 -0700 Subject: [PATCH] fix(ds/dialog): use existing i18n namespace for close button label (#1776) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DS::Dialog#close_button called I18n.t("common.close") but no `common.close` key exists in any locale file, so every modal rendered the literal string "Translation missing: en.common.close" as both the `title` and `aria-label` of the X close button — visible to screen readers and as a hover tooltip. Switch to `ds.dialog.close` to mirror the existing `ds.alert.*` namespace under config/locales/views/components/*.yml, and add the English string. Other locales fall back to English (fallbacks=true in config/application.rb) until translated. Closes #1763. Co-authored-by: plind-junior --- app/components/DS/dialog.rb | 4 ++-- config/locales/views/components/en.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/DS/dialog.rb b/app/components/DS/dialog.rb index e9c4eb3ae..1027f6db0 100644 --- a/app/components/DS/dialog.rb +++ b/app/components/DS/dialog.rb @@ -133,8 +133,8 @@ class DS::Dialog < DesignSystemComponent variant: "icon", class: classes, icon: "x", - title: I18n.t("common.close"), - aria_label: I18n.t("common.close"), + title: I18n.t("ds.dialog.close"), + aria_label: I18n.t("ds.dialog.close"), data: { action: "DS--dialog#close" } ) end diff --git a/config/locales/views/components/en.yml b/config/locales/views/components/en.yml index b17124e37..785343aba 100644 --- a/config/locales/views/components/en.yml +++ b/config/locales/views/components/en.yml @@ -8,6 +8,8 @@ en: warning: Warning error: Error destructive: Error + dialog: + close: Close provider_sync_summary: title: Sync summary last_sync: "Last sync: %{time_ago} ago"