/**
 * Robot Manager Translations - English
 */
import { RobotManagerTranslations } from './zh';

export const robotManagerEn: RobotManagerTranslations = {
  // Module name
  title: 'Robot Manager',
  subtitle: 'Robot Lifecycle Management',

  // Common
  loading: 'Loading...',

  // Navigation
  overview: 'Overview',
  list: 'Robot List',
  reports: 'Reports',

  // Status
  status: {
    // v2 compat (legacy, PR3 to be removed)
    ORDERED: 'Ordered',
    IN_TRANSIT: 'In Transit',
    BONDED: 'Bonded',
    IN_STOCK: 'In Stock',
    RESERVED: 'Reserved',
    SOLD: 'Sold',
    DELIVERED: 'Delivered',
    REPAIR: 'In Repair',
    REPAIRED: 'Repaired',
    // v3 28 stages
    SUPPLY_PO_CREATED: 'PO Created',
    SUPPLY_IN_PRODUCTION: 'In Production',
    SUPPLY_READY_TO_SHIP: 'Ready to Ship',
    LOGISTICS_IN_TRANSIT: 'Logistics In Transit',
    LOGISTICS_BONDED: 'Bonded',
    LOGISTICS_CUSTOMS_CLEARED: 'Customs Cleared',
    WAREHOUSE_RECEIVED: 'W1 Received',
    WAREHOUSE_AT_W1_PDI: 'W1 PDI',
    WAREHOUSE_MODIFICATION: 'Modification',
    WAREHOUSE_AT_W2: 'W2 Stored',
    WAREHOUSE_AT_W2_RLE: 'W2 RLE',
    WAREHOUSE_BRANDED_READY: 'Branded Ready',
    SALES_RESERVED: 'Sales Reserved',
    SALES_PAYMENT_VALIDATED: 'Payment Validated',
    DELIVERY_APPROVAL: 'Delivery Approval',
    DELIVERY_PAYMENT_COLLECTED: 'Pre-Del Payment Collected',
    DELIVERY_READY: 'Ready for Delivery',
    DELIVERY_DELIVERED: 'Delivered',
    RENTAL_ACTIVE: 'Rental Active',
    AFTERSALES_TICKET: 'Service Ticket',
    AFTERSALES_RETURN_INITIATED: 'RMA Initiated',
    AFTERSALES_RETURN_RECEIVED: 'Return Received',
    AFTERSALES_AT_W6: 'W6 Aftersales',
    AFTERSALES_UNDER_REPAIR: 'Under Repair',
    AFTERSALES_QUOTE_APPROVAL: 'OOW Quote Approval',
    AFTERSALES_REPAIRED: 'Repaired',
    CLOSED: 'Closed',
    CANCELLED: 'Cancelled',
    RETURNED: 'Returned',
  },
  // 6 departments + terminals
  department: {
    SUPPLY: 'Supply Chain',
    LOGISTICS: 'Logistics',
    WAREHOUSE: 'Warehouse',
    SALES: 'Sales',
    DELIVERY: 'Delivery',
    RENTAL: 'Rental',
    AFTERSALES: 'Aftersales',
    TERMINAL: 'Terminal',
  },

  // Lifecycle event types
  event: {
    stage_changed: 'Stage Changed',
    held: 'Held',
    unheld: 'Resumed',
    location_moved: 'Location Moved',
    sn_activated: 'SN Activated',
    usage_type_changed: 'Usage Type Changed',
    label_applied: 'Label Applied',
    inspection_logged: 'Inspection Logged',
    readiness_completed: 'Readiness Completed',
    payment_collected: 'Payment Collected',
    delivery_signed: 'Delivery Signed',
    service_opened: 'Service Opened',
    service_closed: 'Service Closed',
    imported_from_v5: 'Imported from v5',
    note_added: 'Note Added',
  },

  // Location
  location: {
    label: 'Location',
    placeholder: 'Enter location',
  },

  // Field labels — Basic info
  fields: {
    ffsn: 'FF Serial Number',
    supplierSn: 'Supplier Serial Number',
    model: 'Model',
    sku: 'SKU',
    usageType: 'Usage Type',
    importType: 'Import Type',
    currentStatus: 'Current Status',
    deliveryStatus: 'Delivery Status',
    location: 'Location',
    issueTag: 'Issue Tag',
    version: 'Version',
    createdAt: 'Created At',
    updatedAt: 'Updated At',
    status: 'Status',
    contractStatus: 'Contract',
    amount: 'Amount',
    signedAt: 'Signed At',
    createdShort: 'Created',
    paymentNo: 'Payment No',
    direction: 'Direction',
    relatedType: 'Related',
    paymentMethod: 'Method',
    paidAt: 'Paid At',
    expectedDate: 'Expected Date',
    deliveryNo: 'Delivery No',
    requestType: 'Type',
    ticketNo: 'Ticket No',
    severity: 'Severity',
    issueTypeCode: 'Issue Type',
    openedAt: 'Opened At',
    closedAt: 'Closed At',
    rentalStart: 'Start',
    rentalEnd: 'End',
    periodMonths: 'Period (Months)',
    monthlyRate: 'Monthly Rate',
    poNo: 'PO Number',
    sapPoNo: 'SAP PO',
    orderedAt: 'Ordered At',
    expectedAt: 'Expected Arrival',
    linkedRobots: 'Linked Robots',
    soNo: 'SO Number',
    d365SoId: 'D365 SO',
    paymentInbound: '↓ Inbound',
    paymentOutbound: '↑ Outbound',
  },

  // Field labels — Purchase info
  purchase: {
    title: 'Purchase Information',
    supplier: 'Supplier',
    poNumber: 'PO Number',
    purchaseDate: 'Purchase Date',
    purchasePrice: 'Purchase Price',
    eta: 'ETA',
    arrivalDate: 'Arrival Date',
  },

  // Field labels — Sales info
  sales: {
    title: 'Sales Information',
    customerName: 'Customer Name',
    salesOrderId: 'Sales Order ID',
    salesPrice: 'Sales Price',
    deliveredDate: 'Delivered Date',
  },

  // Field labels — Contract info
  contract: {
    title: 'Contract Information',
    contractStatus: 'Contract Status',
    contractLink: 'Contract Link',
  },

  // Field labels — Finance info
  finance: {
    title: 'Finance Information',
    cost: 'Cost',
    paymentMethod: 'Payment Method',
    paymentStatus: 'Payment Status',
    grossMargin: 'Gross Margin',
  },

  // Field labels — Warranty info
  warranty: {
    title: 'Warranty Information',
    warrantyStatus: 'Warranty Status',
    serviceRecords: 'Service Records',
    statusChangeLogs: 'Status Change Logs',
  },

  // Placeholders
  placeholders: {
    ffsn: 'Enter FF serial number',
    supplierSn: 'Enter supplier serial number',
    model: 'Select model',
    sku: 'Enter SKU',
    usageType: 'Select usage type',
    importType: 'Select import type',
    supplier: 'Enter supplier',
    poNumber: 'Enter PO number',
    unknownStage: 'Unknown Stage',
    customerName: 'Enter customer name',
    salesOrderId: 'Enter sales order ID',
    issueTag: 'Enter issue tag',
    search: 'Search serial number, model, customer...',
    searchCodeName: 'Search code / name',
    searchMyWork: 'Search FFSN / supplier SN / model / SKU / customer',
    currentUser: 'Current user',
    holdReason: 'Hold reason (e.g. waiting for parts)',
    inspectionIssue: 'e.g. battery contact issue',
    poNoAutoOrManual: 'Auto-generate or specify manually',
    orderedAtEmpty: 'Empty = today',
    supplierSnHintIfPhysical: 'Enter if physical unit available',
    reasonOptional: 'Reason (Optional, written to event notes)',
  },

  // Stage action panel (StageActionPanel)
  stage: {
    currentStage: 'Current Stage',
    deptProcessing: '{dept} department processing',
    heldPrefix: 'Held: {reason}',
    holdResumeTitle: 'Hold / Resume',
    defaultFormHint: 'Stage {stage} has no dedicated form. Use "Switch Stage" below to advance, or go to the related business table (PO/SO/Delivery/Service/Rental) for details.',
    deptNextStep: '{dept} · Next Step',
    nextStage: 'Next Stage',
    arrivedAtOptional: 'Arrived At (Optional)',
    notes: 'Notes',
    enterBonded: 'Enter Bonded',
    customsCleared: 'Customs Cleared',
    pdiResult: 'W1 PDI · Inspection Result',
    foundIssue: 'Found Issue',
    issueDescription: 'Issue Description',
    passEnterModification: 'Pass → Modification',
    procurementSourcing: 'External Source Warehouse',
    seriousIssueReturn: 'Serious Issue → Return to Supplier',
    warehouseReady: 'Warehouse · Ready',
    warehouseReadyHint: 'Branding 7 items + Parts 10-item check must be done first (filled in Aftersales/Assembly panel).',
    availableReserveForSales: 'Available → Reserve for Sales',
    salesPaymentValidation: 'Sales · Payment Validation',
    paymentValidationHintBefore: 'Guard G5: Must have PaymentRecord(paymentStatus=PAID) to advance. Detailed payment entry via',
    paymentValidationHintAfter: '.',
    paymentList: 'Payment List',
    paymentReceivedAdvance: 'Payment Received → Advance',
    deliveryPgi: 'Delivery · PGI Advance',
    deliveryPgiHintBefore: 'Guard checks DeliveryFulfillment.signedFormStatus=SIGNED + payment PAID. DeliveryFulfillment details via',
    deliveryPgiHintAfter: '.',
    deliveryList: 'Delivery List',
    signAndPaidDelivered: 'Signed + PAID → Delivered',
    legalNextWhitelistGuard: 'Legal next stages (whitelist + Guard check):',
    selectTargetStagePlaceholder: 'Select target stage',
    noLegalNextStage: 'No legal next stage (terminal)',
    advanceToStage: 'Advance to "{stage}"',
    poNumberLabel: 'PO Number:',
    supplierLabel: 'Supplier:',
    notLinked: 'Not linked',
    // === Drawer activation block ===
    activateTitle: 'Placeholder SN — activate by scanning supplier physical label at receipt',
    activatePlaceholderLabel: 'Placeholder SN:',
    activateAfterHint: 'After activation a formal FFSN is generated (original placeholder kept in placeholderSnOrig for trace).',
    activateScanBtn: 'Scan to activate SN',
    activateSupplierSnLabel: 'Supplier SN (scan supplier physical label)',
    activateSupplierSnPh: 'e.g. SUP-12345 or autofill via scan',
    activating: 'Activating…',
    activateConfirm: 'Confirm activate',
    activateFailed: 'Activation failed',
    activateMissingSn: 'Please enter the scanned Supplier SN',
    // === Drawer footer ===
    drawerSectionTitle: '{stage} · Advance operations',
    escClose: 'Esc to cancel',
    openDetail: 'Detail',
    openDetailFull: 'Open detail page',
    terminalStage: 'Terminal — cannot advance',
    advancing: 'Advancing…',
    advanceComplete: 'Complete and advance → {label}',
    branchPickerHint: 'This stage has {count} branches, pick next step:',
    advanceFailedDetail: 'Advance failed, retry or use the detail page',
    // === V3FieldsPanel ===
    fieldSaved: '{field} saved',
    fieldSaveConflict: 'Data was modified by someone else, please refresh and retry',
    fieldSaveFailed: 'Save failed: {msg}',
    fieldsThisStage: 'Fields needed at this stage',
    fieldsCount: '{count} fields',
    fieldsAllDetails: 'All robot fields',
    fieldsFilledHint: '{filled}/{total} filled · click value to edit',
    fieldCurrentBadge: 'Current',
    fieldLoadingOptions: 'Loading options…',
    fieldReadonly: '(read-only)',
    // === Stage form shared ===
    processing: 'Processing…',
    // WarehouseModificationForm
    modTitle: 'Modification / Labeling · Validate',
    modHint: 'Clicking "Complete" will verify 7 quality labels (BRAND_PLATE / SERIAL_NUMBER / WARNING_LABEL / COMPLIANCE_CE / COMPLIANCE_FCC / BATTERY_INFO / QC_PASS) and mark all 10 accessories present in one go.',
    modAdvance: 'Complete → Branded Ready',
    // WarehouseBrandedReadyForm
    brandedHint: 'Click reserve auto-creates 1 SO bound to this robot. For full SO (multi-line / discount / contract), go to',
    brandedSalesLink: 'Sales Orders',
    brandedHintSuffix: '.',
    brandedCustomer: 'Customer',
    brandedCustomerPh: 'Select customer',
    brandedUnitPrice: 'Unit Price',
    brandedMissingCustomer: 'Please select a customer',
    brandedReuseExistingSo: 'This robot is already bound to SO {soNo}; reusing existing SO to reserve (your customer/price input was ignored — edit the SO page if needed)',
    // SalesReservedForm
    salesAmountLabel: 'Payment Amount',
    salesHint: 'Click auto-creates PaymentRecord(PAID, FULL_PAYMENT_WIRE) to satisfy G5 hard gate. For full payment (installments / multi-currency / bank statement link), go to',
    salesHintSuffix: '.',
    salesMissingSo: 'No SO found bound to this robot',
    // DeliveryReadyForm
    deliverHintBefore: 'Click auto-creates DeliveryFulfillment(signedFormStatus=SIGNED + acceptanceFormStatus=SIGNED). For full sign-off / acceptance form (with attachments, PGI doc no), go to',
    deliverHintSuffix: '. Prereq: robot must have SO bound + Payment PAID (already checked at SALES_PAYMENT_VALIDATED via checkG5Payment).',
    deliverMissingSo: 'No SO bound to this robot — go back to "Branded Ready" to reserve first',
    // DeliveredRmaBlock
    rmaTitle: 'Path A · Open Service Ticket',
    rmaHint: 'Customer reports issue → open ServiceTicket → advance to "Service Ticket" stage (from there can further push RMA / return).',
    rmaIssuePh: 'Issue description (e.g. battery anomaly / joint failure)',
    rmaMissingIssue: 'Please fill in issue description',
    rmaSubmit: 'Create ticket → Service Ticket',
    // DeliveredRentalBlock
    rentalTitle: 'Path B · Convert to Rental',
    rentalHint: 'Customer switches to rental payment, creates ACTIVE RentalAgreement. Customer is taken from this robot\'s bound SO.',
    rentalPeriod: 'Period (months)',
    rentalMonthlyRate: 'Monthly Rate',
    rentalMissingSo: 'No SO bound to this robot, cannot resolve customer',
    rentalSubmit: 'Create agreement → Rental Active',
    // DeliveredCloseBlock
    closeTitle: 'Path C · Retire Asset',
    closeHint: 'Equipment scrapped / resold / permanently retired. Fill disposalType + note, retiredAt auto-set.',
    closeDisposalLabel: 'Disposal Type',
    closeNotesPh: 'Note (optional)',
    closeSubmit: 'Retire asset',
    closeDisposalScrapped: 'Scrapped',
    closeDisposalSoldOut: 'Sold Out',
    closeDisposalDonated: 'Donated',
    closeDisposalOther: 'Other',
    // V3 field tooltips
    fieldEditableColumn: 'Editable (direct column)',
    fieldEditableMetadata: 'Editable (metadata.{key})',
  },

  // My Work (workbench)
  myWork: {
    captionCurrentUserDept: '{user} · Department: {depts}',
    yourDeptIs: 'Your departments: {depts}',
    empty: 'No pending robots',
    viewAllList: 'View Full List',
    allChip: 'All ({count})',
    totalBanner: ' robots pending in your departments, grouped by stage:',
    totalPrefix: 'Total',
    filterBannerPrefix: 'Filter "',
    filterBannerMiddle: '" · ',
    filterBannerOfTotal: ' of ',
    filterBannerEnd: '',
    selectAllGroup: 'Select all in group',
    deselectAllGroup: 'Deselect all',
    selectedCount: '{count} selected',
    poGroupSummary: '· {count} placeholders',
    poStats: '(received {received} / pending {pending})',
    expand: 'Expand ▾',
    collapse: 'Collapse ▴',
    pendingFields: 'Pending {count}',
    pendingFieldsTitle: 'Click to view {count} pending field details',
    bulkAdvanceLabel: 'Bulk Advance → {label}',
    bulkAdvanceFailed: 'Bulk advance failed: {msg}',
    bulkAdvancePicker: 'Bulk advance to …',
    bulkAdvanceResult: 'Bulk advance: {ok} succeeded{failSuffix}',
    bulkAdvanceFailSuffix: ' · {fail} failed',
    bulkFillButton: 'Bulk Fill',
    unknownError: 'Unknown error',
    holdLabel: 'Held',
    noLinkedPo: '(No linked PO)',
  },

  // 6 L3 business list pages (uses SimpleListPage)
  lists: {
    salesOrders: {
      title: 'Sales Orders (SO)',
      description: 'robot-manager L3 · Node 12 Sales',
      searchPlaceholder: 'Search SO No / D365 SO ID',
    },
    purchaseOrders: {
      title: 'Purchase Orders (PO)',
      description: 'robot-manager L3 · Nodes 01-03 Supply Chain · Auto-generates placeholder RobotUnits per quantity',
      searchPlaceholder: 'Search PO No / SAP PO No',
    },
    deliveries: {
      title: 'Delivery Requests',
      description: 'robot-manager L3 · Node 14 Delivery',
      searchPlaceholder: 'Search Delivery No',
    },
    rentals: {
      title: 'Rental Agreements',
      description: 'robot-manager L3 · Node 17 Rental branch',
    },
    payments: {
      title: 'Payment Records',
      description: 'robot-manager L3 · Node P6.1 / 13 · Bi-directional INBOUND/OUTBOUND',
      searchPlaceholder: 'Search Payment No',
    },
    serviceTickets: {
      title: 'Service Tickets',
      description: 'robot-manager L3 · Node ST Aftersales',
      searchPlaceholder: 'Search Ticket No',
    },
  },

  // Delivery type dictionary
  deliveryType: {
    WILL_CALL: 'Will Call (Pickup)',
    THREE_PL: 'Third-Party Logistics',
    WHITE_GLOVE: 'White Glove Service',
  },

  // QR scan component
  qr: {
    scan: 'Scan',
    scanTitle: 'Scan to Locate Robot',
    startCamera: 'Start Camera Scan',
    closeCamera: 'Close Camera',
    orManual: 'Or enter ffsn manually',
    open: 'Open',
    cameraError: 'Cannot access camera',
    notFound: 'Robot not found: ffsn={ffsn}',
    mobileHint: 'On mobile, use the system camera or WeChat to scan the QR code on the robot. The URL will auto-redirect to the robot detail page.',
    scanOrVisit: 'Scan or visit',
    batchPrintTitle: 'Batch Print QR Codes ({count} sheets)',
    batchPrintDesc: 'Scan to open robot detail. A4 layout 4×6 = 24 per page, label ~65×45mm.',
    generating: 'Generating QR codes…',
    selectFirst: 'Please select robots to print first',
    closeDialog: 'Close',
    printCount: 'Print {count} sheets',
  },

  // Actions
  actions: {
    create: 'Add Robot',
    edit: 'Edit',
    delete: 'Delete',
    changeStatus: 'Change Status',
    bulkChangeStatus: 'Bulk Status Change',
    export: 'Export',
    import: 'Import',
    view: 'View',
    viewDetails: 'View Details',
    save: 'Save',
    cancel: 'Cancel',
    confirm: 'Confirm',
    back: 'Back',
    refresh: 'Refresh',
    new: 'New',
    search: 'Search',
    pasteImport: 'Paste Import',
    bulkEnable: 'Bulk Enable',
    bulkDisable: 'Bulk Disable',
    bulkDelete: 'Bulk Delete',
    clearSelection: 'Clear Selection',
    undo: 'Undo',
    discardDraft: 'Discard Draft',
    addLine: 'Add Line',
    advance: 'Advance',
    advanceTo: 'Advance to',
    next: 'Next',
    expand: 'Expand',
    collapse: 'Collapse',
    creating: 'Creating…',
    createShort: 'Create',
    createAndOpenDetail: 'Create and Open Detail',
    hold: 'Hold',
    resume: 'Resume',
    manualSwitchStage: 'Manual Stage Switch',
    advancedManualSwitch: 'Advanced: Manual Stage Switch',
  },

  // Reports
  report: {
    inventory: 'Inventory Report',
    sales: 'Sales Report',
    finance: 'Finance Report',
    totalCount: 'Total Count',
    byStatus: 'By Status',
    byModel: 'By Model',
    byLocation: 'By Location',
    totalSales: 'Total Sales',
    totalRevenue: 'Total Revenue',
    totalCost: 'Total Cost',
    totalMargin: 'Total Margin',
    averageMargin: 'Average Margin',
    customerBreakdown: 'Customer Breakdown',
    // KPI cards
    kpiTotalRobots: 'Total Robots',
    kpiInStockHint: 'In stock {warehouse} · In transit {transit}',
    kpiSold: 'Sold',
    kpiCustomers: '{count} customers',
    kpiRevenue: 'Total Revenue',
    kpiPerCustomer: 'Avg {avg}/customer',
    kpiGrossMargin: 'Gross Margin',
    kpiMarginRate: '{rate}% profit margin',
    // Section headers
    sectionInventoryDist: 'Inventory Stage Distribution',
    sectionTopCustomer: 'Top Customer Revenue',
    sectionCustomerDetails: 'Customer Details',
    sectionFinancialSummary: 'Financial Summary',
    sectionMonthlyTrend: 'Monthly Sales Trend',
    // Column labels
    colCustomerName: 'Customer Name',
    colSoldCount: 'Units Sold',
    colRevenue: 'Revenue',
    colAverage: 'Avg/Customer',
    // Empty / unknown
    unknownCustomer: 'Unknown',
    noData: 'No data',
    noSalesData: 'No sales data',
    unitSuffix: 'units',
    // Summary
    summaryRevenue: 'Total Revenue',
    summaryCost: 'Total Cost',
    summaryMargin: 'Gross Margin',
    // Chart legend
    legendRevenue: 'Revenue',
    legendCount: 'Units',
  },

  // Messages
  messages: {
    createSuccess: 'Robot created successfully',
    createFailed: 'Failed to create',
    updateSuccess: 'Updated successfully',
    updateFailed: 'Failed to update',
    deleteSuccess: 'Deleted successfully',
    deleteFailed: 'Failed to delete',
    statusChangeSuccess: 'Status changed successfully',
    statusChangeFailed: 'Failed to change status',
    bulkStatusChangeSuccess: 'Bulk status change successful, {count} updated',
    bulkStatusChangeFailed: 'Bulk status change failed',
    exportSuccess: 'Export successful',
    exportFailed: 'Export failed',
    importSuccess: 'Import complete: {total} total, {success} succeeded, {failed} failed',
    importFailed: 'Import failed',
    confirmDelete: 'Are you sure you want to delete this robot? This action cannot be undone.',
    confirmStatusChange: 'Are you sure you want to change status to "{status}"?',
    confirmBulkStatusChange: 'Are you sure you want to change status to "{status}" for {count} robots?',
    noDataMessage: 'No data available',
    loadFailed: 'Failed to load',
    // Generic toast / confirm
    updated: 'Updated',
    held: 'Held',
    resumed: 'Resumed',
    advanced: 'Advanced',
    advanceFailed: 'Advance failed',
    actionFailed: 'Operation failed',
    saveSuccess: 'Saved',
    saveFailed: 'Save failed',
    restored: 'Restored',
    restoreFailed: 'Restore failed',
    fixErrors: 'Please fix form errors first',
    draftRestored: 'Unsaved draft restored',
    bulkEnabled: 'Enabled {count} items',
    bulkDisabled: 'Disabled {count} items',
    bulkDeleted: 'Deleted {count} items',
    bulkAllFailed: 'All failed ({count} items)',
    bulkPartial: 'Success {success} / Failed {failed}',
    bulkDeleteConfirm: 'Delete {count} items? (Soft delete, recoverable)',
    deleteConfirmNamed: 'Delete "{name}"?',
    deletedNamed: 'Deleted {name}',
    pasteEmpty: 'Paste at least 1 row',
    pasteSuccess: 'Imported {count} rows',
    selectModelSku: 'Select Model and SKU',
    fillPoSupplier: 'Fill PO number and supplier',
    oneLineRequired: 'At least one line required',
    lineSkuQtyPriceRequired: 'Line {n}: SKU / quantity / unit price required',
    dropdownLoadFailed: 'Failed to load options: {msg}',
    holdReasonRequired: 'Please enter hold reason',
    selectTargetStage: 'Select target stage',
    requiredFieldTemplate: '{field} required',
    selected: '{count} selected',
    robotCreatedNamed: 'Robot {ffsn} created',
    createFailedReason: 'Create failed: {msg}',
    poCreatedSummary: 'PO {poNo} created · {lines} lines · {total} placeholder RobotUnits',
    selectField: 'Please select a field',
    invalidNumber: 'Please enter a valid number',
    bulkFillResult: 'Bulk fill: {ok} succeeded{failSuffix}',
    bulkFillFailSuffix: ' · {fail} failed',
    importSummary: 'Total {total}, created {created}, updated {updated}, skipped {skipped}, failed {failed}',
  },

  // Bulk fill field dialog
  bulkFill: {
    title: 'Bulk Fill Field',
    description: 'Fill the same value for the same field across {count} selected robots. Only fields editable at the current stage are listed.',
    field: 'Field',
    value: 'Value',
    selectField: '— Select Field —',
    noEditableField: 'No editable field for this stage',
    clearField: '— Empty (clear field)',
    valuePlaceholder: 'Enter value (empty = clear field)',
    largeBatchWarning: '⚠️ {count} selected · Bulk fill sends {count} API requests, may be slow',
    submitting: 'Filling…',
    applyToCount: 'Apply to {count}',
  },

  // OptionsEditor default i18n
  optionsEditor: {
    labelEn: 'English',
    labelEnPlaceholder: 'English label',
    labelZh: 'Chinese',
    labelZhPlaceholder: 'Chinese label',
    enabled: 'Enabled',
    addOption: '+ Add Option',
    empty: 'No options. Click button below to add.',
    up: 'Move up',
  },

  // Backend business error-code translations (matches backend/.../errors/robot-manager.errors.ts)
  errorCodes: {
    ROBOT_VERSION_CONFLICT: 'Data was modified by another user, please refresh and retry',
    ROBOT_MUST_BIND_CUSTOMER_BEFORE_RESERVE: 'Must bind a customer before reserving',
    ROBOT_MUST_SET_SALES_PRICE_BEFORE_SOLD: 'Sales price required before marking as sold',
    ROBOT_CUSTOMER_ID_REQUIRED_FOR_RETURN: 'Customer is required when returning to customer',
    ROBOT_SALES_PRICE_REQUIRED_FOR_RETURN: 'Sales price required when returning to customer',
    ROBOT_REMARK_REQUIRED_FOR_CANCEL: 'Remark is required when cancelling/disposing',
    ROBOT_PO_NUMBER_IMMUTABLE: 'PO number is already set and cannot be modified',
    ROBOT_SALES_ORDER_ID_IMMUTABLE: 'Sales order ID is already set and cannot be modified',
    ROBOT_EXCEL_MISSING_SHEET: 'Excel file contains no worksheet',
    ROBOT_EXCEL_MISSING_ROWS: 'Excel file contains no data rows',
    ROBOT_FIELD_KEY_OR_LABEL_EN_REQUIRED: 'Please provide either Key or English Label',
    ROBOT_FIELD_KEY_GENERATION_FAILED: 'Cannot generate Key from English label; use alphanumeric text or specify manually',
    ROBOT_FIELD_KEY_MUST_START_WITH_LETTER: 'Generated Key must start with a letter',
    ROBOT_FIELD_GROUP_REQUIRED_FOR_UNIT_SCOPE: 'Group is required when scope=unit',
    ROBOT_FIELD_OPTIONS_REQUIRED_FOR_SELECT: 'Select type field must provide options',
    ROBOT_FIELD_OPTION_REQUIRES_CODE_AND_LABEL: 'Dictionary option must contain both code and label',
    ROBOT_FIELD_OPTIONS_ONLY_FOR_SELECT: 'Options only applies to select type field',
    ROBOT_ATTACHMENT_NO_FILE: 'Please select a file to upload',
    ROBOT_ATTACHMENT_TOO_LARGE: 'File exceeds the maximum size (50MB)',
    ROBOT_IMPORT_REQUIRED_MAPPING_MISSING: 'Required fields are not mapped. Please ensure FFSN / Model Code / SKU Code are all assigned to Excel columns',
    ROBOT_IMPORT_MAPPING_COLUMN_NOT_FOUND: 'A mapped Excel column no longer exists. Please re-upload the file',
    ROBOT_IMPORT_MAPPING_DUPLICATE_COLUMN: 'One Excel column is mapped to multiple fields. Please adjust',
  },

  // List page
  listPage: {
    totalDevices: 'Total Devices',
    columnsConfig: 'Columns',
    notAllowedForSelection: '(not allowed for some selected)',
    selectedCount: '{count} selected',
    page: 'Page',
    pageOf: 'of',
    pages: '',
    total: 'Total',
    items: 'items',
    prevPage: 'Previous',
    nextPage: 'Next',
    pageSize: 'Page size',
    remarkRequired: 'Reason is required for cancellation',
    remarkOptional: 'Optional remark',
    bulkSuccess: 'Bulk update successful ({count} units)',
    bulkPartial: '{success} succeeded, {failed} failed',
    selectDevices: 'Please select devices first',
    selectTargetStatus: 'Please select target status',
    targetStatus: 'Target Status',
    remark: 'Remark',
    empty: 'No data. Click "New" at top-right to add.',
    pasteHintLine1: 'Copy multiple rows from Excel / CSV and paste below. Column order: ',
    pasteHintLine2: '. One record per row. Tab or comma separated.',
    pasteExample: 'Example:\nC-2026-001\\tCustomer A\\tB2B\\tTech\\tCN\\tCNY',
    pasteImport: 'Paste Import {title}',
    createTitle: 'New {title}',
    editTitle: 'Edit {title}',
  },

  // Filters
  filters: {
    all: 'All',
    filterByStatus: 'Filter by Status',
    filterByModel: 'Filter by Model',
    filterByLocation: 'Filter by Location',
    filterBySupplier: 'Filter by Supplier',
    clearFilters: 'Clear Filters',
    showFilters: 'Show Filters',
    hideFilters: 'Hide Filters',
    moreFilters: 'More filters',
    filterByCustomer: 'Filter by Customer',
    filterBySku: 'Filter by SKU',
    applyFilters: 'Apply',
    resetFilters: 'Reset',
  },

  // Form
  form: {
    basicInfo: 'Basic Information',
    purchaseInfo: 'Purchase Information',
    salesInfo: 'Sales Information',
    contractInfo: 'Contract Information',
    financeInfo: 'Finance Information',
    warrantyInfo: 'Warranty Information',
    createTitle: 'Add Robot',
    editTitle: 'Edit Robot',
    selectStatus: 'Select status',
    selectReason: 'Enter reason for change',
    select: 'Select',
    required: 'Required',
    saving: 'Saving...',
    submitting: 'Submitting...',
    submit: 'Submit',
    processing: 'Processing...',
    confirmDelete: 'Confirm Delete',
    confirmStatusChange: 'Confirm Status Change',
    softDeleteHint: 'This will soft-delete the device. It can be restored via admin.',
    createHint: 'New device starts as ORDERED. FFSN will be auto-generated.',
    selectModelFirst: 'Select a model first',
    priceMustPositive: 'Price must not be negative',
    requiredField: '{field} is required',
    versionConflict: 'Data was modified by another user. Please refresh and retry.',
    noPermission: 'No permission to edit this section',
    defaultByStatus: 'Default inferred by status',
    notFound: 'Device not found',
    // Generic select prompts
    selectModel: 'Select Model',
    selectSku: 'Select SKU',
    selectSupplierOption: 'Select supplier',
    selectCurrencyOption: 'Select currency',
    loadingOption: 'Loading…',
    noCurrencies: 'No currencies available',
    notSpecifiedFillLater: 'Skip / fill in detail later',
    // NewRobotDialog
    newRobotTitle: 'New Robot Unit',
    newRobotDesc: 'Bulk reservation via PO is the main path. This entry is for prototypes / R&D units / historical data migration. Detail page opens after creation for field input.',
    newRobotButton: 'New Robot',
    modelRequired: 'Model (Required)',
    skuRequired: 'SKU (Required)',
    usage: 'Usage',
    supplierOptional: 'Supplier (Optional)',
    supplierSnOptional: 'Supplier SN (Optional)',
    usageSales: 'Sales (Default)',
    usageRnd: 'R&D Prototype',
    usageMarketing: 'Marketing Display',
    // NewPoDialog
    newPoTitle: 'New Purchase Order (PO)',
    newPoDesc: 'After creation, placeholder robots are auto-generated based on line quantities. Activate to formal SN when scanning at receipt.',
    newPoButton: 'New PO',
    poNoLabel: 'PO Number',
    orderedAtOptional: 'Order Date (Optional)',
    supplier: 'Supplier',
    currency: 'Currency',
    poLines: 'Purchase Lines',
    poLinesSummary: '{lines} lines · {qty} units · Total {currency} {total}',
    quantity: 'Quantity',
    unitPriceWithCurrency: 'Unit Price ({currency})',
    deleteThisLine: 'Delete this line',
    atLeastKeepOneLine: 'At least one line required',
    createPoButton: 'Create PO · {total} placeholders',
  },

  // Navigation labels
  nav: {
    deviceManage: 'All Devices',
    importExport: 'Import/Export',
    modelManage: 'Models',
    skuManage: 'SKUs',
    importData: 'Import Data',
    supplierManage: 'Suppliers',
    customerManage: 'Customers',
    partnerManage: 'Partners',
    locationManage: 'Locations',
    dictionary: 'Dictionary',
    fieldDefs: 'Field Defs',
    settings: 'Settings',
    admin: 'Admin',
    groupArchive: 'Master Data',
    groupConfig: 'Config',
    groupTool: 'Tools',
    groupBusiness: 'Business',
    purchaseOrders: 'Purchase Orders',
    salesOrders: 'Sales Orders',
    deliveries: 'Deliveries',
    payments: 'Payments',
    serviceTickets: 'Service Tickets',
    rentals: 'Rentals',
    workflow: 'Workflow',
    groupReference: 'Reference',
    myWork: 'Quick Actions',
  },

  // Detail page tabs
  tabs: {
    all: 'All',
    identity: 'Identity',
    supplyChain: 'Supply Chain',
    salesTab: 'Sales',
    financeTab: 'Finance',
    afterSales: 'After-Sales',
    compliance: 'Compliance',
  },

  // Dashboard
  dashboard: {
    title: 'Overview',
    subtitle: 'Key metrics and recent activity',
    kpi: 'Key Metrics',
    totalDevices: 'Total Devices',
    inStock: 'In Stock',
    pendingDelivery: 'Pending Delivery (Reserved/Sold)',
    inRepair: 'In Repair',
    quickActions: 'Quick Actions',
    recentUpdates: 'Recent Updates',
    viewAll: 'View all',
  },

  // Attachments
  attachments: {
    title: 'Attachments',
    upload: 'Upload',
    uploading: 'Uploading...',
    download: 'Download',
    remove: 'Delete',
    empty: 'No attachments yet. Upload contracts, invoices, acceptance forms, images, etc. (max 50 MB per file)',
    confirmDelete: 'Delete "{name}"?',
    uploadSuccess: 'Upload successful',
    uploadFailed: 'Upload failed',
  },

  // Detail page
  detail: {
    prevUnit: 'Previous unit',
    nextUnit: 'Next unit',
    duplicate: 'Duplicate as new',
    duplicateHint: 'Copied supply-chain/sales/finance fields from the source unit; FFSN will be auto-generated',
    sectionEvents: 'Event Stream',
    sectionCurrentAction: 'Current Action',
    sectionIdentity: 'Identity',
    sectionQrCode: 'QR Code',
    notFound: 'Not Found',
    backToList: 'Back to List',
    modelLabel: 'Model',
    usageLabel: 'Usage',
    purchaseOrderLabel: 'Purchase Order',
    noEvents: 'No events yet',
    placeholderSn: 'Placeholder SN',
    manufactureDate: 'Manufacture Date',
  },

  // Global search
  search: {
    placeholder: 'Search FFSN, model, SKU, customer, supplier, location...',
    hintEmpty: 'Type to start searching',
    hintClose: 'Close',
    hintEnter: 'Go',
    noResults: 'No matching results',
    units: 'Units',
    models: 'Models',
    skus: 'SKUs',
    suppliers: 'Suppliers',
    customers: 'Customers',
    locations: 'Locations',
    triggerHint: 'Global search',
  },

  // Compare view
  compare: {
    title: 'Compare Units',
    field: 'Field',
    unitsCount: 'Comparing {count} units',
    diffHint: 'Rows with differing values are highlighted',
    noUnits: 'Please select units from the list first',
    compareButton: 'Compare',
    compareMinHint: 'Please select 2 to 4 units',
  },

  // Admin common
  admin: {
    create: 'Create',
    edit: 'Edit',
    operation: 'Actions',
    enabled: 'Enabled',
    disabled: 'Disabled',
    confirmDeleteMsg: 'Are you sure you want to delete?',
    saveFailed: 'Save failed',
    name: 'Name',
    code: 'Code',
    codeAutoGeneratedHint: 'Leave blank to auto-generate',
    status: 'Status',
    searchPlaceholder: 'Search...',
    fillRequired: 'Please fill in: {fields}',
    invalidJson: '{field}: Invalid JSON ({reason})',
    optionRowNoLabel: '{field}: Row {row} requires at least one label',
    optionRowCannotGenerateCode: '{field}: Row {row} label cannot generate code (use alphanumeric text)',
    noServiceRecords: 'No service records',
    noStatusLogs: 'No status change logs',
    completedAt: 'Completed at',
  },

  // Admin field definitions
  fieldDefsPage: {
    title: 'Field Definitions',
    tabs: {
      custom: 'Custom Fields',
      system: 'System Fields',
    },
    descriptions: {
      custom: 'Business fields on RobotUnit — self-service metadata fields',
      system: 'System fields — dropdown dictionaries used by ServiceRecord / Location entities',
    },
    scope: {
      label: 'Scope (owning entity)',
      column: 'Scope',
      serviceRecord: 'Service Record',
      location: 'Location',
      serviceRecordShort: 'Service Record',
      locationShort: 'Location',
    },
    columns: {
      key: 'Key',
      labelZh: 'Chinese',
      type: 'Type',
      group: 'Group',
      options: 'Options',
      required: 'Required',
      inList: 'In List',
      optionsCount: '{count} items',
    },
    fields: {
      keyLabel: 'Key (blank = auto-generate)',
      keyPlaceholder: 'e.g. poNumber, fccStatus',
      labelEn: 'English Label',
      labelZh: 'Chinese Label (optional)',
      description: 'Description',
      type: 'Type',
      group: 'Group',
      options: 'Options (type=select only)',
      optionsHint: 'Provide at least one label (Chinese or English)',
      sortOrder: 'Sort Order',
      defaultValue: 'Default Value (optional)',
      defaultValuePlaceholder: 'e.g. USD / 1000 / true',
      required: 'Required',
      showInList: 'Show in list page',
    },
    optionsEditor: {
      labelEn: 'English',
      labelEnPlaceholder: 'English label',
      labelZh: 'Chinese',
      labelZhPlaceholder: 'Chinese label',
      enabled: 'Enabled',
      addOption: '+ Add option',
      empty: 'No options yet. Click the button below to add.',
      up: 'Move up',
    },
    searchPlaceholder: 'Search key or label...',
  },

  // Admin dictionary
  dictionary: {
    title: 'Dictionary',
    description: 'Manage 10 configurable category labels for business users',
    createItem: 'Create Dictionary Item',
    editItem: 'Edit Dictionary Item',
    category: 'Category',
    sortOrder: 'Sort Order',
    labelZh: 'Chinese',
    labelEn: 'English',
    codePlaceholder: 'Leave blank to auto-generate from English label',
    codeHint: 'Leave blank for auto-generation; not editable once created',
    labelZhPlaceholder: 'e.g. 教育',
    labelEnPlaceholder: 'e.g. Education',
    codeAndLabelRequired: 'Code and label are required',
    labelRequired: 'Chinese label is required',
    codeOrLabelEnRequired: 'Please provide code or English label (at least one)',
    categories: {
      USAGE_TYPE: 'Usage Type',
      IMPORT_TYPE: 'Import Type',
      DELIVERY_STATUS: 'Delivery Status',
      CONTRACT_STATUS: 'Contract Status',
      PAYMENT_METHOD: 'Payment Method',
      PAYMENT_STATUS: 'Payment Status',
      WARRANTY_STATUS: 'Warranty Status',
      SERVICE_TYPE: 'Service Type',
      ISSUE_TAG: 'Issue Tag',
      LOCATION_TYPE: 'Location Type',
      CURRENCY: 'Currency',
    },
  },

  // Admin settings
  settings: {
    title: 'System Settings',
    description: 'FFSN generation rules / Status default location mapping / Repair auto service type',
    saveAll: 'Save All',
    configSaved: 'System settings saved',
    configLoadFailed: 'Failed to load settings',
    ffsn: {
      title: 'FFSN Generation Rule',
      preview: 'Preview',
      prefix: 'Prefix',
      dateFormat: 'Date Format',
      seqLength: 'Sequence Length',
      resetPeriod: 'Reset Period',
      monthly: 'Monthly',
      yearly: 'Yearly',
      never: 'Never',
    },
    statusLocation: {
      title: 'Status → Default Location Mapping',
      description: 'Auto-set default location on status change. Leave empty to let UI infer.',
      inferByUI: '(Inferred by UI)',
    },
    repairServiceType: {
      title: 'Auto Service Type on REPAIR',
      description: 'When device enters REPAIR status, a ServiceRecord is auto-created with this type.',
    },
  },

  // Admin entity management
  entities: {
    models: { title: 'Model Management', description: 'Manage robot models', brand: 'Brand', skuCount: 'SKUs / Devices', searchPlaceholder: 'Search code / name / brand' },
    skus: { title: 'SKU Management', description: 'Manage SKUs (under models)', parentModel: 'Parent Model', variant: 'Variant', defaultPrice: 'Default Price', defaultCost: 'Default Cost', deviceCount: 'Devices', searchPlaceholder: 'Search code / name / variant' },
    suppliers: { title: 'Supplier Management', description: 'Manage robot suppliers', contactName: 'Contact', contactPhone: 'Phone', contactEmail: 'Email', address: 'Address', paymentTerms: 'Payment Terms', leadTimeDays: 'Lead Time (days)', deviceCount: 'Devices', searchPlaceholder: 'Search code / name / contact' },
    customers: { title: 'Customer Management', description: 'Manage robot customers', industry: 'Industry', creditLimit: 'Credit Limit', deviceLocationCount: 'Devices / Locations', searchPlaceholder: 'Search code / name / industry / contact' },
    locations: { title: 'Location Management', description: 'Manage robot locations (warehouse / client site / bonded zone / service center ...)', locationType: 'Location Type', relatedCustomer: 'Related Customer', contact: 'Contact', searchPlaceholder: 'Search code / name / address' },
    description: 'Description',
    imageUrl: 'Image URL',
    optional: '(Optional)',
  },

  // Import/Export page
  importExport: {
    title: 'Import / Export',
    exportTitle: 'Export Excel',
    exportHint: 'Export device list to Excel file with filters',
    importTitle: 'Import Excel',
    importHint: 'Bulk import device data. System validates FFSN uniqueness, enum validity, and non-negative values.',
    statusFilter: 'Status Filter',
    exportExcel: 'Export Excel',
    exporting: 'Exporting...',
    importExcel: 'Start Import',
    importing: 'Importing...',
    dropHint: 'Click to select file or drag and drop here',
    fileTypes: 'Supports .xlsx / .xls format',
    invalidFileType: 'Please upload an Excel file (.xlsx / .xls)',
    selectFileFirst: 'Please select a file first',
    importPartial: 'Import complete: {success} succeeded, {failed} failed',
    resultTitle: 'Import Result',
    totalRows: 'Total Rows',
    success: 'Success',
    failure: 'Failed',
    errorDetails: 'Error Details',
    rowNum: 'Row',
    fieldName: 'Field',
    errorMsg: 'Error Message',
    validationRules: 'Validation Rules',
    rules: [
      'FFSN must be unique (provided in Excel, validated by system)',
      'Model Code / SKU Code are required; they must be registered in Model / SKU admin first',
      'Supplier Code / Customer Code / Location Code (if provided) must be registered in the corresponding admin page first',
      'Dictionary fields (Usage Type / Import Type / Delivery Status / Contract Status / Payment Method / Payment Status / Warranty Status / Issue Tag) use dictionary code',
      'Status must be a valid value (ORDERED / IN_TRANSIT / BONDED / IN_STOCK / RESERVED / DELIVERED)',
      'Direct import to REPAIR or CANCELLED status is not allowed',
      'Prices and costs cannot be negative',
      'Different statuses have different required fields (see documentation)',
    ],
    downloadTemplate: 'Download template',
    templateHint: 'Choose fields to include in the template. FFSN / Model Code / SKU Code are required and always included.',
    requiredColumns: 'Required columns (always included)',
    optionalFixedColumns: 'Optional system columns',
    dynamicFields: 'Dynamic fields',
    selectAll: 'Select all',
    selectNone: 'Deselect all',
    // Column mapping
    mappingTitle: 'Column Mapping',
    mappingHint: 'Map each system field to one Excel column. Empty columns are excluded from the dropdown.',
    fileStats: '{cols} columns, {rows} data rows',
    fileStatsEmpty: 'No file selected',
    ourField: 'System Field',
    excelColumn: 'Excel Column',
    samplePrefix: 'Sample',
    pleaseSelect: '— Select —',
    doNotImport: 'Do not import',
    autoMatched: 'auto',
    required: 'required',
    requiredMissing: 'Required fields not mapped',
    previewFailed: 'Preview failed, please check the file',
    previewing: 'Parsing...',
    reupload: 'Choose another file',
    reset: 'Reset mapping',
    // Conflict strategy
    conflictStrategy: 'When FFSN exists',
    strategy_update: 'Update existing',
    strategy_skip: 'Skip',
    strategy_abort: 'Abort on conflict',
  },

  // Help / User guide page
  help: {
    title: 'User Guide',
    subtitle: 'Quick overview of the robot management system',
    intro: {
      title: 'What is this system',
      paragraph:
        'The robot management system tracks each robot unit across its full lifecycle — from ordering, shipping, warehousing, reservation and delivery to after-sales repair. Supply-chain, sales and finance teams maintain their own fields; the system wires up status transitions, reports, and Excel import/export.',
      highlights: [
        { title: 'Unit-level records', desc: 'Each row represents one robot, identified by its FFSN' },
        { title: 'Status-driven', desc: '8 lifecycle states, 15 legal transitions, every change auto-logged' },
        { title: 'Field-level permissions', desc: 'Each role can only edit fields it owns, preventing accidental overwrites' },
      ],
    },
    concepts: {
      title: 'Core concepts',
      description: 'A few terms to know before you start',
      items: [
        { term: 'FFSN', desc: 'FF serial number, auto-generated by rule, unique across the organization, used to identify each unit' },
        { term: 'Model / SKU', desc: 'Model is the product line (e.g. AEGIS); SKU is the specific variant (e.g. AEGIS-STD). Every unit must be linked to a SKU' },
        { term: 'Supplier / Customer', desc: 'Independent master data tables. When registering a unit, link from the dropdown for easier filtering and reporting later' },
        { term: 'Location', desc: 'Physical locations: warehouse, client site, bonded zone, service center, etc. Default location auto-set per status' },
        { term: 'Dictionary', desc: 'Admins maintain configurable categories (usage type, payment method, issue tags, etc.) in Dictionary' },
        { term: 'Field Definitions', desc: 'Apart from a few fixed fields (FFSN, Model, Status, etc.), all other business fields are managed by admins in Field Definitions — add/remove fields, choose types (text/number/money/date/select, etc.), group them, set validation rules, all without developer involvement' },
      ],
    },
    stateFlow: {
      title: 'Status flow',
      description: '10 states × 19 legal transitions — all shown in the diagram',
      legendMain: 'Main flow',
      legendSpecial: 'Special paths',
      legendRepair: 'Repair branch',
      cancelNote: 'Note: Ordered / In Transit / Bonded / Sold / Repair / Repaired (6 states) can transition to Cancelled (not drawn as edges above)',
      transitionsTitle: 'Where each state can go',
      transitions: [
        { from: 'Ordered', options: '→ In Transit (supplier ships) / Cancelled (cancel PO)' },
        { from: 'In Transit', options: '→ Bonded (arrives at bonded zone) / In Stock (direct warehousing) / Cancelled (lost in transit)' },
        { from: 'Bonded', options: '→ In Stock (customs cleared) / Cancelled (held by customs)' },
        { from: 'In Stock', options: '→ Reserved (assigned to customer) / Repair (defect found)' },
        { from: 'Reserved', options: '→ Sold (customer confirms) / In Stock (reservation cancelled)' },
        { from: 'Sold', options: '→ Delivered (handed over) / Cancelled (order voided)' },
        { from: 'Delivered', options: '→ Repair (customer reports issue)' },
        { from: 'Repair', options: '→ Repaired (fixed, awaiting dispatch) / Cancelled (written off)' },
        { from: 'Repaired', options: '→ Delivered (returned to customer) / In Stock (re-available) / Cancelled (QA failed)' },
        { from: 'Cancelled', options: 'Terminal — no outbound transitions' },
      ],
    },
    tasks: {
      title: 'What do you want to do',
      description: 'Click a card below to jump directly to that page',
      create: 'Register a new unit',
      createDesc: 'Create a robot manually: pick model/SKU/supplier, FFSN auto-generated',
      list: 'View device list',
      listDesc: 'Search, filter, bulk status change, export the current view',
      reports: 'View reports',
      reportsDesc: 'Inventory / Sales / Finance reports grouped by status, model, location, customer',
      models: 'Manage models / SKUs',
      modelsDesc: 'Add product lines or variants that appear in the unit registration dropdown',
      suppliers: 'Manage suppliers',
      suppliersDesc: 'Supplier master data: contact, payment terms, lead times',
      customers: 'Manage customers',
      customersDesc: 'Customer master data: contact, credit limit, related sites',
      importExport: 'Bulk import / export',
      importExportDesc: 'Batch register new units via Excel template, or export filtered data',
      fieldDefs: 'Field definitions',
      fieldDefsDesc: 'Self-service metadata fields + system dictionaries',
    },
    roles: {
      title: 'Roles & Responsibilities',
      description: 'Five roles positioned across the business chain',
      items: [
        { code: 'Administrator', name: 'Administrator', scope: 'Global', desc: 'Cross-module admin for all data and permissions' },
        { code: 'RobotManagerRLE', name: 'Lifecycle Engineer', scope: 'Full flow', desc: 'Full ownership of the robot lifecycle; all operations allowed (including delete and full edit)' },
        { code: 'RobotManagerSupplyChain', name: 'Supply Chain', scope: 'Identity + Supply Chain', desc: 'PO / import / receiving; maintains PO number, arrival date, logistics status' },
        { code: 'RobotManagerSales', name: 'Sales', scope: 'Sales', desc: 'Customer binding / contract / delivery; maintains sales price and contract status' },
        { code: 'RobotManagerFinance', name: 'Finance', scope: 'Finance', desc: 'Cost / invoice / collection; maintains cost and payment status' },
      ],
      permissionsTitle: 'Permission Matrix',
      permissionsNote: '✅ = allowed; — = not allowed. Field-level permissions (write:xxx) only control edit ability for that Tab; read is unrestricted.',
      permissionMatrix: {
        abilityHeader: 'Ability',
        view: 'View',
        create: 'Create',
        delete: 'Soft delete',
        status: 'Change status',
        identityAndSupplyChain: 'Edit: Identity / Supply Chain',
        sales: 'Edit: Sales',
        finance: 'Edit: Finance',
        afterSalesAndCompliance: 'Edit: After-Sales / Compliance',
        manageFields: 'Manage field defs / settings',
        manageModels: 'Manage models / SKUs',
        manageSuppliers: 'Manage suppliers',
        manageCustomers: 'Manage customers',
        manageLocations: 'Manage locations',
      },
    },
    setupFlow: {
      title: 'Master Data Maintenance',
      description: 'Who knows best maintains it — different master data by different roles',
      groups: [
        {
          name: 'Admin / RLE — System config',
          scope: 'Stable, low-frequency changes',
          items: [
            { name: 'System Settings', icon: 'settings', desc: 'FFSN rule, status default location, auto service type', path: '/robot-manager/admin/settings' },
            { name: 'Field Definitions', icon: 'sliders', desc: 'Custom business fields + system dictionaries', path: '/robot-manager/admin/fields' },
            { name: 'Models / SKUs', icon: 'package', desc: 'Product lines and variants; required on unit creation', path: '/robot-manager/admin/models' },
          ],
        },
        {
          name: 'SupplyChain — Supply side',
          scope: 'Medium frequency; per new supplier or warehouse',
          items: [
            { name: 'Suppliers', icon: 'truck', desc: 'Procurement source, contact, payment terms, lead time', path: '/robot-manager/admin/suppliers' },
            { name: 'Locations (warehouse/bonded)', icon: 'map-pin', desc: 'Internal warehouses, bonded zones, supplier sites', path: '/robot-manager/admin/locations' },
          ],
        },
        {
          name: 'Sales — Customer side',
          scope: 'High frequency; per new customer signed',
          items: [
            { name: 'Customers', icon: 'users', desc: 'Customer master data, credit limit, industry classification', path: '/robot-manager/admin/customers' },
            { name: 'Locations (customer sites)', icon: 'map-pin', desc: 'Customer project sites, branches; delivery targets', path: '/robot-manager/admin/locations' },
          ],
        },
      ],
      note: 'Master data self-maintained by role. Disable instead of delete to preserve historical references.',
    },
    businessFlow: {
      title: 'Robot Lifecycle',
      description: '5 typical collaboration scenarios for daily high-frequency operations',
      scenarios: [
        {
          name: 'New robot sales — full chain (most common)',
          desc: 'ORDERED → IN_TRANSIT → IN_STOCK → RESERVED → SOLD → DELIVERED',
          steps: [
            { actor: 'SupplyChain', action: 'Create unit, fill PO and purchase price' },
            { actor: 'SupplyChain', action: 'Advance to IN_TRANSIT after shipment' },
            { actor: 'SupplyChain', action: 'Advance to IN_STOCK after receiving (auto-routed to HQ_FZ)' },
            { actor: 'Sales', action: 'Assign customer → RESERVED (customer must be bound)' },
            { actor: 'Sales', action: 'Contract + Finance confirms payment → SOLD (sales price required)' },
            { actor: 'Sales', action: 'Shipment arrives → DELIVERED (deliveredDate auto-set)' },
          ],
        },
        {
          name: 'In-stock defect repair',
          desc: 'IN_STOCK → REPAIR → REPAIRED → IN_STOCK',
          steps: [
            { actor: 'RLE', action: 'Inspection finds defect, set issueTagCode, advance to REPAIR' },
            { actor: 'RLE', action: 'System auto-creates ServiceRecord' },
            { actor: 'RLE', action: 'Repair complete → REPAIRED' },
            { actor: 'RLE', action: 'Back to stock → IN_STOCK (auto-unbinds customer for reassignment)' },
          ],
        },
        {
          name: 'Customer return → repair → deliver back',
          desc: 'DELIVERED → REPAIR → REPAIRED → DELIVERED',
          steps: [
            { actor: 'Customer', action: 'Request repair' },
            { actor: 'RLE', action: 'Advance to REPAIR (keep customerId, unit routed to HQ_FZ)' },
            { actor: 'RLE', action: 'Repair complete → REPAIRED' },
            { actor: 'RLE', action: 'Deliver back → DELIVERED (auto-sets new deliveredDate)' },
          ],
          note: 'Zhiyuan Exchange: pick ZHIYUAN_EXCHANGE for ServiceRecord.serviceTypeCode; rest of the flow identical.',
        },
        {
          name: 'Purchase cancel / logistics failure',
          desc: 'ORDERED / IN_TRANSIT / BONDED → CANCELLED',
          steps: [
            { actor: 'SupplyChain or RLE', action: 'Issue detected (supplier breach / lost shipment / customs hold)' },
            { actor: 'Operator', action: 'Advance to CANCELLED (remark required)' },
          ],
        },
        {
          name: 'Sales reversal (refund)',
          desc: 'SOLD → CANCELLED',
          steps: [
            { actor: 'Sales', action: 'Customer refund → advance to CANCELLED (remark required)' },
          ],
          note: 'SOLD → RESERVED rollback not supported; customer re-signing requires new unit.',
        },
      ],
    },
    dailyOps: {
      title: 'Monitoring & Daily Operations',
      description: 'Runtime operations: view, filter, batch process, analyze trends',
      items: [
        { name: 'List filter + search', desc: 'Multi-dimensional filter by FFSN / status / model / customer / location; column preferences stored in browser' },
        { name: 'Reports', desc: 'Inventory / Sales / Finance; StatCards drill down to filtered list' },
        { name: 'Bulk status change', desc: 'Select multiple units → pick target status → per-unit validation (one failure won\'t roll back others)' },
        { name: 'Excel import/export', desc: 'Template download / export by filter; import disallows direct REPAIR / CANCELLED states' },
        { name: 'Duplicate create', desc: 'Quick clone from existing unit (FFSN / PO / sales order ID not copied)' },
        { name: 'Attachments', desc: 'Per-unit upload: contract scans, shipping docs, repair reports' },
        { name: 'Global search', desc: 'Press / or Cmd+K to jump to any FFSN / model / customer' },
        { name: 'Status change log', desc: 'Detail page footer; full record of from→to, operator, time, remark' },
      ],
      shortcutsTitle: 'Keyboard shortcuts',
      shortcuts: [
        { key: '/', desc: 'Open global search' },
        { key: 'Cmd+K / Ctrl+K', desc: 'Open global search' },
        { key: 'c', desc: 'Jump to create page from anywhere' },
        { key: '?', desc: 'Open this user guide' },
      ],
    },
    roadmap: {
      title: 'Roadmap',
      description: '3 iteration directions for robot-manager (continuous)',
      phases: [
        {
          name: 'AI Enhancement',
          icon: 'ai',
          items: [
            { title: 'Smart status advancement', desc: 'Integrate logistics/payment APIs to auto-advance status; user confirms' },
            { title: 'Repair knowledge base', desc: 'LLM indexes ServiceRecord history; suggest solutions from symptoms' },
            { title: 'Customer churn alert', desc: 'Predict renewal probability from usage duration + warranty period' },
            { title: 'AI-assisted Excel import', desc: 'Intelligent column mapping + row-level error suggestions' },
          ],
        },
        {
          name: 'Efficiency',
          icon: 'speed',
          items: [
            { title: 'Mobile-friendly', desc: 'Responsive / PWA; scan FFSN barcode for quick query and status change' },
            { title: 'Bulk operations', desc: 'Batch field edits, customer assignment, barcode printing' },
            { title: 'Custom reports', desc: 'Visual report builder + role-based default dashboards' },
            { title: 'Audit timeline', desc: 'Unified view of robot history (status + repair + edit events)' },
          ],
        },
        {
          name: 'Integration',
          icon: 'integrate',
          items: [
            { title: 'ERP reconciliation', desc: 'Daily sync of revenue/cost to SAP / Kingdee / Yonyou' },
            { title: 'WMS bridge', desc: 'Warehouse system real-time location sync; FFSN scan confirmation' },
            { title: 'Real-time logistics', desc: 'Integrate SF / DHL / Cainiao APIs' },
            { title: 'CRM integration', desc: 'Auto satisfaction survey after delivery; feedback writes back to Salesforce / HubSpot' },
          ],
        },
      ],
      footer: 'Reviewed quarterly. Suggestions welcome via PR to docs/modules/robot-manager/12-roadmap.md',
    },
  },

  import: {
    pageTitle: 'Data Import',
    pageSubtitle: 'Batch import Robot Manager data via Excel templates',
    comingSoon: 'Coming soon',
    tabs: {
      purchaseOrder: 'Purchase Order (PO)',
      robotUnit: 'Robot Unit',
      master: 'Master Data',
      serviceTicket: 'Service Ticket',
    },
    steps: {
      template: 'Download Template',
      upload: 'Upload File',
      review: 'Preview & Validate',
      done: 'Done',
    },
    common: {
      back: 'Back',
    },
    template: {
      title: 'Download {type} Template',
      desc: 'The template includes field descriptions and examples. Fill in by column, one record per row; multiple lines under the same PO share the same poNo.',
      downloadBtn: 'Download template (.xlsx)',
      nextBtn: 'Got it, next',
    },
    upload: {
      title: 'Upload Excel',
      desc: 'Up to 1000 rows per batch, file ≤ 10 MB. Upon upload the system validates fields, references and business rules.',
      uploading: 'Uploading and validating...',
    },
    review: {
      title: 'Validation Result',
      totalRows: 'Total rows',
      successRows: 'OK',
      errorRows: 'Errors',
      warningRows: 'Warnings',
      errorAlertTitle: 'Error rows present, cannot import',
      errorAlertDesc: 'Download the error report, fix and re-upload (system dedupes identical files within 24h).',
      errorListTitle: 'Error details (first 50 rows)',
      moreErrors: '{n} more error rows not shown — download the full error report',
      confirmBtn: 'Confirm Import',
      downloadErrorReportBtn: 'Download Error Report',
      cancelBtn: 'Cancel',
    },
    done: {
      title: 'Import Completed',
      summary: 'Imported {rows} rows successfully, created {records} records',
      restartBtn: 'Import another file',
    },
    toast: {
      templateDownloaded: 'Template downloaded',
      templateDownloadFailed: 'Template download failed',
      fileTooLarge: 'File exceeds 10 MB limit',
      previewFailed: 'Validation failed',
      confirmFailed: 'Import failed',
      importCompleted: 'Import succeeded',
      errorReportFailed: 'Error report download failed',
      deduped: 'Same file uploaded within 24h — reusing previous batch',
    },
  },
};
