fix(notifications): a notice's button is said when shown, like its text

An action label was translated when the notice was raised, so after a language switch a live
toast or center row read in one language with its button in the other. The access-requests nudge
no longer re-issues on a switch for it. New tests: the button and a server refusal follow a
switch.
This commit is contained in:
2026-10-30 00:10:38 +01:00
parent 4a0d4b0964
commit b515c16117
26 changed files with 98 additions and 70 deletions
+3 -3
View File
@@ -176,10 +176,10 @@ export default function Toaster({
{(toast.action || toast.secondaryAction) && (
<div className="mt-1 flex flex-wrap gap-x-4">
{[toast.action, toast.secondaryAction].map(
(action) =>
(action, i) =>
action && (
<Button
key={action.label}
key={i}
variant="link"
onClick={() => {
action.onClick();
@@ -187,7 +187,7 @@ export default function Toaster({
}}
className="text-sm"
>
{action.label}
{sayNotif(action.label, t)}
</Button>
),
)}