feat: add internationalization message platform

This commit is contained in:
donghyeon-ka
2026-07-26 16:17:39 +09:00
parent b8c0444217
commit 668bf05b48
57 changed files with 1711 additions and 201 deletions
@@ -11,6 +11,7 @@ import {
import { CloseIcon } from "../icons/semantic-icons.js";
import { Button, Dialog, IconButton } from "./core.js";
import { useLocale } from "../../i18n/index.js";
export type DrawerProps = Readonly<{
open: boolean;
@@ -343,9 +344,10 @@ function ToastRegion({
toasts: readonly ToastEntry[];
dismiss(id: string): void;
}>) {
const { message } = useLocale();
return (
<section
aria-label="Notifications"
aria-label={message("toast.region")}
aria-live="polite"
className="ui-toast-region"
>
@@ -363,6 +365,7 @@ function ToastItem({
toast: ToastEntry;
dismiss(id: string): void;
}>) {
const { message } = useLocale();
const [paused, setPaused] = useState(false);
useEffect(() => {
if (paused) return;
@@ -391,7 +394,7 @@ function ToastItem({
{toast.description ? <p>{toast.description}</p> : null}
</div>
<IconButton
accessibleName={`${toast.title} 닫기`}
accessibleName={message("action.closeNamed", { title: toast.title })}
onClick={() => dismiss(toast.id)}
variant="ghost"
>