fix(ds/dialog): use existing i18n namespace for close button label (#1776)

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 <plind-junior@users.noreply.github.com>
This commit is contained in:
plind
2026-05-12 21:19:03 +02:00
committed by GitHub
co-authored by plind-junior
parent 18f0718f63
commit f6fee24f99
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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
+2
View File
@@ -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"