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
Use translations for all Admin UI
Damian Legawiecbbbe191b4d27
diff --git a/packages/admin/src/components/spree/command-palette/command-palette.tsx b/packages/admin/src/components/spree/command-palette/command-palette.tsxindex 8ade1fdf3a..f58c978314 100644--- a/packages/admin/src/components/spree/command-palette/command-palette.tsx+++ b/packages/admin/src/components/spree/command-palette/command-palette.tsx@@ -29,6 +29,7 @@ import {import { useAuth } from '@/hooks/use-auth'import { useCommandPalette } from '@/hooks/use-command-palette'import { useGlobalSearch } from '@/hooks/use-global-search'+import { useTranslation } from '@/lib/i18n'export function CommandPalette() {const { open, setOpen } = useCommandPalette()@@ -40,6 +41,7 @@ export function CommandPalette() {}function CommandPaletteContent({ setOpen }: { setOpen: (open: boolean) => void }) {+ const { t } = useTranslation()const { storeId: rawStoreId } = useParams({ strict: false }) as { storeId?: string }const storeId = rawStoreId ?? 'default'const navigate = useNavigate()@@ -91,7 +93,7 @@ function CommandPaletteContent({ setOpen }: { setOpen: (open: boolean) => void }<CommandInputvalue={input}onValueChange={setInput}- placeholder="Search products, orders, customers… or run a command"+ placeholder={t('admin.components.command_palette.placeholder')}/><CommandList><SearchStatusdiff --git a/packages/admin/src/components/spree/confirm-dialog.tsx b/packages/admin/src/components/spree/confirm-dialog.tsxindex 894a52aedd..0480d2beb3 100644--- a/packages/admin/src/components/spree/confirm-dialog.tsx+++ b/packages/admin/src/components/spree/confirm-dialog.tsx@@ -8,6 +8,7 @@ import {DialogHeader,DialogTitle,} from '@/components/ui/dialog'+import { useTranslation } from '@/lib/i18n'interface ConfirmOptions {title?: string@@ -28,6 +29,7 @@ export function useConfirm(): ConfirmFn {}export function ConfirmProvider({ children }: { children: ReactNode }) {+ const { t } = useTranslation()const [open, setOpen] = useState(false)const [options, setOptions] = useState<ConfirmOptions>({message: '',@@ -59,18 +61,18 @@ export function ConfirmProvider({ children }: { children: ReactNode }) {><DialogContent showCloseButton={false}><DialogHeader>- <DialogTitle>{options.title ?? 'Are you sure?'}</DialogTitle>+ <DialogTitle>{options.title ?? t('admin.components.confirm_dialog.title')}</DialogTitle><DialogDescription>{options.message}</DialogDescription></DialogHeader><DialogFooter><Button variant="outline" onClick={() => handleClose(false)}>- {options.cancelLabel ?? 'Cancel'}+ {options.cancelLabel ?? t('admin.actions.cancel')}</Button><Buttonvariant={options.variant === 'destructive' ? 'destructive' : 'default'}onClick={() => handleClose(true)}>- {options.confirmLabel ?? 'Confirm'}+ {options.confirmLabel ?? t('admin.actions.confirm')}</Button></DialogFooter></DialogContent>diff --git a/packages/admin/src/components/spree/country-combobox.tsx b/packages/admin/src/components/spree/country-combobox.tsxindex cc532c1fc0..6fcd6ae8cc 100644--- a/packages/admin/src/components/spree/country-combobox.tsx+++ b/packages/admin/src/components/spree/country-combobox.tsx@@ -59,7 +59,7 @@ function CountryRow({ country }: { country: CountryOption }) {export function CountryCombobox({value,onValueChange,- placeholder = 'Search countries...',+ placeholder,disabled = false,}: {value: string | null | undefined@@ -67,6 +67,7 @@ export function CountryCombobox({placeholder?: stringdisabled?: boolean}) {+ const { t } = useTranslation()const { countries } = useCountries()const items: CountryOption[] = useMemo(@@ -89,7 +90,10 @@ export function CountryCombobox({// typing the ISO code ("US", "USA") also matches.filter={countryFilter}>- <ComboboxInput placeholder={placeholder} disabled={disabled}>+ <ComboboxInput+ placeholder={placeholder ?? t('admin.components.country_combobox.search_placeholder')}+ disabled={disabled}+ >{/* When a country is picked the InputGroup gets a leading flag —mirrors the dropdown items so the trigger shows the same shape.Hidden while empty so the input doesn't lurch when typing a new@@ -101,7 +105,7 @@ export function CountryCombobox({)}</ComboboxInput><ComboboxContent>- <ComboboxEmpty>No countries found</ComboboxEmpty>+ <ComboboxEmpty>{t('admin.components.country_combobox.empty')}</ComboboxEmpty><ComboboxList>{(country: CountryOption) => (<ComboboxItem key={country.iso} value={country}>diff --git a/packages/admin/src/components/spree/country-state-fields.tsx b/packages/admin/src/components/spree/country-state-fields.tsxindex d1522c90d0..f190483049 100644--- a/packages/admin/src/components/spree/country-state-fields.tsx+++ b/packages/admin/src/components/spree/country-state-fields.tsx@@ -1,5 +1,6 @@import type { State } from '@spree/admin-sdk'import { useMemo } from 'react'+import { useTranslation } from 'react-i18next'import {Combobox,ComboboxContent,@@ -42,7 +43,7 @@ export function StateCombobox({states,value,onValueChange,- placeholder = 'Search states...',+ placeholder,disabled = false,}: {countryIso: string | null | undefined@@ -53,6 +54,7 @@ export function StateCombobox({placeholder?: stringdisabled?: boolean}) {+ const { t } = useTranslation()const items = states as StateOption[]const selected = useMemo(() => items.find((s) => s.abbr === value) ?? null, [items, value])@@ -65,9 +67,12 @@ export function StateCombobox({itemToStringLabel={(s: StateOption | null) => s?.name ?? ''}itemToStringValue={(s: StateOption | null) => s?.abbr ?? ''}>- <ComboboxInput placeholder={placeholder} disabled={disabled} />+ <ComboboxInput+ placeholder={placeholder ?? t('admin.components.state_combobox.search_placeholder')}+ disabled={disabled}+ /><ComboboxContent>- <ComboboxEmpty>No states found</ComboboxEmpty>+ <ComboboxEmpty>{t('admin.components.state_combobox.empty')}</ComboboxEmpty><ComboboxList>{(state: StateOption) => (<ComboboxItem key={state.abbr} value={state}>diff --git a/packages/admin/src/components/spree/currency-select.tsx b/packages/admin/src/components/spree/currency-select.tsxindex 0562f0ecc2..a521fdf224 100644--- a/packages/admin/src/components/spree/currency-select.tsx+++ b/packages/admin/src/components/spree/currency-select.tsx@@ -6,6 +6,7 @@ import {SelectTrigger,SelectValue,} from '@/components/ui/select'+import { useTranslation } from '@/lib/i18n'import { useStore } from '@/providers/store-provider'interface CurrencySelectProps {@@ -60,6 +61,7 @@ export function CurrencySelect({required,disabled,}: CurrencySelectProps) {+ const { t } = useTranslation()const { currencies, defaultCurrency, defaultLocale } = useStore()const [internalValue, setInternalValue] = useState(defaultValue ?? defaultCurrency)const isControlled = controlledValue !== undefined@@ -94,7 +96,7 @@ export function CurrencySelect({{/* Base UI's `<SelectValue>` defaults to rendering the raw `value`(the bare ISO code). Use the children render-prop so thetrigger shows the same `CODE — Full Name` as the items. */}- <SelectValue placeholder="Select a currency">+ <SelectValue placeholder={t('admin.components.currency_select.placeholder')}>{(v) => (v ? renderOption(v as string) : (v as string))}</SelectValue></SelectTrigger>diff --git a/packages/admin/src/components/spree/custom-fields/value-input.tsx b/packages/admin/src/components/spree/custom-fields/value-input.tsxindex 409536a282..32d0933aab 100644--- a/packages/admin/src/components/spree/custom-fields/value-input.tsx+++ b/packages/admin/src/components/spree/custom-fields/value-input.tsx@@ -3,6 +3,7 @@ import { Input } from '@/components/ui/input'import { RichTextEditor } from '@/components/ui/rich-text-editor'import { Switch } from '@/components/ui/switch'import { Textarea } from '@/components/ui/textarea'+import { useTranslation } from '@/lib/i18n'type FieldType = 'short_text' | 'long_text' | 'rich_text' | 'number' | 'boolean' | 'json'@@ -14,6 +15,7 @@ interface ValueInputProps {}export function ValueInput({ control, name, fieldType, id }: ValueInputProps) {+ const { t } = useTranslation()return (<Controllername={name}@@ -70,7 +72,7 @@ export function ValueInput({ control, name, fieldType, id }: ValueInputProps) {id={id}rows={6}className="font-mono text-xs"- placeholder='{"key": "value"}'+ placeholder={t('admin.components.custom_fields.json_placeholder')}value={field.value === null || field.value === undefined? ''diff --git a/packages/admin/src/components/spree/preferences-form.tsx b/packages/admin/src/components/spree/preferences-form.tsxindex faf413ed38..d6a0a4c21a 100644--- a/packages/admin/src/components/spree/preferences-form.tsx+++ b/packages/admin/src/components/spree/preferences-form.tsx@@ -8,6 +8,7 @@ import { Field, FieldGroup, FieldLabel } from '@/components/ui/field'import { Input } from '@/components/ui/input'import { Switch } from '@/components/ui/switch'import { Textarea } from '@/components/ui/textarea'+import { useTranslation } from '@/lib/i18n'/*** Hydrates a `preferences` hash with each field's default. Used to seed@@ -104,6 +105,7 @@ export function PreferenceField({onChange,redactPasswords,}: PreferenceFieldProps) {+ const { t } = useTranslation()const id = `preference-${field.key}`const displayLabel = label ?? humanizeKey(field.key)@@ -184,7 +186,7 @@ export function PreferenceField({<Inputid={id}value={Array.isArray(value) ? value.join(', ') : ((value as string) ?? '')}- placeholder="comma-separated"+ placeholder={t('admin.components.preferences_form.comma_separated_hint')}onChange={(e) =>onChange(e.target.value@@ -194,7 +196,9 @@ export function PreferenceField({)}/>- <span className="text-xs text-muted-foreground">Separate values with commas.</span>+ <span className="text-xs text-muted-foreground">+ {t('admin.components.preferences_form.comma_separated_hint')}+ </span></Field>)@@ -259,6 +263,7 @@ function TiersEditor({value: unknownonChange: (next: Record<string, number>) => void}) {+ const { t } = useTranslation()const idPrefix = useId()// Seed once from the initial value. Subsequent rerenders driven by// parent state (e.g. another preference field changes) keep our row@@ -296,16 +301,20 @@ function TiersEditor({return (<Field>- <FieldLabel>Tiers</FieldLabel>+ <FieldLabel>{t('admin.components.preferences_form.tiers.label')}</FieldLabel><div className="space-y-2">{rows.length === 0 ? (<p className="text-xs text-muted-foreground">- No tiers yet. The base rate applies until you add a tier.+ {t('admin.components.preferences_form.tiers.empty')}</p>) : (<div className="grid grid-cols-[1fr_1fr_auto] gap-2">- <span className="text-xs font-medium text-muted-foreground">Order total ≥</span>- <span className="text-xs font-medium text-muted-foreground">Discount</span>+ <span className="text-xs font-medium text-muted-foreground">+ {t('admin.components.preferences_form.tiers.header_threshold')}+ </span>+ <span className="text-xs font-medium text-muted-foreground">+ {t('admin.components.preferences_form.tiers.header_value')}+ </span><span />{rows.map((row) => (<TierRow@@ -319,7 +328,7 @@ function TiersEditor({)}<Button type="button" variant="outline" size="sm" onClick={addRow}><PlusIcon className="size-4" />- Add tier+ {t('admin.components.preferences_form.tiers.add_tier')}</Button></div></Field>@@ -335,6 +344,7 @@ function TierRow({onChange: (patch: Partial<Pick<TierRowState, 'threshold' | 'value'>>) => voidonRemove: () => void}) {+ const { t } = useTranslation()return (<><Input@@ -358,7 +368,7 @@ function TierRow({size="icon-sm"variant="ghost"onClick={onRemove}- aria-label="Remove tier"+ aria-label={t('admin.components.preferences_form.tiers.remove_tier')}className="text-destructive hover:bg-destructive/10 hover:text-destructive"><TrashIcon className="size-4" />diff --git a/packages/admin/src/components/spree/products/media-edit-sheet.tsx b/packages/admin/src/components/spree/products/media-edit-sheet.tsxindex 9e6da99d9f..63e42e9d0a 100644--- a/packages/admin/src/components/spree/products/media-edit-sheet.tsx+++ b/packages/admin/src/components/spree/products/media-edit-sheet.tsx@@ -7,6 +7,7 @@ import { Field, FieldLabel } from '@/components/ui/field'import { Sheet, SheetContent, SheetFooter, SheetHeader, SheetTitle } from '@/components/ui/sheet'import { Textarea } from '@/components/ui/textarea'import { useUpdateProductMedia } from '@/hooks/use-product-media'+import { useTranslation } from '@/lib/i18n'type Props = {productId: string@@ -17,6 +18,7 @@ type Props = {}export function MediaEditSheet({ productId, mediaItem, variants, open, onOpenChange }: Props) {+ const { t } = useTranslation()const updateMedia = useUpdateProductMedia(productId)const [alt, setAlt] = useState('')@@ -127,7 +129,7 @@ export function MediaEditSheet({ productId, mediaItem, variants, open, onOpenChavalue={alt}onChange={(e) => setAlt(e.target.value)}rows={3}- placeholder="Describe the image for accessibility and SEO"+ placeholder={t('admin.components.media.alt_placeholder')}/></Field>diff --git a/packages/admin/src/components/spree/table-toolbar.tsx b/packages/admin/src/components/spree/table-toolbar.tsxindex cf2a04b8e4..1fcb79f349 100644--- a/packages/admin/src/components/spree/table-toolbar.tsx+++ b/packages/admin/src/components/spree/table-toolbar.tsx@@ -34,6 +34,7 @@ import {SelectValue,} from '@/components/ui/select'import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'+import { useTranslation } from '@/lib/i18n'import {type ColumnDef,type FilterRule,@@ -133,7 +134,7 @@ export function TableToolbar({onVisibleColumnsChange,search,onSearchChange,- searchPlaceholder = 'Search...',+ searchPlaceholder,sort,onSortChange,filters,@@ -143,6 +144,7 @@ export function TableToolbar({actions,hideSort = false,}: TableToolbarProps) {+ const { t } = useTranslation()const [filterOpen, setFilterOpen] = useState(false)const searchRef = useRef<HTMLInputElement>(null)@@ -164,7 +166,9 @@ export function TableToolbar({<SearchIcon className="size-4 text-muted-foreground shrink-0" /><inputref={searchRef}- placeholder={searchPlaceholder}+ placeholder={+ searchPlaceholder ?? t('admin.components.table_toolbar.search_placeholder')+ }value={search}onChange={(e) => onSearchChange(e.target.value)}className="h-full w-full border-0 bg-transparent p-0 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-0"@@ -201,7 +205,9 @@ export function TableToolbar({</Button></PopoverTrigger></TooltipTrigger>- <TooltipContent>Filters</TooltipContent>+ <TooltipContent>+ {t('admin.components.table_toolbar.filters_button')}+ </TooltipContent></Tooltip><PopoverContent align="end" className="w-[480px] p-0"><FilterPanel@@ -341,6 +347,7 @@ function CurrencyFilterPicker({operator: stringonChange: (next: string) => void}) {+ const { t } = useTranslation()const { currencies } = useStore()const items = useMemo(() => currencies.map((code) => ({ value: code, label: code })),@@ -362,7 +369,7 @@ function CurrencyFilterPicker({return (<Select items={items} value={value || undefined} onValueChange={(val) => onChange(val)}><SelectTrigger size="sm" className="flex-1">- <SelectValue placeholder="Select…" />+ <SelectValue placeholder={t('admin.components.table_toolbar.filter_select_placeholder')} /></SelectTrigger><SelectContent>{items.map((opt) => (@@ -547,6 +554,7 @@ function FilterPanel({onApply: (filters: FilterRule[]) => voidonClose: () => void}) {+ const { t } = useTranslation()const [draft, setDraft] = useState<FilterRule[]>(initialFilters)// Stable `{ value, label }` array for the field-picker `<Select items>`.// Building it inline per render produces a new reference each time, which@@ -590,7 +598,9 @@ function FilterPanel({return (<div className="flex flex-col"><div className="flex items-center justify-between border-b px-3 py-2">- <span className="text-sm font-medium">Filters</span>+ <span className="text-sm font-medium">+ {t('admin.components.table_toolbar.filters_button')}+ </span><button type="button" onClick={onClose} className="p-1 rounded hover:bg-muted"><XIcon className="size-3.5" /></button>@@ -667,7 +677,9 @@ function FilterPanel({onValueChange={(val) => updateFilter(filter.id, { value: val })}><SelectTrigger size="sm" className="flex-1">- <SelectValue placeholder="Select..." />+ <SelectValue+ placeholder={t('admin.components.table_toolbar.filter_select_placeholder')}+ /></SelectTrigger><SelectContent>{col.filterOptions.map((opt) => (@@ -690,7 +702,9 @@ function FilterPanel({onValueChange={(val) => updateFilter(filter.id, { value: val })}><SelectTrigger size="sm" className="flex-1">- <SelectValue placeholder="Select..." />+ <SelectValue+ placeholder={t('admin.components.table_toolbar.filter_select_placeholder')}+ /></SelectTrigger><SelectContent><SelectItem value="true">Yes</SelectItem>@@ -706,14 +720,14 @@ function FilterPanel({<StoreDatePickervalue={filter.value || null}onChange={(next) => updateFilter(filter.id, { value: next ?? '' })}- placeholder="Pick a date"+ placeholder={t('admin.components.table_toolbar.filter_date_placeholder')}/></div>) : (<Inputtype={col?.filterType === 'number' ? 'number' : 'text'}className="flex-1 py-1 px-2 text-sm h-7"- placeholder="Value..."+ placeholder={t('admin.components.table_toolbar.filter_text_placeholder')}value={filter.value}onChange={(e) => updateFilter(filter.id, { value: e.target.value })}/>diff --git a/packages/admin/src/locales/en.json b/packages/admin/src/locales/en.jsonindex deb463736a..daa4a6a731 100644--- a/packages/admin/src/locales/en.json+++ b/packages/admin/src/locales/en.json@@ -1,13 +1,127 @@{"admin": {"actions": {+ "add": "Add",+ "cancel": "Cancel",+ "close": "Close",+ "confirm": "Confirm","create": "Create",- "save": "Save",- "saving": "Saving…","creating": "Creating…",- "cancel": "Cancel","delete": "Delete",- "generate": "Generate"+ "deleting": "Deleting…",+ "edit": "Edit",+ "generate": "Generate",+ "remove": "Remove",+ "save": "Save",+ "saving": "Saving…",+ "search": "Search",+ "sign_in": "Sign in",+ "signing_in": "Signing in…",+ "view_all": "View all",+ "view_details": "View details",+ "copy": "Copy",+ "copied": "Copied!",+ "export": "Export",+ "exporting": "Exporting…",+ "import": "Import",+ "invite": "Invite",+ "send": "Send",+ "send_invitation": "Send invitation",+ "sending": "Sending…",+ "reset": "Reset",+ "show": "Show",+ "hide": "Hide"+ },+ "common": {+ "loading": "Loading…",+ "no_results": "No results",+ "optional": "Optional",+ "required": "Required",+ "yes": "Yes",+ "no": "No",+ "or": "or",+ "and": "and",+ "all": "All",+ "none": "None",+ "page_of": "Page {{page}} of {{total}}",+ "prev": "Prev",+ "next": "Next",+ "select_placeholder": "Select…",+ "search_placeholder": "Search…",+ "pick_date": "Pick a date",+ "comma_separated_hint": "Separate values with commas.",+ "are_you_sure": "Are you sure?",+ "remove_question": "Remove?",+ "deleted": "Deleted",+ "unsaved_changes": "You have unsaved changes."+ },+ "messages": {+ "saved": "Saved",+ "created": "Created",+ "updated": "Updated",+ "removed": "Removed",+ "settings_updated": "Settings updated",+ "store_settings_updated": "Store settings updated",+ "invitation_sent": "Invitation sent",+ "invitation_resent": "Invitation resent",+ "invitation_accepted": "Welcome to Spree",+ "key_created": "Key created",+ "key_revoked": "Key revoked",+ "product_saved": "Product saved",+ "product_created": "Product created",+ "product_deleted": "Product deleted",+ "order_saved": "Order saved",+ "customer_saved": "Customer saved",+ "customer_deleted": "Customer deleted",+ "payment_method_saved": "Payment method saved",+ "tax_category_saved": "Tax category saved",+ "stock_location_saved": "Stock location saved",+ "promotion_created": "Promotion created",+ "promotion_saved": "Promotion saved",+ "promotion_deleted": "Promotion deleted",+ "gift_card_created": "Gift card created",+ "address_saved": "Address saved",+ "copied_to_clipboard": "Copied to clipboard"+ },+ "errors": {+ "required": "This field is required",+ "generic": "Something went wrong",+ "failed_to_load": "Failed to load",+ "failed_to_save": "Failed to save",+ "failed_to_update": "Failed to update",+ "failed_to_create": "Failed to create",+ "failed_to_delete": "Failed to delete",+ "failed_to_load_customer": "Failed to load customer",+ "failed_to_load_order": "Failed to load order",+ "failed_to_load_product": "Failed to load product",+ "failed_to_send_invitation": "Failed to send invitation",+ "failed_to_revoke_key": "Failed to revoke key",+ "failed_to_update_store": "Failed to update store settings",+ "failed_to_update_staff": "Failed to update staff",+ "network": "Network error — please retry",+ "unauthorized": "You don't have permission to do that",+ "not_found": "Not found"+ },+ "branding": { "app_name": "Spree Admin", "powered_by": "Powered by Spree Commerce" },+ "nav": {+ "home": "Home",+ "orders": "Orders",+ "draft_orders": "Draft Orders",+ "products": "Products",+ "price_lists": "Price Lists",+ "categories": "Categories",+ "options": "Options",+ "transfers": "Transfers",+ "customers": "Customers",+ "customer_groups": "Groups",+ "promotions": "Promotions",+ "gift_cards": "Gift Cards",+ "reports": "Reports",+ "settings": "Settings"+ },+ "auth": {+ "login": { "title": "Welcome back", "subtitle": "Sign in to your admin account" },+ "logout": "Sign out"},"fields": {"name": { "label": "Name" },@@ -41,7 +155,15 @@"meta_title": { "label": "Meta title" },"meta_description": { "label": "Meta description" },"tax_category_id": { "label": "Tax category" },-+ "status": { "label": "Status" },+ "created_at": { "label": "Created at" },+ "updated_at": { "label": "Updated at" },+ "completed_at": { "label": "Completed at" },+ "total": { "label": "Total" },+ "subtotal": { "label": "Subtotal" },+ "tax": { "label": "Tax" },+ "shipping": { "label": "Shipping" },+ "discount": { "label": "Discount" },"promotion": {"name": { "placeholder": "Summer Sale" },"description": { "placeholder": "Internal description (optional)" },@@ -62,7 +184,6 @@"usage_limit": { "label": "Usage limit", "placeholder": "Unlimited" },"match_policy": { "label": "Match policy" }},-"custom_field_definition": {"label": { "label": "Label", "placeholder": "e.g. Material" },"namespace": { "label": "Namespace", "placeholder": "custom" },@@ -70,7 +191,6 @@"field_type": { "label": "Type" },"storefront_visible": { "label": "Visible on storefront" }},-"tax_category": {"name": { "placeholder": "e.g. Reduced rate" },"tax_code": {@@ -83,17 +203,14 @@"help": "Setting this demotes the previous default. Products without an explicit category fall back to this one."}},-"invitation_acceptance": {"password": { "label": "Password" },"password_confirmation": { "label": "Confirm password" }},-"customer_group": {"name": { "placeholder": "e.g. VIP customers" },"description": { "placeholder": "Optional internal description" }},-"stock_location": {"name": { "placeholder": "Brooklyn warehouse" },"admin_name": {@@ -128,26 +245,20 @@"placeholder": "Where the customer should go to collect their order."}},-"payment_method": {"type": { "label": "Provider" },"name": { "placeholder": "e.g. Credit card (Stripe)" },"description": { "placeholder": "Customer-facing description shown at checkout" },"storefront_visible": { "label": "Visible on storefront" },- "active": {- "label": "Active",- "help": "Inactive methods are hidden from checkout."- },+ "active": { "label": "Active", "help": "Inactive methods are hidden from checkout." },"auto_capture": {"label": "Auto-capture","help": "Capture funds automatically on authorization. When off, you must capture manually."}},-"login": {"email": { "placeholder": "[email protected]" }},-"option_type": {"name": {"label": "Internal name",@@ -168,23 +279,17 @@"help": "Show this option as a filter in storefront product listings."}},-"option_value": {"name": { "label": "Internal name", "placeholder": "e.g. small" },"label": { "label": "Label", "placeholder": "e.g. Small" },"color_code": { "label": "Color" },"image": { "label": "Image" }},-"api_key": {- "name": {- "label": "Name",- "placeholder": "Backend integration, Storefront prod, …"- },+ "name": { "label": "Name", "placeholder": "Backend integration, Storefront prod, …" },"key_type": { "label": "Type" },"scopes": { "label": "Scopes" }},-"store": {"name": { "label": "Store name" },"preferred_admin_locale": {@@ -195,18 +300,15 @@"preferred_unit_system": { "label": "Unit system" },"preferred_weight_unit": { "label": "Weight unit" }},-"product": {"name": { "placeholder": "Product name" },"description": { "placeholder": "Write a product description…" },- "status": { "label": "Status" },"make_active_at": { "label": "Make active at" },"available_on": { "label": "Available on" },"discontinue_on": { "label": "Discontinue on" },"category_ids": { "label": "Categories" },"tags": { "label": "Tags" }},-"gift_card": {"code": {"label": "Code",@@ -221,21 +323,7 @@"help": "1 issues a single card. More than 1 issues a batch with auto-generated codes."}},-- "invitation": {- "email": { "label": "Email" },- "role_id": { "label": "Role" }- },-- "admin_user": {- "role_ids": { "label": "Roles" }- },-"customer": {- "email": { "label": "Email" },- "first_name": { "label": "First name" },- "last_name": { "label": "Last name" },- "phone": { "label": "Phone" },"tags": { "label": "Tags" },"accepts_email_marketing": { "label": "Subscribed to marketing" },"internal_note": {@@ -243,27 +331,20 @@"placeholder": "Staff-only context about this customer…"}},-"address": {"label": { "label": "Label", "placeholder": "e.g. Home, Office" },- "first_name": { "label": "First name" },- "last_name": { "label": "Last name" },"address1": { "label": "Address" },"address2": { "label": "Apartment, suite, etc." },- "city": { "label": "City" },"postal_code": { "label": "Postal code" },- "phone": { "label": "Phone" },"is_default_billing": { "label": "Default billing address" },"is_default_shipping": { "label": "Default shipping address" }},-"store_credit": {"amount": { "label": "Amount" },"currency": { "label": "Currency" },"category_id": { "label": "Category" },"memo": { "label": "Memo", "placeholder": "Reason for issuing this credit" }},-"order": {"email": { "label": "Or use a guest email", "placeholder": "[email protected]" },"customer_note": { "label": "Customer note (visible to customer)" },@@ -271,6 +352,39 @@"coupon_code": { "label": "Coupon code", "placeholder": "Optional" }}},+ "components": {+ "currency_select": { "placeholder": "Select a currency" },+ "country_combobox": {+ "search_placeholder": "Search countries…",+ "empty": "No countries found"+ },+ "state_combobox": { "search_placeholder": "Search states…", "empty": "No states found" },+ "command_palette": { "placeholder": "Search products, orders, customers…" },+ "preferences_form": {+ "comma_separated_hint": "Separate values with commas.",+ "tiers": {+ "label": "Tiers",+ "header_threshold": "Order total ≥",+ "header_value": "Discount",+ "empty": "No tiers yet. The base rate applies until you add a tier.",+ "add_tier": "Add tier",+ "remove_tier": "Remove tier"+ }+ },+ "confirm_dialog": { "title": "Are you sure?" },+ "table_toolbar": {+ "search_placeholder": "Search…",+ "filter_select_placeholder": "Select…",+ "filter_date_placeholder": "Pick a date",+ "filter_text_placeholder": "Filter…",+ "filters_button": "Filters"+ },+ "media": {+ "alt_placeholder": "Describe the image for accessibility and SEO",+ "remove_tooltip": "Remove image"+ },+ "custom_fields": { "json_placeholder": "{ \"example\": \"value\" }" }+ },"promotions": {"rules": {"country": {@@ -324,8 +438,580 @@}}},- "errors": {- "required": "This field is required"- }+ "pages": {+ "home": {+ "top_products": "Top Products",+ "top_products_description": "Best-selling products in your store."+ },+ "login": { "title": "Welcome back", "subtitle": "Sign in to your admin account" },+ "staff": {+ "title": "Staff",+ "subtitle": "Manage admin teammates and roles",+ "invite_cta": "Invite teammate",+ "members_section": "Members",+ "invitations_section": "Pending invitations",+ "empty": "No staff yet",+ "empty_description": "Invite a teammate to collaborate on this store.",+ "table": {+ "member": "Member",+ "roles": "Roles",+ "email": "Email",+ "role": "Role",+ "expires": "Expires"+ },+ "invite_sheet": {+ "title": "Invite teammate",+ "description": "We'll email them a link to set their password."+ },+ "edit_sheet": { "title": "Edit teammate" },+ "actions": { "resend": "Resend", "revoke": "Revoke", "remove": "Remove from staff" },+ "messages": {+ "revoked": "Invitation revoked",+ "updated": "Staff updated",+ "removed": "Removed from staff"+ }+ },+ "customers": {+ "new_cta": "New Customer",+ "groups_cta": "Customer groups",+ "groups": {+ "title": "Customer groups",+ "add_cta": "Add customer group",+ "edit_sheet_title": "Edit customer group",+ "add_sheet_title": "Add customer group"+ },+ "detail": {+ "stat_total_spent": "Total spent",+ "stat_orders": "Orders",+ "stat_avg_order_value": "Avg order value",+ "section_profile": "Profile",+ "section_addresses": "Addresses",+ "section_orders": "Orders",+ "section_store_credit": "Store credit",+ "section_internal_note": "Internal note",+ "section_tags": "Tags",+ "addresses_empty": "No addresses on file.",+ "orders_empty": "No orders yet.",+ "store_credit_empty": "No store credit issued.",+ "add_address": "Add address",+ "edit_address": "Edit address",+ "issue_credit": "Issue store credit",+ "edit_credit": "Edit store credit"+ }+ },+ "orders": {+ "drafts_title": "Draft Orders",+ "new": {+ "title": "New Order",+ "section_customer": "Customer",+ "section_items": "Items",+ "section_billing": "Billing",+ "section_notes": "Notes",+ "section_summary": "Summary",+ "add_line_item": "Add line item",+ "select_customer": "Select customer",+ "search_variant": "Search variant…"+ },+ "detail": {+ "section_summary": "Summary",+ "section_items": "Items",+ "section_payments": "Payments",+ "section_shipments": "Shipments",+ "section_customer": "Customer",+ "section_shipping_address": "Shipping address",+ "section_billing_address": "Billing address",+ "section_internal_note": "Internal note",+ "section_customer_note": "Customer note",+ "section_history": "History",+ "summary": {+ "created_by": "Created by",+ "created_at": "Created at",+ "completed_at": "Completed at",+ "market": "Market",+ "locale": "Locale",+ "currency": "Currency",+ "channel": "Channel",+ "ip_address": "IP address"+ },+ "empty_payments": "No payments yet.",+ "empty_shipments": "No shipments yet.",+ "empty_history": "No history yet.",+ "actions": {+ "approve": "Approve",+ "cancel": "Cancel order",+ "resume": "Resume",+ "refund": "Refund",+ "capture": "Capture",+ "void": "Void",+ "mark_paid": "Mark as paid",+ "ship": "Mark as shipped"+ },+ "dialogs": {+ "cancel_title": "Cancel order?",+ "approve_title": "Approve order?",+ "refund_title": "Refund payment?"+ }+ }+ },+ "products": {+ "section_basics": "Basics",+ "section_media": "Media",+ "section_pricing": "Pricing",+ "section_inventory": "Inventory",+ "section_seo": "SEO",+ "section_categorization": "Categorization",+ "section_organization": "Organization",+ "section_variants": "Variants",+ "section_status": "Status",+ "section_custom_fields": "Custom fields",+ "media_empty": "No media yet.",+ "media_upload": "Upload media",+ "variants_empty": "No variants yet.",+ "status_options": { "draft": "Draft", "active": "Active", "archived": "Archived" },+ "inventory": {+ "out_of_stock": "Out of stock",+ "on_backorder": "On backorder",+ "in_stock": "{{count}} in stock"+ },+ "transfers": {+ "sheet_title": "Stock transfer",+ "section_from": "From",+ "section_to": "To",+ "section_items": "Items",+ "items_empty": "No items yet."+ },+ "options": {+ "sheet_title_create": "Create option type",+ "sheet_title_edit": "Edit option type",+ "values_section": "Values",+ "values_empty": "No values yet.",+ "add_value": "Add value",+ "table": { "values": "Values" }+ }+ },+ "settings": {+ "store": {+ "title": "Store settings",+ "subtitle": "General configuration and store-wide defaults.",+ "tab_general": "General",+ "tab_standards": "Standards and formats"+ },+ "api_keys": {+ "title": "API keys",+ "subtitle": "Authorize integrations and apps to call the Admin API.",+ "publishable_section": "Publishable keys",+ "publishable_help": "Used by your storefront. Safe to expose in client-side code.",+ "secret_section": "Secret keys",+ "secret_help": "Server-to-server only. Scope each key to the operations it needs.",+ "new_cta": "New key",+ "empty_publishable": "No publishable keys yet.",+ "empty_secret": "No secret keys yet.",+ "table": {+ "name": "Name",+ "key": "Key",+ "scopes": "Scopes",+ "created_at": "Created at",+ "last_used_at": "Last used"+ },+ "save_secret_title": "Save your secret key",+ "save_secret_description": "Copy this value now — we won't show it again.",+ "scope_badge": { "full_access": "Full access", "read_all": "Read all" }+ },+ "payment_methods": {+ "add_sheet_title": "Add payment method",+ "edit_sheet_title": "Edit payment method"+ },+ "tax_categories": {+ "add_sheet_title": "Add tax category",+ "edit_sheet_title": "Edit tax category"+ },+ "stock_locations": {+ "add_sheet_title": "Add stock location",+ "edit_sheet_title": "Edit stock location",+ "section_address": "Address",+ "search_placeholder": "Search stock locations…"+ }+ },+ "promotions": {+ "gift_cards": {+ "new_sheet_title": "New gift card",+ "edit_sheet_title": "Gift card",+ "new_cta": "New gift card",+ "batch_section": "Batch",+ "create_batch_cta": "Create {{count}} gift cards",+ "status_options": { "redeemed": "Redeemed", "expired": "Expired", "void": "Void" },+ "sheet": {+ "create_description": "Issue a single gift card or generate a batch with auto-generated codes.",+ "edit_description": "Update the gift card's customer or expiry. The code and amount are immutable once issued."+ },+ "delete_confirm": {+ "title": "Delete gift card?",+ "message": "This will void the gift card and prevent it from being redeemed."+ },+ "validation": {+ "amount_positive": "Amount must be greater than zero",+ "amount_required": "Amount is required",+ "prefix_required": "Prefix is required for batches"+ }+ }+ }+ },+ "validation": {+ "required": "{{field}} is required",+ "min_length": "{{field}} must be at least {{count}} characters",+ "passwords_dont_match": "Passwords do not match",+ "invalid_email_or_password": "Invalid email or password",+ "invalid_password": "Invalid password",+ "password_required": "Password is required",+ "first_name_required": "First name is required",+ "last_name_required": "Last name is required"+ },+ "invitation": {+ "missing_token_title": "Missing invitation token",+ "missing_token_message": "This link looks incomplete. Ask whoever invited you to send it again.",+ "loading": "Loading invitation…",+ "not_found_title": "Invitation not found",+ "not_found_message": "This invitation has expired, been revoked, or already been accepted. Ask the inviter to send a new one.",+ "generic_error_title": "Could not load invitation",+ "generic_error_message": "Something went wrong. Please try again.",+ "join_store": "Join {{store}}",+ "join_default": "Join this store",+ "invited_by": "{{email}} invited you",+ "invited_generic": "You have been invited",+ "invited_as_role": " as {{role}}",+ "sign_in_to_accept": ". Sign in to accept.",+ "create_to_accept": ". Create your account to accept.",+ "could_not_accept": "Could not accept invitation",+ "accepting": "Accepting…",+ "sign_in_and_accept": "Sign in & accept",+ "create_and_accept": "Create account & accept"+ },+ "staff": {+ "actions": {+ "copy_invitation_link": "Copy invitation link",+ "invitation_link_copied": "Invitation link copied"+ },+ "confirm": {+ "remove_title": "Remove from store?",+ "remove_message": "{{name}} will lose access to this store.",+ "revoke_title": "Revoke invitation?",+ "revoke_message": "{{email}} will no longer be able to accept this invitation."+ },+ "errors": {+ "failed_to_remove": "Failed to remove staff",+ "failed_to_resend": "Failed to resend invitation",+ "failed_to_revoke": "Failed to revoke invitation"+ },+ "invite": {+ "email_placeholder": "[email protected]",+ "roles_loading": "Loading roles…",+ "roles_placeholder": "Select a role",+ "no_roles": "No roles available."+ },+ "edit": { "roles_label": "Roles for this store" },+ "actions_aria": "Actions"+ },+ "api_keys": {+ "empty_description": "Create one to get started.",+ "create_sheet_title": "Create API key",+ "create_sheet_description": "Choose a key type, then pick the scopes it can use.",+ "key_type": {+ "secret_title": "Secret key",+ "secret_description": "Server-to-server. Each key carries an explicit list of scopes.",+ "publishable_title": "Publishable key",+ "publishable_description": "Safe to expose in client-side code. Grants public/guest access."+ },+ "scope_picker": {+ "resource_header": "Resource",+ "read_header": "Read",+ "write_header": "Write",+ "read_aria": "Read {{resource}}",+ "write_aria": "Write {{resource}}",+ "full_access_label": "Full access (write_all)",+ "read_all_label": "Read all (read_all)"+ },+ "warning_treat_like_password": "Treat this key like a password. Store it in your secrets manager — we can't show it again.",+ "done": "Done",+ "revoke_confirm": {+ "title": "Revoke key?",+ "message": "Any integration using this key will stop working immediately."+ },+ "delete_confirm": {+ "title": "Delete key?",+ "message": "This permanently removes the key. Prefer revoke if you might restore access later."+ },+ "dropdown": {+ "revoke": "Revoke key",+ "delete": "Delete key",+ "copy_token_aria": "Copy token"+ },+ "badge": { "revoked": "Revoked", "never_used": "Never" },+ "errors": { "failed_to_delete": "Failed to delete key" },+ "by_email": "by {{email}}"+ },+ "customers": {+ "groups": {+ "bulk_add_action": "Add to group…",+ "bulk_remove_action": "Remove from group…",+ "bulk_added": "Added {{count}} customers to groups",+ "bulk_removed": "Removed {{count}} customers from groups",+ "bulk_add_failed": "Failed to add customers to groups",+ "bulk_remove_failed": "Failed to remove customers from groups",+ "picker": {+ "add_title": "Add to groups",+ "add_description": "Pick the groups to add these customers to.",+ "remove_title": "Remove from groups",+ "remove_description": "Pick the groups to remove these customers from."+ },+ "view_members": "View members",+ "count_one": "{{count}} customer",+ "count_other": "{{count}} customers",+ "create_description": "Create a customer group to segment your customers for promotions, analytics, or marketing.",+ "edit_description": "Update the name or description.",+ "delete_confirm": {+ "title": "Delete customer group?",+ "message": "{{name}} will be removed. Customers in this group are not deleted."+ }+ },+ "detail": {+ "delete_label": "Delete customer",+ "edit_profile_description": "Update the customer's profile information.",+ "subscribed_to_marketing": "Subscribed to marketing",+ "not_subscribed_to_marketing": "Not subscribed to marketing",+ "customer_since": "Customer since",+ "last_order_placed": "Last order placed",+ "orders_table": {+ "order": "Order",+ "date": "Date",+ "status": "Status",+ "total": "Total"+ },+ "no_internal_notes": "No internal notes",+ "address": {+ "default_billing": "Default billing",+ "default_shipping": "Default shipping",+ "set_default_billing": "Set as default billing",+ "set_default_shipping": "Set as default shipping",+ "delete_confirm_message": "Delete this address?"+ },+ "store_credit": {+ "title": "Store credit",+ "empty": "No store credits issued",+ "table": {+ "amount": "Amount",+ "used": "Used",+ "remaining": "Remaining",+ "category": "Category",+ "memo": "Memo"+ },+ "delete_confirm_message": "Delete this store credit?",+ "edit_description": "Adjust the amount, category, or memo. Used balance cannot be edited.",+ "add_description": "Issue store credit to this customer's account."+ }+ },+ "new_sheet_description": "Customers created here have no password set. They'll get a magic link the first time they sign in."+ },+ "orders": {+ "new": {+ "use_default_addresses": "Use customer's default billing & shipping addresses",+ "add_variant": "Add a variant",+ "section_discount": "Discount",+ "items_table": { "variant": "Variant", "sku": "SKU", "qty": "Qty" },+ "creates_draft_note": "Creates a draft order. Add payments and complete it after creation."+ },+ "detail": {+ "load_failed_message": "We couldn't load order {{orderId}}.",+ "confirm": {+ "complete_message": "Complete this draft order now?",+ "approve_message": "Approve this order?",+ "resume_message": "Resume this canceled order?",+ "cancel_message": "Are you sure you want to cancel this order?",+ "remove_item_message": "Remove this item from the order?",+ "ship_message": "Ship this fulfillment?",+ "cancel_shipment_message": "Cancel this fulfillment?",+ "capture_message": "Capture this payment?",+ "void_message": "Void this payment?",+ "remove_gift_card_message": "Remove this gift card from the order?",+ "remove_store_credit_message": "Remove store credit from the order?"+ },+ "dropdown": {+ "complete_order": "Complete Order",+ "preview_order": "Preview Order",+ "resend_confirmation": "Resend Confirmation",+ "edit_quantity": "Edit Quantity",+ "cancel_shipment": "Cancel Shipment",+ "void_payment": "Void Payment"+ },+ "messages": {+ "canceled": "Order canceled",+ "completed": "Order completed",+ "approved": "Order approved",+ "resumed": "Order resumed",+ "shipped": "Fulfillment shipped",+ "captured": "Payment captured",+ "voided": "Payment voided"+ },+ "variant_search": {+ "description": "Search for a product variant to add to this order.",+ "label": "Search variant",+ "empty": "No variants found",+ "sku_prefix": "SKU"+ },+ "edit_quantity": {+ "title": "Edit Quantity",+ "description": "Set the quantity for this line item."+ },+ "items_table": {+ "item": "Item",+ "price": "Price",+ "qty": "Qty",+ "tax": "Tax",+ "discount": "Discount",+ "total": "Total"+ },+ "tracking": {+ "label": "Tracking Number",+ "description": "Update the tracking number for this shipment.",+ "prefix": "Tracking",+ "shipped_prefix": "Shipped"+ },+ "payments_table": {+ "number": "Number",+ "method": "Method",+ "state": "State",+ "amount": "Amount"+ },+ "payment_form": {+ "description": "Charge a payment method against this order.",+ "method_label": "Payment method",+ "method_placeholder": "Choose a payment method",+ "source_label": "Source",+ "amount_help": "Leave blank to default to the outstanding balance.",+ "capture_immediately": "Capture immediately"+ },+ "summary": {+ "canceled_at": "Canceled at",+ "canceler": "Canceler",+ "approved_by": "Approved by",+ "promotions": "Promotions",+ "adjustments": "Adjustments",+ "tax_included": "Tax (included)",+ "tax_additional": "Tax (additional)",+ "payment_total": "Payment total",+ "outstanding_balance": "Outstanding balance"+ },+ "gift_card_section": {+ "title": "Gift Card & Store Credit",+ "gift_card_label": "Gift card",+ "store_credit_label": "Store credit",+ "none_applied": "None applied",+ "applied_suffix": "applied",+ "apply_balance": "Apply customer's available balance",+ "requires_customer": "Requires a customer",+ "apply_button": "Apply",+ "apply_dialog_title": "Apply Gift Card",+ "apply_dialog_description": "Enter a gift card code to apply to this order."+ },+ "address_edit": {+ "shipping_title": "Edit Shipping Address",+ "billing_title": "Edit Billing Address"+ },+ "no_customer": "No customer information",+ "section_customer_note": "Special Instructions",+ "section_internal_note": "Internal Note"+ }+ },+ "products": {+ "save_label": "Save product",+ "delete_label": "Delete product",+ "delete_confirm": "Are you sure you want to delete this product?",+ "media": {+ "delete_confirm": "Delete this media? This cannot be undone.",+ "drop_hint": "Drag & drop media here, or click to browse",+ "file_types_hint": "PNG, JPG, WebP up to 10MB"+ },+ "seo": {+ "slug_placeholder": "product-url-handle",+ "meta_title_placeholder": "SEO title",+ "meta_description_placeholder": "SEO description"+ },+ "tax_category_placeholder": "Select tax category",+ "transfers": {+ "new_cta": "New transfer",+ "create_description": "Move stock between locations, or receive new stock from an external vendor.",+ "external_label": "External (vendor receive)",+ "destination_placeholder": "Select destination location",+ "different_locations_error": "Source and destination must differ.",+ "reference_label": "Reference",+ "reference_placeholder": "PO number, vendor invoice, …",+ "search_items_placeholder": "Search by name or SKU (3+ chars)…",+ "items_table": { "variant": "Variant", "sku": "SKU", "qty": "Qty" },+ "delete_confirm": {+ "title": "Delete this transfer?",+ "message": "Stock movements created by this transfer will be reversed."+ },+ "review_description": "Review the transfer before creating. Items can't be changed afterwards.",+ "details_card": "Details",+ "fields": {+ "type": "Type",+ "internal": "Internal",+ "external_receive": "External receive",+ "reference": "Reference",+ "created": "Created",+ "immutable_note": "Stock transfers are immutable once created."+ }+ },+ "options": {+ "kinds": { "dropdown": "Dropdown", "color_swatch": "Color swatch", "buttons": "Buttons" },+ "create_description": "Define an option that variants can use (e.g. size, color).",+ "edit_description": "Edit the option type and its values.",+ "delete_confirm": {+ "title": "Delete option type?",+ "message": "This will also delete all of its values. Variants using these values will lose them."+ },+ "values_help": "Drag values to reorder. The first value is the default for new variants.",+ "count_one": "{{count}} value",+ "count_other": "{{count}} values",+ "value_name_placeholder": "e.g. small",+ "value_label_placeholder": "e.g. Small"+ }+ },+ "payment_methods": {+ "add_cta": "Add payment method",+ "create_description": "Pick a provider and configure its credentials.",+ "edit_description": "Update name, visibility, or status.",+ "create_label": "Create payment method",+ "delete_confirm": {+ "title": "Delete payment method?",+ "message": "{{name}} will no longer be available at checkout."+ }+ },+ "tax_categories": {+ "add_cta": "Add tax category",+ "create_description": "Group products by tax treatment (standard, reduced, exempt, …).",+ "edit_description": "Update the name, code, or default flag.",+ "create_label": "Create tax category",+ "delete_confirm": {+ "title": "Delete tax category?",+ "message": "{{name}} will be removed. Products in this category fall back to the default."+ }+ },+ "stock_locations": {+ "add_cta": "Add stock location",+ "create_description": "Add a warehouse, store, or pickup point to fulfill orders from.",+ "edit_description": "Update name, address, pickup, or stock policies.",+ "delete_confirm": {+ "title": "Delete stock location?",+ "message": "{{name}} will be removed. Stock items at this location are not deleted."+ },+ "section_pickup": "Pickup",+ "stock_items": {+ "title": "Stock at this location",+ "help": "Adjust on-hand and backorderable counts per variant.",+ "search_placeholder": "Search SKU or product…",+ "table": { "variant": "Variant", "on_hand": "On hand", "backorder": "Backorder" }+ }+ },+ "store": { "load_failed_title": "Failed to load store settings" }}}diff --git a/packages/admin/src/nav/default.ts b/packages/admin/src/nav/default.tsindex 78298ebe84..b13c959e87 100644--- a/packages/admin/src/nav/default.ts+++ b/packages/admin/src/nav/default.ts@@ -7,12 +7,13 @@ import {TagIcon,UsersIcon,} from 'lucide-react'+import { i18n } from '@/lib/i18n'import { nav } from '@/lib/nav-registry'import { Subject } from '@/lib/permissions'nav.add({key: 'home',- label: 'Home',+ label: i18n.t('admin.nav.home'),path: '/',icon: HomeIcon,position: 100,@@ -20,7 +21,7 @@ nav.add({nav.add({key: 'orders',- label: 'Orders',+ label: i18n.t('admin.nav.orders'),path: '/orders',icon: InboxIcon,subject: Subject.Order,@@ -28,7 +29,7 @@ nav.add({children: [{key: 'orders.drafts',- label: 'Draft Orders',+ label: i18n.t('admin.nav.draft_orders'),path: '/orders/drafts',subject: Subject.Order,position: 100,@@ -38,7 +39,7 @@ nav.add({nav.add({key: 'products',- label: 'Products',+ label: i18n.t('admin.nav.products'),path: '/products',icon: PackageIcon,subject: Subject.Product,@@ -46,28 +47,28 @@ nav.add({children: [{key: 'products.price-lists',- label: 'Price Lists',+ label: i18n.t('admin.nav.price_lists'),path: '/products/price-lists',subject: Subject.Product,position: 100,},{key: 'products.categories',- label: 'Categories',+ label: i18n.t('admin.nav.categories'),path: '/products/categories',subject: Subject.Taxon,position: 300,},{key: 'products.options',- label: 'Options',+ label: i18n.t('admin.nav.options'),path: '/products/options',subject: Subject.OptionType,position: 400,},{key: 'products.transfers',- label: 'Transfers',+ label: i18n.t('admin.nav.transfers'),path: '/products/transfers',subject: Subject.StockTransfer,position: 500,@@ -77,7 +78,7 @@ nav.add({nav.add({key: 'customers',- label: 'Customers',+ label: i18n.t('admin.nav.customers'),path: '/customers',icon: UsersIcon,subject: Subject.Customer,@@ -85,7 +86,7 @@ nav.add({children: [{key: 'customers.groups',- label: 'Groups',+ label: i18n.t('admin.nav.customer_groups'),path: '/customers/groups',subject: Subject.CustomerGroup,position: 100,@@ -95,7 +96,7 @@ nav.add({nav.add({key: 'promotions',- label: 'Promotions',+ label: i18n.t('admin.nav.promotions'),path: '/promotions',icon: TagIcon,subject: Subject.Promotion,@@ -103,7 +104,7 @@ nav.add({children: [{key: 'promotions.gift-cards',- label: 'Gift Cards',+ label: i18n.t('admin.nav.gift_cards'),path: '/promotions/gift-cards',subject: Subject.GiftCard,position: 100,@@ -113,7 +114,7 @@ nav.add({nav.add({key: 'reports',- label: 'Reports',+ label: i18n.t('admin.nav.reports'),path: '/reports',icon: BarChart3Icon,position: 600,@@ -121,7 +122,7 @@ nav.add({nav.add({key: 'settings',- label: 'Settings',+ label: i18n.t('admin.nav.settings'),path: '/settings',icon: SettingsIcon,subject: Subject.Store,diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx b/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsxindex 7b09ec4f51..602eb76ba7 100644--- a/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx@@ -92,14 +92,15 @@ function useCustomerMutation<TParams>(}function CustomerDetailPage() {+ const { t } = useTranslation()const { customerId } = Route.useParams()const { data: customer, isLoading, error, refetch } = useCustomer(customerId)- if (isLoading) return <p className="text-muted-foreground">Loading customer…</p>+ if (isLoading) return <p className="text-muted-foreground">{t('admin.common.loading')}</p>if (error || !customer) {return (<ErrorState- title="Failed to load customer"+ title={t('admin.errors.failed_to_load_customer')}error={error as Error | undefined}onRetry={() => refetch()}/>@@ -110,6 +111,7 @@ function CustomerDetailPage() {}function CustomerBody({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const { storeId } = Route.useParams()const navigate = useNavigate()const { data, isLoading } = useCustomerOrders(customer.id, { limit: 10 })@@ -139,7 +141,7 @@ function CustomerBody({ customer }: { customer: Customer }) {badges={customer.tags?.map((tag) => <Badge key={tag}>{tag}</Badge>)}resource={{ id: customer.id }}onDelete={() => deleteMutation.mutateAsync()}- deleteLabel="Delete customer"+ deleteLabel={t('admin.customers.detail.delete_label')}jsonPreview={{title: `Customer ${customer.email}`,queryKey: ['json', 'customer', customer.id],@@ -187,17 +189,18 @@ function CustomerBody({ customer }: { customer: Customer }) {// ---------------------------------------------------------------------------function ProfileCard({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const [editOpen, setEditOpen] = useState(false)return (<><Card><CardHeader>- <CardTitle>Profile</CardTitle>+ <CardTitle>{t('admin.pages.customers.detail.section_profile')}</CardTitle><CardAction><Button size="sm" variant="outline" onClick={() => setEditOpen(true)}><PencilIcon className="size-4" />- Edit+ {t('admin.actions.edit')}</Button></CardAction></CardHeader>@@ -216,13 +219,16 @@ function ProfileCard({ customer }: { customer: Customer }) {<StarIcon className="size-4 text-muted-foreground" /><span>{customer.accepts_email_marketing- ? 'Subscribed to marketing'- : 'Not subscribed to marketing'}+ ? t('admin.customers.detail.subscribed_to_marketing')+ : t('admin.customers.detail.not_subscribed_to_marketing')}</span></div>{customer.created_at && (<div className="text-xs text-muted-foreground">- <RelativeTime iso={customer.created_at} prefix="Customer since" />+ <RelativeTime+ iso={customer.created_at}+ prefix={t('admin.customers.detail.customer_since')}+ /></div>)}</CardContent>@@ -279,8 +285,10 @@ function EditProfileSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>Edit Customer</SheetTitle>- <SheetDescription>Update the customer's profile information.</SheetDescription>+ <SheetTitle>{t('admin.pages.customers.detail.section_profile')}</SheetTitle>+ <SheetDescription>+ {t('admin.customers.detail.edit_profile_description')}+ </SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -373,10 +381,10 @@ function EditProfileSheet({onClick={() => onOpenChange(false)}disabled={mutation.isPending}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>@@ -390,6 +398,7 @@ function EditProfileSheet({// ---------------------------------------------------------------------------function LifetimeStatsCard({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const orders = customer.orders_count ?? 0const totalSpent = Number(customer.total_spent ?? '0')const aov = orders > 0 ? totalSpent / orders : 0@@ -401,11 +410,23 @@ function LifetimeStatsCard({ customer }: { customer: Customer }) {return (<Card><CardContent className="grid grid-cols-2 lg:grid-cols-5 gap-6 py-6">- <Stat label="Total spent" value={customer.display_total_spent ?? '—'} />- <Stat label="Orders" value={String(orders)} />- <Stat label="Avg order value" value={aovDisplay ?? '—'} />- <Stat label="Store credit" value={customer.display_available_store_credit_total ?? '—'} />- <Stat label="Customer since" value={<RelativeTime iso={customer.created_at} />} />+ <Stat+ label={t('admin.pages.customers.detail.stat_total_spent')}+ value={customer.display_total_spent ?? '—'}+ />+ <Stat label={t('admin.pages.customers.detail.stat_orders')} value={String(orders)} />+ <Stat+ label={t('admin.pages.customers.detail.stat_avg_order_value')}+ value={aovDisplay ?? '—'}+ />+ <Stat+ label={t('admin.pages.customers.detail.section_store_credit')}+ value={customer.display_available_store_credit_total ?? '—'}+ />+ <Stat+ label={t('admin.customers.detail.customer_since')}+ value={<RelativeTime iso={customer.created_at} />}+ /></CardContent></Card>)@@ -441,10 +462,11 @@ function useCustomerOrders(customerId: string, params: { limit: number; status?:}function LastOrderCard({ order }: { order: Order }) {+ const { t } = useTranslation()return (<Card><CardHeader>- <CardTitle>Last order placed</CardTitle>+ <CardTitle>{t('admin.customers.detail.last_order_placed')}</CardTitle></CardHeader><CardContent className="p-0"><div className="border-t flex items-center justify-between px-6 py-3">@@ -503,14 +525,15 @@ function OrdersCard({totalCount: numberisLoading: boolean}) {+ const { t } = useTranslation()if (isLoading) {return (<Card><CardHeader>- <CardTitle>Orders</CardTitle>+ <CardTitle>{t('admin.pages.customers.detail.section_orders')}</CardTitle></CardHeader><CardContent>- <p className="text-sm text-muted-foreground">Loading orders…</p>+ <p className="text-sm text-muted-foreground">{t('admin.common.loading')}</p></CardContent></Card>)@@ -520,7 +543,7 @@ function OrdersCard({<Card><CardHeader><CardTitle>- Orders+ {t('admin.pages.customers.detail.section_orders')}{totalCount > 0 && <Badge variant="outline">{totalCount}</Badge>}</CardTitle>{totalCount > orders.length && (@@ -532,24 +555,34 @@ function OrdersCard({}}className="text-sm text-primary hover:underline">- View all →+ {t('admin.actions.view_all')} →</Link></CardAction>)}</CardHeader>{orders.length === 0 ? (<CardContent>- <p className="text-sm text-muted-foreground">No orders yet</p>+ <p className="text-sm text-muted-foreground">+ {t('admin.pages.customers.detail.orders_empty')}+ </p></CardContent>) : (<CardContent className="p-0"><table className="w-full text-sm"><thead><tr className="border-b text-muted-foreground text-left">- <th className="px-6 py-2 font-normal">Order</th>- <th className="px-6 py-2 font-normal">Date</th>- <th className="px-6 py-2 font-normal">Status</th>- <th className="px-6 py-2 font-normal text-right">Total</th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.orders_table.order')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.orders_table.date')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.orders_table.status')}+ </th>+ <th className="px-6 py-2 font-normal text-right">+ {t('admin.customers.detail.orders_table.total')}+ </th></tr></thead><tbody>@@ -594,6 +627,7 @@ function OrdersCard({// ---------------------------------------------------------------------------function InternalNoteCard({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const [editing, setEditing] = useState(false)const [note, setNote] = useState(customer.internal_note_html ?? '')@@ -604,12 +638,12 @@ function InternalNoteCard({ customer }: { customer: Customer }) {return (<Card><CardHeader>- <CardTitle>Internal Note</CardTitle>+ <CardTitle>{t('admin.pages.customers.detail.section_internal_note')}</CardTitle>{!editing && (<CardAction><Button size="sm" variant="outline" onClick={() => setEditing(true)}><PencilIcon className="size-4" />- Edit+ {t('admin.actions.edit')}</Button></CardAction>)}@@ -621,7 +655,7 @@ function InternalNoteCard({ customer }: { customer: Customer }) {rows={4}value={note}onChange={(e) => setNote(e.target.value)}- placeholder="Staff-only notes about this customer…"+ placeholder={t('admin.fields.customer.internal_note.placeholder')}/><div className="flex gap-2 justify-end"><Button@@ -633,7 +667,7 @@ function InternalNoteCard({ customer }: { customer: Customer }) {setNote(customer.internal_note_html ?? '')}}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="button"@@ -643,7 +677,7 @@ function InternalNoteCard({ customer }: { customer: Customer }) {mutation.mutate({ internal_note: note }, { onSuccess: () => setEditing(false) })}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></div></div>@@ -654,7 +688,9 @@ function InternalNoteCard({ customer }: { customer: Customer }) {dangerouslySetInnerHTML={{ __html: customer.internal_note_html }}/>) : (- <p className="text-sm text-muted-foreground">No internal notes</p>+ <p className="text-sm text-muted-foreground">+ {t('admin.customers.detail.no_internal_notes')}+ </p>)}</CardContent></Card>@@ -666,6 +702,7 @@ function InternalNoteCard({ customer }: { customer: Customer }) {// ---------------------------------------------------------------------------function AddressesCard({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const [addOpen, setAddOpen] = useState(false)const [editing, setEditing] = useState<Address | null>(null)const confirm = useConfirm()@@ -691,19 +728,21 @@ function AddressesCard({ customer }: { customer: Customer }) {<Card><CardHeader><CardTitle>- Addresses+ {t('admin.pages.customers.detail.section_addresses')}{addresses.length > 0 && <Badge variant="outline">{addresses.length}</Badge>}</CardTitle><CardAction><Button size="sm" variant="outline" onClick={() => setAddOpen(true)}><PlusIcon className="size-4" />- Add Address+ {t('admin.pages.customers.detail.add_address')}</Button></CardAction></CardHeader>{addresses.length === 0 ? (<CardContent>- <p className="text-sm text-muted-foreground">No saved addresses</p>+ <p className="text-sm text-muted-foreground">+ {t('admin.pages.customers.detail.addresses_empty')}+ </p></CardContent>) : (<CardContent className="flex flex-col gap-3">@@ -716,9 +755,15 @@ function AddressesCard({ customer }: { customer: Customer }) {<div className="font-medium">{addr.full_name ?? '—'}<span className="ml-2 inline-flex gap-1">- {addr.is_default_billing && <Badge variant="outline">Default billing</Badge>}+ {addr.is_default_billing && (+ <Badge variant="outline">+ {t('admin.customers.detail.address.default_billing')}+ </Badge>+ )}{addr.is_default_shipping && (- <Badge variant="outline">Default shipping</Badge>+ <Badge variant="outline">+ {t('admin.customers.detail.address.default_shipping')}+ </Badge>)}</span></div>@@ -739,20 +784,20 @@ function AddressesCard({ customer }: { customer: Customer }) {<DropdownMenuContent align="end"><DropdownMenuItem onClick={() => setEditing(addr)}><PencilIcon className="size-4" />- Edit+ {t('admin.actions.edit')}</DropdownMenuItem>{!addr.is_default_billing && (<DropdownMenuItemonClick={() => setDefaultMutation.mutate({ id: addr.id, kind: 'billing' })}>- Set as default billing+ {t('admin.customers.detail.address.set_default_billing')}</DropdownMenuItem>)}{!addr.is_default_shipping && (<DropdownMenuItemonClick={() => setDefaultMutation.mutate({ id: addr.id, kind: 'shipping' })}>- Set as default shipping+ {t('admin.customers.detail.address.set_default_shipping')}</DropdownMenuItem>)}<DropdownMenuItem@@ -760,9 +805,9 @@ function AddressesCard({ customer }: { customer: Customer }) {onClick={async () => {if (await confirm({- message: 'Delete this address?',+ message: t('admin.customers.detail.address.delete_confirm_message'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})) {deleteMutation.mutate(addr.id)@@ -770,7 +815,7 @@ function AddressesCard({ customer }: { customer: Customer }) {}}><TrashIcon className="size-4" />- Delete+ {t('admin.actions.delete')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -785,7 +830,7 @@ function AddressesCard({ customer }: { customer: Customer }) {customer={customer}address={newAddressTemplate(customer)}onOpenChange={setAddOpen}- title="Add Address"+ title={t('admin.pages.customers.detail.add_address')}/>)}{editing && (@@ -795,7 +840,7 @@ function AddressesCard({ customer }: { customer: Customer }) {onOpenChange={(o) => {if (!o) setEditing(null)}}- title="Edit Address"+ title={t('admin.pages.customers.detail.edit_address')}/>)}</>@@ -852,6 +897,7 @@ function CustomerAddressDialog({// ---------------------------------------------------------------------------function StoreCreditsCard({ customer }: { customer: Customer }) {+ const { t } = useTranslation()const [addOpen, setAddOpen] = useState(false)const [editing, setEditing] = useState<StoreCredit | null>(null)const confirm = useConfirm()@@ -866,30 +912,42 @@ function StoreCreditsCard({ customer }: { customer: Customer }) {<Card><CardHeader><CardTitle>- Store Credits+ {t('admin.customers.detail.store_credit.title')}{credits.length > 0 && <Badge>{credits.length}</Badge>}</CardTitle><CardAction><Button size="sm" variant="outline" onClick={() => setAddOpen(true)}><PlusIcon className="size-4" />- Issue Credit+ {t('admin.pages.customers.detail.issue_credit')}</Button></CardAction></CardHeader>{credits.length === 0 ? (<CardContent>- <p className="text-sm text-muted-foreground">No store credits issued</p>+ <p className="text-sm text-muted-foreground">+ {t('admin.customers.detail.store_credit.empty')}+ </p></CardContent>) : (<CardContent className="p-0"><table className="w-full text-sm"><thead><tr className="border-b text-muted-foreground text-left">- <th className="px-6 py-2 font-normal">Amount</th>- <th className="px-6 py-2 font-normal">Used</th>- <th className="px-6 py-2 font-normal">Remaining</th>- <th className="px-6 py-2 font-normal">Category</th>- <th className="px-6 py-2 font-normal">Memo</th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.store_credit.table.amount')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.store_credit.table.used')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.store_credit.table.remaining')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.store_credit.table.category')}+ </th>+ <th className="px-6 py-2 font-normal">+ {t('admin.customers.detail.store_credit.table.memo')}+ </th><th className="px-6 py-2 w-10" /></tr></thead>@@ -917,16 +975,18 @@ function StoreCreditsCard({ customer }: { customer: Customer }) {<DropdownMenuContent align="end"><DropdownMenuItem onClick={() => setEditing(sc)}><PencilIcon className="size-4" />- Edit+ {t('admin.actions.edit')}</DropdownMenuItem><DropdownMenuItemclassName="text-destructive focus:text-destructive"onClick={async () => {if (await confirm({- message: 'Delete this store credit?',+ message: t(+ 'admin.customers.detail.store_credit.delete_confirm_message',+ ),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})) {deleteMutation.mutate(sc.id)@@ -934,7 +994,7 @@ function StoreCreditsCard({ customer }: { customer: Customer }) {}}><TrashIcon className="size-4" />- Delete+ {t('admin.actions.delete')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -975,13 +1035,16 @@ function StoreCreditCategorySelect({onChange: (next: string) => voidrequired?: boolean}) {+ const { t } = useTranslation()const { data, isLoading } = useStoreCreditCategories()const categories = data?.data ?? []return (<Select value={value} onValueChange={onChange}><SelectTrigger id={id} aria-required={required}>- <SelectValue placeholder={isLoading ? 'Loading categories…' : 'Select a category'}>+ <SelectValue+ placeholder={isLoading ? t('admin.common.loading') : t('admin.common.select_placeholder')}+ >{(v) => {const category = categories.find((c) => c.id === v)return category ? category.name : (v as string)@@ -1059,11 +1122,9 @@ function EditStoreCreditDialog({<Dialog open onOpenChange={onOpenChange}><DialogContent><DialogHeader>- <DialogTitle>Edit Store Credit</DialogTitle>+ <DialogTitle>{t('admin.pages.customers.detail.edit_credit')}</DialogTitle><DialogDescription>- Update the memo, category, or amount.- {amountLocked &&- ' The amount cannot be changed because some of it has already been used.'}+ {t('admin.customers.detail.store_credit.edit_description')}</DialogDescription></DialogHeader><form onSubmit={form.handleSubmit(onSubmit)}>@@ -1134,10 +1195,10 @@ function EditStoreCreditDialog({</DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></DialogFooter></form>@@ -1185,8 +1246,10 @@ function IssueStoreCreditDialog({<Dialog open={open} onOpenChange={onOpenChange}><DialogContent><DialogHeader>- <DialogTitle>Issue Store Credit</DialogTitle>- <DialogDescription>Add store credit to this customer's account.</DialogDescription>+ <DialogTitle>{t('admin.pages.customers.detail.issue_credit')}</DialogTitle>+ <DialogDescription>+ {t('admin.customers.detail.store_credit.add_description')}+ </DialogDescription></DialogHeader><form onSubmit={form.handleSubmit(onSubmit)}><DialogBody>@@ -1263,10 +1326,12 @@ function IssueStoreCreditDialog({</DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={mutation.isPending}>- {mutation.isPending ? 'Issuing…' : 'Issue Credit'}+ {mutation.isPending+ ? t('admin.actions.saving')+ : t('admin.pages.customers.detail.issue_credit')}</Button></DialogFooter></form>diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsx b/packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsxindex 5b1dfde62b..54f57c4981 100644--- a/packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsx@@ -48,6 +48,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/customers/groups'})function CustomerGroupsPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof customerGroupsSearchSchema>const navigate = useNavigate()@@ -81,7 +82,7 @@ function CustomerGroupsPage() {<Can I="create" a={Subject.CustomerGroup}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- Add customer group+ {t('admin.pages.customers.groups.add_cta')}</Button></Can>}@@ -118,6 +119,7 @@ function CreateCustomerGroupSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateCustomerGroup()const form = useForm<FormValues>({// eslint-disable-next-line @typescript-eslint/no-explicit-any@@ -145,11 +147,8 @@ function CreateCustomerGroupSheet({><SheetContent><SheetHeader>- <SheetTitle>Add customer group</SheetTitle>- <SheetDescription>- Groups segment customers for targeted promotions and reporting. After creating, assign- customers from the Customers screen using bulk actions.- </SheetDescription>+ <SheetTitle>{t('admin.pages.customers.groups.add_sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.customers.groups.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -163,10 +162,12 @@ function CreateCustomerGroupSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Creating…' : 'Create customer group'}+ {form.formState.isSubmitting+ ? t('admin.actions.creating')+ : t('admin.actions.create')}</Button></SheetFooter></form>@@ -184,6 +185,7 @@ function EditCustomerGroupSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { storeId } = Route.useParams()const { data: group, isLoading } = useCustomerGroup(id)const updateMutation = useUpdateCustomerGroup(id)@@ -217,10 +219,12 @@ function EditCustomerGroupSheet({async function onDelete() {const ok = await confirm({- title: 'Delete customer group?',- message: `${group?.name ?? 'This group'} will be removed. Customers in it will not be deleted.`,+ title: t('admin.customers.groups.delete_confirm.title'),+ message: t('admin.customers.groups.delete_confirm.message', {+ name: group?.name ?? 'This group',+ }),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -237,11 +241,13 @@ function EditCustomerGroupSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>{group?.name ?? 'Edit customer group'}</SheetTitle>- <SheetDescription>Update the name or description.</SheetDescription>+ <SheetTitle>+ {group?.name ?? t('admin.pages.customers.groups.edit_sheet_title')}+ </SheetTitle>+ <SheetDescription>{t('admin.customers.groups.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -261,7 +267,7 @@ function EditCustomerGroupSheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -271,14 +277,14 @@ function EditCustomerGroupSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"size="sm"disabled={form.formState.isSubmitting || !form.formState.isDirty}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>@@ -328,17 +334,15 @@ function NameDescriptionFields({ form }: { form: UseFormReturn<FormValues> }) {}function MembersSummary({ count, href }: { count: number; href: string }) {+ const { t } = useTranslation()return (<div className="flex items-center justify-between rounded-md border bg-muted/40 px-3 py-2"><div className="flex items-center gap-2 text-sm"><UsersIcon className="size-4 text-muted-foreground" />- <span>- <span className="font-medium">{count}</span> {count === 1 ? 'customer' : 'customers'} in- this group- </span>+ <span>{t('admin.customers.groups.count', { count })}</span></div><Link to={href as never} className="text-sm font-medium text-primary hover:underline">- View members+ {t('admin.customers.groups.view_members')}</Link></div>)diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx b/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsxindex 89c1c60179..5f8f2471c4 100644--- a/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx@@ -46,43 +46,49 @@ type GroupFormValues = { customer_group_ids: string[] }// drop the groups cache to force a refetch when the user navigates back.const GROUP_INVALIDATIONS = [['customer-groups']]-const BULK_ACTIONS: BulkAction<GroupFormValues>[] = [- {- key: 'add-to-groups',- label: 'Add to group…',- icon: <UserPlusIcon className="size-4" />,- subject: Subject.Customer,- form: (props) => <GroupPickerSheet {...props} mode="add" />,- run: ({ ids, formValues }) =>- adminClient.customers.bulkAddToGroups({- ids,- customer_group_ids: formValues?.customer_group_ids ?? [],- }),- invalidate: GROUP_INVALIDATIONS,- successMessage: 'Added {n} customers to groups',- errorMessage: 'Failed to add customers to groups',- },- {- key: 'remove-from-groups',- label: 'Remove from group…',- icon: <UserMinusIcon className="size-4" />,- subject: Subject.Customer,- form: (props) => <GroupPickerSheet {...props} mode="remove" />,- run: ({ ids, formValues }) =>- adminClient.customers.bulkRemoveFromGroups({- ids,- customer_group_ids: formValues?.customer_group_ids ?? [],- }),- invalidate: GROUP_INVALIDATIONS,- successMessage: 'Removed {n} customers from groups',- errorMessage: 'Failed to remove customers from groups',- },-]-function CustomersPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof customersSearchSchema>const navigate = useNavigate()+ // BulkActionBar's `successMessage` runs through a `{n}` interpolation in the+ // bar itself; we pass i18next `{{count}}` as the literal `{n}` token so the+ // bar can substitute the real count at runtime.+ const bulkActions: BulkAction<GroupFormValues>[] = [+ {+ key: 'add-to-groups',+ label: t('admin.customers.groups.bulk_add_action'),+ icon: <UserPlusIcon className="size-4" />,+ subject: Subject.Customer,+ form: (props) => <GroupPickerSheet {...props} mode="add" />,+ run: ({ ids, formValues }) =>+ adminClient.customers.bulkAddToGroups({+ ids,+ customer_group_ids: formValues?.customer_group_ids ?? [],+ }),+ invalidate: GROUP_INVALIDATIONS,+ successMessage: t('admin.customers.groups.bulk_added', { count: '{n}' as unknown as number }),+ errorMessage: t('admin.customers.groups.bulk_add_failed'),+ },+ {+ key: 'remove-from-groups',+ label: t('admin.customers.groups.bulk_remove_action'),+ icon: <UserMinusIcon className="size-4" />,+ subject: Subject.Customer,+ form: (props) => <GroupPickerSheet {...props} mode="remove" />,+ run: ({ ids, formValues }) =>+ adminClient.customers.bulkRemoveFromGroups({+ ids,+ customer_group_ids: formValues?.customer_group_ids ?? [],+ }),+ invalidate: GROUP_INVALIDATIONS,+ successMessage: t('admin.customers.groups.bulk_removed', {+ count: '{n}' as unknown as number,+ }),+ errorMessage: t('admin.customers.groups.bulk_remove_failed'),+ },+ ]+const isCreating = !!search.newfunction openCreate() {@@ -106,13 +112,13 @@ function CustomersPage() {queryFn={(params) => adminClient.customers.list(params)}searchParams={search}defaultParams={{ expand: ['customer_groups'] }}- bulkActions={BULK_ACTIONS}+ bulkActions={bulkActions}actions={(ctx) => (<><ExportButton type="Spree::Exports::Customers" {...ctx} /><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- New Customer+ {t('admin.pages.customers.new_cta')}</Button></>)}@@ -127,31 +133,32 @@ function CustomersPage() {* with `{ customer_group_ids }` so the same component drives both verbs.*/function GroupPickerSheet({- ids,onSubmit,onCancel,mode,}: BulkActionFormProps<GroupFormValues> & { mode: 'add' | 'remove' }) {+ const { t } = useTranslation()const [groupIds, setGroupIds] = useState<string[]>([])- const verb = mode === 'add' ? 'Add' : 'Remove'return (<Sheet open onOpenChange={(o) => !o && onCancel()}><SheetContent><SheetHeader><SheetTitle>- {verb} {ids.length} customers to groups+ {mode === 'add'+ ? t('admin.customers.groups.picker.add_title')+ : t('admin.customers.groups.picker.remove_title')}</SheetTitle><SheetDescription>{mode === 'add'- ? 'Selected customers will be added to every group you pick. Already-members are skipped.'- : 'Selected customers will be removed from every group you pick. Non-members are skipped.'}+ ? t('admin.customers.groups.picker.add_description')+ : t('admin.customers.groups.picker.remove_description')}</SheetDescription></SheetHeader><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4"><FieldGroup><Field>- <FieldLabel>Customer groups</FieldLabel>+ <FieldLabel>{t('admin.pages.customers.groups_cta')}</FieldLabel><ResourceMultiAutocomplete{...customerGroupAutocompleteProps('customer-groups-picker')}value={groupIds}@@ -162,7 +169,7 @@ function GroupPickerSheet({</div><SheetFooter><Button type="button" variant="outline" size="sm" onClick={onCancel}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="button"@@ -170,7 +177,7 @@ function GroupPickerSheet({disabled={groupIds.length === 0}onClick={() => onSubmit({ customer_group_ids: groupIds })}>- {verb}+ {mode === 'add' ? t('admin.actions.add') : t('admin.actions.remove')}</Button></SheetFooter></SheetContent>@@ -250,11 +257,8 @@ function NewCustomerSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>New Customer</SheetTitle>- <SheetDescription>- No password is set and no email is sent. Trigger a password reset from the customer's- page if they need to sign in.- </SheetDescription>+ <SheetTitle>{t('admin.pages.customers.new_cta')}</SheetTitle>+ <SheetDescription>{t('admin.customers.new_sheet_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -367,10 +371,10 @@ function NewCustomerSheet({onClick={() => onOpenChange(false)}disabled={createMutation.isPending}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={createMutation.isPending}>- {createMutation.isPending ? 'Creating…' : 'Create Customer'}+ {createMutation.isPending ? t('admin.actions.creating') : t('admin.actions.create')}</Button></SheetFooter></form>diff --git a/packages/admin/src/routes/_authenticated/$storeId/index.tsx b/packages/admin/src/routes/_authenticated/$storeId/index.tsxindex eb80a039b7..ad99c0d2a0 100644--- a/packages/admin/src/routes/_authenticated/$storeId/index.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/index.tsx@@ -4,6 +4,7 @@ import { createFileRoute, Link } from '@tanstack/react-router'import { subDays } from 'date-fns'import { PackageIcon } from 'lucide-react'import { useState } from 'react'+import { useTranslation } from 'react-i18next'import { Bar, BarChart, CartesianGrid, XAxis } from 'recharts'import { adminClient } from '@/client'import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'@@ -152,6 +153,7 @@ function AnalyticsChart({ data }: { data: DashboardAnalytics }) {}function TopProducts({ products }: { products: DashboardAnalytics['top_products'] }) {+ const { t } = useTranslation()if (products.length === 0) {return null}@@ -159,8 +161,8 @@ function TopProducts({ products }: { products: DashboardAnalytics['top_products'return (<Card><CardHeader>- <CardTitle>Top Products</CardTitle>- <CardDescription>Best selling products by revenue</CardDescription>+ <CardTitle>{t('admin.pages.home.top_products')}</CardTitle>+ <CardDescription>{t('admin.pages.home.top_products_description')}</CardDescription></CardHeader><CardContent className="p-0"><table className="w-full text-sm">diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsxindex 7064483aa1..1a5429d169 100644--- a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx@@ -19,6 +19,7 @@ import {XCircleIcon,} from 'lucide-react'import { type FormEvent, useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'import { adminClient } from '@/client'import { AddressBlock } from '@/components/spree/address-block'import { AddressFormDialog, type AddressParams } from '@/components/spree/address-form-dialog'@@ -100,6 +101,7 @@ function formatDate(iso: string | null) {// ---------------------------------------------------------------------------function OrderDetailPage() {+ const { t } = useTranslation()const { orderId } = Route.useParams()const { data: order, isLoading, error, refetch } = useOrder(orderId)@@ -107,8 +109,8 @@ function OrderDetailPage() {if (error || !order) {return (<ErrorState- title="Failed to load order"- description={`We couldn't load order ${orderId}.`}+ title={t('admin.errors.failed_to_load_order')}+ description={t('admin.orders.detail.load_failed_message', { orderId })}error={error as Error | undefined}onRetry={() => refetch()}/>@@ -146,6 +148,7 @@ function OrderDetailPage() {// ---------------------------------------------------------------------------function OrderHeader({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const confirm = useConfirm()@@ -154,25 +157,25 @@ function OrderHeader({ order }: { order: Order }) {const cancelMutation = useResourceMutation({mutationFn: () => adminClient.orders.cancel(orderId),invalidate: [orderQueryKey(orderId)],- successMessage: 'Order canceled',+ successMessage: t('admin.orders.detail.messages.canceled'),errorMessage: 'Failed to cancel order',})const completeMutation = useResourceMutation({mutationFn: () => adminClient.orders.complete(orderId),invalidate: [orderQueryKey(orderId)],- successMessage: 'Order completed',+ successMessage: t('admin.orders.detail.messages.completed'),errorMessage: 'Failed to complete order',})const approveMutation = useResourceMutation({mutationFn: () => adminClient.orders.approve(orderId),invalidate: [orderQueryKey(orderId)],- successMessage: 'Order approved',+ successMessage: t('admin.orders.detail.messages.approved'),errorMessage: 'Failed to approve order',})const resumeMutation = useResourceMutation({mutationFn: () => adminClient.orders.resume(orderId),invalidate: [orderQueryKey(orderId)],- successMessage: 'Order resumed',+ successMessage: t('admin.orders.detail.messages.resumed'),errorMessage: 'Failed to resume order',})const resendMutation = useResourceMutation({@@ -199,7 +202,7 @@ function OrderHeader({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Complete this draft order now?',+ message: t('admin.orders.detail.confirm.complete_message'),confirmLabel: 'Complete',})) {@@ -209,20 +212,26 @@ function OrderHeader({ order }: { order: Order }) {disabled={completeMutation.isPending}><CheckCircleIcon className="size-4" />- Complete Order+ {t('admin.orders.detail.dropdown.complete_order')}</DropdownMenuItem>)}{order.considered_risky && !order.approved_at && (<DropdownMenuItemonClick={async () => {- if (await confirm({ message: 'Approve this order?', confirmLabel: 'Approve' })) {+ if (+ await confirm({+ title: t('admin.pages.orders.detail.dialogs.approve_title'),+ message: t('admin.orders.detail.confirm.approve_message'),+ confirmLabel: t('admin.pages.orders.detail.actions.approve'),+ })+ ) {approveMutation.mutate(undefined)}}}disabled={approveMutation.isPending}><ShieldCheckIcon className="size-4" />- Approve Order+ {t('admin.pages.orders.detail.actions.approve')}</DropdownMenuItem>)}{order.status === 'canceled' && (@@ -230,8 +239,8 @@ function OrderHeader({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Resume this canceled order?',- confirmLabel: 'Resume',+ message: t('admin.orders.detail.confirm.resume_message'),+ confirmLabel: t('admin.pages.orders.detail.actions.resume'),})) {resumeMutation.mutate(undefined)@@ -240,21 +249,21 @@ function OrderHeader({ order }: { order: Order }) {disabled={resumeMutation.isPending}><RotateCcwIcon className="size-4" />- Resume Order+ {t('admin.pages.orders.detail.actions.resume')}</DropdownMenuItem>)}{order.completed_at && (<><DropdownMenuItem><ExternalLinkIcon className="size-4" />- Preview Order+ {t('admin.orders.detail.dropdown.preview_order')}</DropdownMenuItem><DropdownMenuItemonClick={() => resendMutation.mutate(undefined)}disabled={resendMutation.isPending}><MailIcon className="size-4" />- Resend Confirmation+ {t('admin.orders.detail.dropdown.resend_confirmation')}</DropdownMenuItem><DropdownMenuSeparator /></>@@ -265,9 +274,10 @@ function OrderHeader({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Are you sure you want to cancel this order?',+ title: t('admin.pages.orders.detail.dialogs.cancel_title'),+ message: t('admin.orders.detail.confirm.cancel_message'),variant: 'destructive',- confirmLabel: 'Cancel Order',+ confirmLabel: t('admin.pages.orders.detail.actions.cancel'),})) {cancelMutation.mutate(undefined)@@ -276,7 +286,7 @@ function OrderHeader({ order }: { order: Order }) {disabled={cancelMutation.isPending}><XCircleIcon className="size-4" />- Cancel Order+ {t('admin.pages.orders.detail.actions.cancel')}</DropdownMenuItem>)}</>@@ -313,6 +323,7 @@ function AddLineItemDialog({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const [search, setSearch] = useState('')const [selectedVariant, setSelectedVariant] = useState<Variant | null>(null)const [quantity, setQuantity] = useState(1)@@ -351,13 +362,13 @@ function AddLineItemDialog({<SheetContent side="right"><SheetHeader><SheetTitle>Add Line Item</SheetTitle>- <SheetDescription>Search for a product variant to add to this order.</SheetDescription>+ <SheetDescription>{t('admin.orders.detail.variant_search.description')}</SheetDescription></SheetHeader><form onSubmit={handleSubmit} className="flex flex-col flex-1 overflow-hidden"><div className="flex-1 overflow-y-auto p-4"><FieldGroup><Field>- <FieldLabel>Search variant</FieldLabel>+ <FieldLabel>{t('admin.orders.detail.variant_search.label')}</FieldLabel><Inputplaceholder="Type product name or SKU (min 3 chars)..."value={search}@@ -383,7 +394,7 @@ function AddLineItemDialog({<div className="font-medium truncate">{v.product_name ?? v.sku}</div><div className="text-xs text-muted-foreground">{v.options_text && <span>{v.options_text} · </span>}- SKU: {v.sku || '—'}+ {t('admin.orders.detail.variant_search.sku_prefix')}: {v.sku || '—'}</div></div><div className="text-sm font-medium whitespace-nowrap">@@ -394,7 +405,9 @@ function AddLineItemDialog({</div>)}{search.length >= 3 && variants.length === 0 && !selectedVariant && (- <p className="mt-1 text-xs text-muted-foreground">No variants found</p>+ <p className="mt-1 text-xs text-muted-foreground">+ {t('admin.orders.detail.variant_search.empty')}+ </p>)}</Field>@@ -408,7 +421,8 @@ function AddLineItemDialog({{selectedVariant.options_text && (<span>{selectedVariant.options_text} · </span>)}- SKU: {selectedVariant.sku || '—'} · {formatPrice(selectedVariant.price)}+ {t('admin.orders.detail.variant_search.sku_prefix')}:{' '}+ {selectedVariant.sku || '—'} · {formatPrice(selectedVariant.price)}</div></div><button@@ -436,10 +450,10 @@ function AddLineItemDialog({</div><SheetFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={!selectedVariant || mutation.isPending}>- {mutation.isPending ? 'Adding…' : 'Add Item'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.add')}</Button></SheetFooter></form>@@ -461,6 +475,7 @@ function EditQuantityDialog({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const mutation = useOrderMutation(orderId, (params: { quantity: number }) =>adminClient.orders.items.update(orderId, lineItemId, params),)@@ -478,8 +493,10 @@ function EditQuantityDialog({<Dialog open={open} onOpenChange={onOpenChange}><DialogContent><DialogHeader>- <DialogTitle>Edit Quantity</DialogTitle>- <DialogDescription>Update the quantity for this line item.</DialogDescription>+ <DialogTitle>{t('admin.orders.detail.edit_quantity.title')}</DialogTitle>+ <DialogDescription>+ {t('admin.orders.detail.edit_quantity.description')}+ </DialogDescription></DialogHeader><form onSubmit={handleSubmit}><DialogBody>@@ -498,10 +515,10 @@ function EditQuantityDialog({</DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></DialogFooter></form>@@ -511,6 +528,7 @@ function EditQuantityDialog({}function LineItemsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const confirm = useConfirm()@@ -528,13 +546,13 @@ function LineItemsCard({ order }: { order: Order }) {<CardHeader><CardTitle><ShoppingCartIcon className="size-4" />- Line Items+ {t('admin.pages.orders.detail.section_items')}{items.length > 0 && <Badge variant="outline">{items.length}</Badge>}</CardTitle><CardAction className="flex items-center gap-2"><Button size="sm" variant="outline" onClick={() => setAddOpen(true)}><PlusIcon data-icon="inline-start" />- Add Item+ {t('admin.actions.add')}</Button></CardAction></CardHeader>@@ -543,12 +561,24 @@ function LineItemsCard({ order }: { order: Order }) {<table className="w-full text-sm"><thead><tr className="border-b bg-muted/50 text-muted-foreground">- <th className="p-3 pl-5 text-left font-normal">Item</th>- <th className="p-3 text-right font-normal">Price</th>- <th className="p-3 text-right font-normal">Qty</th>- <th className="p-3 text-right font-normal">Tax</th>- <th className="p-3 text-right font-normal">Discount</th>- <th className="p-3 text-right font-normal">Total</th>+ <th className="p-3 pl-5 text-left font-normal">+ {t('admin.orders.detail.items_table.item')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.items_table.price')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.items_table.qty')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.items_table.tax')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.items_table.discount')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.items_table.total')}+ </th><th className="p-3 pr-5 w-10" /></tr></thead>@@ -603,7 +633,7 @@ function LineItemsCard({ order }: { order: Order }) {onClick={() => setEditItem({ id: item.id, quantity: item.quantity })}><PencilIcon className="size-4" />- Edit Quantity+ {t('admin.orders.detail.dropdown.edit_quantity')}</DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem@@ -611,9 +641,9 @@ function LineItemsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Remove this item from the order?',+ message: t('admin.orders.detail.confirm.remove_item_message'),variant: 'destructive',- confirmLabel: 'Remove',+ confirmLabel: t('admin.actions.remove'),})) {deleteMutation.mutate(item.id)@@ -621,7 +651,7 @@ function LineItemsCard({ order }: { order: Order }) {}}><TrashIcon className="size-4" />- Remove+ {t('admin.actions.remove')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -670,6 +700,7 @@ function EditTrackingDialog({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const mutation = useOrderMutation(orderId, (params: { tracking: string }) =>adminClient.orders.fulfillments.update(orderId, fulfillmentId, params),)@@ -688,23 +719,25 @@ function EditTrackingDialog({<DialogContent><DialogHeader><DialogTitle>Edit Tracking</DialogTitle>- <DialogDescription>Update the tracking number for this fulfillment.</DialogDescription>+ <DialogDescription>{t('admin.orders.detail.tracking.description')}</DialogDescription></DialogHeader><form onSubmit={handleSubmit}><DialogBody><FieldGroup><Field>- <FieldLabel htmlFor="tracking">Tracking Number</FieldLabel>+ <FieldLabel htmlFor="tracking">+ {t('admin.orders.detail.tracking.label')}+ </FieldLabel><Input id="tracking" name="tracking" defaultValue={currentTracking ?? ''} /></Field></FieldGroup></DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></DialogFooter></form>@@ -714,6 +747,7 @@ function EditTrackingDialog({}function ShipmentsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const confirm = useConfirm()@@ -738,7 +772,7 @@ function ShipmentsCard({ order }: { order: Order }) {<CardHeader><CardTitle><TruckIcon className="size-4" />- Fulfillments+ {t('admin.pages.orders.detail.section_shipments')}<Badge variant="outline">{fulfillments.length}</Badge></CardTitle><CardAction className="flex items-center gap-2">@@ -773,9 +807,9 @@ function ShipmentsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Ship this fulfillment?',+ message: t('admin.orders.detail.confirm.ship_message'),variant: 'default',- confirmLabel: 'Fulfill',+ confirmLabel: t('admin.pages.orders.detail.actions.ship'),})) {fulfillMutation.mutate(fulfillment.id)@@ -783,7 +817,7 @@ function ShipmentsCard({ order }: { order: Order }) {}}><TruckIcon className="size-4" />- Ship+ {t('admin.pages.orders.detail.actions.ship')}</DropdownMenuItem>)}{['pending', 'ready'].includes(fulfillment.status) && (@@ -794,9 +828,9 @@ function ShipmentsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Cancel this fulfillment?',+ message: t('admin.orders.detail.confirm.cancel_shipment_message'),variant: 'destructive',- confirmLabel: 'Cancel Fulfillment',+ confirmLabel: t('admin.actions.cancel'),})) {cancelFulfillmentMutation.mutate(fulfillment.id)@@ -804,7 +838,7 @@ function ShipmentsCard({ order }: { order: Order }) {}}><XCircleIcon className="size-4" />- Cancel Shipment+ {t('admin.actions.cancel')}</DropdownMenuItem></>)}@@ -828,7 +862,9 @@ function ShipmentsCard({ order }: { order: Order }) {{fulfillment.tracking && (<div className="text-sm">- <span className="text-muted-foreground">Tracking: </span>+ <span className="text-muted-foreground">+ {t('admin.orders.detail.tracking.prefix')}:{' '}+ </span>{fulfillment.tracking_url ? (<ahref={fulfillment.tracking_url}@@ -846,7 +882,11 @@ function ShipmentsCard({ order }: { order: Order }) {{fulfillment.fulfilled_at && (<span className="text-xs text-muted-foreground">- <RelativeTime iso={fulfillment.fulfilled_at} prefix="Shipped" fallback="" />+ <RelativeTime+ iso={fulfillment.fulfilled_at}+ prefix={t('admin.orders.detail.tracking.shipped_prefix')}+ fallback=""+ /></span>)}</div>@@ -872,6 +912,7 @@ function ShipmentsCard({ order }: { order: Order }) {// ---------------------------------------------------------------------------function PaymentsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const confirm = useConfirm()const [addOpen, setAddOpen] = useState(false)@@ -890,30 +931,40 @@ function PaymentsCard({ order }: { order: Order }) {<CardHeader><CardTitle><CreditCardIcon className="size-4" />- Payments+ {t('admin.pages.orders.detail.section_payments')}{payments.length > 0 && <Badge variant="outline">{payments.length}</Badge>}</CardTitle><CardAction className="flex items-center gap-2">{order.payment_status && <StatusBadge status={order.payment_status} />}<Button size="sm" variant="outline" onClick={() => setAddOpen(true)}><PlusIcon data-icon="inline-start" />- Add Payment+ {t('admin.actions.add')}</Button></CardAction></CardHeader>{payments.length === 0 ? (<CardContent>- <p className="text-center text-muted-foreground py-8">No payments yet</p>+ <p className="text-center text-muted-foreground py-8">+ {t('admin.pages.orders.detail.empty_payments')}+ </p></CardContent>) : (<div className="overflow-x-auto"><table className="w-full text-sm"><thead><tr className="border-b bg-muted/50 text-muted-foreground">- <th className="p-3 pl-5 text-left font-normal">Number</th>- <th className="p-3 text-left font-normal">Method</th>- <th className="p-3 text-left font-normal">State</th>- <th className="p-3 text-right font-normal">Amount</th>+ <th className="p-3 pl-5 text-left font-normal">+ {t('admin.orders.detail.payments_table.number')}+ </th>+ <th className="p-3 text-left font-normal">+ {t('admin.orders.detail.payments_table.method')}+ </th>+ <th className="p-3 text-left font-normal">+ {t('admin.orders.detail.payments_table.state')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.detail.payments_table.amount')}+ </th><th className="p-3 pr-5 w-10" /></tr></thead>@@ -946,9 +997,9 @@ function PaymentsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Capture this payment?',+ message: t('admin.orders.detail.confirm.capture_message'),variant: 'default',- confirmLabel: 'Capture',+ confirmLabel: t('admin.pages.orders.detail.actions.capture'),})) {captureMutation.mutate(payment.id)@@ -956,7 +1007,7 @@ function PaymentsCard({ order }: { order: Order }) {}}><CreditCardIcon className="size-4" />- Capture+ {t('admin.pages.orders.detail.actions.capture')}</DropdownMenuItem>)}{(payment.status === 'checkout' ||@@ -967,9 +1018,9 @@ function PaymentsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Void this payment?',+ message: t('admin.orders.detail.confirm.void_message'),variant: 'destructive',- confirmLabel: 'Void Payment',+ confirmLabel: t('admin.pages.orders.detail.actions.void'),})) {voidMutation.mutate(payment.id)@@ -977,7 +1028,7 @@ function PaymentsCard({ order }: { order: Order }) {}}><XCircleIcon className="size-4" />- Void+ {t('admin.pages.orders.detail.actions.void')}</DropdownMenuItem>)}</DropdownMenuContent>@@ -1004,6 +1055,7 @@ function AddPaymentDialog({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const orderId = order.idconst customerId = order.customer_id ?? undefinedconst [paymentMethodId, setPaymentMethodId] = useState<string>('')@@ -1083,13 +1135,15 @@ function AddPaymentDialog({<DialogContent><DialogHeader><DialogTitle>Add Payment</DialogTitle>- <DialogDescription>Charge a payment method against this order.</DialogDescription>+ <DialogDescription>{t('admin.orders.detail.payment_form.description')}</DialogDescription></DialogHeader><form onSubmit={handleSubmit}><DialogBody><FieldGroup><Field>- <FieldLabel htmlFor="pay-method">Payment method</FieldLabel>+ <FieldLabel htmlFor="pay-method">+ {t('admin.orders.detail.payment_form.method_label')}+ </FieldLabel><Selectvalue={paymentMethodId}onValueChange={(v) => {@@ -1098,10 +1152,12 @@ function AddPaymentDialog({}}><SelectTrigger id="pay-method">- <SelectValue placeholder="Choose a payment method...">+ <SelectValue+ placeholder={t('admin.orders.detail.payment_form.method_placeholder')}+ >{(value) =>paymentMethods.find((m) => m.id === value)?.name ??- 'Choose a payment method...'+ t('admin.orders.detail.payment_form.method_placeholder')}</SelectValue></SelectTrigger>@@ -1117,7 +1173,9 @@ function AddPaymentDialog({{sourceRequired && (<Field>- <FieldLabel htmlFor="pay-source">Source</FieldLabel>+ <FieldLabel htmlFor="pay-source">+ {t('admin.orders.detail.payment_form.source_label')}+ </FieldLabel>{!customerId ? (<p className="text-sm text-destructive">This payment method requires a saved source. Assign a customer to the order@@ -1162,28 +1220,29 @@ function AddPaymentDialog({onChange={(e) => setAmount(e.target.value)}/><p className="text-xs text-muted-foreground mt-1">- Leave blank to default to the outstanding balance (- {order.display_amount_due ?? '$0.00'}).+ {t('admin.orders.detail.payment_form.amount_help')}</p></Field><Field><label className="flex items-center gap-2 text-sm" htmlFor="pay-capture"><Switch id="pay-capture" checked={capture} onCheckedChange={setCapture} />- Capture immediately+ {t('admin.orders.detail.payment_form.capture_immediately')}</label></Field></FieldGroup></DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"disabled={!canSubmit || mutation.isPending || captureMutation.isPending}>- {mutation.isPending || captureMutation.isPending ? 'Processing…' : 'Add Payment'}+ {mutation.isPending || captureMutation.isPending+ ? t('admin.actions.saving')+ : t('admin.actions.add')}</Button></DialogFooter></form>@@ -1222,73 +1281,124 @@ function SummaryRow({}function OrderSummaryCard({ order }: { order: Order }) {+ const { t } = useTranslation()const outstandingBalance = Number.parseFloat(order.amount_due ?? '0')return (<Card><CardHeader>- <CardTitle>Summary</CardTitle>+ <CardTitle>{t('admin.pages.orders.detail.section_summary')}</CardTitle></CardHeader><div className="py-1">- {order.created_by && <SummaryRow label="Created by" value={order.created_by.full_name} />}- <SummaryRow label="Created at" value={formatDate(order.created_at)} />+ {order.created_by && (+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.created_by')}+ value={order.created_by.full_name}+ />+ )}+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.created_at')}+ value={formatDate(order.created_at)}+ />{order.completed_at && (- <SummaryRow label="Completed at" value={formatDate(order.completed_at)} />+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.completed_at')}+ value={formatDate(order.completed_at)}+ />)}{order.canceled_at && (<>- <SummaryRow label="Canceled at" value={formatDate(order.canceled_at)} />- {order.canceler && <SummaryRow label="Canceler" value={order.canceler.full_name} />}+ <SummaryRow+ label={t('admin.orders.detail.summary.canceled_at')}+ value={formatDate(order.canceled_at)}+ />+ {order.canceler && (+ <SummaryRow+ label={t('admin.orders.detail.summary.canceler')}+ value={order.canceler.full_name}+ />+ )}</>)}{order.approved_at && order.approver && (- <SummaryRow label="Approved by" value={order.approver.full_name} />+ <SummaryRow+ label={t('admin.orders.detail.summary.approved_by')}+ value={order.approver.full_name}+ />)}<Separator />{order.market && (- <SummaryRow label="Market" value={order.market.name ?? order.market_id ?? '—'} />+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.market')}+ value={order.market.name ?? order.market_id ?? '—'}+ />)}- <SummaryRow label="Locale" value={order.locale ?? '—'} />- <SummaryRow label="Currency" value={order.currency} />+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.locale')}+ value={order.locale ?? '—'}+ />+ <SummaryRow+ label={t('admin.pages.orders.detail.summary.currency')}+ value={order.currency}+ /><Separator />- <SummaryRow label="Subtotal" value={order.display_item_total} />+ <SummaryRow label={t('admin.fields.subtotal.label')} value={order.display_item_total} />{Number.parseFloat(order.delivery_total) > 0 && (- <SummaryRow label="Shipping" value={order.display_delivery_total} />+ <SummaryRow+ label={t('admin.fields.shipping.label')}+ value={order.display_delivery_total}+ />)}{Number.parseFloat(order.discount_total) !== 0 && (- <SummaryRow label="Promotions" value={order.display_discount_total} />+ <SummaryRow+ label={t('admin.orders.detail.summary.promotions')}+ value={order.display_discount_total}+ />)}{Number.parseFloat(order.adjustment_total) !== 0 && (- <SummaryRow label="Adjustments" value={order.display_adjustment_total} />+ <SummaryRow+ label={t('admin.orders.detail.summary.adjustments')}+ value={order.display_adjustment_total}+ />)}{Number.parseFloat(order.included_tax_total) > 0 && (- <SummaryRow label="Tax (included)" value={order.display_included_tax_total} />+ <SummaryRow+ label={t('admin.orders.detail.summary.tax_included')}+ value={order.display_included_tax_total}+ />)}{Number.parseFloat(order.additional_tax_total) > 0 && (- <SummaryRow label="Tax (additional)" value={order.display_additional_tax_total} />+ <SummaryRow+ label={t('admin.orders.detail.summary.tax_additional')}+ value={order.display_additional_tax_total}+ />)}<Separator />- <SummaryRow label="Total" value={order.display_total} bold />+ <SummaryRow label={t('admin.fields.total.label')} value={order.display_total} bold /><Separator />- <SummaryRow label="Payment total" value={order.display_payment_total} highlight /><SummaryRow- label="Outstanding balance"+ label={t('admin.orders.detail.summary.payment_total')}+ value={order.display_payment_total}+ highlight+ />+ <SummaryRow+ label={t('admin.orders.detail.summary.outstanding_balance')}value={order.display_amount_due}highlightdanger={outstandingBalance > 0}@@ -1303,6 +1413,7 @@ function OrderSummaryCard({ order }: { order: Order }) {// ---------------------------------------------------------------------------function DiscountsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const confirm = useConfirm()const [giftCardOpen, setGiftCardOpen] = useState(false)@@ -1324,19 +1435,23 @@ function DiscountsCard({ order }: { order: Order }) {<><Card><CardHeader>- <CardTitle>Gift Card & Store Credit</CardTitle>+ <CardTitle>{t('admin.orders.detail.gift_card_section.title')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-3">{/* Gift card */}<div className="flex items-center justify-between gap-2"><div className="flex flex-col">- <span className="text-sm font-medium">Gift card</span>+ <span className="text-sm font-medium">+ {t('admin.orders.detail.gift_card_section.gift_card_label')}+ </span>{order.gift_card ? (<span className="text-xs text-muted-foreground">{order.gift_card.code} · {order.display_gift_card_total}</span>) : (- <span className="text-xs text-muted-foreground">None applied</span>+ <span className="text-xs text-muted-foreground">+ {t('admin.orders.detail.gift_card_section.none_applied')}+ </span>)}</div>{order.gift_card ? (@@ -1346,8 +1461,8 @@ function DiscountsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Remove this gift card from the order?',- confirmLabel: 'Remove',+ message: t('admin.orders.detail.confirm.remove_gift_card_message'),+ confirmLabel: t('admin.actions.remove'),})) {removeGiftCardMutation.mutate(undefined)@@ -1355,12 +1470,12 @@ function DiscountsCard({ order }: { order: Order }) {}}disabled={removeGiftCardMutation.isPending}>- Remove+ {t('admin.actions.remove')}</Button>) : (<Button size="sm" variant="outline" onClick={() => setGiftCardOpen(true)}><PlusIcon className="size-4" />- Apply+ {t('admin.orders.detail.gift_card_section.apply_button')}</Button>)}</div>@@ -1370,14 +1485,19 @@ function DiscountsCard({ order }: { order: Order }) {{/* Store credit */}<div className="flex items-center justify-between gap-2"><div className="flex flex-col">- <span className="text-sm font-medium">Store credit</span>+ <span className="text-sm font-medium">+ {t('admin.orders.detail.gift_card_section.store_credit_label')}+ </span>{hasStoreCredit ? (<span className="text-xs text-muted-foreground">- {order.display_store_credit_total} applied+ {order.display_store_credit_total}{' '}+ {t('admin.orders.detail.gift_card_section.applied_suffix')}</span>) : (<span className="text-xs text-muted-foreground">- {hasCustomer ? "Apply customer's available balance" : 'Requires a customer'}+ {hasCustomer+ ? t('admin.orders.detail.gift_card_section.apply_balance')+ : t('admin.orders.detail.gift_card_section.requires_customer')}</span>)}</div>@@ -1388,8 +1508,8 @@ function DiscountsCard({ order }: { order: Order }) {onClick={async () => {if (await confirm({- message: 'Remove store credit from the order?',- confirmLabel: 'Remove',+ message: t('admin.orders.detail.confirm.remove_store_credit_message'),+ confirmLabel: t('admin.actions.remove'),})) {removeStoreCreditMutation.mutate(undefined)@@ -1397,7 +1517,7 @@ function DiscountsCard({ order }: { order: Order }) {}}disabled={removeStoreCreditMutation.isPending}>- Remove+ {t('admin.actions.remove')}</Button>) : (<Button@@ -1407,7 +1527,7 @@ function DiscountsCard({ order }: { order: Order }) {onClick={() => applyStoreCreditMutation.mutate(undefined)}><PlusIcon className="size-4" />- Apply+ {t('admin.orders.detail.gift_card_section.apply_button')}</Button>)}</div>@@ -1428,6 +1548,7 @@ function ApplyGiftCardDialog({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const mutation = useOrderMutation(orderId, (params: { code: string }) =>adminClient.orders.giftCards.apply(orderId, params),)@@ -1444,8 +1565,10 @@ function ApplyGiftCardDialog({<Dialog open={open} onOpenChange={onOpenChange}><DialogContent><DialogHeader>- <DialogTitle>Apply Gift Card</DialogTitle>- <DialogDescription>Enter the gift card code to apply it to this order.</DialogDescription>+ <DialogTitle>{t('admin.orders.detail.gift_card_section.apply_dialog_title')}</DialogTitle>+ <DialogDescription>+ {t('admin.orders.detail.gift_card_section.apply_dialog_description')}+ </DialogDescription></DialogHeader><form onSubmit={handleSubmit}><DialogBody>@@ -1464,10 +1587,10 @@ function ApplyGiftCardDialog({</DialogBody><DialogFooter><Button type="button" variant="outline" onClick={() => onOpenChange(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" disabled={mutation.isPending}>- {mutation.isPending ? 'Applying…' : 'Apply'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.add')}</Button></DialogFooter></form>@@ -1481,6 +1604,7 @@ function ApplyGiftCardDialog({// ---------------------------------------------------------------------------function CustomerCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const queryClient = useQueryClient()const customer = order.customer@@ -1500,13 +1624,15 @@ function CustomerCard({ order }: { order: Order }) {})const editTitle =- editAddress === 'shipping_address' ? 'Edit Shipping Address' : 'Edit Billing Address'+ editAddress === 'shipping_address'+ ? t('admin.orders.detail.address_edit.shipping_title')+ : t('admin.orders.detail.address_edit.billing_title')return (<><Card><CardHeader>- <CardTitle>Customer</CardTitle>+ <CardTitle>{t('admin.pages.orders.detail.section_customer')}</CardTitle><CardAction><DropdownMenu><DropdownMenuTrigger asChild>@@ -1517,11 +1643,11 @@ function CustomerCard({ order }: { order: Order }) {<DropdownMenuContent align="end"><DropdownMenuItem onClick={() => setEditAddress('shipping_address')}><PencilIcon className="size-4" />- Edit Shipping Address+ {t('admin.orders.detail.address_edit.shipping_title')}</DropdownMenuItem><DropdownMenuItem onClick={() => setEditAddress('billing_address')}><PencilIcon className="size-4" />- Edit Billing Address+ {t('admin.orders.detail.address_edit.billing_title')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -1542,11 +1668,19 @@ function CustomerCard({ order }: { order: Order }) {) : order.email ? (<div className="text-sm text-blue-600">{order.email}</div>) : (- <span className="text-sm text-muted-foreground">No customer information</span>+ <span className="text-sm text-muted-foreground">+ {t('admin.orders.detail.no_customer')}+ </span>)}- <AddressBlock title="Shipping Address" address={order.shipping_address} />- <AddressBlock title="Billing Address" address={order.billing_address} />+ <AddressBlock+ title={t('admin.pages.orders.detail.section_shipping_address')}+ address={order.shipping_address}+ />+ <AddressBlock+ title={t('admin.pages.orders.detail.section_billing_address')}+ address={order.billing_address}+ /></CardContent></Card>@@ -1571,6 +1705,7 @@ function CustomerCard({ order }: { order: Order }) {// ---------------------------------------------------------------------------function SpecialInstructionsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const [editing, setEditing] = useState(false)@@ -1590,7 +1725,7 @@ function SpecialInstructionsCard({ order }: { order: Order }) {return (<Card><CardHeader>- <CardTitle>Special Instructions</CardTitle>+ <CardTitle>{t('admin.orders.detail.section_customer_note')}</CardTitle><CardAction><Button variant="ghost" size="icon-xs" onClick={() => setEditing(!editing)}><PencilIcon className="size-4" />@@ -1603,17 +1738,17 @@ function SpecialInstructionsCard({ order }: { order: Order }) {<Textarea name="customer_note" defaultValue={order.customer_note ?? ''} /><div className="flex justify-end gap-2"><Button type="button" variant="outline" size="sm" onClick={() => setEditing(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></div></form>) : order.customer_note ? (<p className="text-sm text-muted-foreground whitespace-pre-wrap">{order.customer_note}</p>) : (- <p className="text-sm text-muted-foreground">None</p>+ <p className="text-sm text-muted-foreground">{t('admin.common.none')}</p>)}</CardContent></Card>@@ -1625,6 +1760,7 @@ function SpecialInstructionsCard({ order }: { order: Order }) {// ---------------------------------------------------------------------------function TagsCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const [editing, setEditing] = useState(false)const [tags, setTags] = useState<string[]>(order.tags ?? [])@@ -1636,7 +1772,7 @@ function TagsCard({ order }: { order: Order }) {return (<Card><CardHeader>- <CardTitle>Tags</CardTitle>+ <CardTitle>{t('admin.pages.customers.detail.section_tags')}</CardTitle><CardAction><Buttonvariant="ghost"@@ -1656,7 +1792,7 @@ function TagsCard({ order }: { order: Order }) {<TagCombobox taggableType="Spree::Order" value={tags} onChange={setTags} /><div className="flex justify-end gap-2"><Button type="button" variant="outline" size="sm" onClick={() => setEditing(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="button"@@ -1664,7 +1800,7 @@ function TagsCard({ order }: { order: Order }) {disabled={mutation.isPending}onClick={() => mutation.mutate({ tags }, { onSuccess: () => setEditing(false) })}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></div></div>@@ -1675,7 +1811,7 @@ function TagsCard({ order }: { order: Order }) {))}</div>) : (- <p className="text-sm text-muted-foreground">None</p>+ <p className="text-sm text-muted-foreground">{t('admin.common.none')}</p>)}</CardContent></Card>@@ -1687,6 +1823,7 @@ function TagsCard({ order }: { order: Order }) {// ---------------------------------------------------------------------------function InternalNoteCard({ order }: { order: Order }) {+ const { t } = useTranslation()const { orderId } = Route.useParams()const [editing, setEditing] = useState(false)@@ -1706,7 +1843,7 @@ function InternalNoteCard({ order }: { order: Order }) {return (<Card><CardHeader>- <CardTitle>Internal Note</CardTitle>+ <CardTitle>{t('admin.orders.detail.section_internal_note')}</CardTitle><CardAction><Button variant="ghost" size="icon-xs" onClick={() => setEditing(!editing)}><PencilIcon className="size-4" />@@ -1719,17 +1856,17 @@ function InternalNoteCard({ order }: { order: Order }) {<Textarea name="internal_note" defaultValue={order.internal_note ?? ''} /><div className="flex justify-end gap-2"><Button type="button" variant="outline" size="sm" onClick={() => setEditing(false)}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={mutation.isPending}>- {mutation.isPending ? 'Saving…' : 'Save'}+ {mutation.isPending ? t('admin.actions.saving') : t('admin.actions.save')}</Button></div></form>) : order.internal_note ? (<p className="text-sm text-muted-foreground whitespace-pre-wrap">{order.internal_note}</p>) : (- <p className="text-sm text-muted-foreground">None</p>+ <p className="text-sm text-muted-foreground">{t('admin.common.none')}</p>)}</CardContent></Card>diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsxindex 369b6af575..752a3a429e 100644--- a/packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsx@@ -1,5 +1,6 @@import { createFileRoute } from '@tanstack/react-router'import { PlusIcon } from 'lucide-react'+import { useTranslation } from 'react-i18next'import { adminClient } from '@/client'import { ResourceTable, resourceSearchSchema } from '@/components/spree/resource-table'import { Button } from '@/components/ui/button'@@ -11,6 +12,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/orders/drafts')({})function DraftOrdersPage() {+ const { t } = useTranslation()const searchParams = Route.useSearch()return (@@ -20,11 +22,11 @@ function DraftOrdersPage() {queryFn={(params) => adminClient.orders.list(params)}searchParams={searchParams}defaultParams={{ incomplete: 1 }}- title="Draft Orders"+ title={t('admin.pages.orders.drafts_title')}actions={<Button size="sm" className="h-[2.125rem]"><PlusIcon className="size-4" />- New Order+ {t('admin.pages.orders.new.title')}</Button>}/>diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsxindex 98ff20ef65..be95427fc2 100644--- a/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx@@ -115,7 +115,7 @@ function NewOrderPage() {return (<form onSubmit={form.handleSubmit(onSubmit)}><ResourceLayout- header={<PageHeader title="New Order" backTo="orders/drafts" />}+ header={<PageHeader title={t('admin.pages.orders.new.title')} backTo="orders/drafts" />}main={<>{errors.root?.message && (@@ -125,12 +125,12 @@ function NewOrderPage() {)}<Card><CardHeader>- <CardTitle>Customer</CardTitle>+ <CardTitle>{t('admin.pages.orders.new.section_customer')}</CardTitle></CardHeader><CardContent><FieldGroup><Field>- <FieldLabel>Search by email or name</FieldLabel>+ <FieldLabel>{t('admin.pages.orders.new.select_customer')}</FieldLabel><ResourceCombobox<Customer>{...customerAutocompleteProps('customer-picker')}value={customer?.id}@@ -165,9 +165,7 @@ function NewOrderPage() {{customer && (<div className="mt-4 flex items-center gap-3"><Switch checked={useDefaultAddress} onCheckedChange={setUseDefaultAddress} />- <span className="text-sm">- Use customer's default billing & shipping addresses- </span>+ <span className="text-sm">{t('admin.orders.new.use_default_addresses')}</span></div>)}</CardContent>@@ -175,14 +173,14 @@ function NewOrderPage() {<Card><CardHeader>- <CardTitle>Items</CardTitle>+ <CardTitle>{t('admin.pages.orders.new.section_items')}</CardTitle></CardHeader><CardContent><FieldGroup><Field>- <FieldLabel>Add a variant</FieldLabel>+ <FieldLabel>{t('admin.orders.new.add_variant')}</FieldLabel><Input- placeholder="Search by name or SKU (3+ chars)…"+ placeholder={t('admin.pages.orders.new.search_variant')}value={variantSearch}onChange={(e) => setVariantSearch(e.target.value)}/>@@ -211,9 +209,15 @@ function NewOrderPage() {<table className="w-full text-sm"><thead><tr className="border-b bg-muted/50 text-muted-foreground">- <th className="p-3 pl-5 text-left font-normal">Variant</th>- <th className="p-3 text-left font-normal">SKU</th>- <th className="p-3 text-right font-normal">Qty</th>+ <th className="p-3 pl-5 text-left font-normal">+ {t('admin.orders.new.items_table.variant')}+ </th>+ <th className="p-3 text-left font-normal">+ {t('admin.orders.new.items_table.sku')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.orders.new.items_table.qty')}+ </th><th className="p-3 pr-5 w-10" /></tr></thead>@@ -257,7 +261,7 @@ function NewOrderPage() {<><Card><CardHeader>- <CardTitle>Notes</CardTitle>+ <CardTitle>{t('admin.pages.orders.new.section_notes')}</CardTitle></CardHeader><CardContent><FieldGroup>@@ -291,7 +295,7 @@ function NewOrderPage() {<Card><CardHeader>- <CardTitle>Discount</CardTitle>+ <CardTitle>{t('admin.orders.new.section_discount')}</CardTitle></CardHeader><CardContent><FieldGroup>@@ -314,7 +318,9 @@ function NewOrderPage() {<Card><CardContent className="flex flex-col gap-3 pt-6"><Button type="submit" disabled={!canSubmit}>- {createMutation.isPending ? 'Creating…' : 'Create Order'}+ {createMutation.isPending+ ? t('admin.actions.creating')+ : t('admin.pages.orders.new.title')}</Button>{createMutation.error && !errors.root && (<p className="text-sm text-destructive">@@ -322,7 +328,7 @@ function NewOrderPage() {</p>)}<p className="text-xs text-muted-foreground">- Creates a draft order. Add payments and complete it after creation.+ {t('admin.orders.new.creates_draft_note')}</p></CardContent></Card>diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx b/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsxindex 20925af5c4..0979ec83a2 100644--- a/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx@@ -129,6 +129,7 @@ function productToFormValues(product: Product): ProductFormValues {// ---------------------------------------------------------------------------function ProductDetailPage() {+ const { t } = useTranslation()const { productId } = Route.useParams()const { data: product, isLoading, error, refetch } = useProduct(productId)@@ -136,7 +137,7 @@ function ProductDetailPage() {if (error || !product) {return (<ErrorState- title="Failed to load product"+ title={t('admin.errors.failed_to_load_product')}error={error as Error | undefined}onRetry={() => refetch()}/>@@ -151,6 +152,7 @@ function ProductDetailPage() {// ---------------------------------------------------------------------------function ProductForm({ product }: { product: Product }) {+ const { t } = useTranslation()const confirm = useConfirm()const { productId, storeId } = Route.useParams()const router = useRouter()@@ -185,11 +187,11 @@ function ProductForm({ product }: { product: Product }) {try {await updateProduct.mutateAsync({ id: productId, ...payload })- toast.success('Product saved')+ toast.success(t('admin.messages.product_saved'))} catch (err) {if (mapSpreeErrorsToForm(err, form.setError)) returnif (err instanceof SpreeError) throw err- toast.error('Failed to save product')+ toast.error(t('admin.errors.failed_to_save'))}}@@ -197,21 +199,21 @@ function ProductForm({ product }: { product: Product }) {const handleDelete = async () => {const confirmed = await confirm({- message: 'Are you sure you want to delete this product?',+ message: t('admin.products.delete_confirm'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!confirmed) returntry {await deleteProduct.mutateAsync(productId)- toast.success('Product deleted')+ toast.success(t('admin.messages.product_deleted'))await router.navigate({to: '/$storeId/products',params: { storeId },search: { filters: [], columns: [] },})} catch {- toast.error('Failed to delete product')+ toast.error(t('admin.errors.failed_to_delete'))}}@@ -228,10 +230,10 @@ function ProductForm({ product }: { product: Product }) {title={product.name}backTo="products"badges={<StatusBadge status={product.status} />}- actions={<FormActions form={form} saveLabel="Save product" />}+ actions={<FormActions form={form} saveLabel={t('admin.products.save_label')} />}resource={{ id: product.id }}onDelete={handleDelete}- deleteLabel="Delete product"+ deleteLabel={t('admin.products.delete_label')}jsonPreview={{title: `Product ${product.name}`,queryKey: ['json', 'product', productId],@@ -285,7 +287,7 @@ function GeneralCard({ form }: FormCardProps) {return (<Card><CardHeader>- <CardTitle>General</CardTitle>+ <CardTitle>{t('admin.pages.products.section_basics')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-4"><Field>@@ -307,7 +309,7 @@ function GeneralCard({ form }: FormCardProps) {<RichTextEditorvalue={field.value}onChange={field.onChange}- placeholder="Write a product description..."+ placeholder={t('admin.fields.product.description.placeholder')}/>)}/>@@ -329,6 +331,7 @@ interface PendingUpload {}function MediaCard({ productId, variants }: { productId: string; variants: Variant[] }) {+ const { t } = useTranslation()const { data: mediaResponse } = useProductMedia(productId)const createMedia = useCreateProductMedia(productId)const updateMedia = useUpdateProductMedia(productId)@@ -430,17 +433,17 @@ function MediaCard({ productId, variants }: { productId: string; variants: Variaconst handleDeleteMedia = async (mediaId: string) => {const confirmed = await confirm({- message: 'Delete this media? This cannot be undone.',+ message: t('admin.products.media.delete_confirm'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!confirmed) returntry {await deleteMedia.mutateAsync(mediaId)- toast.success('Media deleted')+ toast.success(t('admin.common.deleted'))} catch {- toast.error('Failed to delete media')+ toast.error(t('admin.errors.failed_to_delete'))}}@@ -448,7 +451,7 @@ function MediaCard({ productId, variants }: { productId: string; variants: Varia<><Card><CardHeader>- <CardTitle>Media</CardTitle>+ <CardTitle>{t('admin.pages.products.section_media')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-4">{/* Media grid — sortable items first, pending uploads appended after */}@@ -497,10 +500,10 @@ function MediaCard({ productId, variants }: { productId: string; variants: VariaonClick={() => fileInputRef.current?.click()}><ImagePlusIcon className="size-8 text-muted-foreground" />- <p className="text-sm text-muted-foreground">- Drag & drop media here, or click to browse+ <p className="text-sm text-muted-foreground">{t('admin.products.media.drop_hint')}</p>+ <p className="text-xs text-muted-foreground">+ {t('admin.products.media.file_types_hint')}</p>- <p className="text-xs text-muted-foreground">PNG, JPG, WebP up to 10MB</p></button><inputref={fileInputRef}@@ -613,10 +616,11 @@ function InventoryCard({storeId,hasVariants,}: FormCardProps & { storeId: string; hasVariants: boolean }) {+ const { t } = useTranslation()return (<Card><CardHeader>- <CardTitle>Inventory</CardTitle>+ <CardTitle>{t('admin.pages.products.section_inventory')}</CardTitle></CardHeader><CardContent><InventorySection form={form} storeId={storeId} hasVariants={hasVariants} />@@ -630,6 +634,7 @@ function InventoryCard({// ---------------------------------------------------------------------------function SEOCard({ form, product }: FormCardProps & { product: Product }) {+ const { t } = useTranslation()const slug = form.watch('slug')const metaTitle = form.watch('meta_title')const metaDescription = form.watch('meta_description')@@ -638,7 +643,7 @@ function SEOCard({ form, product }: FormCardProps & { product: Product }) {return (<Card><CardHeader>- <CardTitle>SEO</CardTitle>+ <CardTitle>{t('admin.pages.products.section_seo')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-4">{/* Preview */}@@ -653,31 +658,33 @@ function SEOCard({ form, product }: FormCardProps & { product: Product }) {</div><Field>- <FieldLabel htmlFor="product-slug">URL handle</FieldLabel>+ <FieldLabel htmlFor="product-slug">{t('admin.fields.slug.label')}</FieldLabel><Inputid="product-slug"- placeholder="product-url-handle"+ placeholder={t('admin.products.seo.slug_placeholder')}aria-invalid={!!errors.slug || undefined}{...form.register('slug')}/><FieldError errors={[errors.slug]} /></Field><Field>- <FieldLabel htmlFor="product-meta-title">Meta title</FieldLabel>+ <FieldLabel htmlFor="product-meta-title">{t('admin.fields.meta_title.label')}</FieldLabel><Inputid="product-meta-title"- placeholder="SEO title"+ placeholder={t('admin.products.seo.meta_title_placeholder')}aria-invalid={!!errors.meta_title || undefined}{...form.register('meta_title')}/><FieldError errors={[errors.meta_title]} /></Field><Field>- <FieldLabel htmlFor="product-meta-description">Meta description</FieldLabel>+ <FieldLabel htmlFor="product-meta-description">+ {t('admin.fields.meta_description.label')}+ </FieldLabel><Textareaid="product-meta-description"rows={3}- placeholder="SEO description"+ placeholder={t('admin.products.seo.meta_description_placeholder')}aria-invalid={!!errors.meta_description || undefined}{...form.register('meta_description')}/>@@ -693,16 +700,17 @@ function SEOCard({ form, product }: FormCardProps & { product: Product }) {// ---------------------------------------------------------------------------function StatusCard({ form }: FormCardProps) {+ const { t } = useTranslation()const status = form.watch('status')return (<Card><CardHeader>- <CardTitle>Status</CardTitle>+ <CardTitle>{t('admin.pages.products.section_status')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-4"><Field>- <FieldLabel>Status</FieldLabel>+ <FieldLabel>{t('admin.fields.status.label')}</FieldLabel><Controllername="status"control={form.control}@@ -712,9 +720,15 @@ function StatusCard({ form }: FormCardProps) {<SelectValue /></SelectTrigger><SelectContent>- <SelectItem value="draft">Draft</SelectItem>- <SelectItem value="active">Active</SelectItem>- <SelectItem value="archived">Archived</SelectItem>+ <SelectItem value="draft">+ {t('admin.pages.products.status_options.draft')}+ </SelectItem>+ <SelectItem value="active">+ {t('admin.pages.products.status_options.active')}+ </SelectItem>+ <SelectItem value="archived">+ {t('admin.pages.products.status_options.archived')}+ </SelectItem></SelectContent></Select>)}@@ -723,7 +737,7 @@ function StatusCard({ form }: FormCardProps) {{status !== 'active' && (<Field>- <FieldLabel>Schedule activation</FieldLabel>+ <FieldLabel>{t('admin.fields.product.make_active_at.label')}</FieldLabel><Controllername="make_active_at"control={form.control}@@ -731,7 +745,7 @@ function StatusCard({ form }: FormCardProps) {<StoreDatePickervalue={field.value}onChange={field.onChange}- placeholder="Pick a date"+ placeholder={t('admin.common.pick_date')}includeTime/>)}@@ -740,7 +754,7 @@ function StatusCard({ form }: FormCardProps) {)}<Field>- <FieldLabel>Available on</FieldLabel>+ <FieldLabel>{t('admin.fields.product.available_on.label')}</FieldLabel><Controllername="available_on"control={form.control}@@ -748,7 +762,7 @@ function StatusCard({ form }: FormCardProps) {<StoreDatePickervalue={field.value}onChange={field.onChange}- placeholder="Pick a date"+ placeholder={t('admin.common.pick_date')}includeTime/>)}@@ -756,7 +770,7 @@ function StatusCard({ form }: FormCardProps) {</Field><Field>- <FieldLabel>Discontinue on</FieldLabel>+ <FieldLabel>{t('admin.fields.product.discontinue_on.label')}</FieldLabel><Controllername="discontinue_on"control={form.control}@@ -764,7 +778,7 @@ function StatusCard({ form }: FormCardProps) {<StoreDatePickervalue={field.value}onChange={field.onChange}- placeholder="Pick a date"+ placeholder={t('admin.common.pick_date')}includeTime/>)}@@ -780,17 +794,18 @@ function StatusCard({ form }: FormCardProps) {// ---------------------------------------------------------------------------function CategorizationCard({ form }: FormCardProps) {+ const { t } = useTranslation()const { data: categoriesResponse } = useCategories()const categories = categoriesResponse?.data ?? []return (<Card><CardHeader>- <CardTitle>Categorization</CardTitle>+ <CardTitle>{t('admin.pages.products.section_categorization')}</CardTitle></CardHeader><CardContent className="flex flex-col gap-4"><Field>- <FieldLabel>Categories</FieldLabel>+ <FieldLabel>{t('admin.fields.product.category_ids.label')}</FieldLabel><Controllername="category_ids"control={form.control}@@ -805,7 +820,7 @@ function CategorizationCard({ form }: FormCardProps) {</Field><Field>- <FieldLabel>Tags</FieldLabel>+ <FieldLabel>{t('admin.fields.product.tags.label')}</FieldLabel><Controllername="tags"control={form.control}@@ -889,24 +904,25 @@ function CategoryCombobox({// ---------------------------------------------------------------------------function TaxCard({ form }: FormCardProps) {+ const { t } = useTranslation()const { data: taxCategoriesResponse } = useTaxCategories()const taxCategories = taxCategoriesResponse?.data ?? []return (<Card><CardHeader>- <CardTitle>Tax</CardTitle>+ <CardTitle>{t('admin.fields.tax.label')}</CardTitle></CardHeader><CardContent><Field>- <FieldLabel>Tax category</FieldLabel>+ <FieldLabel>{t('admin.fields.tax_category_id.label')}</FieldLabel><Controllername="tax_category_id"control={form.control}render={({ field }) => (<Select value={field.value ?? ''} onValueChange={(v) => field.onChange(v || null)}><SelectTrigger className="w-full">- <SelectValue placeholder="Select tax category" />+ <SelectValue placeholder={t('admin.products.tax_category_placeholder')} /></SelectTrigger><SelectContent>{taxCategories.map((cat) => (diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/options.tsx b/packages/admin/src/routes/_authenticated/$storeId/products/options.tsxindex bc8e8aef6e..7d481b9a0a 100644--- a/packages/admin/src/routes/_authenticated/$storeId/products/options.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/products/options.tsx@@ -95,6 +95,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/products/options'})function OptionTypesPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof optionTypesSearchSchema>const navigate = useNavigate()const queryClient = useQueryClient()@@ -129,7 +130,7 @@ function OptionTypesPage() {<Can I="create" a={Subject.OptionType}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- Add option type+ {t('admin.actions.add')}</Button></Can>}@@ -151,10 +152,13 @@ function OptionTypesPage() {// Form schema// ---------------------------------------------------------------------------+// NOTE: kind labels are translated at render time via i18n (see+// `OptionTypeFormFields`); the `label` here is the i18n key suffix used by+// `kindLabel(value)` below.const KIND_OPTIONS = [- { value: 'dropdown', label: 'Dropdown' },- { value: 'color_swatch', label: 'Color swatch' },- { value: 'buttons', label: 'Buttons' },+ { value: 'dropdown', label: 'dropdown' },+ { value: 'color_swatch', label: 'color_swatch' },+ { value: 'buttons', label: 'buttons' },] as constconst HEX_RE = /^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/@@ -236,6 +240,7 @@ function CreateOptionTypeSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateOptionType()const form = useForm<FormValues>({// eslint-disable-next-line @typescript-eslint/no-explicit-any@@ -266,10 +271,8 @@ function CreateOptionTypeSheet({><SheetContent className="sm:max-w-2xl"><SheetHeader>- <SheetTitle>Add option type</SheetTitle>- <SheetDescription>- Option types group the choices a customer makes per variant — size, color, material.- </SheetDescription>+ <SheetTitle>{t('admin.pages.products.options.sheet_title_create')}</SheetTitle>+ <SheetDescription>{t('admin.products.options.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-6 overflow-y-auto p-4">@@ -289,10 +292,12 @@ function CreateOptionTypeSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Creating…' : 'Create option type'}+ {form.formState.isSubmitting+ ? t('admin.actions.creating')+ : t('admin.actions.create')}</Button></SheetFooter></form>@@ -314,6 +319,7 @@ function EditOptionTypeSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: optionType, isLoading } = useOptionType(id)const updateMutation = useUpdateOptionType(id)const deleteMutation = useDeleteOptionType()@@ -354,10 +360,10 @@ function EditOptionTypeSheet({async function onDelete() {const ok = await confirm({- title: 'Delete option type?',- message: `${optionType?.name ?? 'This option type'} and its option values will be removed. Variants currently using it will lose those option assignments.`,+ title: t('admin.products.options.delete_confirm.title'),+ message: t('admin.products.options.delete_confirm.message'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -368,14 +374,13 @@ function EditOptionTypeSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent className="sm:max-w-2xl"><SheetHeader>- <SheetTitle>{optionType?.name ?? 'Edit option type'}</SheetTitle>- <SheetDescription>- Update the option type and its values. Drag rows to reorder. Values omitted from this- list will be removed.- </SheetDescription>+ <SheetTitle>+ {optionType?.name ?? t('admin.pages.products.options.sheet_title_edit')}+ </SheetTitle>+ <SheetDescription>{t('admin.products.options.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-6 overflow-y-auto p-4">@@ -397,7 +402,7 @@ function EditOptionTypeSheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -407,14 +412,14 @@ function EditOptionTypeSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"size="sm"disabled={form.formState.isSubmitting || !form.formState.isDirty}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>@@ -465,24 +470,26 @@ function OptionTypeFormFields({ form }: { form: UseFormReturn<FormValues> }) {<Controllername="kind"control={form.control}- render={({ field }) => (- <Select- items={KIND_OPTIONS as never}- value={field.value}- onValueChange={field.onChange}- >- <SelectTrigger id="ot-kind">- <SelectValue />- </SelectTrigger>- <SelectContent>- {KIND_OPTIONS.map((o) => (- <SelectItem key={o.value} value={o.value}>- {o.label}- </SelectItem>- ))}- </SelectContent>- </Select>- )}+ render={({ field }) => {+ const items = KIND_OPTIONS.map((o) => ({+ value: o.value,+ label: t(`admin.products.options.kinds.${o.value}`),+ }))+ return (+ <Select items={items as never} value={field.value} onValueChange={field.onChange}>+ <SelectTrigger id="ot-kind">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {items.map((o) => (+ <SelectItem key={o.value} value={o.value}>+ {o.label}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ )+ }}/><p className="text-xs text-muted-foreground">{t('admin.fields.option_type.kind.help')}</p></Field>@@ -519,6 +526,7 @@ function OptionValuesFieldArray({// eslint-disable-next-line @typescript-eslint/no-explicit-anyform: any}) {+ const { t } = useTranslation()const valuesArray = useFieldArray<FormValues, 'option_values', '_key'>({control: form.control as Control<FormValues>,name: 'option_values',@@ -550,14 +558,14 @@ function OptionValuesFieldArray({<div className="flex flex-col gap-3"><div className="flex items-center justify-between"><div className="flex flex-col">- <h3 className="text-sm font-medium">Option values</h3>- <p className="text-xs text-muted-foreground">- The individual choices (e.g. Small, Medium, Large). Drag rows to reorder.- </p>+ <h3 className="text-sm font-medium">+ {t('admin.pages.products.options.values_section')}+ </h3>+ <p className="text-xs text-muted-foreground">{t('admin.products.options.values_help')}</p></div>{valuesArray.fields.length > 0 && (<span className="text-xs text-muted-foreground">- {valuesArray.fields.length === 1 ? '1 value' : `${valuesArray.fields.length} values`}+ {t('admin.products.options.count', { count: valuesArray.fields.length })}</span>)}</div>@@ -572,10 +580,12 @@ function OptionValuesFieldArray({<TableHeader><TableRow><TableHead className="w-8" aria-label="Reorder" />- <TableHead>Internal name</TableHead>- <TableHead>Label</TableHead>- {showColor && <TableHead>Color</TableHead>}- {showImage && <TableHead>Image</TableHead>}+ <TableHead>{t('admin.fields.option_value.name.label')}</TableHead>+ <TableHead>{t('admin.fields.option_value.label.label')}</TableHead>+ {showColor && (+ <TableHead>{t('admin.fields.option_value.color_code.label')}</TableHead>+ )}+ {showImage && <TableHead>{t('admin.fields.option_value.image.label')}</TableHead>}<TableHead aria-label="Actions" /></TableRow></TableHeader>@@ -586,7 +596,7 @@ function OptionValuesFieldArray({colSpan={totalColCount}className="py-6 text-center text-sm text-muted-foreground">- No values yet. Add one to get started.+ {t('admin.pages.products.options.values_empty')}</TableCell></TableRow>)}@@ -618,7 +628,7 @@ function OptionValuesFieldArray({className="flex w-full items-center justify-center gap-2 px-3 py-3 text-sm font-medium text-foreground transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><PlusIcon className="size-4" />- Add option value+ {t('admin.pages.products.options.add_value')}</button></TableCell></TableRow>@@ -647,6 +657,7 @@ function SortableOptionValueRow({showImage: booleanonRemove: () => void}) {+ const { t } = useTranslation()const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({id: sortableId,})@@ -671,8 +682,8 @@ function SortableOptionValueRow({<TableCell><Input- aria-label="Internal name"- placeholder="e.g. small"+ aria-label={t('admin.fields.option_value.name.label')}+ placeholder={t('admin.products.options.value_name_placeholder')}{...form.register(`option_values.${index}.name` as const)}aria-invalid={!!errors?.name}/>@@ -683,8 +694,8 @@ function SortableOptionValueRow({<TableCell><Input- aria-label="Label"- placeholder="e.g. Small"+ aria-label={t('admin.fields.option_value.label.label')}+ placeholder={t('admin.products.options.value_label_placeholder')}{...form.register(`option_values.${index}.label` as const)}aria-invalid={!!errors?.label}/>diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx b/packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsxindex e4b2068c9f..f49633fba6 100644--- a/packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx@@ -3,6 +3,7 @@ import { useQuery } from '@tanstack/react-query'import { createFileRoute, useNavigate } from '@tanstack/react-router'import { ArrowLeftRightIcon, PlusIcon, TrashIcon } from 'lucide-react'import { useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { z } from 'zod/v4'import { adminClient } from '@/client'import { Can } from '@/components/spree/can'@@ -53,6 +54,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/products/transferconst SOURCE_NONE = '__external__'function StockTransfersPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof stockTransfersSearchSchema>const navigate = useNavigate()@@ -86,7 +88,7 @@ function StockTransfersPage() {<Can I="create" a={Subject.StockTransfer}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- New transfer+ {t('admin.products.transfers.new_cta')}</Button></Can>}@@ -112,6 +114,7 @@ function CreateStockTransferSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateStockTransfer()const { data: stockLocations } = useStockLocations({ limit: 100 })const locations = stockLocations?.data ?? []@@ -187,27 +190,29 @@ function CreateStockTransferSheet({><SheetContent className="sm:max-w-2xl"><SheetHeader>- <SheetTitle>New stock transfer</SheetTitle>- <SheetDescription>- Move stock between locations, or omit a source to record an external receive.- </SheetDescription>+ <SheetTitle>{t('admin.pages.products.transfers.sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.products.transfers.create_description')}</SheetDescription></SheetHeader><div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4"><FieldGroup><Field>- <FieldLabel htmlFor="source">Source</FieldLabel>+ <FieldLabel htmlFor="source">+ {t('admin.pages.products.transfers.section_from')}+ </FieldLabel><Select value={sourceId} onValueChange={setSourceId}><SelectTrigger id="source"><SelectValue>{(value) =>value === SOURCE_NONE- ? 'External (vendor receive)'+ ? t('admin.products.transfers.external_label'): (locations.find((l) => l.id === value)?.name ?? (value as string))}</SelectValue></SelectTrigger><SelectContent>- <SelectItem value={SOURCE_NONE}>External (vendor receive)</SelectItem>+ <SelectItem value={SOURCE_NONE}>+ {t('admin.products.transfers.external_label')}+ </SelectItem>{locations.map((l) => (<SelectItem key={l.id} value={l.id}>{l.name}@@ -218,10 +223,12 @@ function CreateStockTransferSheet({</Field><Field>- <FieldLabel htmlFor="destination">Destination</FieldLabel>+ <FieldLabel htmlFor="destination">+ {t('admin.pages.products.transfers.section_to')}+ </FieldLabel><Select value={destinationId} onValueChange={setDestinationId}><SelectTrigger id="destination">- <SelectValue placeholder="Select destination location">+ <SelectValue placeholder={t('admin.products.transfers.destination_placeholder')}>{(value) => locations.find((l) => l.id === value)?.name ?? (value as string)}</SelectValue></SelectTrigger>@@ -236,24 +243,28 @@ function CreateStockTransferSheet({</SelectContent></Select>{sourceId !== SOURCE_NONE && sourceId === destinationId && (- <p className="text-sm text-destructive">Source and destination must differ.</p>+ <p className="text-sm text-destructive">+ {t('admin.products.transfers.different_locations_error')}+ </p>)}</Field><Field>- <FieldLabel htmlFor="reference">Reference (optional)</FieldLabel>+ <FieldLabel htmlFor="reference">+ {t('admin.products.transfers.reference_label')}+ </FieldLabel><Inputid="reference"- placeholder="Vendor PO, invoice, or internal note"+ placeholder={t('admin.products.transfers.reference_placeholder')}value={reference}onChange={(e) => setReference(e.target.value)}/></Field><Field>- <FieldLabel>Variants</FieldLabel>+ <FieldLabel>{t('admin.pages.products.transfers.section_items')}</FieldLabel><Input- placeholder="Search by name or SKU (3+ chars)…"+ placeholder={t('admin.products.transfers.search_items_placeholder')}value={variantSearch}onChange={(e) => setVariantSearch(e.target.value)}/>@@ -282,9 +293,15 @@ function CreateStockTransferSheet({<table className="w-full text-sm"><thead><tr className="border-b bg-muted/50 text-muted-foreground">- <th className="p-3 pl-5 text-left font-normal">Variant</th>- <th className="p-3 text-left font-normal">SKU</th>- <th className="p-3 text-right font-normal">Qty</th>+ <th className="p-3 pl-5 text-left font-normal">+ {t('admin.products.transfers.items_table.variant')}+ </th>+ <th className="p-3 text-left font-normal">+ {t('admin.products.transfers.items_table.sku')}+ </th>+ <th className="p-3 text-right font-normal">+ {t('admin.products.transfers.items_table.qty')}+ </th><th className="p-3 pr-5 w-10" /></tr></thead>@@ -329,7 +346,7 @@ function CreateStockTransferSheet({onClick={() => onOpenChange(false)}disabled={createMutation.isPending}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="button"@@ -337,7 +354,7 @@ function CreateStockTransferSheet({onClick={handleSubmit}disabled={!canSubmit || createMutation.isPending}>- {createMutation.isPending ? 'Recording…' : 'Record transfer'}+ {createMutation.isPending ? t('admin.actions.creating') : t('admin.actions.create')}</Button></SheetFooter></SheetContent>@@ -354,6 +371,7 @@ function ViewStockTransferSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: transfer, isLoading } = useStockTransfer(id)const deleteMutation = useDeleteStockTransfer()const confirm = useConfirm()@@ -369,11 +387,10 @@ function ViewStockTransferSheet({async function onDelete() {const ok = await confirm({- title: 'Delete stock transfer?',- message:- 'Deleting a transfer reverses the stock movements. Use with caution — this is mostly for fixing erroneous entries.',+ title: t('admin.products.transfers.delete_confirm.title'),+ message: t('admin.products.transfers.delete_confirm.message'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -391,7 +408,11 @@ function ViewStockTransferSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent className="sm:max-w-xl"><SheetHeader>- <SheetTitle>{transfer ? `Transfer ${transfer.number}` : 'Stock transfer'}</SheetTitle>+ <SheetTitle>+ {transfer+ ? `Transfer ${transfer.number}`+ : t('admin.pages.products.transfers.sheet_title')}+ </SheetTitle><SheetDescription>{transfer?.source_location_id ? (<>@@ -407,34 +428,43 @@ function ViewStockTransferSheet({</SheetHeader>{isLoading || !transfer ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4"><Card><CardHeader>- <CardTitle>Details</CardTitle>+ <CardTitle>{t('admin.products.transfers.details_card')}</CardTitle></CardHeader><CardContent><dl className="grid grid-cols-3 gap-y-2 text-sm">- <dt className="text-muted-foreground">Type</dt>+ <dt className="text-muted-foreground">+ {t('admin.products.transfers.fields.type')}+ </dt><dd className="col-span-2">{transfer.source_location_id ? (<Badge variant="outline">- <ArrowLeftRightIcon className="size-3" /> Internal+ <ArrowLeftRightIcon className="size-3" />{' '}+ {t('admin.products.transfers.fields.internal')}</Badge>) : (- <Badge variant="outline">External receive</Badge>+ <Badge variant="outline">+ {t('admin.products.transfers.fields.external_receive')}+ </Badge>)}</dd>{transfer.reference && (<>- <dt className="text-muted-foreground">Reference</dt>+ <dt className="text-muted-foreground">+ {t('admin.products.transfers.fields.reference')}+ </dt><dd className="col-span-2">{transfer.reference}</dd></>)}- <dt className="text-muted-foreground">Created</dt>+ <dt className="text-muted-foreground">+ {t('admin.products.transfers.fields.created')}+ </dt><dd className="col-span-2"><RelativeTime iso={transfer.created_at} /></dd>@@ -443,8 +473,7 @@ function ViewStockTransferSheet({</Card><p className="text-xs text-muted-foreground">- Stock transfers are immutable once recorded. Deleting the transfer reverses its stock- movements.+ {t('admin.products.transfers.fields.immutable_note')}</p></div>)}@@ -459,11 +488,11 @@ function ViewStockTransferSheet({disabled={deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button type="button" variant="outline" size="sm" onClick={() => onOpenChange(false)}>- Close+ {t('admin.actions.close')}</Button></SheetFooter></SheetContent>diff --git a/packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx b/packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsxindex 11e68a70e3..fd6e84bc38 100644--- a/packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx@@ -40,6 +40,7 @@ import {useUpdateGiftCard,} from '@/hooks/use-gift-cards'import { mapSpreeErrorsToForm } from '@/lib/form-errors'+import { i18n } from '@/lib/i18n'import { Subject } from '@/lib/permissions'import { useStore } from '@/providers/store-provider'import '@/tables/gift-cards'@@ -61,6 +62,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/promotions/gift-cconst LIST_EXPAND = ['customer', 'created_by', 'gift_card_batch']function GiftCardsPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof giftCardsSearchSchema>const navigate = useNavigate()@@ -95,7 +97,7 @@ function GiftCardsPage() {<Can I="create" a={Subject.GiftCard}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- New gift card+ {t('admin.pages.promotions.gift_cards.new_cta')}</Button></Can>}@@ -120,7 +122,9 @@ const createFormSchema = z.object({// When `quantity === 1` this is the optional caller-supplied code.// When `quantity > 1` it becomes the required batch `prefix`.code: z.string().optional(),- amount: z.coerce.number().positive('Amount must be greater than zero'),+ amount: z.coerce+ .number()+ .positive(i18n.t('admin.pages.promotions.gift_cards.validation.amount_positive')),currency: z.string().min(1, 'Currency is required'),expires_at: z.string().optional(),customer_id: z.string().optional(),@@ -131,7 +135,9 @@ type CreateFormValues = z.infer<typeof createFormSchema>const editFormSchema = z.object({code: z.string().optional(),- amount: z.coerce.number().positive('Amount must be greater than zero'),+ amount: z.coerce+ .number()+ .positive(i18n.t('admin.pages.promotions.gift_cards.validation.amount_positive')),currency: z.string().min(1, 'Currency is required'),expires_at: z.string().optional(),customer_id: z.string().optional(),@@ -185,6 +191,7 @@ function CreateGiftCardSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateGiftCard()const createBatchMutation = useCreateGiftCardBatch()// `CurrencySelect` falls back to the store default visually, but we have to@@ -215,7 +222,10 @@ function CreateGiftCardSheet({// Batches require a prefix; surface the validation error inline rather// than letting the server 422.if (!values.code?.trim()) {- form.setError('code', { type: 'required', message: 'Prefix is required for batches' })+ form.setError('code', {+ type: 'required',+ message: t('admin.pages.promotions.gift_cards.validation.prefix_required'),+ })return}await createBatchMutation.mutateAsync(batchValuesToParams(values))@@ -239,11 +249,9 @@ function CreateGiftCardSheet({><SheetContent><SheetHeader>- <SheetTitle>New gift card</SheetTitle>+ <SheetTitle>{t('admin.pages.promotions.gift_cards.new_sheet_title')}</SheetTitle><SheetDescription>- {isBatch- ? `Bulk-issue ${quantity} gift cards. The server generates codes by suffixing random hex onto the prefix.`- : 'Issuing a gift card credits the recipient with the listed amount. The code is auto-generated unless you provide one. No email is sent — share the code manually.'}+ {t('admin.pages.promotions.gift_cards.sheet.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col">@@ -263,14 +271,14 @@ function CreateGiftCardSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>{form.formState.isSubmitting- ? 'Creating…'+ ? t('admin.actions.creating'): isBatch- ? `Create ${quantity} gift cards`- : 'Create gift card'}+ ? t('admin.pages.promotions.gift_cards.create_batch_cta', { count: quantity })+ : t('admin.actions.create')}</Button></SheetFooter></form>@@ -292,6 +300,7 @@ function EditGiftCardSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: giftCard, isLoading } = useGiftCard(id, ['customer', 'created_by', 'orders'])const updateMutation = useUpdateGiftCard(id)const deleteMutation = useDeleteGiftCard()@@ -333,10 +342,10 @@ function EditGiftCardSheet({async function onDelete() {const ok = await confirm({- title: 'Delete gift card?',- message: `Gift card ${giftCard?.code ?? ''} will be removed. Codes that have already been redeemed cannot be deleted.`,+ title: t('admin.pages.promotions.gift_cards.delete_confirm.title'),+ message: t('admin.pages.promotions.gift_cards.delete_confirm.message'),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -352,15 +361,15 @@ function EditGiftCardSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>{giftCard?.code ?? 'Edit gift card'}</SheetTitle>+ <SheetTitle>+ {giftCard?.code ?? t('admin.pages.promotions.gift_cards.edit_sheet_title')}+ </SheetTitle><SheetDescription>- {editable- ? 'Adjust amount, expiration, or recipient. Code cannot be changed.'- : 'This card cannot be edited — once redeemed, canceled, or expired, the details are locked.'}+ {t('admin.pages.promotions.gift_cards.sheet.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -382,7 +391,7 @@ function EditGiftCardSheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -392,14 +401,14 @@ function EditGiftCardSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"size="sm"disabled={!editable || form.formState.isSubmitting || !form.formState.isDirty}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsxindex bc0ad57cca..c2670ed2b2 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsx@@ -100,6 +100,7 @@ const SCOPE_GROUPS: Array<{ label: string; resource: string; readOnly?: boolean// ---------------------------------------------------------------------------function ApiKeysSettingsPage() {+ const { t } = useTranslation()const { data, isLoading } = useApiKeys()const [createOpen, setCreateOpen] = useState(false)const [tokenReveal, setTokenReveal] = useState<ApiKey | null>(null)@@ -111,30 +112,32 @@ function ApiKeysSettingsPage() {return (<div className="flex flex-col gap-6"><PageHeader- title="API keys"- subtitle="Publishable and secret keys for the Storefront and Admin APIs."+ title={t('admin.pages.settings.api_keys.title')}+ subtitle={t('admin.pages.settings.api_keys.subtitle')}actions={<Button size="sm" onClick={() => setCreateOpen(true)}><PlusIcon className="size-4" />- Create key+ {t('admin.pages.settings.api_keys.new_cta')}</Button>}/><ApiKeyTable- title="Publishable"- description="Used by your storefront. Safe to expose in client-side code."+ title={t('admin.pages.settings.api_keys.publishable_section')}+ description={t('admin.pages.settings.api_keys.publishable_help')}keys={publishable}loading={isLoading}showScopes={false}+ emptyMessage={t('admin.pages.settings.api_keys.empty_publishable')}/><ApiKeyTable- title="Secret"- description="Server-to-server only. Never expose in client-side code."+ title={t('admin.pages.settings.api_keys.secret_section')}+ description={t('admin.pages.settings.api_keys.secret_help')}keys={secret}loading={isLoading}showScopes+ emptyMessage={t('admin.pages.settings.api_keys.empty_secret')}/><CreateApiKeyDialog@@ -171,13 +174,16 @@ function ApiKeyTable({keys,loading,showScopes,+ emptyMessage,}: {title: stringdescription: stringkeys: ApiKey[]loading: booleanshowScopes: boolean+ emptyMessage: string}) {+ const { t } = useTranslation()return (<Card><CardHeader>@@ -195,19 +201,21 @@ function ApiKeyTable({<EmptyMedia variant="icon"><KeyRoundIcon /></EmptyMedia>- <EmptyTitle>{`No ${title.toLowerCase()} keys yet`}</EmptyTitle>- <EmptyDescription>Create one to get started.</EmptyDescription>+ <EmptyTitle>{emptyMessage}</EmptyTitle>+ <EmptyDescription>{t('admin.api_keys.empty_description')}</EmptyDescription></EmptyHeader></Empty>) : (<Table><TableHeader><TableRow>- <TableHead>Name</TableHead>- <TableHead>Token</TableHead>- {showScopes && <TableHead>Scopes</TableHead>}- <TableHead>Last used</TableHead>- <TableHead>Created</TableHead>+ <TableHead>{t('admin.pages.settings.api_keys.table.name')}</TableHead>+ <TableHead>{t('admin.pages.settings.api_keys.table.key')}</TableHead>+ {showScopes && (+ <TableHead>{t('admin.pages.settings.api_keys.table.scopes')}</TableHead>+ )}+ <TableHead>{t('admin.pages.settings.api_keys.table.last_used_at')}</TableHead>+ <TableHead>{t('admin.pages.settings.api_keys.table.created_at')}</TableHead><TableHead className="w-12" /></TableRow></TableHeader>@@ -224,6 +232,7 @@ function ApiKeyTable({}function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: boolean }) {+ const { t } = useTranslation()const revokeMutation = useRevokeApiKey()const deleteMutation = useDeleteApiKey()const confirm = useConfirm()@@ -237,8 +246,8 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleanasync function handleRevoke() {const ok = await confirm({- title: 'Revoke key?',- message: `Future requests using ${apiKey.name} will fail. The key stays in the list (with a revoked badge) so you can audit it later.`,+ title: t('admin.api_keys.revoke_confirm.title'),+ message: t('admin.api_keys.revoke_confirm.message'),variant: 'destructive',confirmLabel: 'Revoke',})@@ -246,16 +255,16 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleantry {await revokeMutation.mutateAsync(apiKey.id)- toast.success('Key revoked')+ toast.success(t('admin.messages.key_revoked'))} catch (err) {- toast.error(err instanceof Error ? err.message : 'Failed to revoke key')+ toast.error(err instanceof Error ? err.message : t('admin.errors.failed_to_revoke_key'))}}async function handleDelete() {const ok = await confirm({- title: 'Delete key?',- message: `${apiKey.name} will be permanently removed from this store. This can't be undone.`,+ title: t('admin.api_keys.delete_confirm.title'),+ message: t('admin.api_keys.delete_confirm.message'),variant: 'destructive',confirmLabel: 'Delete',})@@ -265,7 +274,7 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleanawait deleteMutation.mutateAsync(apiKey.id)toast.success('Key deleted')} catch (err) {- toast.error(err instanceof Error ? err.message : 'Failed to delete key')+ toast.error(err instanceof Error ? err.message : t('admin.api_keys.errors.failed_to_delete'))}}@@ -274,7 +283,7 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: boolean<TableCell><div className="flex items-center gap-2"><span className="font-medium">{apiKey.name}</span>- {isRevoked && <Badge variant="destructive">Revoked</Badge>}+ {isRevoked && <Badge variant="destructive">{t('admin.api_keys.badge.revoked')}</Badge>}</div></TableCell><TableCell>@@ -285,7 +294,7 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleansize="icon-xs"variant="ghost"onClick={() => copy(apiKey.plaintext_token ?? '')}- aria-label="Copy token"+ aria-label={t('admin.api_keys.dropdown.copy_token_aria')}>{copied ? <CheckIcon /> : <CopyIcon />}</Button>@@ -304,29 +313,37 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleankey still in use?" decisions. */}<RelativeTimeiso={apiKey.last_used_at}- fallback={<span className="text-muted-foreground/60">Never</span>}+ fallback={+ <span className="text-muted-foreground/60">{t('admin.api_keys.badge.never_used')}</span>+ }/></TableCell><TableCell className="text-sm text-muted-foreground whitespace-nowrap"><RelativeTime iso={apiKey.created_at} />- {apiKey.created_by_email && <div className="text-xs">by {apiKey.created_by_email}</div>}+ {apiKey.created_by_email && (+ <div className="text-xs">+ {t('admin.api_keys.by_email', { email: apiKey.created_by_email })}+ </div>+ )}</TableCell><TableCell className="text-right"><DropdownMenu><DropdownMenuTrigger asChild>- <Button size="icon-sm" variant="ghost" aria-label="Actions">+ <Button size="icon-sm" variant="ghost" aria-label={t('admin.staff.actions_aria')}><MoreHorizontalIcon className="size-4" /></Button></DropdownMenuTrigger><DropdownMenuContent align="end">{!isRevoked && (<>- <DropdownMenuItem onClick={handleRevoke}>Revoke key</DropdownMenuItem>+ <DropdownMenuItem onClick={handleRevoke}>+ {t('admin.api_keys.dropdown.revoke')}+ </DropdownMenuItem><DropdownMenuSeparator /></>)}<DropdownMenuItem variant="destructive" onClick={handleDelete}>- Delete key+ {t('admin.api_keys.dropdown.delete')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -341,11 +358,12 @@ function ApiKeyRow({ apiKey, showScopes }: { apiKey: ApiKey; showScopes: booleanconst SCOPE_PREVIEW_COUNT = 3function ScopeList({ scopes }: { scopes: string[] }) {+ const { t } = useTranslation()if (scopes.includes('write_all')) {- return <Badge>Full access</Badge>+ return <Badge>{t('admin.pages.settings.api_keys.scope_badge.full_access')}</Badge>}if (scopes.includes('read_all')) {- return <Badge>Read all</Badge>+ return <Badge>{t('admin.pages.settings.api_keys.scope_badge.read_all')}</Badge>}if (scopes.length === 0) {return <span className="text-sm text-muted-foreground">—</span>@@ -436,7 +454,7 @@ function CreateApiKeyDialog({}try {const key = await createMutation.mutateAsync(params)- toast.success('Key created')+ toast.success(t('admin.messages.key_created'))form.reset({ name: '', key_type: 'secret', scopes: [] })onCreated(key)} catch (err) {@@ -456,11 +474,8 @@ function CreateApiKeyDialog({><SheetContent><SheetHeader>- <SheetTitle>Create API key</SheetTitle>- <SheetDescription>- Secret keys are server-to-server only and limited to the scopes you pick. Publishable- keys are for storefront/client-side use and have no scopes.- </SheetDescription>+ <SheetTitle>{t('admin.api_keys.create_sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.api_keys.create_sheet_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col">{/* `flex-1 overflow-y-auto` keeps the footer pinned while the body@@ -492,13 +507,13 @@ function CreateApiKeyDialog({<RadioGroup value={field.value} onValueChange={(value) => field.onChange(value)}><KeyTypeChoicevalue="secret"- title="Secret"- description="Admin API · server-to-server"+ title={t('admin.api_keys.key_type.secret_title')}+ description={t('admin.api_keys.key_type.secret_description')}/><KeyTypeChoicevalue="publishable"- title="Publishable"- description="Storefront · safe to expose"+ title={t('admin.api_keys.key_type.publishable_title')}+ description={t('admin.api_keys.key_type.publishable_description')}/></RadioGroup>)}@@ -564,6 +579,7 @@ function KeyTypeChoice({}function ScopePicker({ value, onChange }: { value: string[]; onChange: (next: string[]) => void }) {+ const { t } = useTranslation()const hasWriteAll = value.includes('write_all')const hasReadAll = value.includes('read_all')@@ -590,7 +606,7 @@ function ScopePicker({ value, onChange }: { value: string[]; onChange: (next: st<div className="flex flex-col gap-2 border-b border-border bg-muted/30 p-3"><label htmlFor="scope-write-all" className="flex cursor-pointer items-center gap-2 text-sm"><Checkbox id="scope-write-all" checked={hasWriteAll} onCheckedChange={setAllWrite} />- <span className="font-medium">Full access (write_all)</span>+ <span className="font-medium">{t('admin.api_keys.scope_picker.full_access_label')}</span><span className="text-xs text-muted-foreground">— read + write on every resource</span></label><label htmlFor="scope-read-all" className="flex cursor-pointer items-center gap-2 text-sm">@@ -600,7 +616,7 @@ function ScopePicker({ value, onChange }: { value: string[]; onChange: (next: stonCheckedChange={setAllRead}disabled={hasWriteAll}/>- <span className="font-medium">Read all (read_all)</span>+ <span className="font-medium">{t('admin.api_keys.scope_picker.read_all_label')}</span><span className="text-xs text-muted-foreground">— read on every resource</span></label></div>@@ -611,9 +627,15 @@ function ScopePicker({ value, onChange }: { value: string[]; onChange: (next: st(hasWriteAll || hasReadAll) && 'pointer-events-none opacity-50',)}>- <span className="font-medium text-muted-foreground">Resource</span>- <span className="font-medium text-muted-foreground">Read</span>- <span className="font-medium text-muted-foreground">Write</span>+ <span className="font-medium text-muted-foreground">+ {t('admin.api_keys.scope_picker.resource_header')}+ </span>+ <span className="font-medium text-muted-foreground">+ {t('admin.api_keys.scope_picker.read_header')}+ </span>+ <span className="font-medium text-muted-foreground">+ {t('admin.api_keys.scope_picker.write_header')}+ </span>{SCOPE_GROUPS.map((group) => {const readScope = `read_${group.resource}`const writeScope = `write_${group.resource}`@@ -657,6 +679,7 @@ function ScopeRow({onToggleRead: () => voidonToggleWrite: () => void}) {+ const { t } = useTranslation()return (<><span>{label}</span>@@ -666,7 +689,7 @@ function ScopeRow({// Checking write implies read; reflect that here so the UI doesn't// look out of sync with what the server will enforce.disabled={hasWrite}- aria-label={`Read ${label}`}+ aria-label={t('admin.api_keys.scope_picker.read_aria', { resource: label })}className="justify-self-center"/>{readOnly ? (@@ -675,7 +698,7 @@ function ScopeRow({<Checkboxchecked={hasWrite}onCheckedChange={onToggleWrite}- aria-label={`Write ${label}`}+ aria-label={t('admin.api_keys.scope_picker.write_aria', { resource: label })}className="justify-self-center"/>)}@@ -694,25 +717,22 @@ function TokenRevealDialog({apiKey: ApiKey | nullonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { copied, copy } = useCopyToClipboard()return (<Dialog open={!!apiKey} onOpenChange={onOpenChange}><DialogContent><DialogHeader>- <DialogTitle>Save your secret key</DialogTitle>+ <DialogTitle>{t('admin.pages.settings.api_keys.save_secret_title')}</DialogTitle><DialogDescription>- This is the only time we'll show you the full key. Store it in a password manager or- your secret store now — if you lose it, you'll need to create a new one.+ {t('admin.pages.settings.api_keys.save_secret_description')}</DialogDescription></DialogHeader><DialogBody className="flex flex-col gap-3"><div className="flex items-start gap-2 rounded-md border border-yellow-200 bg-yellow-50 p-3 text-sm text-yellow-900 dark:border-yellow-900/40 dark:bg-yellow-950/40 dark:text-yellow-200"><AlertTriangleIcon className="size-4 shrink-0" />- <span>- Treat this key like a password. Anyone with it can act on your store via the Admin- API.- </span>+ <span>{t('admin.api_keys.warning_treat_like_password')}</span></div>{apiKey?.plaintext_token && (<div className="flex items-center gap-2 rounded-md border border-border bg-muted/40 p-3">@@ -723,14 +743,14 @@ function TokenRevealDialog({onClick={() => copy(apiKey.plaintext_token ?? '')}>{copied ? <CheckIcon /> : <CopyIcon />}- {copied ? 'Copied' : 'Copy'}+ {copied ? t('admin.actions.copied') : t('admin.actions.copy')}</Button></div>)}</DialogBody><DialogFooter><Button size="sm" onClick={() => onOpenChange(false)}>- Done+ {t('admin.api_keys.done')}</Button></DialogFooter></DialogContent>diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsxindex 3492a5922f..4911e160c5 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsx@@ -10,6 +10,7 @@ import { createFileRoute, useNavigate } from '@tanstack/react-router'import { PlusIcon } from 'lucide-react'import { useEffect, useMemo, useRef, useState } from 'react'import { useForm } from 'react-hook-form'+import { useTranslation } from 'react-i18next'import { z } from 'zod/v4'import { adminClient } from '@/client'import { Can } from '@/components/spree/can'@@ -50,6 +51,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/settings/payment-})function PaymentMethodsPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof paymentMethodsSearchSchema>const navigate = useNavigate()const queryClient = useQueryClient()@@ -84,7 +86,7 @@ function PaymentMethodsPage() {<Can I="create" a={Subject.PaymentMethod}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- Add payment method+ {t('admin.payment_methods.add_cta')}</Button></Can>}@@ -158,6 +160,7 @@ function CreatePaymentMethodSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreatePaymentMethod()const { data: typesResponse, isLoading: loadingTypes } = usePaymentMethodTypes()const providerTypes = useMemo(() => typesResponse?.data ?? [], [typesResponse])@@ -204,8 +207,8 @@ function CreatePaymentMethodSheet({><SheetContent><SheetHeader>- <SheetTitle>Add payment method</SheetTitle>- <SheetDescription>Pick a provider and configure it in one step.</SheetDescription>+ <SheetTitle>{t('admin.pages.settings.payment_methods.add_sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.payment_methods.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -235,10 +238,12 @@ function CreatePaymentMethodSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Creating…' : 'Create payment method'}+ {form.formState.isSubmitting+ ? t('admin.actions.creating')+ : t('admin.payment_methods.create_label')}</Button></SheetFooter></form>@@ -256,6 +261,7 @@ function EditPaymentMethodSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: paymentMethod, isLoading } = usePaymentMethod(id)const updateMutation = useUpdatePaymentMethod(id)const deleteMutation = useDeletePaymentMethod()@@ -310,10 +316,12 @@ function EditPaymentMethodSheet({async function onDelete() {const ok = await confirm({- title: 'Delete payment method?',- message: `${paymentMethod?.name ?? 'This payment method'} will be removed. Existing payments referencing it remain intact.`,+ title: t('admin.payment_methods.delete_confirm.title'),+ message: t('admin.payment_methods.delete_confirm.message', {+ name: paymentMethod?.name ?? '',+ }),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -334,13 +342,17 @@ function EditPaymentMethodSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>{paymentMethod?.name ?? 'Edit payment method'}</SheetTitle>+ <SheetTitle>+ {paymentMethod?.name ?? t('admin.pages.settings.payment_methods.edit_sheet_title')}+ </SheetTitle><SheetDescription>- {providerLabel ? `Provider: ${providerLabel}` : 'Update name, visibility, or status.'}+ {providerLabel+ ? `Provider: ${providerLabel}`+ : t('admin.payment_methods.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -369,7 +381,7 @@ function EditPaymentMethodSheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -379,7 +391,7 @@ function EditPaymentMethodSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"@@ -388,7 +400,7 @@ function EditPaymentMethodSheet({form.formState.isSubmitting || (!form.formState.isDirty && !preferencesDirty)}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsxindex f705abf32f..1effcedd12 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsx@@ -81,6 +81,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/settings/staff')(// ---------------------------------------------------------------------------function StaffSettingsPage() {+ const { t } = useTranslation()const { data: staff, isLoading: staffLoading } = useStaff()const { data: invitations, isLoading: invitationsLoading } = useInvitations()const [inviteOpen, setInviteOpen] = useState(false)@@ -90,12 +91,12 @@ function StaffSettingsPage() {return (<div className="flex flex-col gap-6"><PageHeader- title="Staff"- subtitle="Invite teammates and manage their access to this store."+ title={t('admin.pages.staff.title')}+ subtitle={t('admin.pages.staff.subtitle')}actions={<Button size="sm" onClick={() => setInviteOpen(true)}><PlusIcon className="size-4" />- Invite teammate+ {t('admin.pages.staff.invite_cta')}</Button>}/>@@ -116,10 +117,11 @@ function StaffSettingsPage() {// ---------------------------------------------------------------------------function StaffCard({ staff, loading }: { staff: AdminUser[]; loading: boolean }) {+ const { t } = useTranslation()return (<Card><CardHeader>- <CardTitle>Members</CardTitle>+ <CardTitle>{t('admin.pages.staff.members_section')}</CardTitle></CardHeader><CardContent className="p-0">{loading ? (@@ -133,18 +135,16 @@ function StaffCard({ staff, loading }: { staff: AdminUser[]; loading: boolean })<EmptyMedia variant="icon"><UsersRoundIcon /></EmptyMedia>- <EmptyTitle>No staff yet</EmptyTitle>- <EmptyDescription>- Invite a teammate to give them access to this store.- </EmptyDescription>+ <EmptyTitle>{t('admin.pages.staff.empty')}</EmptyTitle>+ <EmptyDescription>{t('admin.pages.staff.empty_description')}</EmptyDescription></EmptyHeader></Empty>) : (<Table><TableHeader><TableRow>- <TableHead>Member</TableHead>- <TableHead>Roles</TableHead>+ <TableHead>{t('admin.pages.staff.table.member')}</TableHead>+ <TableHead>{t('admin.pages.staff.table.roles')}</TableHead><TableHead className="w-12" /></TableRow></TableHeader>@@ -161,6 +161,7 @@ function StaffCard({ staff, loading }: { staff: AdminUser[]; loading: boolean })}function StaffRow({ member }: { member: AdminUser }) {+ const { t } = useTranslation()const [editOpen, setEditOpen] = useState(false)const removeMutation = useRemoveStaff()const confirm = useConfirm()@@ -169,18 +170,20 @@ function StaffRow({ member }: { member: AdminUser }) {async function handleRemove() {const ok = await confirm({- title: 'Remove from store?',- message: `${member.full_name || member.email} will lose access to this store. Their account stays — they keep access to any other stores they belong to.`,+ title: t('admin.staff.confirm.remove_title'),+ message: t('admin.staff.confirm.remove_message', {+ name: member.full_name || member.email,+ }),variant: 'destructive',- confirmLabel: 'Remove',+ confirmLabel: t('admin.actions.remove'),})if (!ok) returntry {await removeMutation.mutateAsync(member.id)- toast.success('Removed from store')+ toast.success(t('admin.pages.staff.messages.removed'))} catch (err) {- toast.error(err instanceof Error ? err.message : 'Failed to remove staff')+ toast.error(err instanceof Error ? err.message : t('admin.staff.errors.failed_to_remove'))}}@@ -218,18 +221,18 @@ function StaffRow({ member }: { member: AdminUser }) {<TableCell className="text-right"><DropdownMenu><DropdownMenuTrigger asChild>- <Button size="icon-sm" variant="ghost" aria-label="Actions">+ <Button size="icon-sm" variant="ghost" aria-label={t('admin.staff.actions_aria')}><MoreHorizontalIcon className="size-4" /></Button></DropdownMenuTrigger><DropdownMenuContent align="end"><DropdownMenuItem onClick={() => setEditOpen(true)}><ShieldIcon className="size-4" />- Edit roles+ {t('admin.actions.edit')}</DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem variant="destructive" onClick={handleRemove}>- Remove from store+ {t('admin.pages.staff.actions.remove')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -252,10 +255,11 @@ function PendingInvitationsCard({invitations: Invitation[]loading: boolean}) {+ const { t } = useTranslation()return (<Card><CardHeader>- <CardTitle>Pending invitations</CardTitle>+ <CardTitle>{t('admin.pages.staff.invitations_section')}</CardTitle></CardHeader><CardContent className="p-0">{loading ? (@@ -266,9 +270,9 @@ function PendingInvitationsCard({<Table><TableHeader><TableRow>- <TableHead>Email</TableHead>- <TableHead>Role</TableHead>- <TableHead>Expires</TableHead>+ <TableHead>{t('admin.pages.staff.table.email')}</TableHead>+ <TableHead>{t('admin.pages.staff.table.role')}</TableHead>+ <TableHead>{t('admin.pages.staff.table.expires')}</TableHead><TableHead className="w-12" /></TableRow></TableHeader>@@ -285,6 +289,7 @@ function PendingInvitationsCard({}function InvitationRow({ invitation }: { invitation: Invitation }) {+ const { t } = useTranslation()const resendMutation = useResendInvitation()const deleteMutation = useDeleteInvitation()const confirm = useConfirm()@@ -296,32 +301,32 @@ function InvitationRow({ invitation }: { invitation: Invitation }) {? `${window.location.origin}${invitation.acceptance_url}`: invitation.acceptance_urlawait copy(url)- toast.success('Invitation link copied')+ toast.success(t('admin.staff.actions.invitation_link_copied'))}async function handleResend() {try {await resendMutation.mutateAsync(invitation.id)- toast.success('Invitation resent')+ toast.success(t('admin.messages.invitation_resent'))} catch (err) {- toast.error(err instanceof Error ? err.message : 'Failed to resend invitation')+ toast.error(err instanceof Error ? err.message : t('admin.staff.errors.failed_to_resend'))}}async function handleDelete() {const ok = await confirm({- title: 'Revoke invitation?',- message: `${invitation.email} won't be able to accept this invitation. You can invite them again later.`,+ title: t('admin.staff.confirm.revoke_title'),+ message: t('admin.staff.confirm.revoke_message', { email: invitation.email }),variant: 'destructive',- confirmLabel: 'Revoke',+ confirmLabel: t('admin.pages.staff.actions.revoke'),})if (!ok) returntry {await deleteMutation.mutateAsync(invitation.id)- toast.success('Invitation revoked')+ toast.success(t('admin.pages.staff.messages.revoked'))} catch (err) {- toast.error(err instanceof Error ? err.message : 'Failed to revoke invitation')+ toast.error(err instanceof Error ? err.message : t('admin.staff.errors.failed_to_revoke'))}}@@ -353,22 +358,22 @@ function InvitationRow({ invitation }: { invitation: Invitation }) {<TableCell className="text-right"><DropdownMenu><DropdownMenuTrigger asChild>- <Button size="icon-sm" variant="ghost" aria-label="Actions">+ <Button size="icon-sm" variant="ghost" aria-label={t('admin.staff.actions_aria')}><MoreHorizontalIcon className="size-4" /></Button></DropdownMenuTrigger><DropdownMenuContent align="end"><DropdownMenuItem onClick={handleResend}><MailIcon className="size-4" />- Resend invitation+ {t('admin.pages.staff.actions.resend')}</DropdownMenuItem><DropdownMenuItem onClick={handleCopyLink}><LinkIcon className="size-4" />- Copy invitation link+ {t('admin.staff.actions.copy_invitation_link')}</DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem variant="destructive" onClick={handleDelete}>- Revoke invitation+ {t('admin.pages.staff.actions.revoke')}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -407,13 +412,13 @@ function InviteDialog({async function onSubmit(values: InviteFormValues) {try {await createMutation.mutateAsync(values)- toast.success('Invitation sent')+ toast.success(t('admin.messages.invitation_sent'))form.reset({ email: '', role_id: '' })onOpenChange(false)} catch (err) {if (mapSpreeErrorsToForm(err, form.setError)) returnif (err instanceof SpreeError) throw err- toast.error(err instanceof Error ? err.message : 'Failed to send invitation')+ toast.error(err instanceof Error ? err.message : t('admin.errors.failed_to_send_invitation'))}}@@ -427,10 +432,8 @@ function InviteDialog({><DialogContent><DialogHeader>- <DialogTitle>Invite teammate</DialogTitle>- <DialogDescription>- We'll email them a sign-up link. They'll get the role you pick here for this store only.- </DialogDescription>+ <DialogTitle>{t('admin.pages.staff.invite_sheet.title')}</DialogTitle>+ <DialogDescription>{t('admin.pages.staff.invite_sheet.description')}</DialogDescription></DialogHeader><form onSubmit={form.handleSubmit(onSubmit)}><DialogBody className="flex flex-col gap-4">@@ -445,7 +448,7 @@ function InviteDialog({id="invite-email"type="email"autoFocus- placeholder="[email protected]"+ placeholder={t('admin.staff.invite.email_placeholder')}aria-invalid={!!form.formState.errors.email || undefined}{...form.register('email')}/>@@ -465,7 +468,11 @@ function InviteDialog({`value` (a prefixed role ID). Use the childrenrender-prop to map ID → name. */}<SelectValue- placeholder={rolesLoading ? 'Loading roles…' : 'Select a role'}+ placeholder={+ rolesLoading+ ? t('admin.staff.invite.roles_loading')+ : t('admin.staff.invite.roles_placeholder')+ }>{(value) => {const role = roleList.find((r) => r.id === value)@@ -501,10 +508,12 @@ function InviteDialog({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Sending…' : 'Send invitation'}+ {form.formState.isSubmitting+ ? t('admin.actions.sending')+ : t('admin.actions.send_invitation')}</Button></DialogFooter></form>@@ -557,12 +566,12 @@ function EditStaffDialog({role_ids: values.role_ids,},})- toast.success('Staff updated')+ toast.success(t('admin.pages.staff.messages.updated'))onOpenChange(false)} catch (err) {if (mapSpreeErrorsToForm(err, form.setError)) returnif (err instanceof SpreeError) throw err- toast.error(err instanceof Error ? err.message : 'Failed to update staff')+ toast.error(err instanceof Error ? err.message : t('admin.errors.failed_to_update_staff'))}}@@ -582,7 +591,7 @@ function EditStaffDialog({><DialogContent><DialogHeader>- <DialogTitle>Edit staff member</DialogTitle>+ <DialogTitle>{t('admin.pages.staff.edit_sheet.title')}</DialogTitle><DialogDescription>{member.email}</DialogDescription></DialogHeader><form onSubmit={form.handleSubmit(onSubmit)}>@@ -617,7 +626,7 @@ function EditStaffDialog({</Field></div><Field>- <FieldLabel>Roles for this store</FieldLabel>+ <FieldLabel>{t('admin.staff.edit.roles_label')}</FieldLabel><Controllername="role_ids"control={form.control}@@ -642,10 +651,10 @@ function EditStaffDialog({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></DialogFooter></form>@@ -666,12 +675,14 @@ function RoleCheckboxGroup({value: string[]onChange: (next: string[]) => void}) {+ const { t } = useTranslation()+function toggle(id: string) {onChange(value.includes(id) ? value.filter((v) => v !== id) : [...value, id])}if (roles.length === 0) {- return <p className="text-sm text-muted-foreground">No roles available.</p>+ return <p className="text-sm text-muted-foreground">{t('admin.staff.invite.no_roles')}</p>}return (diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsxindex 0b59419406..f055f58ab4 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsx@@ -74,6 +74,7 @@ const PICKUP_POLICY_OPTIONS = [] as constfunction StockLocationsPage() {+ const { t } = useTranslation()// Cast: Route.useSearch's inferred type unions with the parent layout's// search shape, which doesn't know about our `edit`/`new` keys. The runtime// schema (`stockSearchSchema`) is still the source of truth — this just@@ -114,7 +115,7 @@ function StockLocationsPage() {<Can I="create" a={Subject.StockLocation}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- Add stock location+ {t('admin.stock_locations.add_cta')}</Button></Can>}@@ -243,6 +244,7 @@ function CreateStockLocationSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateStockLocation()const form = useForm<FormValues>({@@ -272,10 +274,8 @@ function CreateStockLocationSheet({><SheetContent><SheetHeader>- <SheetTitle>Add stock location</SheetTitle>- <SheetDescription>- A place where inventory lives — a warehouse, store, or third-party fulfillment center.- </SheetDescription>+ <SheetTitle>{t('admin.pages.settings.stock_locations.add_sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.stock_locations.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -289,10 +289,12 @@ function CreateStockLocationSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Creating…' : 'Create stock location'}+ {form.formState.isSubmitting+ ? t('admin.actions.creating')+ : t('admin.actions.create')}</Button></SheetFooter></form>@@ -314,6 +316,7 @@ function EditStockLocationSheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: stockLocation, isLoading } = useStockLocation(id)const updateMutation = useUpdateStockLocation(id)const deleteMutation = useDeleteStockLocation()@@ -346,10 +349,12 @@ function EditStockLocationSheet({async function onDelete() {const ok = await confirm({- title: 'Delete stock location?',- message: `${stockLocation?.name ?? 'This location'} will be removed. Any orders that referenced it will keep the historical record.`,+ title: t('admin.stock_locations.delete_confirm.title'),+ message: t('admin.stock_locations.delete_confirm.message', {+ name: stockLocation?.name ?? '',+ }),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -360,13 +365,13 @@ function EditStockLocationSheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>{stockLocation?.name ?? 'Edit stock location'}</SheetTitle>- <SheetDescription>- Update inventory location, address, and pickup options.- </SheetDescription>+ <SheetTitle>+ {stockLocation?.name ?? t('admin.pages.settings.stock_locations.edit_sheet_title')}+ </SheetTitle>+ <SheetDescription>{t('admin.stock_locations.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -383,7 +388,7 @@ function EditStockLocationSheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -393,14 +398,14 @@ function EditStockLocationSheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"size="sm"disabled={form.formState.isSubmitting || !form.formState.isDirty}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>@@ -415,6 +420,7 @@ function EditStockLocationSheet({// ============================================================================function StockItemsPanel({ stockLocationId }: { stockLocationId: string }) {+ const { t } = useTranslation()const [search, setSearch] = useState('')const [page, setPage] = useState(1)const { data, isFetching } = useStockItems({@@ -434,13 +440,13 @@ function StockItemsPanel({ stockLocationId }: { stockLocationId: string }) {<div className="rounded-md border"><div className="flex items-center justify-between gap-2 border-b px-4 py-3"><div>- <h3 className="text-sm font-medium">Stock at this location</h3>+ <h3 className="text-sm font-medium">{t('admin.stock_locations.stock_items.title')}</h3><p className="text-xs text-muted-foreground">- Inline edits save immediately. For broader changes, edit the product directly.+ {t('admin.stock_locations.stock_items.help')}</p></div><Input- placeholder="Search SKU or product…"+ placeholder={t('admin.stock_locations.stock_items.search_placeholder')}value={search}onChange={(e) => {setSearch(e.target.value)@@ -526,6 +532,7 @@ function groupItemsByProduct(items: StockItem[]): StockItemGroup[] {}function ProductGroup({ group, defaultOpen }: { group: StockItemGroup; defaultOpen: boolean }) {+ const { t } = useTranslation()const [open, setOpen] = useState(defaultOpen)return (@@ -548,9 +555,15 @@ function ProductGroup({ group, defaultOpen }: { group: StockItemGroup; defaultOp<table className="w-full text-sm"><thead className="sticky top-0 bg-card text-xs text-muted-foreground"><tr className="border-y">- <th className="px-4 py-2 text-left font-medium">Variant</th>- <th className="px-3 py-2 text-right font-medium">On hand</th>- <th className="px-3 py-2 text-left font-medium">Backorder</th>+ <th className="px-4 py-2 text-left font-medium">+ {t('admin.stock_locations.stock_items.table.variant')}+ </th>+ <th className="px-3 py-2 text-right font-medium">+ {t('admin.stock_locations.stock_items.table.on_hand')}+ </th>+ <th className="px-3 py-2 text-left font-medium">+ {t('admin.stock_locations.stock_items.table.backorder')}+ </th><th className="px-3 py-2" /></tr></thead>@@ -741,7 +754,9 @@ function StockLocationFormFields({ form }: { form: UseFormReturn<FormValues> })/><div className="border-t border-border pt-4">- <h3 className="mb-3 text-sm font-medium">Address</h3>+ <h3 className="mb-3 text-sm font-medium">+ {t('admin.pages.settings.stock_locations.section_address')}+ </h3><FieldGroup><Field><FieldLabel htmlFor="sl-address1">{t('admin.fields.address1.label')}</FieldLabel>@@ -847,7 +862,7 @@ function StockLocationFormFields({ form }: { form: UseFormReturn<FormValues> })</div><div className="border-t border-border pt-4">- <h3 className="mb-3 text-sm font-medium">Pickup</h3>+ <h3 className="mb-3 text-sm font-medium">{t('admin.stock_locations.section_pickup')}</h3><FieldGroup><BooleanRowid="sl-pickup-enabled"diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/store.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/store.tsxindex 76534099a9..4e5eeafbc2 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/store.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/store.tsx@@ -65,6 +65,7 @@ function storeToFormValues(store: Store): StoreSettingsFormValues {}function StoreSettingsPage() {+ const { t } = useTranslation()const { data: store, isLoading, error, refetch } = useStoreSettings()if (isLoading || !store) {@@ -80,7 +81,7 @@ function StoreSettingsPage() {if (error) {return (<ErrorState- title="Failed to load store settings"+ title={t('admin.store.load_failed_title')}description={error instanceof Error ? error.message : undefined}onRetry={() => refetch()}/>@@ -123,12 +124,12 @@ function StoreSettingsForm({ store }: { store: Store }) {preferred_unit_system: values.preferred_unit_system,preferred_weight_unit: values.preferred_weight_unit,})- toast.success('Store settings updated')+ toast.success(t('admin.messages.store_settings_updated'))form.reset(values)} catch (err) {if (mapSpreeErrorsToForm(err, form.setError)) returnif (err instanceof SpreeError) throw err- toast.error(err instanceof Error ? err.message : 'Failed to update store settings')+ toast.error(err instanceof Error ? err.message : t('admin.errors.failed_to_update_store'))}}@@ -146,8 +147,8 @@ function StoreSettingsForm({ store }: { store: Store }) {<ResourceLayoutheader={<PageHeader- title="Store settings"- subtitle="General configuration for this store."+ title={t('admin.pages.settings.store.title')}+ subtitle={t('admin.pages.settings.store.subtitle')}actions={<FormActions form={form} />}/>}@@ -160,7 +161,7 @@ function StoreSettingsForm({ store }: { store: Store }) {)}<Card><CardHeader>- <CardTitle>General</CardTitle>+ <CardTitle>{t('admin.pages.settings.store.tab_general')}</CardTitle></CardHeader><CardContent><FieldGroup>@@ -181,7 +182,7 @@ function StoreSettingsForm({ store }: { store: Store }) {<Card><CardHeader>- <CardTitle>Standards and formats</CardTitle>+ <CardTitle>{t('admin.pages.settings.store.tab_standards')}</CardTitle></CardHeader><CardContent><FieldGroup>diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsx b/packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsxindex 58839349ec..8372a8fd91 100644--- a/packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsx@@ -49,6 +49,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/settings/tax-cate})function TaxCategoriesPage() {+ const { t } = useTranslation()const search = Route.useSearch() as z.infer<typeof taxCategoriesSearchSchema>const navigate = useNavigate()@@ -82,7 +83,7 @@ function TaxCategoriesPage() {<Can I="create" a={Subject.TaxCategory}><Button size="sm" className="h-[2.125rem]" onClick={openCreate}><PlusIcon className="size-4" />- Add tax category+ {t('admin.tax_categories.add_cta')}</Button></Can>}@@ -122,6 +123,7 @@ function CreateTaxCategorySheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const createMutation = useCreateTaxCategory()const form = useForm<FormValues>({// eslint-disable-next-line @typescript-eslint/no-explicit-any@@ -149,11 +151,8 @@ function CreateTaxCategorySheet({><SheetContent><SheetHeader>- <SheetTitle>Add tax category</SheetTitle>- <SheetDescription>- Tax categories classify products for rate calculation. Setting one as the default- demotes the previous default.- </SheetDescription>+ <SheetTitle>{t('admin.pages.settings.tax_categories.add_sheet_title')}</SheetTitle>+ <SheetDescription>{t('admin.tax_categories.create_description')}</SheetDescription></SheetHeader><form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -167,10 +166,12 @@ function CreateTaxCategorySheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Button type="submit" size="sm" disabled={form.formState.isSubmitting}>- {form.formState.isSubmitting ? 'Creating…' : 'Create tax category'}+ {form.formState.isSubmitting+ ? t('admin.actions.creating')+ : t('admin.tax_categories.create_label')}</Button></SheetFooter></form>@@ -188,6 +189,7 @@ function EditTaxCategorySheet({open: booleanonOpenChange: (open: boolean) => void}) {+ const { t } = useTranslation()const { data: taxCategory, isLoading } = useTaxCategory(id)const updateMutation = useUpdateTaxCategory(id)const deleteMutation = useDeleteTaxCategory()@@ -222,10 +224,12 @@ function EditTaxCategorySheet({async function onDelete() {const ok = await confirm({- title: 'Delete tax category?',- message: `${taxCategory?.name ?? 'This category'} will be removed. Products and tax rates referencing it will lose the assignment.`,+ title: t('admin.tax_categories.delete_confirm.title'),+ message: t('admin.tax_categories.delete_confirm.message', {+ name: taxCategory?.name ?? '',+ }),variant: 'destructive',- confirmLabel: 'Delete',+ confirmLabel: t('admin.actions.delete'),})if (!ok) returnawait deleteMutation.mutateAsync(id)@@ -236,11 +240,13 @@ function EditTaxCategorySheet({<Sheet open={open} onOpenChange={onOpenChange}><SheetContent><SheetHeader>- <SheetTitle>{taxCategory?.name ?? 'Edit tax category'}</SheetTitle>- <SheetDescription>Update name, tax code, or default flag.</SheetDescription>+ <SheetTitle>+ {taxCategory?.name ?? t('admin.pages.settings.tax_categories.edit_sheet_title')}+ </SheetTitle>+ <SheetDescription>{t('admin.tax_categories.edit_description')}</SheetDescription></SheetHeader>{isLoading ? (- <div className="p-4 text-sm text-muted-foreground">Loading…</div>+ <div className="p-4 text-sm text-muted-foreground">{t('admin.common.loading')}</div>) : (<form onSubmit={form.handleSubmit(onSubmit)} className="flex min-h-0 flex-1 flex-col"><div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">@@ -256,7 +262,7 @@ function EditTaxCategorySheet({disabled={form.formState.isSubmitting || deleteMutation.isPending}className="mr-auto text-destructive hover:bg-destructive/10 hover:text-destructive">- Delete+ {t('admin.actions.delete')}</Button></Can><Button@@ -266,14 +272,14 @@ function EditTaxCategorySheet({onClick={() => onOpenChange(false)}disabled={form.formState.isSubmitting}>- Cancel+ {t('admin.actions.cancel')}</Button><Buttontype="submit"size="sm"disabled={form.formState.isSubmitting || !form.formState.isDirty}>- {form.formState.isSubmitting ? 'Saving…' : 'Save'}+ {form.formState.isSubmitting ? t('admin.actions.saving') : t('admin.actions.save')}</Button></SheetFooter></form>diff --git a/packages/admin/src/routes/accept-invitation.$invitationId.tsx b/packages/admin/src/routes/accept-invitation.$invitationId.tsxindex c8f4301d76..86d89ef806 100644--- a/packages/admin/src/routes/accept-invitation.$invitationId.tsx+++ b/packages/admin/src/routes/accept-invitation.$invitationId.tsx@@ -12,6 +12,7 @@ import { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'import { useAuth } from '@/hooks/use-auth'import { mapSpreeErrorsToForm } from '@/lib/form-errors'+import { i18n } from '@/lib/i18n'const acceptSearchSchema = z.object({token: z.string().min(1).optional(),@@ -23,6 +24,7 @@ export const Route = createFileRoute('/accept-invitation/$invitationId')({})function AcceptInvitationPage() {+ const { t } = useTranslation()const { invitationId } = Route.useParams()const { token } = Route.useSearch()const { isAuthenticated } = useAuth()@@ -33,8 +35,8 @@ function AcceptInvitationPage() {return (<Shell><ErrorCard- title="Missing invitation token"- message="This link looks incomplete. Ask whoever invited you to send it again."+ title={t('admin.invitation.missing_token_title')}+ message={t('admin.invitation.missing_token_message')}/></Shell>)@@ -48,6 +50,7 @@ function AcceptInvitationPage() {}function InvitationLoader({ invitationId, token }: { invitationId: string; token: string }) {+ const { t } = useTranslation()const lookup = useQuery({queryKey: ['invitation-lookup', invitationId, token],queryFn: () => adminClient.auth.lookupInvitation(invitationId, token),@@ -58,7 +61,7 @@ function InvitationLoader({ invitationId, token }: { invitationId: string; tokenreturn (<Card><CardContent className="py-12 text-center text-muted-foreground">- Loading invitation…+ {t('admin.invitation.loading')}</CardContent></Card>)@@ -68,11 +71,15 @@ function InvitationLoader({ invitationId, token }: { invitationId: string; tokenconst err = lookup.error as SpreeErrorreturn (<ErrorCard- title={err.status === 404 ? 'Invitation not found' : 'Could not load invitation'}+ title={+ err.status === 404+ ? t('admin.invitation.not_found_title')+ : t('admin.invitation.generic_error_title')+ }message={err.status === 404- ? 'This invitation has expired, been revoked, or already been accepted. Ask the inviter to send a new one.'- : err.message || 'Something went wrong. Please try again.'+ ? t('admin.invitation.not_found_message')+ : err.message || t('admin.invitation.generic_error_message')}/>)@@ -98,7 +105,7 @@ function AcceptForm({}const signInSchema = z.object({- password: z.string().min(1, 'Password is required'),+ password: z.string().min(1, i18n.t('admin.validation.password_required')),})type SignInForm = z.infer<typeof signInSchema>@@ -128,25 +135,32 @@ function SignInForm({} catch (err) {const e = err as SpreeErrorif (e?.status === 401) {- form.setError('root', { message: 'Invalid password' })+ form.setError('root', { message: t('admin.validation.invalid_password') })return}if (!mapSpreeErrorsToForm(err, form.setError)) {- form.setError('root', { message: e?.message || 'Could not accept invitation' })+ form.setError('root', { message: e?.message || t('admin.invitation.could_not_accept') })}}}+ const invitedPart = invitation.inviter_email+ ? t('admin.invitation.invited_by', { email: invitation.inviter_email })+ : t('admin.invitation.invited_generic')+ const rolePart = invitation.role_name+ ? t('admin.invitation.invited_as_role', { role: invitation.role_name })+ : ''+ const actionPart = t('admin.invitation.sign_in_to_accept')+return (<Card><CardHeader className="text-center">- <CardTitle className="text-xl">Join {invitation.store.name ?? 'this store'}</CardTitle>- <CardDescription>- {invitation.inviter_email- ? `${invitation.inviter_email} invited you`- : 'You have been invited'}- {invitation.role_name ? ` as ${invitation.role_name}` : null}. Sign in to accept.- </CardDescription>+ <CardTitle className="text-xl">+ {invitation.store.name+ ? t('admin.invitation.join_store', { store: invitation.store.name })+ : t('admin.invitation.join_default')}+ </CardTitle>+ <CardDescription>{`${invitedPart}${rolePart}${actionPart}`}</CardDescription></CardHeader><CardContent><form onSubmit={form.handleSubmit(onSubmit)} className="grid gap-6">@@ -173,7 +187,7 @@ function SignInForm({)}</div><Button type="submit" className="w-full" disabled={isLoading}>- {isLoading ? 'Accepting…' : 'Sign in & accept'}+ {isLoading ? t('admin.invitation.accepting') : t('admin.invitation.sign_in_and_accept')}</Button></form></CardContent>@@ -183,13 +197,19 @@ function SignInForm({const signUpSchema = z.object({- first_name: z.string().min(1, 'First name is required'),- last_name: z.string().min(1, 'Last name is required'),- password: z.string().min(8, 'Password must be at least 8 characters'),+ first_name: z.string().min(1, i18n.t('admin.validation.first_name_required')),+ last_name: z.string().min(1, i18n.t('admin.validation.last_name_required')),+ password: z.string().min(+ 8,+ i18n.t('admin.validation.min_length', {+ field: i18n.t('admin.fields.password.label'),+ count: 8,+ }),+ ),password_confirmation: z.string(),}).refine((data) => data.password === data.password_confirmation, {- message: 'Passwords do not match',+ message: i18n.t('admin.validation.passwords_dont_match'),path: ['password_confirmation'],})type SignUpForm = z.infer<typeof signUpSchema>@@ -220,22 +240,28 @@ function SignUpForm({} catch (err) {if (!mapSpreeErrorsToForm(err, form.setError)) {const e = err as SpreeError- form.setError('root', { message: e?.message || 'Could not accept invitation' })+ form.setError('root', { message: e?.message || t('admin.invitation.could_not_accept') })}}}+ const invitedPart = invitation.inviter_email+ ? t('admin.invitation.invited_by', { email: invitation.inviter_email })+ : t('admin.invitation.invited_generic')+ const rolePart = invitation.role_name+ ? t('admin.invitation.invited_as_role', { role: invitation.role_name })+ : ''+ const actionPart = t('admin.invitation.create_to_accept')+return (<Card><CardHeader className="text-center">- <CardTitle className="text-xl">Join {invitation.store.name ?? 'this store'}</CardTitle>- <CardDescription>- {invitation.inviter_email- ? `${invitation.inviter_email} invited you`- : 'You have been invited'}- {invitation.role_name ? ` as ${invitation.role_name}` : null}. Create your account to- accept.- </CardDescription>+ <CardTitle className="text-xl">+ {invitation.store.name+ ? t('admin.invitation.join_store', { store: invitation.store.name })+ : t('admin.invitation.join_default')}+ </CardTitle>+ <CardDescription>{`${invitedPart}${rolePart}${actionPart}`}</CardDescription></CardHeader><CardContent><form onSubmit={form.handleSubmit(onSubmit)} className="grid gap-6">@@ -300,7 +326,7 @@ function SignUpForm({)}</div><Button type="submit" className="w-full" disabled={isLoading}>- {isLoading ? 'Creating account…' : 'Create account & accept'}+ {isLoading ? t('admin.invitation.accepting') : t('admin.invitation.create_and_accept')}</Button></form></CardContent>diff --git a/packages/admin/src/routes/login.tsx b/packages/admin/src/routes/login.tsxindex d706aa002b..df7d8333b2 100644--- a/packages/admin/src/routes/login.tsx+++ b/packages/admin/src/routes/login.tsx@@ -8,11 +8,12 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/comimport { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'import { useAuth } from '@/hooks/use-auth'+import { i18n } from '@/lib/i18n'import { cn } from '@/lib/utils'const loginSchema = z.object({email: z.email(),- password: z.string().min(1, 'Password is required'),+ password: z.string().min(1, i18n.t('admin.validation.password_required')),})type LoginForm = z.infer<typeof loginSchema>@@ -22,6 +23,7 @@ export const Route = createFileRoute('/login')({})function LoginPage() {+ const { t } = useTranslation()const { login, isLoading, isAuthenticated } = useAuth()const form = useForm<LoginForm>({@@ -33,7 +35,7 @@ function LoginPage() {try {await login(data.email, data.password)} catch {- form.setError('root', { message: 'Invalid email or password' })+ form.setError('root', { message: t('admin.validation.invalid_email_or_password') })}}@@ -46,7 +48,7 @@ function LoginPage() {<div className="flex h-6 w-6 items-center justify-center rounded-md bg-primary text-primary-foreground"><GalleryVerticalEnd className="size-4" /></div>- Spree Admin+ {t('admin.branding.app_name')}</a><LoginFormCard form={form} onSubmit={onSubmit} isLoading={isLoading} /></div>@@ -71,8 +73,8 @@ function LoginFormCard({<div className={cn('flex flex-col gap-6', className)}><Card><CardHeader className="text-center">- <CardTitle className="text-xl">Welcome back</CardTitle>- <CardDescription>Sign in to your admin account</CardDescription>+ <CardTitle className="text-xl">{t('admin.pages.login.title')}</CardTitle>+ <CardDescription>{t('admin.pages.login.subtitle')}</CardDescription></CardHeader><CardContent><form onSubmit={form.handleSubmit(onSubmit)}>@@ -107,7 +109,7 @@ function LoginFormCard({)}</div><Button type="submit" className="w-full" disabled={isLoading}>- {isLoading ? 'Signing in...' : 'Login'}+ {isLoading ? t('admin.actions.signing_in') : t('admin.actions.sign_in')}</Button></div></div>@@ -115,14 +117,13 @@ function LoginFormCard({</CardContent></Card><div className="text-balance text-center text-xs text-muted-foreground">- Powered by{' '}<ahref="https://spreecommerce.org"className="underline underline-offset-4 hover:text-primary"target="_blank"rel="noreferrer">- Spree Commerce+ {t('admin.branding.powered_by')}</a></div></div>diff --git a/packages/admin/src/tables/products.tsx b/packages/admin/src/tables/products.tsxindex 8034195f48..c3d9cedeba 100644--- a/packages/admin/src/tables/products.tsx+++ b/packages/admin/src/tables/products.tsx@@ -1,4 +1,5 @@import { Link } from '@tanstack/react-router'+import i18n from 'i18next'import { PackageIcon } from 'lucide-react'import { RelativeTime } from '@/components/spree/relative-time'import { StatusBadge } from '@/components/ui/badge'@@ -6,16 +7,16 @@ import { formatPrice } from '@/lib/formatters'import { defineTable } from '@/lib/table-registry'defineTable('products', {- title: 'Products',+ title: i18n.t('admin.nav.products'),searchParam: 'multi_search',- searchPlaceholder: 'Search products...',+ searchPlaceholder: i18n.t('admin.common.search_placeholder'),defaultSort: { field: 'updated_at', direction: 'desc' },emptyIcon: <PackageIcon className="size-8 text-muted-foreground" />,- emptyMessage: 'No products found',+ emptyMessage: i18n.t('admin.common.no_results'),columns: [{key: 'name',- label: 'Name',+ label: i18n.t('admin.fields.name.label'),sortable: true,filterable: true,default: true,@@ -44,21 +45,21 @@ defineTable('products', {},{key: 'status',- label: 'Status',+ label: i18n.t('admin.fields.status.label'),sortable: true,filterable: true,default: true,filterType: 'enum',filterOptions: [- { value: 'draft', label: 'Draft' },- { value: 'active', label: 'Active' },- { value: 'archived', label: 'Archived' },+ { value: 'draft', label: i18n.t('admin.pages.products.status_options.draft') },+ { value: 'active', label: i18n.t('admin.pages.products.status_options.active') },+ { value: 'archived', label: i18n.t('admin.pages.products.status_options.archived') },],render: (product) => <StatusBadge status={product.status} />,},{key: 'inventory',- label: 'Inventory',+ label: i18n.t('admin.pages.products.section_inventory'),sortable: false,filterable: false,default: true,@@ -67,11 +68,17 @@ defineTable('products', {const inventoryStatus =!product.in_stock && !product.backorderable ? (- <span className="text-sm text-destructive">Out of stock</span>+ <span className="text-sm text-destructive">+ {i18n.t('admin.pages.products.inventory.out_of_stock')}+ </span>) : product.backorderable && !product.in_stock ? (- <span className="text-sm text-muted-foreground">On backorder</span>+ <span className="text-sm text-muted-foreground">+ {i18n.t('admin.pages.products.inventory.on_backorder')}+ </span>) : (- <span className="text-sm text-muted-foreground">{product.total_on_hand} in stock</span>+ <span className="text-sm text-muted-foreground">+ {i18n.t('admin.pages.products.inventory.in_stock', { count: product.total_on_hand })}+ </span>)return (@@ -112,7 +119,7 @@ defineTable('products', {},{key: 'created_at',- label: 'Created at',+ label: i18n.t('admin.fields.created_at.label'),sortable: true,filterable: true,default: false,@@ -122,7 +129,7 @@ defineTable('products', {},{key: 'updated_at',- label: 'Updated at',+ label: i18n.t('admin.fields.updated_at.label'),sortable: true,filterable: true,default: false,