Localize shared modal, overlay and deployment-progress components.
Localize the confirm modal, delete button, deleting overlays/modal, the build-progress modal, deployment progress bar/manager and the resource upgrade modal via a shared components dictionary. Build-phase labels now resolve from the dictionary; deleting overlays take name/kind and build their own localized message (callers updated). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
'use client';
|
||||
|
||||
import { Clock } from 'lucide-react';
|
||||
import { useT } from '@/i18n/I18nProvider';
|
||||
|
||||
export function DeleteButtonLabel({ loading, label = 'Delete' }: { loading?: boolean; label?: string }) {
|
||||
export function DeleteButtonLabel({ loading, label }: { loading?: boolean; label?: string }) {
|
||||
const t = useT();
|
||||
if (loading) {
|
||||
return (
|
||||
<>
|
||||
<Clock className="w-3 h-3 inline animate-spin" /> Deleting…
|
||||
<Clock className="w-3 h-3 inline animate-spin" /> {t.components.deleting}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <>{label}</>;
|
||||
return <>{label ?? t.common.delete}</>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user