feat: implement localization for models section
- Added a new copy module to handle translations for models-related components. - Integrated translation functionality into ProviderPickerDialog, ProvidersSection, RequestContentDialog, UsageBarChart, and UsageHistorySection. - Updated messages for various UI elements to support multiple languages. - Refactored usage history functions to accept locale for date formatting. - Enhanced user experience by providing localized strings for success/error messages and UI labels.
This commit is contained in:
@@ -4,6 +4,7 @@ type DialogSurfaceProps = {
|
||||
open: boolean;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
closeLabel?: string;
|
||||
widthClassName?: string;
|
||||
onClose: () => void;
|
||||
children: ReactNode;
|
||||
@@ -13,6 +14,7 @@ export default function DialogSurface({
|
||||
open,
|
||||
title,
|
||||
subtitle,
|
||||
closeLabel = 'Close dialog',
|
||||
widthClassName = 'max-w-[560px]',
|
||||
onClose,
|
||||
children,
|
||||
@@ -50,7 +52,7 @@ export default function DialogSurface({
|
||||
type="button"
|
||||
className="mt-0.5 rounded-full p-1 text-[#99A0AE] transition-colors hover:text-[#171717] dark:hover:text-[#f3f4f6]"
|
||||
onClick={onClose}
|
||||
aria-label="Close dialog"
|
||||
aria-label={closeLabel}
|
||||
>
|
||||
<svg viewBox="0 0 24 24" className="h-5 w-5 fill-none stroke-current" strokeWidth="1.8">
|
||||
<path d="M6 6L18 18M18 6L6 18" strokeLinecap="round" />
|
||||
|
||||
Reference in New Issue
Block a user