Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Replace hardcoded dashboard strings with i18n translations (#14222)
Damian Legawiec9f5843575150
diff --git a/packages/dashboard-core/src/components/address-form-dialog.tsx b/packages/dashboard-core/src/components/address-form-dialog.tsxindex e17756b648..76df774b12 100644--- a/packages/dashboard-core/src/components/address-form-dialog.tsx+++ b/packages/dashboard-core/src/components/address-form-dialog.tsx@@ -96,7 +96,7 @@ export function AddressFormDialog({open,onOpenChange,onSave,- title = 'Edit Address',+ title,isPending = false,showLabel = false,showDefaultFlags = false,@@ -111,6 +111,7 @@ export function AddressFormDialog({showDefaultFlags?: boolean}) {const { t } = useTranslation()+ const resolvedTitle = title ?? t('admin.components.address_form_dialog.edit_title')const form = useForm<AddressFormValues>({defaultValues: buildDefaults(address),resolver: zodResolver(addressFormSchema),@@ -174,8 +175,10 @@ export function AddressFormDialog({<Sheet open={open} onOpenChange={(o) => onOpenChange(o as boolean)}><SheetContent side="right"><SheetHeader>- <SheetTitle>{title}</SheetTitle>- <SheetDescription>Update the address details.</SheetDescription>+ <SheetTitle>{resolvedTitle}</SheetTitle>+ <SheetDescription>+ {t('admin.components.address_form_dialog.description')}+ </SheetDescription></SheetHeader><formonSubmit={form.handleSubmit(onSubmit)}@@ -360,10 +363,10 @@ export function AddressFormDialog({</div><SheetFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={isPending}>- {isPending ? 'Saving...' : 'Save'}+ {isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>diff --git a/packages/dashboard-core/src/components/page-header.tsx b/packages/dashboard-core/src/components/page-header.tsxindex c3ded4e335..6e9fdd53d1 100644--- a/packages/dashboard-core/src/components/page-header.tsx+++ b/packages/dashboard-core/src/components/page-header.tsx@@ -104,9 +104,10 @@ export function PageHeader({resource,slotContext,onDelete,- deleteLabel = 'Delete',+ deleteLabel,jsonPreview,}: PageHeaderProps) {+ const { t } = useTranslation()const slotCtx = { ...slotContext, resource }const showDropdown = Boolean(resource || onDelete || dropdownItems || jsonPreview)const [jsonOpen, setJsonOpen] = useState(false)@@ -165,7 +166,7 @@ export function PageHeader({slotContext={slotCtx}dropdownItems={dropdownItems}onDelete={onDelete}- deleteLabel={deleteLabel}+ deleteLabel={deleteLabel ?? t('admin.actions.delete')}onOpenJson={jsonPreview ? openJson : undefined}/>)}@@ -242,7 +243,7 @@ function PageActionsDropdown({onClick={async () => {if (await confirm({- message: 'Are you sure? This action cannot be undone.',+ message: t('admin.common.delete_confirm_message'),variant: 'destructive',confirmLabel: deleteLabel,})@@ -266,6 +267,7 @@ function PageActionsDropdown({// ---------------------------------------------------------------------------function CopyToClipboardItem({ label, value }: { label: string; value: string }) {+ const { t } = useTranslation()const { copied, copy } = useCopyToClipboard()return (@@ -278,7 +280,7 @@ function CopyToClipboardItem({ label, value }: { label: string; value: string })}}>{copied ? <CheckIcon className="size-4" /> : <CopyIcon className="size-4" />}- {copied ? 'Copied' : label}+ {copied ? t('admin.actions.copied') : label}</DropdownMenuItem>)}diff --git a/packages/dashboard-core/src/components/resource-table.tsx b/packages/dashboard-core/src/components/resource-table.tsxindex 05104dcfa7..3a33f1ab2f 100644--- a/packages/dashboard-core/src/components/resource-table.tsx+++ b/packages/dashboard-core/src/components/resource-table.tsx@@ -422,7 +422,7 @@ export function ResourceTable<T extends Record<string, any>>({onVisibleColumnsChange={handleColumnsChange}search={searchInput}onSearchChange={handleSearchChange}- searchPlaceholder={table.searchPlaceholder ?? 'Search...'}+ searchPlaceholder={table.searchPlaceholder ?? t('admin.common.search_placeholder')}sort={{ field: sort, direction: dir }}onSortChange={handleSortChange}filters={filters as FilterRule[]}@@ -462,7 +462,7 @@ export function ResourceTable<T extends Record<string, any>>({<TableBody>{isLoading ? (<TableEmpty colSpan={visibleColumns.length + 1 + (rowActionsEnabled ? 1 : 0)}>- Loading...+ {t('admin.common.loading')}</TableEmpty>) : rows.length === 0 ? (<TableEmpty colSpan={visibleColumns.length + 1 + (rowActionsEnabled ? 1 : 0)}>@@ -471,10 +471,12 @@ export function ResourceTable<T extends Record<string, any>>({{table.emptyIcon && (<EmptyMedia variant="icon">{table.emptyIcon}</EmptyMedia>)}- <EmptyTitle>{table.emptyMessage ?? 'No results found'}</EmptyTitle>+ <EmptyTitle>+ {table.emptyMessage ?? t('admin.common.no_results')}+ </EmptyTitle>{(deferredSearch || (filters as FilterRule[]).length > 0) && (<EmptyDescription>- Try adjusting your search or filters+ {t('admin.common.adjust_search_or_filters')}</EmptyDescription>)}</EmptyHeader>@@ -527,7 +529,7 @@ export function ResourceTable<T extends Record<string, any>>({visibleColumns.length + (selectionEnabled ? 1 : 0) + (rowActionsEnabled ? 1 : 0)}>- Loading...+ {t('admin.common.loading')}</TableEmpty>) : rows.length === 0 ? (<TableEmpty@@ -538,9 +540,11 @@ export function ResourceTable<T extends Record<string, any>>({<Empty className="border-0 p-0"><EmptyHeader>{table.emptyIcon && <EmptyMedia variant="icon">{table.emptyIcon}</EmptyMedia>}- <EmptyTitle>{table.emptyMessage ?? 'No results found'}</EmptyTitle>+ <EmptyTitle>{table.emptyMessage ?? t('admin.common.no_results')}</EmptyTitle>{(deferredSearch || (filters as FilterRule[]).length > 0) && (- <EmptyDescription>Try adjusting your search or filters</EmptyDescription>+ <EmptyDescription>+ {t('admin.common.adjust_search_or_filters')}+ </EmptyDescription>)}</EmptyHeader></Empty>diff --git a/packages/dashboard-core/src/components/tag-combobox.tsx b/packages/dashboard-core/src/components/tag-combobox.tsxindex b4dd5fd4cb..dc18aaa472 100644--- a/packages/dashboard-core/src/components/tag-combobox.tsx+++ b/packages/dashboard-core/src/components/tag-combobox.tsx@@ -12,6 +12,7 @@ import {} from '@spree/dashboard-ui'import { useQuery } from '@tanstack/react-query'import { useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { adminClient } from '../client'import { useAuth } from '../hooks/use-auth'import type { TaggableType } from '../lib/table-registry'@@ -22,13 +23,15 @@ export function TagCombobox({taggableType,value,onChange,- placeholder = 'Type to add tags…',+ placeholder,}: {taggableType: TaggableTypevalue: string[]onChange: (value: string[]) => voidplaceholder?: string}) {+ const { t } = useTranslation()+ const resolvedPlaceholder = placeholder ?? t('admin.components.tag_combobox.placeholder')const anchorRef = useComboboxAnchor()const [inputValue, setInputValue] = useState('')const { isAuthenticated } = useAuth()@@ -69,21 +72,23 @@ export function TagCombobox({}</ComboboxValue><ComboboxChipsInput- placeholder={placeholder}+ placeholder={resolvedPlaceholder}value={inputValue}onChange={(e) => setInputValue((e.target as HTMLInputElement).value)}onKeyDown={handleKeyDown}/></ComboboxChips><ComboboxContent anchor={anchorRef}>- <ComboboxEmpty>Type and press Enter to create a tag</ComboboxEmpty>+ <ComboboxEmpty>{t('admin.components.tag_combobox.empty_hint')}</ComboboxEmpty><ComboboxList>{(tag: string) => {const isSelected = value.includes(tag)const isExisting = existingTags.includes(tag)return (<ComboboxItem key={tag} value={tag}>- {isExisting || isSelected ? tag : <>Create “{tag}”</>}+ {isExisting || isSelected+ ? tag+ : t('admin.components.tag_combobox.create_option', { tag })}</ComboboxItem>)}}diff --git a/packages/dashboard-core/src/hooks/use-custom-fields.ts b/packages/dashboard-core/src/hooks/use-custom-fields.tsindex 71a3d5afc1..4d3412bb4f 100644--- a/packages/dashboard-core/src/hooks/use-custom-fields.ts+++ b/packages/dashboard-core/src/hooks/use-custom-fields.ts@@ -8,6 +8,7 @@ import type {} from '@spree/admin-sdk'import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'import { adminClient } from '../client'+import { i18n } from '../lib/i18n'import { useResourceMutation } from './use-resource-mutation'const valuesKey = (ownerType: CustomFieldOwnerType, ownerId: string) =>@@ -95,8 +96,8 @@ export function useCreateCustomFieldDefinitionForSettings() {return useResourceMutation<CustomFieldDefinition, Error, CustomFieldDefinitionCreateParams>({mutationFn: (params) => adminClient.customFieldDefinitions.create(params),invalidate: [customFieldDefinitionsRootKey],- successMessage: 'Custom field definition created',- errorMessage: 'Failed to create custom field definition',+ successMessage: i18n.t('admin.custom_field_definitions.messages.created'),+ errorMessage: i18n.t('admin.custom_field_definitions.errors.failed_to_create'),})}@@ -104,8 +105,8 @@ export function useUpdateCustomFieldDefinitionForSettings(id: string) {return useResourceMutation<CustomFieldDefinition, Error, CustomFieldDefinitionUpdateParams>({mutationFn: (params) => adminClient.customFieldDefinitions.update(id, params),invalidate: [customFieldDefinitionsRootKey, definitionByIdKey(id)],- successMessage: 'Custom field definition updated',- errorMessage: 'Failed to update custom field definition',+ successMessage: i18n.t('admin.custom_field_definitions.messages.updated'),+ errorMessage: i18n.t('admin.custom_field_definitions.errors.failed_to_update'),})}@@ -114,8 +115,8 @@ export function useDeleteCustomFieldDefinitionForSettings() {return useResourceMutation<void, Error, string>({mutationFn: (id) => adminClient.customFieldDefinitions.delete(id),invalidate: [customFieldDefinitionsRootKey],- successMessage: 'Custom field definition deleted',- errorMessage: 'Failed to delete custom field definition',+ successMessage: i18n.t('admin.custom_field_definitions.messages.deleted'),+ errorMessage: i18n.t('admin.custom_field_definitions.errors.failed_to_delete'),onSuccess: (_data, id) => {queryClient.removeQueries({ queryKey: definitionByIdKey(id) })},diff --git a/packages/dashboard-core/src/hooks/use-export.ts b/packages/dashboard-core/src/hooks/use-export.tsindex 3138ff9e02..3a739ec75d 100644--- a/packages/dashboard-core/src/hooks/use-export.ts+++ b/packages/dashboard-core/src/hooks/use-export.ts@@ -2,6 +2,7 @@ import type { Export, ExportCreateParams } from '@spree/admin-sdk'import { useMutation } from '@tanstack/react-query'import { toast } from 'sonner'import { adminClient } from '../client'+import { i18n } from '../lib/i18n'import { useAuth } from './use-auth'const POLL_INTERVAL_MS = 2000@@ -80,21 +81,26 @@ export function useExport() {// Per-invocation id so concurrent exports don't collide on a single// sticky toast.const toastId = `export-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`- toast.loading('Preparing export…', { id: toastId })+ toast.loading(i18n.t('admin.components.export_button.preparing'), { id: toastId })try {const created = await adminClient.exports.create(params)const finished = await pollUntilDone(created.id)await downloadExportFile(finished, token)- toast.success('Export downloaded', { id: toastId })+ toast.success(i18n.t('admin.components.export_button.downloaded'), { id: toastId })return finished} catch (err) {if (err instanceof ExportTimeoutError) {- toast.info("Still processing — we'll email you a link when it's ready.", {+ toast.info(i18n.t('admin.components.export_button.email_fallback'), {id: toastId,})} else {- toast.error(`Export failed: ${(err as Error).message}`, { id: toastId })+ toast.error(+ i18n.t('admin.components.export_button.failed', {+ message: err instanceof Error ? err.message : String(err),+ }),+ { id: toastId },+ )}throw err}diff --git a/packages/dashboard-core/src/hooks/use-resource-mutation.ts b/packages/dashboard-core/src/hooks/use-resource-mutation.tsindex 732188dff4..1d180e7541 100644--- a/packages/dashboard-core/src/hooks/use-resource-mutation.ts+++ b/packages/dashboard-core/src/hooks/use-resource-mutation.ts@@ -6,6 +6,7 @@ import {useQueryClient,} from '@tanstack/react-query'import { toast } from 'sonner'+import { i18n } from '../lib/i18n'import { withStoreScope } from '../lib/query-keys'import { useStore } from '../providers/store-provider'@@ -57,8 +58,8 @@ export function useResourceMutation<TData = unknown, TError = Error, TVariablesconst { storeId } = useStore()const {invalidate,- successMessage = 'Saved',- errorMessage = 'Something went wrong',+ successMessage = i18n.t('admin.messages.saved'),+ errorMessage = i18n.t('admin.errors.generic'),onSuccess,onError,...restdiff --git a/packages/dashboard-core/src/locales/ar.json b/packages/dashboard-core/src/locales/ar.jsonindex 5c6e7e93a5..3698f82642 100644--- a/packages/dashboard-core/src/locales/ar.json+++ b/packages/dashboard-core/src/locales/ar.json@@ -39,7 +39,8 @@"hide": "إخفاء","back": "رجوع","actions_menu": "الإجراءات",- "more_actions": "المزيد من الإجراءات"+ "more_actions": "المزيد من الإجراءات",+ "adding": "جارٍ الإضافة…"},"row_actions": {"menu_label": "فتح الإجراءات",@@ -71,7 +72,10 @@"remove_image": "إزالة الصورة","view_image": "عرض الصورة","upload_image": "رفع صورة",- "remove_value": "إزالة القيمة"+ "remove_value": "إزالة القيمة",+ "breadcrumb_more": "المزيد",+ "sidebar": "الشريط الجانبي",+ "sidebar_description": "يعرض الشريط الجانبي للجوال."},"common": {"loading": "جارٍ التحميل…",@@ -96,7 +100,10 @@"remove_question": "إزالة؟","deleted": "تم الحذف","unsaved_changes": "لديك تغييرات غير محفوظة.",- "prices": "الأسعار"+ "prices": "الأسعار",+ "delete_confirm_message": "هل أنت متأكد؟ لا يمكن التراجع عن هذا الإجراء.",+ "adjust_search_or_filters": "جرّب تعديل البحث أو عوامل التصفية",+ "default": "افتراضي"},"color_picker": {"no_color": "بدون لون"@@ -154,7 +161,8 @@"network": "خطأ في الشبكة — يرجى المحاولة مجددًا","unauthorized": "ليس لديك صلاحية للقيام بذلك","not_found": "غير موجود",- "failed_to_update_profile": "فشل تحديث الملف الشخصي"+ "failed_to_update_profile": "فشل تحديث الملف الشخصي",+ "unexpected_retry": "حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى."},"auth": {"login": {@@ -306,6 +314,10 @@"label": "النص البديل","placeholder": "صف الصورة لإمكانية الوصول و SEO"}+ },+ "storefront_visible": {+ "label": "مرئي في المتجر",+ "help": "عند الإيقاف، يرى موظفو الإدارة فقط هذا الخيار (طلبات المكتب الخلفي، الإدخال اليدوي)."}},"components": {@@ -417,7 +429,11 @@"all": {"title": "جميع السجلات","description": "تجاهل الفلاتر وتصدير كل شيء في هذا المتجر."- }+ },+ "preparing": "جارٍ تحضير التصدير…",+ "downloaded": "تم تنزيل التصدير",+ "email_fallback": "لا يزال قيد المعالجة — سنرسل لك رابطًا بالبريد عند الجاهزية.",+ "failed": "فشل التصدير: {{message}}"},"metadata_card": {"title": "البيانات الوصفية",@@ -468,12 +484,33 @@"raw": "خام","failed_to_load": "فشل التحميل: {{message}}","collapse_depth": "عمق الطي",- "depth": "العمق {{level}}"+ "depth": "العمق {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "عرض كـ JSON","copy_id": "نسخ ID","copy_number": "نسخ الرقم"+ },+ "secret_input": {+ "replace": "استبدال",+ "stored_help": "مخزّن على الخادم. انقر استبدال للتدوير.",+ "new_value_placeholder": "قيمة جديدة"+ },+ "tag_combobox": {+ "placeholder": "اكتب لإضافة وسوم…",+ "empty_hint": "اكتب واضغط Enter لإنشاء وسم",+ "create_option": "إنشاء «{{tag}}»"+ },+ "address_form_dialog": {+ "edit_title": "تعديل العنوان",+ "description": "تحديث تفاصيل العنوان."+ },+ "error_state": {+ "retry": "إعادة المحاولة"+ },+ "address_block": {+ "not_provided": "غير مُقدَّم"}},"validation": {@@ -500,6 +537,18 @@"community": "المجتمع","contact_support": "الاتصال بالدعم","log_out": "تسجيل الخروج"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "تم إنشاء تعريف الحقل المخصص",+ "updated": "تم تحديث تعريف الحقل المخصص",+ "deleted": "تم حذف تعريف الحقل المخصص"+ },+ "errors": {+ "failed_to_create": "فشل إنشاء تعريف الحقل المخصص",+ "failed_to_update": "فشل تحديث تعريف الحقل المخصص",+ "failed_to_delete": "فشل حذف تعريف الحقل المخصص"+ }}}}diff --git a/packages/dashboard-core/src/locales/de.json b/packages/dashboard-core/src/locales/de.jsonindex e3a21bf89f..5027c84c95 100644--- a/packages/dashboard-core/src/locales/de.json+++ b/packages/dashboard-core/src/locales/de.json@@ -39,7 +39,8 @@"hide": "Ausblenden","back": "Zurück","actions_menu": "Aktionen",- "more_actions": "Weitere Aktionen"+ "more_actions": "Weitere Aktionen",+ "adding": "Hinzufügen…"},"row_actions": {"menu_label": "Aktionen öffnen",@@ -71,7 +72,10 @@"remove_image": "Bild entfernen","view_image": "Bild anzeigen","upload_image": "Bild hochladen",- "remove_value": "Wert entfernen"+ "remove_value": "Wert entfernen",+ "breadcrumb_more": "Mehr",+ "sidebar": "Seitenleiste",+ "sidebar_description": "Zeigt die mobile Seitenleiste an."},"common": {"loading": "Wird geladen…",@@ -96,7 +100,10 @@"remove_question": "Entfernen?","deleted": "Gelöscht","unsaved_changes": "Sie haben ungespeicherte Änderungen.",- "prices": "Preise"+ "prices": "Preise",+ "delete_confirm_message": "Sind Sie sicher? Diese Aktion kann nicht rückgängig gemacht werden.",+ "adjust_search_or_filters": "Passen Sie Ihre Suche oder Filter an",+ "default": "Standard"},"color_picker": {"no_color": "Keine Farbe"@@ -154,7 +161,8 @@"network": "Netzwerkfehler — bitte erneut versuchen","unauthorized": "Sie haben keine Berechtigung dafür","not_found": "Nicht gefunden",- "failed_to_update_profile": "Profil konnte nicht aktualisiert werden"+ "failed_to_update_profile": "Profil konnte nicht aktualisiert werden",+ "unexpected_retry": "Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es erneut."},"auth": {"login": {@@ -306,6 +314,10 @@"label": "Alternativtext","placeholder": "Beschreiben Sie das Bild für Barrierefreiheit und SEO"}+ },+ "storefront_visible": {+ "label": "Im Shop sichtbar",+ "help": "Wenn deaktiviert, sehen nur Admin-Mitarbeiter diese Option (Backoffice-Bestellungen, manuelle Eingabe)."}},"components": {@@ -417,7 +429,11 @@"all": {"title": "Alle Datensätze","description": "Filter ignorieren und alles in diesem Shop exportieren."- }+ },+ "preparing": "Export wird vorbereitet…",+ "downloaded": "Export heruntergeladen",+ "email_fallback": "Noch in Bearbeitung — wir senden Ihnen einen Link per E-Mail, sobald er fertig ist.",+ "failed": "Export fehlgeschlagen: {{message}}"},"metadata_card": {"title": "Metadaten",@@ -468,12 +484,33 @@"raw": "Roh","failed_to_load": "Laden fehlgeschlagen: {{message}}","collapse_depth": "Einklapptiefe",- "depth": "Tiefe {{level}}"+ "depth": "Tiefe {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "Als JSON anzeigen","copy_id": "ID kopieren","copy_number": "Nummer kopieren"+ },+ "secret_input": {+ "replace": "Ersetzen",+ "stored_help": "Auf dem Server gespeichert. Klicken Sie auf Ersetzen, um zu rotieren.",+ "new_value_placeholder": "Neuer Wert"+ },+ "tag_combobox": {+ "placeholder": "Tags hinzufügen…",+ "empty_hint": "Tippen und Enter drücken, um ein Tag zu erstellen",+ "create_option": "„{{tag}}“ erstellen"+ },+ "address_form_dialog": {+ "edit_title": "Adresse bearbeiten",+ "description": "Adressdetails aktualisieren."+ },+ "error_state": {+ "retry": "Erneut versuchen"+ },+ "address_block": {+ "not_provided": "Nicht angegeben"}},"validation": {@@ -500,6 +537,18 @@"community": "Community","contact_support": "Support kontaktieren","log_out": "Abmelden"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "Benutzerdefiniertes Feld erstellt",+ "updated": "Benutzerdefiniertes Feld aktualisiert",+ "deleted": "Benutzerdefiniertes Feld gelöscht"+ },+ "errors": {+ "failed_to_create": "Benutzerdefiniertes Feld konnte nicht erstellt werden",+ "failed_to_update": "Benutzerdefiniertes Feld konnte nicht aktualisiert werden",+ "failed_to_delete": "Benutzerdefiniertes Feld konnte nicht gelöscht werden"+ }}}}diff --git a/packages/dashboard-core/src/locales/en.json b/packages/dashboard-core/src/locales/en.jsonindex d487ecad68..e7f7c51953 100644--- a/packages/dashboard-core/src/locales/en.json+++ b/packages/dashboard-core/src/locales/en.json@@ -39,7 +39,8 @@"hide": "Hide","back": "Back","actions_menu": "Actions",- "more_actions": "More actions"+ "more_actions": "More actions",+ "adding": "Adding…"},"row_actions": {"menu_label": "Open actions",@@ -71,7 +72,10 @@"remove_image": "Remove image","view_image": "View image","upload_image": "Upload image",- "remove_value": "Remove value"+ "remove_value": "Remove value",+ "breadcrumb_more": "More",+ "sidebar": "Sidebar",+ "sidebar_description": "Displays the mobile sidebar."},"common": {"loading": "Loading…",@@ -96,7 +100,10 @@"remove_question": "Remove?","deleted": "Deleted","unsaved_changes": "You have unsaved changes.",- "prices": "Prices"+ "prices": "Prices",+ "delete_confirm_message": "Are you sure? This action cannot be undone.",+ "adjust_search_or_filters": "Try adjusting your search or filters",+ "default": "Default"},"color_picker": {"no_color": "No color"@@ -154,7 +161,8 @@"network": "Network error — please retry","unauthorized": "You don't have permission to do that","not_found": "Not found",- "failed_to_update_profile": "Failed to update profile"+ "failed_to_update_profile": "Failed to update profile",+ "unexpected_retry": "An unexpected error occurred. Please try again."},"auth": {"login": {@@ -306,6 +314,10 @@"label": "Alt text","placeholder": "Describe the image for accessibility and SEO"}+ },+ "storefront_visible": {+ "label": "Visible on storefront",+ "help": "When off, only admin staff see this option (back-office orders, manual entry)."}},"components": {@@ -417,7 +429,11 @@"all": {"title": "All records","description": "Ignore filters and export everything in this store."- }+ },+ "preparing": "Preparing export…",+ "downloaded": "Export downloaded",+ "email_fallback": "Still processing — we'll email you a link when it's ready.",+ "failed": "Export failed: {{message}}"},"metadata_card": {"title": "Metadata",@@ -468,12 +484,33 @@"raw": "Raw","failed_to_load": "Failed to load: {{message}}","collapse_depth": "Collapse depth",- "depth": "Depth {{level}}"+ "depth": "Depth {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "View as JSON","copy_id": "Copy ID","copy_number": "Copy number"+ },+ "secret_input": {+ "replace": "Replace",+ "stored_help": "Stored on the server. Click Replace to rotate.",+ "new_value_placeholder": "New value"+ },+ "tag_combobox": {+ "placeholder": "Type to add tags…",+ "empty_hint": "Type and press Enter to create a tag",+ "create_option": "Create \"{{tag}}\""+ },+ "address_form_dialog": {+ "edit_title": "Edit Address",+ "description": "Update the address details."+ },+ "error_state": {+ "retry": "Try again"+ },+ "address_block": {+ "not_provided": "Not provided"}},"validation": {@@ -500,6 +537,18 @@"community": "Community","contact_support": "Contact Support","log_out": "Log out"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "Custom field definition created",+ "updated": "Custom field definition updated",+ "deleted": "Custom field definition deleted"+ },+ "errors": {+ "failed_to_create": "Failed to create custom field definition",+ "failed_to_update": "Failed to update custom field definition",+ "failed_to_delete": "Failed to delete custom field definition"+ }}}}diff --git a/packages/dashboard-core/src/locales/fr.json b/packages/dashboard-core/src/locales/fr.jsonindex 40aee1a8b8..5f0558d9dd 100644--- a/packages/dashboard-core/src/locales/fr.json+++ b/packages/dashboard-core/src/locales/fr.json@@ -39,7 +39,8 @@"hide": "Masquer","back": "Retour","actions_menu": "Actions",- "more_actions": "Plus d'actions"+ "more_actions": "Plus d'actions",+ "adding": "Ajout…"},"row_actions": {"menu_label": "Ouvrir les actions",@@ -71,7 +72,10 @@"remove_image": "Retirer l'image","view_image": "Voir l'image","upload_image": "Téléverser une image",- "remove_value": "Retirer la valeur"+ "remove_value": "Retirer la valeur",+ "breadcrumb_more": "Plus",+ "sidebar": "Barre latérale",+ "sidebar_description": "Affiche la barre latérale mobile."},"common": {"loading": "Chargement…",@@ -96,7 +100,10 @@"remove_question": "Supprimer ?","deleted": "Supprimé","unsaved_changes": "Vous avez des modifications non enregistrées.",- "prices": "Prix"+ "prices": "Prix",+ "delete_confirm_message": "Êtes-vous sûr ? Cette action est irréversible.",+ "adjust_search_or_filters": "Essayez d’ajuster votre recherche ou vos filtres",+ "default": "Par défaut"},"color_picker": {"no_color": "Aucune couleur"@@ -154,7 +161,8 @@"network": "Erreur réseau — veuillez réessayer","unauthorized": "Vous n'avez pas l'autorisation d'effectuer cette action","not_found": "Introuvable",- "failed_to_update_profile": "Échec de la mise à jour du profil"+ "failed_to_update_profile": "Échec de la mise à jour du profil",+ "unexpected_retry": "Une erreur inattendue s’est produite. Veuillez réessayer."},"auth": {"login": {@@ -306,6 +314,10 @@"label": "Texte alternatif","placeholder": "Décrivez l'image pour l'accessibilité et le SEO"}+ },+ "storefront_visible": {+ "label": "Visible sur la boutique",+ "help": "Si désactivé, seuls les administrateurs voient cette option (commandes back-office, saisie manuelle)."}},"components": {@@ -417,7 +429,11 @@"all": {"title": "Tous les enregistrements","description": "Ignorer les filtres et tout exporter dans cette boutique."- }+ },+ "preparing": "Préparation de l’export…",+ "downloaded": "Export téléchargé",+ "email_fallback": "Toujours en cours — nous vous enverrons un lien par e-mail dès qu’il sera prêt.",+ "failed": "Échec de l’export : {{message}}"},"metadata_card": {"title": "Métadonnées",@@ -468,12 +484,33 @@"raw": "Brut","failed_to_load": "Échec du chargement : {{message}}","collapse_depth": "Profondeur de réduction",- "depth": "Profondeur {{level}}"+ "depth": "Profondeur {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "Voir en JSON","copy_id": "Copier l'ID","copy_number": "Copier le numéro"+ },+ "secret_input": {+ "replace": "Remplacer",+ "stored_help": "Stocké sur le serveur. Cliquez sur Remplacer pour le faire pivoter.",+ "new_value_placeholder": "Nouvelle valeur"+ },+ "tag_combobox": {+ "placeholder": "Saisir des tags…",+ "empty_hint": "Saisissez et appuyez sur Entrée pour créer un tag",+ "create_option": "Créer « {{tag}} »"+ },+ "address_form_dialog": {+ "edit_title": "Modifier l’adresse",+ "description": "Mettre à jour les détails de l’adresse."+ },+ "error_state": {+ "retry": "Réessayer"+ },+ "address_block": {+ "not_provided": "Non renseigné"}},"validation": {@@ -500,6 +537,18 @@"community": "Communauté","contact_support": "Contacter le support","log_out": "Se déconnecter"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "Champ personnalisé créé",+ "updated": "Champ personnalisé mis à jour",+ "deleted": "Champ personnalisé supprimé"+ },+ "errors": {+ "failed_to_create": "Impossible de créer le champ personnalisé",+ "failed_to_update": "Impossible de mettre à jour le champ personnalisé",+ "failed_to_delete": "Impossible de supprimer le champ personnalisé"+ }}}}diff --git a/packages/dashboard-core/src/locales/pl.json b/packages/dashboard-core/src/locales/pl.jsonindex 64250f7392..e5cb334866 100644--- a/packages/dashboard-core/src/locales/pl.json+++ b/packages/dashboard-core/src/locales/pl.json@@ -39,7 +39,8 @@"hide": "Ukryj","back": "Wstecz","actions_menu": "Akcje",- "more_actions": "Więcej akcji"+ "more_actions": "Więcej akcji",+ "adding": "Dodawanie…"},"row_actions": {"menu_label": "Otwórz akcje",@@ -71,7 +72,10 @@"remove_image": "Usuń obraz","view_image": "Wyświetl obraz","upload_image": "Prześlij obraz",- "remove_value": "Usuń wartość"+ "remove_value": "Usuń wartość",+ "breadcrumb_more": "Więcej",+ "sidebar": "Panel boczny",+ "sidebar_description": "Wyświetla mobilny panel boczny."},"common": {"loading": "Ładowanie…",@@ -96,7 +100,10 @@"remove_question": "Usunąć?","deleted": "Usunięto","unsaved_changes": "Masz niezapisane zmiany.",- "prices": "Ceny"+ "prices": "Ceny",+ "delete_confirm_message": "Czy na pewno? Tej operacji nie można cofnąć.",+ "adjust_search_or_filters": "Spróbuj dostosować wyszukiwanie lub filtry",+ "default": "Domyślny"},"color_picker": {"no_color": "Brak koloru"@@ -154,7 +161,8 @@"network": "Błąd sieci — spróbuj ponownie","unauthorized": "Nie masz uprawnień, aby to zrobić","not_found": "Nie znaleziono",- "failed_to_update_profile": "Nie udało się zaktualizować profilu"+ "failed_to_update_profile": "Nie udało się zaktualizować profilu",+ "unexpected_retry": "Wystąpił nieoczekiwany błąd. Spróbuj ponownie."},"auth": {"login": {@@ -306,6 +314,10 @@"label": "Tekst alternatywny","placeholder": "Opisz obraz na potrzeby dostępności i SEO"}+ },+ "storefront_visible": {+ "label": "Widoczny w sklepie",+ "help": "Gdy wyłączone, tylko personel administracyjny widzi tę opcję (zamówienia back-office, ręczne wprowadzanie)."}},"components": {@@ -417,7 +429,11 @@"all": {"title": "Wszystkie rekordy","description": "Zignoruj filtry i wyeksportuj wszystko w tym sklepie."- }+ },+ "preparing": "Przygotowywanie eksportu…",+ "downloaded": "Eksport pobrany",+ "email_fallback": "Nadal przetwarzamy — wyślemy link e-mailem, gdy będzie gotowy.",+ "failed": "Eksport nie powiódł się: {{message}}"},"metadata_card": {"title": "Metadane",@@ -468,12 +484,33 @@"raw": "Surowe","failed_to_load": "Nie udało się załadować: {{message}}","collapse_depth": "Głębokość zwijania",- "depth": "Głębokość {{level}}"+ "depth": "Głębokość {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "Pokaż jako JSON","copy_id": "Kopiuj ID","copy_number": "Kopiuj numer"+ },+ "secret_input": {+ "replace": "Zastąp",+ "stored_help": "Przechowywane na serwerze. Kliknij Zastąp, aby zmienić.",+ "new_value_placeholder": "Nowa wartość"+ },+ "tag_combobox": {+ "placeholder": "Wpisz, aby dodać tagi…",+ "empty_hint": "Wpisz i naciśnij Enter, aby utworzyć tag",+ "create_option": "Utwórz „{{tag}}”"+ },+ "address_form_dialog": {+ "edit_title": "Edytuj adres",+ "description": "Zaktualizuj szczegóły adresu."+ },+ "error_state": {+ "retry": "Spróbuj ponownie"+ },+ "address_block": {+ "not_provided": "Nie podano"}},"validation": {@@ -500,6 +537,18 @@"community": "Społeczność","contact_support": "Skontaktuj się z pomocą","log_out": "Wyloguj się"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "Definicja pola niestandardowego utworzona",+ "updated": "Definicja pola niestandardowego zaktualizowana",+ "deleted": "Definicja pola niestandardowego usunięta"+ },+ "errors": {+ "failed_to_create": "Nie udało się utworzyć definicji pola niestandardowego",+ "failed_to_update": "Nie udało się zaktualizować definicji pola niestandardowego",+ "failed_to_delete": "Nie udało się usunąć definicji pola niestandardowego"+ }}}}diff --git a/packages/dashboard-core/src/locales/zh-CN.json b/packages/dashboard-core/src/locales/zh-CN.jsonindex 49af4fed4b..eb5ad0e97c 100644--- a/packages/dashboard-core/src/locales/zh-CN.json+++ b/packages/dashboard-core/src/locales/zh-CN.json@@ -39,7 +39,8 @@"hide": "隐藏","back": "返回","actions_menu": "操作",- "more_actions": "更多操作"+ "more_actions": "更多操作",+ "adding": "添加中…"},"row_actions": {"menu_label": "打开操作",@@ -71,7 +72,10 @@"remove_image": "移除图片","view_image": "查看图片","upload_image": "上传图片",- "remove_value": "移除值"+ "remove_value": "移除值",+ "breadcrumb_more": "更多",+ "sidebar": "侧边栏",+ "sidebar_description": "显示移动端侧边栏。"},"common": {"loading": "加载中…",@@ -96,7 +100,10 @@"remove_question": "移除?","deleted": "已删除","unsaved_changes": "您有未保存的更改。",- "prices": "价格"+ "prices": "价格",+ "delete_confirm_message": "确定吗?此操作无法撤销。",+ "adjust_search_or_filters": "请尝试调整搜索或筛选条件",+ "default": "默认"},"color_picker": {"no_color": "无颜色"@@ -154,7 +161,8 @@"network": "网络错误 — 请重试","unauthorized": "您没有执行此操作的权限","not_found": "未找到",- "failed_to_update_profile": "更新个人资料失败"+ "failed_to_update_profile": "更新个人资料失败",+ "unexpected_retry": "发生意外错误,请重试。"},"auth": {"login": {@@ -306,6 +314,10 @@"label": "替代文本","placeholder": "为无障碍访问和 SEO 描述该图片"}+ },+ "storefront_visible": {+ "label": "在 storefront 可见",+ "help": "关闭后,仅后台员工可见此选项(后台订单、手动录入)。"}},"components": {@@ -417,7 +429,11 @@"all": {"title": "所有记录","description": "忽略筛选条件,导出此店铺中的全部内容。"- }+ },+ "preparing": "正在准备导出…",+ "downloaded": "导出已下载",+ "email_fallback": "仍在处理中 — 完成后我们会通过邮件发送链接。",+ "failed": "导出失败:{{message}}"},"metadata_card": {"title": "元数据",@@ -468,12 +484,33 @@"raw": "原始数据","failed_to_load": "加载失败:{{message}}","collapse_depth": "折叠层级",- "depth": "层级 {{level}}"+ "depth": "层级 {{level}}",+ "title": "JSON"},"page_header": {"view_as_json": "查看为 JSON","copy_id": "复制 ID","copy_number": "复制编号"+ },+ "secret_input": {+ "replace": "替换",+ "stored_help": "已存储在服务器上。点击“替换”以轮换。",+ "new_value_placeholder": "新值"+ },+ "tag_combobox": {+ "placeholder": "输入以添加标签…",+ "empty_hint": "输入后按 Enter 创建标签",+ "create_option": "创建“{{tag}}”"+ },+ "address_form_dialog": {+ "edit_title": "编辑地址",+ "description": "更新地址详情。"+ },+ "error_state": {+ "retry": "重试"+ },+ "address_block": {+ "not_provided": "未提供"}},"validation": {@@ -500,6 +537,18 @@"community": "社区","contact_support": "联系支持","log_out": "退出登录"+ },+ "custom_field_definitions": {+ "messages": {+ "created": "自定义字段定义已创建",+ "updated": "自定义字段定义已更新",+ "deleted": "自定义字段定义已删除"+ },+ "errors": {+ "failed_to_create": "创建自定义字段定义失败",+ "failed_to_update": "更新自定义字段定义失败",+ "failed_to_delete": "删除自定义字段定义失败"+ }}}}diff --git a/packages/dashboard-ui/src/spree/address-block.tsx b/packages/dashboard-ui/src/spree/address-block.tsxindex c7aab23ea4..14b18d90af 100644--- a/packages/dashboard-ui/src/spree/address-block.tsx+++ b/packages/dashboard-ui/src/spree/address-block.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next'+/*** Structural shape of the fields `<AddressBlock>` renders. Lets the design* system stay decoupled from `@spree/admin-sdk`'s `Address` type — any@@ -22,6 +24,7 @@ export function AddressBlock({title: stringaddress: AddressBlockValue | null | undefined}) {+ const { t } = useTranslation()return (<div><h6 className="font-semibold text-sm mb-1.5">{title}</h6>@@ -38,7 +41,9 @@ export function AddressBlock({{address.phone && <div>{address.phone}</div>}</div>) : (- <span className="text-sm text-muted-foreground">Not provided</span>+ <span className="text-sm text-muted-foreground">+ {t('admin.components.address_block.not_provided')}+ </span>)}</div>)diff --git a/packages/dashboard-ui/src/spree/json-preview-drawer.tsx b/packages/dashboard-ui/src/spree/json-preview-drawer.tsxindex 23a69ac057..30c17d975e 100644--- a/packages/dashboard-ui/src/spree/json-preview-drawer.tsx+++ b/packages/dashboard-ui/src/spree/json-preview-drawer.tsx@@ -56,12 +56,13 @@ export interface JsonPreviewDrawerProps {export function JsonPreviewDrawer({open,onOpenChange,- title = 'JSON',+ title,fetch,endpoint,resolveLink,}: JsonPreviewDrawerProps) {const { t } = useTranslation()+ const resolvedTitle = title ?? t('admin.components.json_preview_drawer.title')const [data, setData] = useState<unknown>(undefined)const [error, setError] = useState<Error | null>(null)const [isFetching, setIsFetching] = useState(false)@@ -122,7 +123,7 @@ export function JsonPreviewDrawer({className="w-full sm:max-w-2xl bg-zinc-950 text-zinc-100 border-zinc-800 overflow-hidden"><SheetHeader className="border-b border-zinc-800 bg-zinc-950 text-zinc-100 rounded-t-xl">- <SheetTitle className="text-zinc-100 font-mono text-base">{title}</SheetTitle>+ <SheetTitle className="text-zinc-100 font-mono text-base">{resolvedTitle}</SheetTitle>{endpoint && (<SheetDescription className="text-zinc-400 font-mono text-xs">GET {endpoint}diff --git a/packages/dashboard-ui/src/spree/resource-multi-autocomplete.tsx b/packages/dashboard-ui/src/spree/resource-multi-autocomplete.tsxindex 039f10b7bc..f719d4feac 100644--- a/packages/dashboard-ui/src/spree/resource-multi-autocomplete.tsx+++ b/packages/dashboard-ui/src/spree/resource-multi-autocomplete.tsx@@ -1,4 +1,5 @@import { useCallback } from 'react'+import { useTranslation } from 'react-i18next'import {Combobox,ComboboxChip,@@ -104,12 +105,16 @@ export function ResourceMultiAutocomplete<T extends AutocompleteOption>({inputValue,onInputChange,getOptionLabel,- placeholder = 'Search…',- emptyText = 'No results',- fetchingText = 'Searching…',+ placeholder,+ emptyText,+ fetchingText,isFetching,disabled,}: ResourceMultiAutocompleteProps<T>) {+ const { t } = useTranslation()+ const resolvedPlaceholder = placeholder ?? t('admin.common.search_placeholder')+ const resolvedEmptyText = emptyText ?? t('admin.common.no_results')+ const resolvedFetchingText = fetchingText ?? t('admin.common.searching')const anchorRef = useComboboxAnchor()const handleChange = useCallback(@@ -155,13 +160,13 @@ export function ResourceMultiAutocomplete<T extends AutocompleteOption>({}</ComboboxValue><ComboboxChipsInput- placeholder={placeholder}+ placeholder={resolvedPlaceholder}value={inputValue}onChange={(e) => onInputChange((e.target as HTMLInputElement).value)}/></ComboboxChips><ComboboxContent anchor={anchorRef}>- <ComboboxEmpty>{isFetching ? fetchingText : emptyText}</ComboboxEmpty>+ <ComboboxEmpty>{isFetching ? resolvedFetchingText : resolvedEmptyText}</ComboboxEmpty><ComboboxList>{(option: T) => (<ComboboxItem key={option.id} value={option}>diff --git a/packages/dashboard-ui/src/spree/route-error-boundary.tsx b/packages/dashboard-ui/src/spree/route-error-boundary.tsxindex eea5bd9500..b4d63498b3 100644--- a/packages/dashboard-ui/src/spree/route-error-boundary.tsx+++ b/packages/dashboard-ui/src/spree/route-error-boundary.tsx@@ -1,5 +1,6 @@import { AlertTriangleIcon, RotateCcwIcon } from 'lucide-react'import { Component, type ReactNode } from 'react'+import { useTranslation } from 'react-i18next'import { Button } from '../ui/button'import {Empty,@@ -28,14 +29,11 @@ interface ErrorStateProps {* (replacing the inline `<p className="text-destructive">Failed to load…</p>`* scattered through detail pages), or as a route's `errorComponent`.*/-export function ErrorState({- title = 'Something went wrong',- description,- error,- onRetry,- retryLabel = 'Try again',-}: ErrorStateProps) {- const message = description ?? error?.message ?? 'An unexpected error occurred. Please try again.'+export function ErrorState({ title, description, error, onRetry, retryLabel }: ErrorStateProps) {+ const { t } = useTranslation()+ const resolvedTitle = title ?? t('admin.errors.generic')+ const resolvedRetryLabel = retryLabel ?? t('admin.components.error_state.retry')+ const message = description ?? error?.message ?? t('admin.errors.unexpected_retry')return (<Empty>@@ -43,14 +41,14 @@ export function ErrorState({<EmptyMedia variant="icon"><AlertTriangleIcon /></EmptyMedia>- <EmptyTitle>{title}</EmptyTitle>+ <EmptyTitle>{resolvedTitle}</EmptyTitle><EmptyDescription>{message}</EmptyDescription></EmptyHeader>{onRetry && (<EmptyContent><Button variant="outline" size="sm" onClick={onRetry}><RotateCcwIcon className="size-4" />- {retryLabel}+ {resolvedRetryLabel}</Button></EmptyContent>)}diff --git a/packages/dashboard-ui/src/spree/secret-input.tsx b/packages/dashboard-ui/src/spree/secret-input.tsxindex 851a7016e8..4816bc817f 100644--- a/packages/dashboard-ui/src/spree/secret-input.tsx+++ b/packages/dashboard-ui/src/spree/secret-input.tsx@@ -81,11 +81,11 @@ export function SecretInput({onChange('')}}>- Replace+ {t('admin.components.secret_input.replace')}</Button></div><span className="text-xs text-muted-foreground">- {helpText ?? 'Stored on the server. Click Replace to rotate.'}+ {helpText ?? t('admin.components.secret_input.stored_help')}</span></Field>)@@ -100,7 +100,9 @@ export function SecretInput({id={id}type={revealed ? 'text' : 'password'}autoComplete="new-password"- placeholder={replacing ? 'New value' : placeholder}+ placeholder={+ replacing ? t('admin.components.secret_input.new_value_placeholder') : placeholder+ }value={(value as string) ?? ''}onChange={(e) => onChange(e.target.value)}className="pr-9"@@ -126,7 +128,7 @@ export function SecretInput({setRevealed(false)}}>- Cancel+ {t('admin.actions.cancel')}</Button>)}</div>diff --git a/packages/dashboard-ui/src/spree/storefront-visible-switch.tsx b/packages/dashboard-ui/src/spree/storefront-visible-switch.tsxindex fa025aa164..fac10a1120 100644--- a/packages/dashboard-ui/src/spree/storefront-visible-switch.tsx+++ b/packages/dashboard-ui/src/spree/storefront-visible-switch.tsx@@ -1,4 +1,5 @@import { type Control, Controller, type FieldPath, type FieldValues } from 'react-hook-form'+import { useTranslation } from 'react-i18next'import { Field, FieldLabel } from '../ui/field'import { Switch } from '../ui/switch'@@ -27,19 +28,22 @@ interface StorefrontVisibleSwitchProps<TFieldValues extends FieldValues> {export function StorefrontVisibleSwitch<TFieldValues extends FieldValues>({control,name,- label = 'Visible on storefront',- description = 'When off, only admin staff see this option (back-office orders, manual entry).',+ label,+ description,id,}: StorefrontVisibleSwitchProps<TFieldValues>) {+ const { t } = useTranslation()+ const resolvedLabel = label ?? t('admin.fields.storefront_visible.label')+ const resolvedDescription = description ?? t('admin.fields.storefront_visible.help')const fieldId = id ?? namereturn (<Field><div className="flex items-start justify-between gap-4"><div className="flex flex-col"><FieldLabel htmlFor={fieldId} className="cursor-pointer">- {label}+ {resolvedLabel}</FieldLabel>- <span className="text-xs text-muted-foreground">{description}</span>+ <span className="text-xs text-muted-foreground">{resolvedDescription}</span></div><Controllername={name}diff --git a/packages/dashboard-ui/src/ui/badge.tsx b/packages/dashboard-ui/src/ui/badge.tsxindex da200fbaaf..d5937846a5 100644--- a/packages/dashboard-ui/src/ui/badge.tsx+++ b/packages/dashboard-ui/src/ui/badge.tsx@@ -1,6 +1,7 @@import { cva, type VariantProps } from 'class-variance-authority'import { CheckIcon } from 'lucide-react'import * as React from 'react'+import { useTranslation } from 'react-i18next'import { cn } from '../lib/utils'import { Slot } from './slot'@@ -125,8 +126,8 @@ function StatusBadge({*/function ActiveBadge({active,- activeLabel = 'Yes',- inactiveLabel = 'No',+ activeLabel,+ inactiveLabel,dashWhenInactive = false,className,}: {@@ -136,11 +137,14 @@ function ActiveBadge({dashWhenInactive?: booleanclassName?: string}) {+ const { t } = useTranslation()+ const resolvedActiveLabel = activeLabel ?? t('admin.common.yes')+ const resolvedInactiveLabel = inactiveLabel ?? t('admin.common.no')if (active) {return (<Badge variant="success" className={className}><CheckIcon />- {activeLabel}+ {resolvedActiveLabel}</Badge>)}@@ -149,7 +153,7 @@ function ActiveBadge({}return (<Badge variant="outline" className={className}>- {inactiveLabel}+ {resolvedInactiveLabel}</Badge>)}diff --git a/packages/dashboard-ui/src/ui/breadcrumb.tsx b/packages/dashboard-ui/src/ui/breadcrumb.tsxindex f9f9f19e1e..a8721f9850 100644--- a/packages/dashboard-ui/src/ui/breadcrumb.tsx+++ b/packages/dashboard-ui/src/ui/breadcrumb.tsx@@ -93,7 +93,7 @@ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'{...props}><MoreHorizontalIcon />- <span className="sr-only">More</span>+ <span className="sr-only">{i18n.t('admin.a11y.breadcrumb_more')}</span></span>)}diff --git a/packages/dashboard-ui/src/ui/command.tsx b/packages/dashboard-ui/src/ui/command.tsxindex e05271116a..27a19b463d 100644--- a/packages/dashboard-ui/src/ui/command.tsx+++ b/packages/dashboard-ui/src/ui/command.tsx@@ -1,4 +1,5 @@import { Command as CommandPrimitive } from 'cmdk'+import i18n from 'i18next'import { CheckIcon, SearchIcon } from 'lucide-react'import * as React from 'react'import { cn } from '../lib/utils'@@ -19,8 +20,8 @@ function Command({ className, ...props }: React.ComponentProps<typeof CommandPri}function CommandDialog({- title = 'Command Palette',- description = 'Search for a command to run...',+ title = i18n.t('admin.components.command_palette.title'),+ description = i18n.t('admin.components.command_palette.description'),children,className,showCloseButton = false,diff --git a/packages/dashboard-ui/src/ui/date-picker.tsx b/packages/dashboard-ui/src/ui/date-picker.tsxindex b743d97727..0d786b7fd0 100644--- a/packages/dashboard-ui/src/ui/date-picker.tsx+++ b/packages/dashboard-ui/src/ui/date-picker.tsx@@ -71,7 +71,7 @@ function formatTriggerLabel(function DatePicker({value,onChange,- placeholder = 'Pick a date',+ placeholder = i18n.t('admin.common.pick_date'),className,disabled = false,includeTime = false,diff --git a/packages/dashboard-ui/src/ui/dialog.tsx b/packages/dashboard-ui/src/ui/dialog.tsxindex 8c90fc8823..a573f0031a 100644--- a/packages/dashboard-ui/src/ui/dialog.tsx+++ b/packages/dashboard-ui/src/ui/dialog.tsx@@ -1,4 +1,5 @@import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'+import i18n from 'i18next'import { XIcon } from 'lucide-react'import * as React from 'react'import { cn } from '../lib/utils'@@ -117,7 +118,7 @@ function DialogContent({render={<Button variant="ghost" className="absolute top-3 right-3" size="icon-sm"><XIcon />- <span className="sr-only">Close</span>+ <span className="sr-only">{i18n.t('admin.actions.close')}</span></Button>}/>@@ -165,7 +166,9 @@ function DialogFooter({{...props}>{children}- {showCloseButton && <DialogPrimitive.Close render={<Button>Close</Button>} />}+ {showCloseButton && (+ <DialogPrimitive.Close render={<Button>{i18n.t('admin.actions.close')}</Button>} />+ )}</div>)}diff --git a/packages/dashboard-ui/src/ui/sheet.tsx b/packages/dashboard-ui/src/ui/sheet.tsxindex 55667621b8..bfd184d090 100644--- a/packages/dashboard-ui/src/ui/sheet.tsx+++ b/packages/dashboard-ui/src/ui/sheet.tsx@@ -1,6 +1,7 @@'use client'import { Dialog as SheetPrimitive } from '@base-ui/react/dialog'+import i18n from 'i18next'import { XIcon } from 'lucide-react'import * as React from 'react'import { cn } from '../lib/utils'@@ -139,7 +140,7 @@ function SheetContent({render={<Button variant="ghost" className="absolute top-3 right-3" size="icon-sm"><XIcon />- <span className="sr-only">Close</span>+ <span className="sr-only">{i18n.t('admin.actions.close')}</span></Button>}/>diff --git a/packages/dashboard-ui/src/ui/sidebar.tsx b/packages/dashboard-ui/src/ui/sidebar.tsxindex e28690ad78..fd4e9f25ae 100644--- a/packages/dashboard-ui/src/ui/sidebar.tsx+++ b/packages/dashboard-ui/src/ui/sidebar.tsx@@ -184,8 +184,8 @@ function Sidebar({side={side}><SheetHeader className="sr-only">- <SheetTitle>Sidebar</SheetTitle>- <SheetDescription>Displays the mobile sidebar.</SheetDescription>+ <SheetTitle>{i18n.t('admin.a11y.sidebar')}</SheetTitle>+ <SheetDescription>{i18n.t('admin.a11y.sidebar_description')}</SheetDescription></SheetHeader><div className="flex h-full w-full flex-col">{children}</div></SheetContent>diff --git a/packages/dashboard/e2e/products-new-media.spec.ts b/packages/dashboard/e2e/products-new-media.spec.tsindex 6957972aa7..a952d80a27 100644--- a/packages/dashboard/e2e/products-new-media.spec.ts+++ b/packages/dashboard/e2e/products-new-media.spec.ts@@ -59,6 +59,9 @@ test.describe('new product — media', () => {const media = mediaCard(page)await media.locator('input[type="file"]').setInputFiles(FIXTURE_IMAGE)await expect(media.locator('img[src]').first()).toBeVisible({ timeout: 15_000 })+ // Wait for upload to finish — the pending thumbnail img is replaced once+ // the direct upload settles; clicking delete before that races DOM detachment.+ await expect(media.locator('.animate-spin')).toHaveCount(0, { timeout: 15_000 })// Hover the thumb to reveal the delete button and click it.await clickMediaThumbnailAction(media, 'delete')diff --git a/packages/dashboard/src/components/spree/custom-fields/custom-fields-inline.tsx b/packages/dashboard/src/components/spree/custom-fields/custom-fields-inline.tsxindex 917e741d8c..11b7884f7c 100644--- a/packages/dashboard/src/components/spree/custom-fields/custom-fields-inline.tsx+++ b/packages/dashboard/src/components/spree/custom-fields/custom-fields-inline.tsx@@ -42,6 +42,7 @@ import {Textarea,} from '@spree/dashboard-ui'import { Link, useParams } from '@tanstack/react-router'+import i18n from 'i18next'import { TagIcon } from 'lucide-react'import {createContext,@@ -291,7 +292,10 @@ export function ApiBackedCustomFieldsProvider({justSavedRef.current.set(definitionId, { id: created.id, value: created.value })}} catch (err) {- const message = err instanceof Error ? err.message : 'Failed to save custom field'+ const message =+ err instanceof Error+ ? err.message+ : i18n.t('admin.components.custom_fields.errors.failed_to_save')toast.error(message)// Roll the draft back to the persisted value so the next render// matches the server's truth.diff --git a/packages/dashboard/src/components/spree/products/inventory-section.tsx b/packages/dashboard/src/components/spree/products/inventory-section.tsxindex e67ef7b282..322aeef864 100644--- a/packages/dashboard/src/components/spree/products/inventory-section.tsx+++ b/packages/dashboard/src/components/spree/products/inventory-section.tsx@@ -224,9 +224,7 @@ export function InventorySection({ form, storeId }: InventorySectionProps) {// Showing "no stock locations" while the query is still in flight is// misleading — the locations may exist but haven't loaded yet.if (stockLocationsLoading) {- return (- <p className="text-sm text-muted-foreground">{t('admin.common.loading') ?? 'Loading…'}</p>- )+ return <p className="text-sm text-muted-foreground">{t('admin.common.loading')}</p>}return (<p className="text-sm text-muted-foreground">diff --git a/packages/dashboard/src/components/spree/products/media-edit-sheet.tsx b/packages/dashboard/src/components/spree/products/media-edit-sheet.tsxindex 4a393cd0a3..3c2006d827 100644--- a/packages/dashboard/src/components/spree/products/media-edit-sheet.tsx+++ b/packages/dashboard/src/components/spree/products/media-edit-sheet.tsx@@ -11,6 +11,7 @@ import {SheetTitle,Textarea,} from '@spree/dashboard-ui'+import i18n from 'i18next'import { CheckIcon, ImagePlusIcon } from 'lucide-react'import { useCallback, useEffect, useRef } from 'react'import type { UseFormReturn } from 'react-hook-form'@@ -199,5 +200,11 @@ export function MediaEditSheet({ form, mediaIndex, variants, open, onOpenChangefunction variantLabel(v: Variant): string {const named = v as { options_text?: string; name?: string; sku?: string | null }- return named.options_text || named.name || named.sku || v.id || 'Variant'+ return (+ named.options_text ||+ named.name ||+ named.sku ||+ v.id ||+ i18n.t('admin.products.variants.variant_label')+ )}diff --git a/packages/dashboard/src/components/spree/products/variant-media-picker.tsx b/packages/dashboard/src/components/spree/products/variant-media-picker.tsxindex 6a24684368..ebb0f94fcd 100644--- a/packages/dashboard/src/components/spree/products/variant-media-picker.tsx+++ b/packages/dashboard/src/components/spree/products/variant-media-picker.tsx@@ -9,6 +9,7 @@ import {} from '@spree/dashboard-ui'import { CheckIcon, ImagePlusIcon, Loader2Icon } from 'lucide-react'import { useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { useProductMedia, useUpdateProductMedia } from '@/hooks/use-product-media'import { useVariantMedia } from '@/hooks/use-variant-media'@@ -22,9 +23,11 @@ type Props = {export function VariantMediaPicker({productId,variantId,- triggerLabel = 'Select from product gallery',+ triggerLabel,triggerVariant = 'outline',}: Props) {+ const { t } = useTranslation()+ const resolvedTriggerLabel = triggerLabel ?? t('admin.products.variant_media_picker.trigger')const [open, setOpen] = useState(false)const [selectedMediaIds, setSelectedMediaIds] = useState<Set<string>>(new Set())@@ -68,12 +71,12 @@ export function VariantMediaPicker({return (<><Button variant={triggerVariant} size="sm" onClick={() => setOpen(true)}>- {triggerLabel}+ {resolvedTriggerLabel}</Button><Dialog open={open} onOpenChange={setOpen}><DialogContent className="max-w-2xl"><DialogHeader>- <DialogTitle>Select from product gallery</DialogTitle>+ <DialogTitle>{t('admin.products.variant_media_picker.title')}</DialogTitle></DialogHeader><DialogBody>{productMediaQuery.isLoading ? (@@ -85,8 +88,8 @@ export function VariantMediaPicker({<ImagePlusIcon className="size-6" /><p className="text-sm">{productMedia.length === 0- ? 'No product media yet — upload images on the product first.'- : 'All product media is already linked to this variant.'}+ ? t('admin.products.variant_media_picker.empty_no_media')+ : t('admin.products.variant_media_picker.empty_all_linked')}</p></div>) : (@@ -128,7 +131,7 @@ export function VariantMediaPicker({</DialogBody><DialogFooter><Button variant="ghost" onClick={() => setOpen(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><ButtononClick={handleAdd}@@ -137,10 +140,14 @@ export function VariantMediaPicker({{updateMedia.isPending ? (<><Loader2Icon className="size-4 animate-spin" />- Adding…+ {t('admin.actions.adding')}</>+ ) : selectedMediaIds.size > 0 ? (+ t('admin.products.variant_media_picker.add_count', {+ count: selectedMediaIds.size,+ })) : (- `Add ${selectedMediaIds.size || ''}`.trim()+ t('admin.actions.add'))}</Button></DialogFooter>diff --git a/packages/dashboard/src/components/spree/products/variants-options-builder.tsx b/packages/dashboard/src/components/spree/products/variants-options-builder.tsxindex 8b7d327c50..5859c61a2b 100644--- a/packages/dashboard/src/components/spree/products/variants-options-builder.tsx+++ b/packages/dashboard/src/components/spree/products/variants-options-builder.tsx@@ -282,7 +282,10 @@ function OptionPicker({ optionType, initialValues, onSave, onCancel }: OptionPicsetPickedNames((prev) => new Set(prev).add(name))setCreatingValue(false)} catch (err) {- const message = err instanceof Error ? err.message : 'Failed to create value'+ const message =+ err instanceof Error+ ? err.message+ : t('admin.products.variants.errors.failed_to_create_value')toast.error(message)}}@@ -376,7 +379,10 @@ function CreateOptionTypeInline({})onCreated(created)} catch (err) {- const message = err instanceof Error ? err.message : 'Failed to create option type'+ const message =+ err instanceof Error+ ? err.message+ : t('admin.products.variants.errors.failed_to_create_option_type')toast.error(message)}}diff --git a/packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsx b/packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsxindex 2ba6fd4404..daff05d532 100644--- a/packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsx+++ b/packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsx@@ -1,5 +1,6 @@import { Button, SheetFooter } from '@spree/dashboard-ui'import type { ReactNode } from 'react'+import { useTranslation } from 'react-i18next'/*** Shared layout for promotion rule and action editors. Wraps the body@@ -12,7 +13,7 @@ export function EditorShell({onSave,onCancel,pending,- saveLabel = 'Save',+ saveLabel,saveDisabled,}: {children: ReactNode@@ -22,15 +23,18 @@ export function EditorShell({saveLabel?: stringsaveDisabled?: boolean}) {+ const { t } = useTranslation()+ const resolvedSaveLabel = saveLabel ?? t('admin.actions.save')+return (<><div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4">{children}</div><SheetFooter><Button type="button" variant="outline" size="sm" onClick={onCancel} disabled={pending}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="button" size="sm" onClick={() => onSave()} disabled={pending || saveDisabled}>- {pending ? 'Saving…' : saveLabel}+ {pending ? t('admin.actions.saving') : resolvedSaveLabel}</Button></SheetFooter></>diff --git a/packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsx b/packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsxindex 74df34d5b6..2f9a0879fd 100644--- a/packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsx+++ b/packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsx@@ -8,6 +8,7 @@ import {RadioGroup,RadioGroupItem,} from '@spree/dashboard-ui'+import { useTranslation } from 'react-i18next'export interface MatchPolicyOption<TValue extends string> {value: TValue@@ -22,7 +23,7 @@ export interface MatchPolicyOption<TValue extends string> {* shared `FieldLabel` choice-card styling.*/export function MatchPolicyPicker<TValue extends string>({- label = 'Match policy',+ label,policies,value,onChange,@@ -32,9 +33,11 @@ export function MatchPolicyPicker<TValue extends string>({value: TValueonChange: (value: TValue) => void}) {+ const { t } = useTranslation()+ const resolvedLabel = label ?? t('admin.fields.match_policy.label')return (<FieldGroup>- <FieldLabel>{label}</FieldLabel>+ <FieldLabel>{resolvedLabel}</FieldLabel><RadioGroup value={value} onValueChange={(next) => onChange(next as TValue)}>{policies.map((policy) => (<FieldLabel key={policy.value}>diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.jsonindex 7487cd9ad6..c3bbf18943 100644--- a/packages/dashboard/src/locales/ar.json+++ b/packages/dashboard/src/locales/ar.json@@ -710,6 +710,9 @@"label": "اللغة","help": "اللغة المستخدمة في لوحة الإدارة. تؤثر فقط على ما تراه."}+ },+ "match_policy": {+ "label": "سياسة المطابقة"}},"promotions": {@@ -977,7 +980,10 @@"admin_only": "Admin only","add_another_field": "أضف حقلاً آخر","create_another": "إنشاء آخر",- "set_values": "تعيين القيم"+ "set_values": "تعيين القيم",+ "errors": {+ "failed_to_save": "فشل حفظ الحقل المخصص"+ }},"adjustment_action_editor": {"calculator_label": "آلة حاسبة",@@ -1053,7 +1059,10 @@"message": "ستتم إزالة {{name}}. ستفقد المنتجات والأوامر المرتبطة بها مرجع قناة المبيعات الخاصة بها."},"search_placeholder": "البحث في قنوات البيع…",- "no_channels_found": "لم يتم العثور على قنوات البيع"+ "no_channels_found": "لم يتم العثور على قنوات البيع",+ "validation": {+ "code_format": "أحرف صغيرة وأرقام وشرطات وشرطات سفلية فقط"+ }},"customers": {"new_cta": "عميل جديد",@@ -1661,7 +1670,11 @@"roles_label": "أدوار لهذا المتجر"},"edit_description": "قم بتحديث تفاصيل الملف الشخصي والأدوار المعينة لهذا الموظف.",- "actions_aria": "الإجراءات"+ "actions_aria": "الإجراءات",+ "validation": {+ "role_required": "اختر دورًا",+ "roles_required": "اختر دورًا واحدًا على الأقل"+ }},"api_keys": {"empty_description": "قم بإنشاء واحدة للبدء.",@@ -1990,7 +2003,8 @@"apply_balance": "قم بتطبيق الرصيد المتاح لـ العميل","requires_customer": "يتطلب العميل","apply_dialog_title": "Apply Gift Card",- "apply_dialog_description": "أدخل رمز بطاقة الهدايا لتطبيقه على هذا الطلب."+ "apply_dialog_description": "أدخل رمز بطاقة الهدايا لتطبيقه على هذا الطلب.",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "تحرير عنوان الشحن",@@ -2099,6 +2113,10 @@"sheet": {"identity": "هوية","tax_category_placeholder": "ترث من المنتج"+ },+ "errors": {+ "failed_to_create_value": "فشل إنشاء القيمة",+ "failed_to_create_option_type": "فشل إنشاء نوع الخيار"}},"inventory": {@@ -2110,7 +2128,8 @@"on_hand_aria": "في متناول اليد في {{location}}","backorder_aria": "السماح بالطلب المؤجل عند {{location}}","empty_no_locations": "أضف موقع المخزون في الإعدادات لبدء تتبع المخزون.",- "empty_no_variants": "تتم إدارة مستويات المخزون لكل موقع المخزون. أضف متغيرًا لبدء تتبع المخزون."+ "empty_no_variants": "تتم إدارة مستويات المخزون لكل موقع المخزون. أضف متغيرًا لبدء تتبع المخزون.",+ "unknown_location": "موقع غير معروف"},"custom_fields": {"empty_title": "لا توجد حقول custom حتى الآن",@@ -2133,7 +2152,18 @@"errors": {"failed_to_activate": "فشل تفعيل قائمة الأسعار","failed_to_deactivate": "فشل في إلغاء تنشيط قائمة الأسعار"+ },+ "validation": {+ "ends_after_starts": "يجب أن يكون بعد تاريخ البدء."}+ },+ "variant_media_picker": {+ "trigger": "اختر من معرض المنتج",+ "title": "اختر من معرض المنتج",+ "empty_no_media": "لا توجد وسائط للمنتج بعد — ارفع الصور على المنتج أولاً.",+ "empty_all_linked": "جميع وسائط المنتج مرتبطة بالفعل بهذا المتغير.",+ "add_count_one": "إضافة {{count}}",+ "add_count_other": "إضافة {{count}}"}},"payment_methods": {@@ -2197,6 +2227,16 @@"delete_confirm": {"title": "هل تريد حذف الحقل custom؟","message": "ستتم إزالة {{label}} مع كل قيمة مخزنة له."+ },+ "messages": {+ "created": "تم إنشاء تعريف الحقل المخصص",+ "updated": "تم تحديث تعريف الحقل المخصص",+ "deleted": "تم حذف تعريف الحقل المخصص"+ },+ "errors": {+ "failed_to_create": "فشل إنشاء تعريف الحقل المخصص",+ "failed_to_update": "فشل تحديث تعريف الحقل المخصص",+ "failed_to_delete": "فشل حذف تعريف الحقل المخصص"}},"allowed_origins": {@@ -2286,7 +2326,11 @@"backorder": "طلب متأخر"},"empty": "لا توجد عناصر المخزون في هذا الموقع حتى الآن.",- "empty_search": "لا توجد عناصر مخزون تطابق بحثك."+ "empty_search": "لا توجد عناصر مخزون تطابق بحثك.",+ "unknown_product": "منتج غير معروف",+ "variant_count_one": "{{count}} متغير",+ "variant_count_other": "{{count}} متغيرات",+ "low_stock_marker": "مخزون منخفض"}},"store": {diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.jsonindex 08d328ceb5..5d49a790a2 100644--- a/packages/dashboard/src/locales/de.json+++ b/packages/dashboard/src/locales/de.json@@ -662,6 +662,9 @@"label": "Sprache","help": "Sprache, die im gesamten Admin-Dashboard verwendet wird. Betrifft nur Ihre Ansicht."}+ },+ "match_policy": {+ "label": "Abgleichrichtlinie"}},"promotions": {@@ -929,7 +932,10 @@"admin_only": "Nur für Administratoren","add_another_field": "Weiteres Feld hinzufügen","create_another": "Weiteres erstellen",- "set_values": "Werte festlegen"+ "set_values": "Werte festlegen",+ "errors": {+ "failed_to_save": "Benutzerdefiniertes Feld konnte nicht gespeichert werden"+ }},"adjustment_action_editor": {"calculator_label": "Kalkulator",@@ -1005,7 +1011,10 @@"message": "{{name}} wird entfernt. Damit verknüpfte Produkte und Bestellungen verlieren ihre Verkaufskanal-Referenz."},"search_placeholder": "Verkaufskanäle suchen…",- "no_channels_found": "Keine Verkaufskanäle gefunden"+ "no_channels_found": "Keine Verkaufskanäle gefunden",+ "validation": {+ "code_format": "Nur Kleinbuchstaben, Zahlen, Bindestriche und Unterstriche"+ }},"customers": {"new_cta": "Neuer Kunde",@@ -1613,7 +1622,11 @@"roles_label": "Rollen für diesen Shop"},"edit_description": "Aktualisieren Sie die Profildaten und zugewiesenen Rollen für diesen Mitarbeiter.",- "actions_aria": "Aktionen"+ "actions_aria": "Aktionen",+ "validation": {+ "role_required": "Wählen Sie eine Rolle",+ "roles_required": "Wählen Sie mindestens eine Rolle"+ }},"api_keys": {"empty_description": "Erstellen Sie einen, um zu beginnen.",@@ -1906,7 +1919,8 @@"apply_balance": "Verfügbares Guthaben des Kunden anwenden","requires_customer": "Erfordert einen Kunden","apply_dialog_title": "Geschenkkarte anwenden",- "apply_dialog_description": "Geben Sie einen Geschenkkartencode ein, der auf diesen Auftrag angewendet werden soll."+ "apply_dialog_description": "Geben Sie einen Geschenkkartencode ein, der auf diesen Auftrag angewendet werden soll.",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "Lieferadresse bearbeiten",@@ -2051,6 +2065,10 @@"sheet": {"identity": "Identität","tax_category_placeholder": "Vom Produkt übernehmen"+ },+ "errors": {+ "failed_to_create_value": "Wert konnte nicht erstellt werden",+ "failed_to_create_option_type": "Optionstyp konnte nicht erstellt werden"}},"inventory": {@@ -2062,7 +2080,8 @@"on_hand_aria": "Verfügbar bei {{location}}","backorder_aria": "Nachbestellung bei {{location}} zulassen","empty_no_locations": "Fügen Sie in den Einstellungen einen Lagerstandort hinzu, um mit der Bestandsverfolgung zu beginnen.",- "empty_no_variants": "Lagerbestände werden pro Lagerstandort verwaltet. Fügen Sie eine Variante hinzu, um mit der Bestandsverfolgung zu beginnen."+ "empty_no_variants": "Lagerbestände werden pro Lagerstandort verwaltet. Fügen Sie eine Variante hinzu, um mit der Bestandsverfolgung zu beginnen.",+ "unknown_location": "Unbekannter Standort"},"custom_fields": {"empty_title": "Noch keine benutzerdefinierten Felder",@@ -2085,7 +2104,18 @@"errors": {"failed_to_activate": "Preisliste konnte nicht aktiviert werden","failed_to_deactivate": "Preisliste konnte nicht deaktiviert werden"+ },+ "validation": {+ "ends_after_starts": "Muss nach dem Startdatum liegen."}+ },+ "variant_media_picker": {+ "trigger": "Aus Produktgalerie auswählen",+ "title": "Aus Produktgalerie auswählen",+ "empty_no_media": "Noch keine Produktmedien — laden Sie zuerst Bilder auf dem Produkt hoch.",+ "empty_all_linked": "Alle Produktmedien sind bereits mit dieser Variante verknüpft.",+ "add_count_one": "{{count}} hinzufügen",+ "add_count_other": "{{count}} hinzufügen"}},"payment_methods": {@@ -2176,6 +2206,16 @@"delete_confirm": {"title": "Benutzerdefiniertes Feld löschen?","message": "{{label}} wird zusammen mit allen dafür gespeicherten Werten entfernt."+ },+ "messages": {+ "created": "Benutzerdefiniertes Feld erstellt",+ "updated": "Benutzerdefiniertes Feld aktualisiert",+ "deleted": "Benutzerdefiniertes Feld gelöscht"+ },+ "errors": {+ "failed_to_create": "Benutzerdefiniertes Feld konnte nicht erstellt werden",+ "failed_to_update": "Benutzerdefiniertes Feld konnte nicht aktualisiert werden",+ "failed_to_delete": "Benutzerdefiniertes Feld konnte nicht gelöscht werden"}},"allowed_origins": {@@ -2228,7 +2268,11 @@"backorder": "Nachbestellung"},"empty": "An diesem Standort sind noch keine Bestandsartikel vorhanden.",- "empty_search": "Keine Bestandsartikel entsprechen Ihrer Suche."+ "empty_search": "Keine Bestandsartikel entsprechen Ihrer Suche.",+ "unknown_product": "Unbekanntes Produkt",+ "variant_count_one": "{{count}} Variante",+ "variant_count_other": "{{count}} Varianten",+ "low_stock_marker": "niedriger Bestand"},"search_placeholder": "Nach Name suchen…","empty": "Noch keine Lagerstandorte",diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.jsonindex ddbdd41be8..cd66d10aec 100644--- a/packages/dashboard/src/locales/en.json+++ b/packages/dashboard/src/locales/en.json@@ -145,6 +145,9 @@"role_ids": {"label": "Roles"},+ "match_policy": {+ "label": "Match policy"+ },"tax_category_id": {"label": "Tax category"},@@ -977,7 +980,10 @@"admin_only": "Admin only","add_another_field": "Add another field","create_another": "Create another",- "set_values": "Set values"+ "set_values": "Set values",+ "errors": {+ "failed_to_save": "Failed to save custom field"+ }},"adjustment_action_editor": {"calculator_label": "Calculator",@@ -1053,7 +1059,10 @@"message": "{{name}} will be removed. Products and orders attached to it will lose their sales-channel reference."},"search_placeholder": "Search sales channels…",- "no_channels_found": "No sales channels found"+ "no_channels_found": "No sales channels found",+ "validation": {+ "code_format": "Lowercase letters, numbers, hyphens, underscores only"+ }},"customers": {"new_cta": "New Customer",@@ -1661,7 +1670,11 @@"roles_label": "Roles for this store"},"edit_description": "Update profile details and assigned roles for this staff member.",- "actions_aria": "Actions"+ "actions_aria": "Actions",+ "validation": {+ "role_required": "Pick a role",+ "roles_required": "Pick at least one role"+ }},"api_keys": {"empty_description": "Create one to get started.",@@ -1990,7 +2003,8 @@"apply_balance": "Apply customer's available balance","requires_customer": "Requires a customer","apply_dialog_title": "Apply Gift Card",- "apply_dialog_description": "Enter a gift card code to apply to this order."+ "apply_dialog_description": "Enter a gift card code to apply to this order.",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "Edit Shipping Address",@@ -2099,6 +2113,10 @@"sheet": {"identity": "Identity","tax_category_placeholder": "Inherit from product"+ },+ "errors": {+ "failed_to_create_value": "Failed to create value",+ "failed_to_create_option_type": "Failed to create option type"}},"inventory": {@@ -2110,7 +2128,8 @@"on_hand_aria": "On hand at {{location}}","backorder_aria": "Allow backorder at {{location}}","empty_no_locations": "Add a stock location in Settings to start tracking inventory.",- "empty_no_variants": "Stock levels are managed per stock location. Add a variant to start tracking inventory."+ "empty_no_variants": "Stock levels are managed per stock location. Add a variant to start tracking inventory.",+ "unknown_location": "Unknown location"},"custom_fields": {"empty_title": "No custom fields yet",@@ -2133,7 +2152,18 @@"errors": {"failed_to_activate": "Failed to activate price list","failed_to_deactivate": "Failed to deactivate price list"+ },+ "validation": {+ "ends_after_starts": "Must be after start date."}+ },+ "variant_media_picker": {+ "trigger": "Select from product gallery",+ "title": "Select from product gallery",+ "empty_no_media": "No product media yet — upload images on the product first.",+ "empty_all_linked": "All product media is already linked to this variant.",+ "add_count_one": "Add {{count}}",+ "add_count_other": "Add {{count}}"}},"payment_methods": {@@ -2197,6 +2227,16 @@"delete_confirm": {"title": "Delete custom field?","message": "{{label}} will be removed along with every value stored for it."+ },+ "messages": {+ "created": "Custom field definition created",+ "updated": "Custom field definition updated",+ "deleted": "Custom field definition deleted"+ },+ "errors": {+ "failed_to_create": "Failed to create custom field definition",+ "failed_to_update": "Failed to update custom field definition",+ "failed_to_delete": "Failed to delete custom field definition"}},"allowed_origins": {@@ -2286,7 +2326,11 @@"backorder": "Backorder"},"empty": "No stock items at this location yet.",- "empty_search": "No stock items match your search."+ "empty_search": "No stock items match your search.",+ "unknown_product": "Unknown product",+ "variant_count_one": "{{count}} variant",+ "variant_count_other": "{{count}} variants",+ "low_stock_marker": "low stock"}},"store": {diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.jsonindex 2891e27fee..b37b63a75a 100644--- a/packages/dashboard/src/locales/fr.json+++ b/packages/dashboard/src/locales/fr.json@@ -662,6 +662,9 @@"label": "Langue","help": "Langue utilisée dans tout le tableau de bord d'administration. N'affecte que ce que vous voyez."}+ },+ "match_policy": {+ "label": "Politique de correspondance"}},"promotions": {@@ -929,7 +932,10 @@"admin_only": "Administrateurs uniquement","add_another_field": "Ajouter un autre champ","create_another": "En créer un autre",- "set_values": "Définir les valeurs"+ "set_values": "Définir les valeurs",+ "errors": {+ "failed_to_save": "Impossible d’enregistrer le champ personnalisé"+ }},"adjustment_action_editor": {"calculator_label": "Calculateur",@@ -1005,7 +1011,10 @@"message": "{{name}} sera supprimé. Les produits et commandes qui y sont rattachés perdront leur référence de canal de vente."},"search_placeholder": "Rechercher des canaux de vente…",- "no_channels_found": "Aucun canal de vente trouvé"+ "no_channels_found": "Aucun canal de vente trouvé",+ "validation": {+ "code_format": "Lettres minuscules, chiffres, tirets et underscores uniquement"+ }},"customers": {"new_cta": "Nouveau client",@@ -1613,7 +1622,11 @@"roles_label": "Rôles pour cette boutique"},"edit_description": "Mettez à jour les informations du profil et les rôles attribués à ce membre du personnel.",- "actions_aria": "Actions"+ "actions_aria": "Actions",+ "validation": {+ "role_required": "Choisissez un rôle",+ "roles_required": "Choisissez au moins un rôle"+ }},"api_keys": {"empty_description": "Créez-en une pour commencer.",@@ -1906,7 +1919,8 @@"apply_balance": "Appliquer le solde disponible du client","requires_customer": "Nécessite un client","apply_dialog_title": "Appliquer une carte cadeau",- "apply_dialog_description": "Saisissez un code de carte cadeau à appliquer à cette commande."+ "apply_dialog_description": "Saisissez un code de carte cadeau à appliquer à cette commande.",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "Modifier l'adresse de livraison",@@ -2051,6 +2065,10 @@"sheet": {"identity": "Identité","tax_category_placeholder": "Hériter du produit"+ },+ "errors": {+ "failed_to_create_value": "Impossible de créer la valeur",+ "failed_to_create_option_type": "Impossible de créer le type d’option"}},"inventory": {@@ -2062,7 +2080,8 @@"on_hand_aria": "En stock à {{location}}","backorder_aria": "Autoriser le réassort à {{location}}","empty_no_locations": "Ajoutez un emplacement de stock dans les Paramètres pour commencer à suivre l'inventaire.",- "empty_no_variants": "Les niveaux de stock sont gérés par emplacement de stock. Ajoutez une variante pour commencer à suivre l'inventaire."+ "empty_no_variants": "Les niveaux de stock sont gérés par emplacement de stock. Ajoutez une variante pour commencer à suivre l'inventaire.",+ "unknown_location": "Emplacement inconnu"},"custom_fields": {"empty_title": "Aucun champ personnalisé pour le moment",@@ -2085,7 +2104,18 @@"errors": {"failed_to_activate": "Échec de l'activation de la liste de prix","failed_to_deactivate": "Échec de la désactivation de la liste de prix"+ },+ "validation": {+ "ends_after_starts": "Doit être postérieur à la date de début."}+ },+ "variant_media_picker": {+ "trigger": "Sélectionner dans la galerie produit",+ "title": "Sélectionner dans la galerie produit",+ "empty_no_media": "Aucun média produit — téléversez d’abord des images sur le produit.",+ "empty_all_linked": "Tous les médias produit sont déjà liés à cette variante.",+ "add_count_one": "Ajouter {{count}}",+ "add_count_other": "Ajouter {{count}}"}},"payment_methods": {@@ -2176,6 +2206,16 @@"delete_confirm": {"title": "Supprimer le champ personnalisé ?","message": "{{label}} sera supprimé, ainsi que toutes les valeurs qui y sont enregistrées."+ },+ "messages": {+ "created": "Champ personnalisé créé",+ "updated": "Champ personnalisé mis à jour",+ "deleted": "Champ personnalisé supprimé"+ },+ "errors": {+ "failed_to_create": "Impossible de créer le champ personnalisé",+ "failed_to_update": "Impossible de mettre à jour le champ personnalisé",+ "failed_to_delete": "Impossible de supprimer le champ personnalisé"}},"allowed_origins": {@@ -2228,7 +2268,11 @@"backorder": "Réassort"},"empty": "Aucun article en stock à cet emplacement pour le moment.",- "empty_search": "Aucun article en stock ne correspond à votre recherche."+ "empty_search": "Aucun article en stock ne correspond à votre recherche.",+ "unknown_product": "Produit inconnu",+ "variant_count_one": "{{count}} variante",+ "variant_count_other": "{{count}} variantes",+ "low_stock_marker": "stock faible"},"search_placeholder": "Rechercher par nom…","empty": "Aucun emplacement de stock pour le moment",diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.jsonindex 043908b8df..5b40da0305 100644--- a/packages/dashboard/src/locales/pl.json+++ b/packages/dashboard/src/locales/pl.json@@ -662,6 +662,9 @@"label": "Język","help": "Język używany w całym panelu administracyjnym. Wpływa tylko na to, co widzisz."}+ },+ "match_policy": {+ "label": "Polityka dopasowania"}},"promotions": {@@ -929,7 +932,10 @@"admin_only": "Tylko dla administratorów","add_another_field": "Dodaj kolejne pole","create_another": "Utwórz kolejne",- "set_values": "Ustaw wartości"+ "set_values": "Ustaw wartości",+ "errors": {+ "failed_to_save": "Nie udało się zapisać pola niestandardowego"+ }},"adjustment_action_editor": {"calculator_label": "Kalkulator",@@ -1005,7 +1011,10 @@"message": "{{name}} zostanie usunięty. Produkty i zamówienia z nim powiązane stracą odniesienie do kanału sprzedaży."},"search_placeholder": "Szukaj kanałów sprzedaży…",- "no_channels_found": "Nie znaleziono kanałów sprzedaży"+ "no_channels_found": "Nie znaleziono kanałów sprzedaży",+ "validation": {+ "code_format": "Tylko małe litery, cyfry, myślniki i podkreślenia"+ }},"customers": {"new_cta": "Nowy klient",@@ -1633,7 +1642,11 @@"roles_label": "Role dla tego sklepu"},"edit_description": "Zaktualizuj dane profilu i przypisane role tego członka personelu.",- "actions_aria": "Akcje"+ "actions_aria": "Akcje",+ "validation": {+ "role_required": "Wybierz rolę",+ "roles_required": "Wybierz co najmniej jedną rolę"+ }},"api_keys": {"empty_description": "Utwórz klucz, aby rozpocząć.",@@ -1930,7 +1943,8 @@"apply_balance": "Zastosuj dostępne saldo klienta","requires_customer": "Wymaga klienta","apply_dialog_title": "Zastosuj kartę podarunkową",- "apply_dialog_description": "Wprowadź kod karty podarunkowej, aby zastosować ją do tego zamówienia."+ "apply_dialog_description": "Wprowadź kod karty podarunkowej, aby zastosować ją do tego zamówienia.",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "Edytuj adres wysyłki",@@ -2081,6 +2095,10 @@"sheet": {"identity": "Tożsamość","tax_category_placeholder": "Dziedzicz z produktu"+ },+ "errors": {+ "failed_to_create_value": "Nie udało się utworzyć wartości",+ "failed_to_create_option_type": "Nie udało się utworzyć typu opcji"}},"inventory": {@@ -2092,7 +2110,8 @@"on_hand_aria": "Na stanie w lokalizacji {{location}}","backorder_aria": "Zezwól na zamówienia oczekujące w lokalizacji {{location}}","empty_no_locations": "Dodaj lokalizację magazynową w Ustawieniach, aby rozpocząć śledzenie stanów magazynowych.",- "empty_no_variants": "Stany magazynowe są zarządzane osobno dla każdej lokalizacji magazynowej. Dodaj wariant, aby rozpocząć śledzenie stanów magazynowych."+ "empty_no_variants": "Stany magazynowe są zarządzane osobno dla każdej lokalizacji magazynowej. Dodaj wariant, aby rozpocząć śledzenie stanów magazynowych.",+ "unknown_location": "Nieznana lokalizacja"},"custom_fields": {"empty_title": "Brak pól niestandardowych",@@ -2115,7 +2134,18 @@"errors": {"failed_to_activate": "Nie udało się aktywować cennika","failed_to_deactivate": "Nie udało się dezaktywować cennika"+ },+ "validation": {+ "ends_after_starts": "Musi być po dacie rozpoczęcia."}+ },+ "variant_media_picker": {+ "trigger": "Wybierz z galerii produktu",+ "title": "Wybierz z galerii produktu",+ "empty_no_media": "Brak mediów produktu — najpierw prześlij obrazy do produktu.",+ "empty_all_linked": "Wszystkie media produktu są już powiązane z tym wariantem.",+ "add_count_one": "Dodaj {{count}}",+ "add_count_other": "Dodaj {{count}}"}},"payment_methods": {@@ -2206,6 +2236,16 @@"delete_confirm": {"title": "Usunąć pole niestandardowe?","message": "{{label}} zostanie usunięte wraz z każdą zapisaną dla niego wartością."+ },+ "messages": {+ "created": "Definicja pola niestandardowego utworzona",+ "updated": "Definicja pola niestandardowego zaktualizowana",+ "deleted": "Definicja pola niestandardowego usunięta"+ },+ "errors": {+ "failed_to_create": "Nie udało się utworzyć definicji pola niestandardowego",+ "failed_to_update": "Nie udało się zaktualizować definicji pola niestandardowego",+ "failed_to_delete": "Nie udało się usunąć definicji pola niestandardowego"}},"allowed_origins": {@@ -2258,7 +2298,11 @@"backorder": "Zamówienie oczekujące"},"empty": "Brak zapasów w tej lokalizacji.",- "empty_search": "Żadne zapasy nie pasują do wyszukiwania."+ "empty_search": "Żadne zapasy nie pasują do wyszukiwania.",+ "unknown_product": "Nieznany produkt",+ "variant_count_one": "{{count}} wariant",+ "variant_count_other": "{{count}} wariantów",+ "low_stock_marker": "niski stan"},"search_placeholder": "Szukaj według nazwy…","empty": "Brak lokalizacji magazynowych",diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.jsonindex 01cc8b98b5..48e15c08d8 100644--- a/packages/dashboard/src/locales/zh-CN.json+++ b/packages/dashboard/src/locales/zh-CN.json@@ -710,6 +710,9 @@"label": "语言","help": "管理后台使用的语言。仅影响您看到的界面。"}+ },+ "match_policy": {+ "label": "匹配策略"}},"promotions": {@@ -977,7 +980,10 @@"admin_only": "仅管理员可见","add_another_field": "添加另一个字段","create_another": "再创建一个",- "set_values": "设置值"+ "set_values": "设置值",+ "errors": {+ "failed_to_save": "保存自定义字段失败"+ }},"adjustment_action_editor": {"calculator_label": "计算器",@@ -1053,7 +1059,10 @@"message": "{{name}} 将被移除。关联到该渠道的商品和订单将失去其销售渠道引用。"},"search_placeholder": "搜索销售渠道…",- "no_channels_found": "未找到销售渠道"+ "no_channels_found": "未找到销售渠道",+ "validation": {+ "code_format": "仅允许小写字母、数字、连字符和下划线"+ }},"customers": {"new_cta": "新建客户",@@ -1661,7 +1670,11 @@"roles_label": "此店铺的角色"},"edit_description": "更新此员工的个人资料详情和分配的角色。",- "actions_aria": "操作"+ "actions_aria": "操作",+ "validation": {+ "role_required": "请选择一个角色",+ "roles_required": "请至少选择一个角色"+ }},"api_keys": {"empty_description": "创建一个以开始使用。",@@ -1990,7 +2003,8 @@"apply_balance": "应用客户的可用余额","requires_customer": "需要客户","apply_dialog_title": "应用礼品卡",- "apply_dialog_description": "输入要应用到此订单的礼品卡代码。"+ "apply_dialog_description": "输入要应用到此订单的礼品卡代码。",+ "code_placeholder": "GIFT-XXXX-YYYY"},"address_edit": {"shipping_title": "编辑收货地址",@@ -2099,6 +2113,10 @@"sheet": {"identity": "标识","tax_category_placeholder": "继承自商品"+ },+ "errors": {+ "failed_to_create_value": "创建值失败",+ "failed_to_create_option_type": "创建选项类型失败"}},"inventory": {@@ -2110,7 +2128,8 @@"on_hand_aria": "{{location}} 的现有库存","backorder_aria": "允许在 {{location}} 延期交货","empty_no_locations": "在「设置」中添加库存地点以开始跟踪库存。",- "empty_no_variants": "库存水平按库存地点管理。添加一个变体以开始跟踪库存。"+ "empty_no_variants": "库存水平按库存地点管理。添加一个变体以开始跟踪库存。",+ "unknown_location": "未知位置"},"custom_fields": {"empty_title": "暂无自定义字段",@@ -2133,7 +2152,18 @@"errors": {"failed_to_activate": "启用价目表失败","failed_to_deactivate": "停用价目表失败"+ },+ "validation": {+ "ends_after_starts": "必须晚于开始日期。"}+ },+ "variant_media_picker": {+ "trigger": "从产品图库选择",+ "title": "从产品图库选择",+ "empty_no_media": "尚无产品媒体 — 请先在产品上上传图片。",+ "empty_all_linked": "所有产品媒体已关联到此变体。",+ "add_count_one": "添加 {{count}} 个",+ "add_count_other": "添加 {{count}} 个"}},"payment_methods": {@@ -2197,6 +2227,16 @@"delete_confirm": {"title": "删除自定义字段?","message": "{{label}} 及为其存储的所有值都将被移除。"+ },+ "messages": {+ "created": "自定义字段定义已创建",+ "updated": "自定义字段定义已更新",+ "deleted": "自定义字段定义已删除"+ },+ "errors": {+ "failed_to_create": "创建自定义字段定义失败",+ "failed_to_update": "更新自定义字段定义失败",+ "failed_to_delete": "删除自定义字段定义失败"}},"allowed_origins": {@@ -2286,7 +2326,11 @@"backorder": "缺货预订"},"empty": "此地点暂无库存项。",- "empty_search": "没有与搜索匹配的库存项。"+ "empty_search": "没有与搜索匹配的库存项。",+ "unknown_product": "未知产品",+ "variant_count_one": "{{count}} 个变体",+ "variant_count_other": "{{count}} 个变体",+ "low_stock_marker": "库存不足"}},"store": {diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsxindex 7b3a5db377..275ff66c8f 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsx@@ -1594,7 +1594,7 @@ function ApplyGiftCardDialog({<Inputid="gift-card-code"name="code"- placeholder="GIFT-XXXX-YYYY"+ placeholder={t('admin.orders.detail.gift_card_section.code_placeholder')}requiredautoFocus/>diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsxindex 831107c808..554171a844 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsx@@ -12,6 +12,7 @@ import {useFormSubmitShortcut,} from '@spree/dashboard-ui'import { createFileRoute, useRouter } from '@tanstack/react-router'+import i18n from 'i18next'import { useEffect } from 'react'import { useForm, useWatch } from 'react-hook-form'import { useTranslation } from 'react-i18next'@@ -87,7 +88,8 @@ function variantToFormValues(variant: Variant, position: number): VariantFormValstock_items: (variant.stock_items ?? []).map((si) => ({id: si.id,stock_location_id: si.stock_location_id ?? si.stock_location?.id ?? '',- stock_location_name: si.stock_location?.name ?? 'Unknown location',+ stock_location_name:+ si.stock_location?.name ?? i18n.t('admin.products.inventory.unknown_location'),count_on_hand: si.count_on_hand,backorderable: si.backorderable,})),diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsxindex 6373118fd2..7a3b7d53da 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsx@@ -29,6 +29,7 @@ import {Input,RelativeTime,RowActions,+ requiredMessage,Select,SelectContent,SelectItem,@@ -51,6 +52,7 @@ import {useCopyToClipboard,} from '@spree/dashboard-ui'import { createFileRoute } from '@tanstack/react-router'+import i18n from 'i18next'import {BanIcon,ClockIcon,@@ -391,8 +393,11 @@ function InvitationRow({ invitation }: { invitation: Invitation }) {// ---------------------------------------------------------------------------const inviteSchema = z.object({- email: z.string().min(1, 'Email is required').email('Enter a valid email'),- role_id: z.string().min(1, 'Pick a role'),+ email: z+ .string()+ .min(1, { error: requiredMessage('email') })+ .email({ error: () => i18n.t('admin.validation.invalid_email') }),+ role_id: z.string().min(1, { error: () => i18n.t('admin.staff.validation.role_required') }),})type InviteFormValues = z.infer<typeof inviteSchema>@@ -531,7 +536,9 @@ function InviteDialog({const editSchema = z.object({first_name: z.string().optional(),last_name: z.string().optional(),- role_ids: z.array(z.string()).min(1, 'Pick at least one role'),+ role_ids: z+ .array(z.string())+ .min(1, { error: () => i18n.t('admin.staff.validation.roles_required') }),})type EditFormValues = z.infer<typeof editSchema>diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsxindex 29b8cecb86..e4223a8d01 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsx@@ -337,7 +337,10 @@ function StockItemsPanel({ stockLocationId }: { stockLocationId: string }) {// Group by product so multi-variant products read as one card with sub-rows// instead of as N unrelated rows. Sort: low stock first, then product name.- const groups = useMemo(() => groupItemsByProduct(items), [items])+ const groups = useMemo(+ () => groupItemsByProduct(items, t('admin.stock_locations.stock_items.unknown_product')),+ [items, t],+ )return (<div className="rounded-md border">@@ -413,11 +416,11 @@ interface StockItemGroup {const LOW_STOCK_THRESHOLD = 5-function groupItemsByProduct(items: StockItem[]): StockItemGroup[] {+function groupItemsByProduct(items: StockItem[], unknownProductLabel: string): StockItemGroup[] {const map = new Map<string, StockItemGroup>()for (const item of items) {const productId = item.variant?.product_id ?? '__unknown__'- const productName = item.variant?.product_name ?? 'Unknown product'+ const productName = item.variant?.product_name ?? unknownProductLabellet group = map.get(productId)if (!group) {group = { productId, productName, items: [], hasLowStock: false }@@ -451,8 +454,8 @@ function ProductGroup({ group, defaultOpen }: { group: StockItemGroup; defaultOp<div className="min-w-0 flex-1"><div className="truncate text-sm font-medium">{group.productName}</div><div className="truncate text-xs text-muted-foreground">- {group.items.length} {group.items.length === 1 ? 'variant' : 'variants'}- {group.hasLowStock && ' · low stock'}+ {t('admin.stock_locations.stock_items.variant_count', { count: group.items.length })}+ {group.hasLowStock && ` · ${t('admin.stock_locations.stock_items.low_stock_marker')}`}</div></div></CollapsibleTrigger>@@ -500,7 +503,7 @@ function StockItemRow({ item }: { item: StockItem }) {const optionsText = variant?.options_textconst sku = variant?.skuconst productId = variant?.product_id- const variantLabel = optionsText || sku || 'Default'+ const variantLabel = optionsText || sku || t('admin.common.default')const isLowStock = count < LOW_STOCK_THRESHOLD && !backorderablefunction save() {diff --git a/packages/dashboard/src/schemas/channel.ts b/packages/dashboard/src/schemas/channel.tsindex c101e28b85..994cc01476 100644--- a/packages/dashboard/src/schemas/channel.ts+++ b/packages/dashboard/src/schemas/channel.ts@@ -1,5 +1,6 @@import type { ChannelCreateParams, ChannelUpdateParams } from '@spree/admin-sdk'import { requiredMessage } from '@spree/dashboard-ui'+import i18n from 'i18next'import { z } from 'zod/v4'// Empty string clears the channel-level override → falls back to store.@@ -15,8 +16,8 @@ export const channelFormSchema = z.object({name: z.string().min(1, { error: requiredMessage('name') }),code: z.string()- .regex(/^[a-z0-9_-]*$/i, {- error: 'Lowercase letters, numbers, hyphens, underscores only',+ .regex(/^[a-z0-9_-]*$/, {+ error: () => i18n.t('admin.pages.channels.validation.code_format'),}).optional(),active: z.boolean(),diff --git a/packages/dashboard/src/schemas/price-list.ts b/packages/dashboard/src/schemas/price-list.tsindex d72769d6a5..0b9ba66f87 100644--- a/packages/dashboard/src/schemas/price-list.ts+++ b/packages/dashboard/src/schemas/price-list.ts@@ -9,6 +9,7 @@ import type {} from '@spree/admin-sdk'import { blankToNull, defaultPreferences } from '@spree/dashboard-core'import { requiredMessage } from '@spree/dashboard-ui'+import i18n from 'i18next'import { z } from 'zod/v4'export const MATCH_POLICIES = ['all', 'any'] as const@@ -78,7 +79,10 @@ export const priceListFormSchema = zif (!v.starts_at || !v.ends_at) return truereturn new Date(v.starts_at) < new Date(v.ends_at)},- { path: ['ends_at'], error: 'Must be after start date.' },+ {+ path: ['ends_at'],+ error: () => i18n.t('admin.products.price_lists.validation.ends_after_starts'),+ },)export type PriceListFormValues = z.infer<typeof priceListFormSchema>