import type { messagesFr } from "./messages-fr";

export const messagesEn: typeof messagesFr = {
  auth: {
    logoutSuccess: "Successfully logged out",
    invalidCredentials: "Invalid email or password",
    sessionExpired: "Your session has expired, please log in again",
    appName: "Dadycar",
    loginSubtitle: "Sign in to your Super Admin account",
    emailPlaceholder: "admin@fleet43.com",
    passwordPlaceholder: "Your password",
    submit: "Sign in",
    forgotPasswordLink: "Forgot password?",
    forgotPassword: {
      title: "Forgot password",
      subtitle: "Enter your email to receive a reset link.",
      submit: "Send link",
      success: "If an account exists for this email, a reset link has been sent.",
      back: "Back to login",
    },
    resetPassword: {
      title: "Set your password",
      subtitle: "Choose a password for your account.",
      newPassword: "New password",
      confirmPassword: "Confirm password",
      submit: "Set password",
      successTitle: "Password set",
      successMessage: "Your password has been saved. You can now sign in.",
      backToLogin: "Go to login",
      invalidLinkTitle: "Invalid link",
      invalidLinkMessage: "This link is invalid or has expired. Please request a new one.",
    },
  },
  pages: {
    telematicsEligibility: { title: "Telematics eligibility", subtitle: "Test and connect companies' vehicles to LinkByCar" },
    dataQuality: { title: "Data quality", subtitle: "Boxes and providers whose data does not yet allow a reliable safety score, grouped by issue" },
    mcpAccess: { title: "MCP access", subtitle: "Your credentials to connect your AI agents to the admin MCP server" },
    accountSettings: { title: "My account", subtitle: "Your name, email, password and the name clients see" },
    announcements: { title: "Announcements", subtitle: "New features, information and maintenance in Fleet: create, target, publish, measure" },
    announcementMenuLabels: { title: "Menu labels", subtitle: "The BETA labels of Fleet's menu, for every client, without a deploy" },
    compliance: { title: "Fleet compliance", subtitle: "Missing vehicle data and documents across all clients" },
    donna: { title: "Donna", subtitle: "Donna's answers, how clients rate them and what they corrected" },
    dashboard: { title: "Overview", subtitle: "Main dashboard" },
    companies: { title: "Companies", subtitle: "Manage companies" },
    users: { title: "Users", subtitle: "Manage all users" },
    internalUsers: { title: "Internal users", subtitle: "Manage admin team members, roles and permissions" },
    vehicles: { title: "Vehicles", subtitle: "Vehicle fleet management" },
    sites: { title: "Sites", subtitle: "Manage sites and locations" },
    subscriptions: { title: "Subscriptions", subtitle: "Manage subscriptions and plans" },
    store: { title: "Store", subtitle: "The Store modules: texts, prices, publication and order" },
    tickets: { title: "Tickets", subtitle: "Manage support tickets" },
    ticketDetail: { title: "Ticket details", subtitle: "Ticket information and management" },
    activityLogs: { title: "Activity logs", subtitle: "Track actions and changes" },
    helpCenter: { title: "Help Center", subtitle: "Manage articles, sections and analyze feedback" },
    helpCenterCreate: { title: "New article", subtitle: "Help Center" },
    telematics: { title: "Telematics boxes", subtitle: "Manage fleet manager orders and the available product catalog" },
    telematicsOrderDetail: { title: "Telematics order details", subtitle: "Order summary" },
    installations: {
      title: "History",
      subtitle: (n: number) => `${n} installation${n !== 1 ? "s" : ""} — whole team`,
    },
    installers: {
      title: "Installers",
      subtitle: (n: number) => `${n} installer${n !== 1 ? "s" : ""}`,
    },
    antai: { title: "ANTAI", subtitle: "Monitor and manage vehicles linked to the ANTAI integration" },
    antaiVehicleDetail: { title: "ANTAI vehicle details", subtitle: "ANTAI state, visibility and exception handling" },
    rfidBatches: { title: "RFID cards", subtitle: "Process RFID card batches submitted by companies" },
    rfidBatchDetail: { title: "RFID batch details", subtitle: "Batch changes and processing" },
    health: { title: "Executive Dashboard", subtitle: "Portfolio-wide health, adoption and engagement across all client accounts" },
    healthClients: { title: "Client Health Scores", subtitle: "Every account scored 0–100 from activity, adoption, frequency, data completeness and growth" },
    healthProfile: { title: "Client profile", subtitle: "Health, activity, adoption and benchmark" },
    healthConfig: { title: "Health configuration", subtitle: "Tune the health-score model and alert thresholds without code" },
    anomalyRules: {
      title: "Anomaly rules",
      subtitle: (n: number) => `${n} rule${n !== 1 ? "s" : ""} — the starting values of every client`,
      searchPlaceholder: "Search a rule...",
      empty: "No rule matches",
      filters: { all: "All", customized: "Customized by clients", off: "Off by default", withdrawn: "Withdrawn" },
      withdrawn: "Withdrawn",
      defaultOn: "On by default",
      defaultOff: "Off by default",
      customized: (n: number) => `${n} client${n !== 1 ? "s" : ""}`,
      disabledBy: (n: number) => `switched off by ${n}`,
      severityByCase: "Depends on the case",
      channels: { mobile: "Driver push", fleet: "Fleet push", email: "Email" },
      sheet: {
        title: "Dadycar values of the rule",
        intro: "These values apply to every client who did not change the rule, from the next detection. A client who customized it keeps their own settings.",
        condition: "What the rule checks",
        available: "Rule available to clients",
        availableHint: "Withdrawn, the rule runs for nobody and disappears from the clients' screen.",
        enabledByDefault: "On by default",
        enabledByDefaultHint: "For clients who did not choose themselves.",
        thresholds: "Thresholds",
        noThreshold: "This rule has no threshold: it records a fact.",
        factory: (value: string) => `Original value: ${value}`,
        severity: "Default severity",
        severityByCaseHint: "The rule grades each anomaly itself; this choice applies when it does not.",
        notifications: "Default notifications",
        mobile: "Push notification to the driver",
        fleet: "Notification in the fleet app",
        email: "Email",
        emailSending: "Email sending",
        save: "Save for every client",
        saved: "Rule updated for every client",
        noChange: "No change",
        error: "Could not save the rule",
        clientsTitle: "Clients who customized it",
        noClients: "No client changed this rule.",
        clientOff: "Off",
        historyTitle: "Latest changes",
        noHistory: "No change recorded.",
        dadycar: "Dadycar",
        resetAction: "Back to the Dadycar values",
      },
    },
    integrations: {
      title: "Connectors",
      subtitle: (n: number) => `${n} connector${n !== 1 ? "s" : ""}`,
      searchPlaceholder: "Search by connector name or code...",
      empty: "No connector found",
      emptyHint: "Ensure the connector name is spelled correctly or adjust the filters.",
      results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
      connectionsCount: (n: number) => `${n} connection${n !== 1 ? "s" : ""}`,
      filters: {
        title: "Filters",
        status: "Status",
        allStatuses: "All statuses",
        category: "Category",
        allCategories: "All categories",
        reset: "Reset",
      },
      statusLabels: {
        enabled: "Enabled",
        disabled: "Disabled",
      } as Record<string, string>,
      connectionMethodLabels: {
        sftp: "SFTP",
        manual: "Manual",
        api: "API",
        oauth: "OAuth",
      } as Record<string, string>,
      categories: {
        fuel_cards: "Fuel Cards",
        telepeage: "Tolls",
        electric_recharge: "Electric Recharge",
        accounting: "Accounting",
        leasing_companies: "Leasing Companies",
        telematics: "Telematics",
        insurance: "Insurance",
        payroll: "Payroll & HR",
        expenses: "Expenses",
      } as Record<string, string>,
      detail: {
        title: "Connector Details",
        editTitle: "Edit Connector",
        generalInfo: "General Information",
        activeConnections: "Active Connections",
        requirements: "Requirements",
        activationSteps: "Activation Steps",
        supportedModules: "Supported Modules",
        noConnections: "No active connections for this connector.",
        noRequirements: "No specific requirements defined.",
        noActivationSteps: "No specific activation steps defined.",
        noModules: "No modules supported.",
        noConnectionDate: "No connection date",
        actions: {
          enable: "Enable Connector",
          disable: "Disable Connector",
          edit: "Edit Details",
          save: "Save Changes",
          cancel: "Cancel",
          saving: "Saving...",
        },
        fields: {
          name: "Connector Name",
          code: "Connector Code",
          description: "Description",
          category: "Category",
          connectionMethod: "Connection Method",
          syncFrequency: "Sync Frequency",
          activationMode: "Activation Mode",
          modules: "Modules",
          status: "Status",
        },
        syncFrequencies: {
          real_time: "Real-time",
          hourly: "Hourly",
          daily: "Daily",
          weekly: "Weekly",
        } as Record<string, string>,
        activationModes: {
          immediate: "Immediate",
          on_request: "On Request",
        } as Record<string, string>,
        toasts: {
          enabled: "Connector enabled successfully",
          disabled: "Connector disabled successfully",
          updated: "Connector updated successfully",
          error: "An error occurred",
        },
        connectionColumns: {
          company: "Company",
          connectedAt: "Connected At",
          lastSync: "Last Sync",
          status: "Status",
        },
        logo: {
          title: "Logo",
          none: "No logo: the connector's initials are shown.",
          choose: "Choose a logo",
          replace: "Replace",
          remove: "Remove the logo",
          undo: "Undo",
          dropHint: "Drop an image here or choose a file",
          formats: "PNG, SVG or JPEG · 5 MB max",
          pending: "New logo, saved with the changes.",
          pendingRemoval: "The logo will be removed when you save.",
          errors: {
            type: "The logo must be a PNG, SVG or JPEG file.",
            size: "The logo must not exceed 5 MB.",
            empty: "The file is empty.",
          },
          toasts: {
            saved: "Logo saved",
            removed: "Logo removed",
            error: "The logo could not be saved",
          },
        },
        allowedCompanies: {
          title: "Allowed clients",
          disabledHint: "The connector is disabled: only these clients see it.",
          enabledHint: "Enabled for every client: the list is kept for when you disable it.",
          empty: "No allowed clients.",
          client: (name: string | null, id: number) => (name ? `${name} · no. ${id}` : `no. ${id}`),
          added: (date: string, by: string | null) => (by ? `Added on ${date} by ${by}` : `Added on ${date}`),
          remove: "Remove",
          searchPlaceholder: "Search a client (name or no.)…",
          noResult: "No client found.",
          add: "Add",
          toasts: {
            added: "Client added successfully",
            removed: "Client removed successfully",
          },
        },
      },
    },
    integrationConnections: {
      title: "Integration Connections",
      subtitle: (n: number) => `${n} connection${n !== 1 ? "s" : ""}`,
      searchPlaceholder: "Search by company, integration or status...",
      empty: "No connection found",
      emptyHint: "Adjust your filters or ensure the search term is spelled correctly.",
      results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
      filters: {
        title: "Filters",
        status: "Status",
        allStatuses: "All statuses",
        company: "Company",
        allCompanies: "All companies",
        category: "Category",
        allCategories: "All categories",
        reset: "Reset",
      },
      statusLabels: {
        disconnected: "Disconnected",
        connected: "Connected",
        requested: "Requested",
        rejected: "Rejected",
        error: "Error",
      } as Record<string, string>,
      table: {
        integration: "Connector",
        company: "Company",
        status: "Status",
        connectedAt: "Connected At",
        lastSync: "Last Sync",
        actions: "Actions",
        viewDetails: "View Details",
      },
      detail: {
        title: "Connection Details",
        editTitle: "Edit Connection",
        integrationInfo: "Connector Information",
        companyInfo: "Company Information",
        connectionInfo: "Connection Info",
        credentials: "Credentials",
        noCredentials: "No credentials defined.",
        rawJson: "Raw JSON Configuration",
        editJson: "Edit as JSON",
        editFields: "Edit Fields",
        invalidJson: "Invalid JSON format.",
        retry: "Retry",
        code: "Code",
        previewNotAvailable: "Preview not available for this file type",
        downloadFile: "Download file",
        toasts: {
          updated: "Connection updated successfully",
          error: "Failed to update connection",
        },
        actions: {
          edit: "Edit Connection",
          save: "Save Changes",
          cancel: "Cancel",
        },
        fields: {
          status: "Status",
          connectedAt: "Connected At",
          lastSyncAt: "Last Sync At",
          name: "Name",
          email: "Email",
          createdAt: "Created At",
          updatedAt: "Updated At",
        },
      },
    },
  },
  nav: {
    overview: "Overview",
    companies: "Companies",
    users: "Users",
    dormantAccounts: "Dormant accounts",
    internalUsers: "Internal users",
    vehicles: "Vehicles",
    sites: "Sites",
    subscriptions: "Subscriptions",
    store: "Store",
    tickets: "Support",
    activityLogs: "Logs",
    helpCenter: "Help Center",
    telematics: "Telematics boxes",
    installations: "Installations",
    installers: "Installers",
    antai: "ANTAI",
    rfidCards: "RFID cards",
    health: "Customer Health",
    integrations: "Connectors",
    integrationConnections: "Connections",
    donna: "Donna",
    anomalyRules: "Anomaly rules",
    compliance: "Fleet compliance",
    announcements: "Announcements",
    mcpAccess: "MCP access",
    telematicsEligibility: "Telematics eligibility",
    dataQuality: "Data quality",
  },
  navCategories: {
    main: "Main",
    management: "Management",
    commercial: "Commercial",
    technical: "Technical",
    system: "System",
    administration: "Administration",
    product: "Product",
  },
  notifications: {
    title: "Notifications",
    empty: "No notification",
    viewAll: "View all",
    markAllRead: "Mark all read",
    unreadBadge: (n: number) => (n > 99 ? "99+" : String(n)),
  },
  accountSettings: {
    profileTitle: "Profile",
    profileDescription: "Your real name: the one the rest of the Dadycar team sees.",
    firstName: "First name",
    lastName: "Last name",
    email: "Sign-in email",
    emailHint: "You will sign in with this address.",
    publicNameTitle: "Name shown to clients",
    publicNameDescription: "The name clients see in the support chat and in emails. Leave empty to show your real name.",
    publicName: "Public name",
    publicNamePreview: (name: string) => `Clients will see: ${name}`,
    save: "Save",
    saved: "Profile saved",
    saveFailed: "The profile could not be saved",
    securityTitle: "Password",
    securityDescription: "Pick a password of at least 8 characters.",
    currentPassword: "Current password",
    newPassword: "New password",
    confirmPassword: "Confirm the new password",
    changePassword: "Change password",
    passwordChanged: "Password updated",
    passwordFailed: "Wrong current password, or the new password was refused",
    passwordMismatch: "The two passwords do not match",
    passwordTooShort: "At least 8 characters",
    forgotTitle: "Forgot your password?",
    sendResetLink: "Get a link by email",
    resetLinkSent: (email: string) => `Link sent to ${email}`,
    resetLinkFailed: "The link could not be sent",
    required: "Required",
  },
  account: {
    myAccount: "My account",
    profile: "Profile",
    security: "Security",
    logout: "Log out",
    defaultName: "Super Admin",
    defaultEmail: "admin@dadycar.fr",
    searchPlaceholder: "Search...",
  },
  support: {
    title: "Support",
    subtitle: "Live conversations with clients",
    views: {
      mine: "My conversations",
      unassigned: "Unassigned",
      open: "All",
      resolved: "Resolved",
    },
    agentFilter: { all: "All", unassigned: "Unassigned" },
    searchPlaceholder: "Search a client, a company…",
    live: "Live",
    autoRefresh: "Auto refresh",
    emptyTitle: "No conversation",
    emptyDescription: "You're all caught up for this view.",
    noResults: "No conversation matches your search",
    selectTitle: "Pick a conversation",
    selectDescription: "Client messages show up here in real time.",
    you: "You",
    note: "Note",
    previewFrom: (who: string, text: string) => `${who}: ${text}`,
    voiceMessage: "Voice message",
    image: "Image",
    file: "File",
    unassigned: "Unassigned",
    awaitingReply: "Awaiting reply",
    seenByClient: "Seen by client",
    notSeenByClient: "Not seen by client yet",
    assignToMe: "Assign to me",
    assign: "Assign",
    resolve: "Mark as answered",
    reopen: "Reopen",
    resolvedBadge: "Resolved",
    statuses: {
      Open: "Open",
      "In Progress": "In progress",
      Resolved: "Awaiting client confirmation",
      Closed: "Closed",
    } as Record<string, string>,
    loadError: "The conversation could not be loaded",
    toasts: {
      resolved: "Marked as answered: the client has to confirm",
      reopened: "Conversation reopened",
      assigned: "Conversation assigned",
    },
    thread: {
      newMessages: "New messages",
      today: "Today",
      yesterday: "Yesterday",
      internalNote: "Internal note",
      awaitingConfirmation: (date: string) => `Marked as answered on ${date} · awaiting the client's confirmation`,
      closedOn: (date: string) => `Conversation closed on ${date}`,
      subject: "Subject",
      urgency: "Urgency",
      startedOn: (date: string) => `Conversation started on ${date}`,
      deleteMessage: "Delete message",
      deleteTitle: "Delete this message?",
      deleteDescription: "The message disappears from the conversation, for the client and for Dadycar. An email or notification already sent to the client is not recalled.",
      deleted: "Message deleted",
      deleteFailed: "The message could not be deleted",
    },
    composer: {
      reply: "Reply",
      note: "Internal note",
      replyPlaceholder: "Write to the client…",
      notePlaceholder: "Only the team sees notes · @ to mention",
      noteHint: "Only visible to the Dadycar team",
      repliesClosed: "Conversation closed: reopen it to reply to the client. Internal notes are still possible.",
      send: "Send",
      addNote: "Add note",
      attach: "Attach a file",
      emoji: "Emoji",
      record: "Record a voice message",
      recording: "Recording…",
      sendingVoice: "Sending the voice message…",
      cancel: "Cancel",
      enterHint: "Enter to send · Shift+Enter for a new line",
      micBlocked: "Microphone blocked for this site: allow it from the address bar icon, then try again.",
      micMissing: "No microphone detected.",
      micBusy: "The microphone is used by another application.",
      emptyVoice: "The voice message is empty, try again.",
      fileTooLarge: (name: string) => `${name} is larger than 10 MB`,
      mentionHeader: "Mention",
      retry: "Try again",
      sendFailed: "The message could not be sent",
    },
    panel: {
      client: "Client",
      company: "Company",
      email: "Email",
      phone: "Phone",
      conversationsCount: (n: number) => `${n} conversation${n > 1 ? "s" : ""}`,
      details: "Details",
      status: "Status",
      priority: "Priority",
      category: "Category",
      assignee: "Assigned to",
      createdAt: "Started on",
      otherConversations: "Other conversations from this client",
      noOtherConversations: "No other conversation",
      activity: "Activity",
      noCategory: "None",
    },
  },
  common: {
    add: "Add",
    edit: "Edit",
    delete: "Delete",
    save: "Save",
    create: "Create",
    cancel: "Cancel",
    confirm: "Confirm",
    yes: "Yes",
    no: "No",
    all: "All",
    allF: "All",
    none: "None",
    loading: "Loading...",
    search: "Search...",
    noData: "No data available",
    resultsCount: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
    resultsCountFor: (n: number, query: string) => `${n} result${n !== 1 ? "s" : ""} for "${query}"`,
    activate: "Activate",
    deactivate: "Deactivate",
    active: "Active",
    inactive: "Inactive",
    activeM: "Active",
    pending: "Pending",
    disabled: "Disabled",
    new30d: "New (30d)",
    new30dF: "New (30d)",
    createdAt: "Created at",
    date: "Date",
    impersonate: "Impersonate",
    impersonationOpened: "Account opened in Fleet, in a new tab",
    unnamed: "Unnamed",
    retry: "Retry",
  },
  fuelTanks: {
    menuLabel: "Fuel tanks",
    title: (name: string) => `Fuel tanks — ${name}`,
    description: "Tank size of each fuel vehicle. Without it, a box that reads the gauge in % gives no litres.",
    summary: { vehicles: "Vehicles", missing: "No tank size", manual: "Typed by hand", estimated: "Estimated" },
    columns: { vehicle: "Vehicle", tank: "Tank (L)", source: "Source", box: "Box" },
    source: { manual: "Typed by hand", estimated: "Estimated", older: "Existing value" },
    estimateMissing: (n: number) => `Estimate the missing ones (${n})`,
    confirmTitle: "Estimate the fuel tanks",
    confirmMissing: (n: number) => `The tank size of ${n} vehicle(s) without one will be estimated from make and model.`,
    confirm: "Start the estimate",
    queued: (n: number) => `${n} estimate(s) started: results come within a minute.`,
    refresh: "Refresh",
    site: "Site",
    allSites: "All sites",
    noSite: "No site",
    estimateRow: "Estimate this vehicle from its make and model",
    saveRow: "Save",
    saved: "Tank saved: the vehicle's litres are recalculated.",
    empty: "No fuel vehicle",
  },
  energyPrices: {
    menuLabel: "Energy prices",
    title: (name: string) => `Energy prices — ${name}`,
    description: "The price of each energy that values the fill-ups and charges read by telematics. Without a range, it is computed on the client's last 30 days, else on the clients' average.",
    energy: { diesel: "Diesel", petrol: "Petrol", electricity: "Electricity" },
    origin: { manual: "Entered", market: "Market follow-up", own: "Client's last 30 days", clients: "Clients' average", default: "Default value" },
    market: (price: string) => `Clients' 7-day average: ${price}`,
    noMarket: "No clients' 7-day average yet",
    columns: { from: "From", to: "Until", price: "Price", origin: "Origin" },
    ongoing: "Ongoing",
    add: "Add a range",
    edit: "Edit",
    remove: "Delete",
    save: "Save",
    priceLabel: "Price incl. VAT",
    saved: "Range saved: the period's estimates are re-priced.",
    removed: "Range deleted.",
  },
  batteries: {
    menuLabel: "Batteries",
    title: (name: string) => `Batteries — ${name}`,
    description: "Battery size of each rechargeable vehicle. Without it, a charge read from the vehicle has no kWh.",
    summary: { vehicles: "Vehicles", missing: "Without battery", manual: "Typed by hand", estimated: "Estimated", reported: "Reported by the car" },
    columns: { vehicle: "Vehicle", battery: "Battery (kWh)", source: "Origin", connected: "Connected" },
    source: { manual: "Typed by hand", estimated: "Estimated", reported: "Reported by the car" },
    estimateMissing: (n: number) => `Estimate the missing ones (${n})`,
    confirmTitle: "Estimate the batteries",
    confirmMissing: (n: number) => `The battery size of ${n} vehicle(s) will be estimated from make and model.`,
    confirm: "Start the estimate",
    queued: (n: number) => `${n} estimate(s) started: results arrive within a minute.`,
    refresh: "Refresh",
    estimateRow: "Estimate this vehicle from its make and model",
    saveRow: "Save",
    saved: "Battery saved: the vehicle's charges are recalculated.",
    empty: "No rechargeable vehicle",
  },
  mcpToken: {
    menuLabel: "Generate MCP token",
    dialogTitle: "MCP token",
    dialogDescription: (name: string) => `Generate MCP access credentials for ${name}. The client connects without email or password.`,
    nameLabel: "Credential name",
    namePlaceholder: "e.g. Client's Claude connector",
    ttlLabel: "Token lifetime (minutes)",
    ttlHint: "Lifetime of the ready-to-use token (5 to 1440, default 60).",
    expiresLabel: "Credential expiry (days)",
    expiresHint: "Empty = never expires.",
    generate: "Generate token",
    regenerate: "Generate a new token",
    warning: "Copy these values now: the client secret is shown only once.",
    accessToken: "Access token (Bearer)",
    accessTokenHint: (min: number) => `Paste as the "Authorization: Bearer" header. Expires in ${min} min.`,
    clientId: "Client ID",
    clientSecret: "Client secret",
    clientSecretHint: "Shown once — durable and revocable.",
    mcpUrl: "MCP server URL",
    tokenEndpoint: "Refresh endpoint",
    credentialExpires: "Credential expiry",
    never: "Never",
    copy: "Copy",
    copied: "Copied",
    copyAll: "Copy all",
    done: "Done",
    toastGenerated: "MCP token generated",
    usageTitle: "How the client uses it",
    usageBody: "Claude connector: enter client_id / client_secret in the OAuth fields. Header-based client: paste the access token into \"Authorization: Bearer\".",
    existingTitle: "Existing credentials",
    emptyList: "No credentials yet.",
    createdAtLabel: "Created",
    lastUsedLabel: "Last used",
    neverUsed: "Never used",
    revoke: "Revoke",
    confirmRevoke: "Confirm revocation",
    toastRevoked: "Credential revoked",
    statusActive: "Active",
    statusExpired: "Expired",
    statusRevoked: "Revoked",
    newSectionTitle: "Generate a new credential",
  },
  mcpAccess: {
    serverTitle: "Admin MCP server",
    serverBody: "Your AI agents read the admin platform without a browser: companies, users, vehicles, subscriptions, billing, Donna, customer health, tickets, compliance, activity logs.",
    urlLabel: "Server URL",
    rightsTitle: "What your credentials allow",
    rights: [
      "They act with your own admin rights: a page you cannot open stays closed to the agent.",
      "Read-only: no changes, no exports.",
      "Revocable at any time: the token stops at the next call.",
      "They open the admin server only, never the clients' Fleet MCP server.",
    ],
    manage: "Manage my credentials",
    dialogDescription: "Your credentials for the admin MCP server. They act with your admin rights.",
    usageBody: "Paste the access token in the \"Authorization: Bearer\" header. For a long-running agent, renew it with client_id and client_secret at the refresh endpoint.",
    configTitle: "MCP client configuration (Claude Code, Cursor…)",
    refreshTitle: "Renew the token (agents)",
    refreshHint: "The token expires (60 min by default, 24 h at most); an agent asks for a new one with its credentials.",
  },
  telematicsEligibility: {
    hint: "Vehicles in the fleet, archived ones excluded. The eligibility test is free; each connected vehicle starts a paid LinkByCar subscription.",
    searchPlaceholder: "Search a company…",
    empty: "No company for these filters.",
    status: { all: "All", client: "Clients", prospect: "Prospects", dormant: "Dormant prospects", former: "Former clients", test: "Test accounts" },
    statusBadge: { client: "Client", prospect: "Prospect", dormant: "Dormant prospect", former: "Former client", test: "Test" },
    stage: { label: "Stage", all: "All stages", to_test: "With vehicles to test", eligible: "With eligible vehicles", connected: "With connected vehicles" },
    sort: { label: "Sort", vehicles: "Most vehicles", name: "Name" },
    columns: {
      company: "Company",
      vehicles: "Vehicles",
      withoutVin: "No VIN",
      toTest: "To test",
      eligible: "Eligible",
      pending: "Pending",
      connected: "Connected",
      actions: "Actions",
    },
    test: "Test",
    connect: (n: number) => `Connect ${n}`,
    running: "Running…",
    toastTestQueued: (n: number) => `Eligibility test started for ${n} vehicle${n > 1 ? "s" : ""}.`,
    toastNothingToTest: "No vehicle to test: no VIN or already connected.",
    toastConnectQueued: (n: number) => `Connection started for ${n} vehicle${n > 1 ? "s" : ""}.`,
    confirmTitle: "Connect the eligible vehicles?",
    confirmDescription: (n: number, company: string) =>
      `${n} eligible vehicle${n > 1 ? "s" : ""} of ${company} will be connected to LinkByCar. Each connected vehicle starts a paid LinkByCar subscription.`,
    confirmLabel: (n: number) => `Connect ${n} vehicle${n > 1 ? "s" : ""}`,
  },
  dataQuality: {
    filters: {
      provider: "Provider",
      allProviders: "Provider: all",
      client: "Client",
      allClients: "Client: all",
      status: "Status",
      openOnly: "Status: open",
      allStatuses: "Status: all",
    },
    kpis: {
      connected: "Connected vehicles",
      connectedSub: (flespi: number, linkbycar: number) => `${flespi} Flespi · ${linkbycar} LinkByCar`,
      reliable: "Reliable score",
      reliableSub: "of connected vehicles",
      reliableKm: "Km covered by a reliable score",
      reliableKmSub: "of km driven over 30 days",
      affected: "Affected vehicles",
      affectedSub: (issues: number) => `in ${issues} open issue${issues > 1 ? "s" : ""}`,
      resolved: "Resolved this month",
      resolvedSub: "boxes repaired or re-read",
    },
    issues: {
      title: "Issues, grouped",
      subtitle: "One issue = one common cause. Each row groups the boxes that have it.",
      new: "New issue",
      empty: "No issues",
      columns: {
        issue: "Issue",
        provider: "Provider",
        factor: "Affected factor",
        vehicles: "Vehicles",
        clients: "Clients",
        km: "Km / 30 d",
        effect: "Effect on score",
        status: "Status",
        nextStep: "Next step",
      },
    },
    makes: {
      title: "LinkByCar makes not scored yet",
      detail: (makes: number) => `${makes} make${makes > 1 ? "s" : ""} without a safety score for now.`,
      factor: "All",
      subtitle: (vehicles: number) => `${vehicles} vehicle${vehicles > 1 ? "s" : ""} · score "coming soon"`,
      columns: {
        make: "Make",
        vehicles: "Vehicles",
        clients: "Clients",
        clientNames: "Clients affected",
      },
    },
    detail: {
      title: (title: string) => `Detail · ${title}`,
      subtitle: (vehicles: number, clients: number) => `${vehicles} vehicle${vehicles > 1 ? "s" : ""} · ${clients} client${clients > 1 ? "s" : ""}`,
      close: "Close",
      effect: "Effect on score",
      nextStep: "Next step",
      nextStepPlaceholder: "What is left to do",
      save: "Save",
      vehicles: "Boxes to check",
      vehiclesSubtitle: "Issues of a specific box · the client sees \"provisional score\"",
      noVehicles: "No vehicle linked",
      columns: {
        plate: "Vehicle",
        client: "Client",
        box: "Box",
        measure: "Measure",
        since: "Since",
        km: "Km / 30 d",
      },
      resolve: "Mark resolved",
      addVehicle: "Add a vehicle",
      platePlaceholder: "Plate",
      measurePlaceholder: "Measure (optional)",
      add: "Add",
      vehicleNotFound: "Vehicle not found",
      notes: "Team notes",
      noNotes: "No notes",
      notePlaceholder: "What was observed or tested…",
      addNote: "Add a note",
    },
    weeks: {
      title: "Km covered by a reliable score, per week",
      empty: "No data yet",
      week: (week: string) => `W${week}`,
      reliableShare: "Reliable score",
      km: "Km driven",
    },
    dialog: {
      title: "New issue",
      issueTitle: "Issue",
      detail: "Detail",
      provider: "Provider",
      factor: "Affected factor",
      factorPlaceholder: "Turns, braking, speed…",
      effect: "Effect on score",
      status: "Status",
      nextStep: "Next step",
      create: "Create",
      required: "Required field",
    },
    status: {
      open: "To analyse",
      analysing: "Analysing",
      field: "Field action",
      accepted: "Accepted",
      resolved: "Resolved",
    },
    effect: {
      provisional: "Provisional score",
      low: "Low",
      none: "No score",
    },
    provider: {
      flespi: "Flespi",
      linkbycar: "LinkByCar",
      other: "Other",
    },
    flagged: {
      title: "Boxes to check",
      subtitle: "Vehicles whose client sees \"provisional score\" or to watch · one vehicle per issue",
      empty: "No box to check",
      issue: "Issue",
    },
    toasts: {
      created: "Issue created",
      updated: "Issue updated",
      noteAdded: "Note added",
      vehicleAdded: "Vehicle added",
      vehicleResolved: "Vehicle marked resolved",
    },
  },
  userAccess: {
    menuLabel: "View access",
    title: "User access",
    company: "Company",
    role: "Role",
    noRole: "No role",
    systemRole: "System role",
    permissions: "Permissions",
    noPermissions: "No permission",
    added: "added",
    removedTitle: "Removed from their role",
    sites: "Sites in reach",
    allSites: "Every site of the company",
    noSites: "No site",
    archived: "archived",
    groupView: "Sees every company of their group",
    actions: { create: "Create", view: "View", edit: "Edit", delete: "Delete", export: "Export", import: "Import", manage: "Manage" },
  },
  validation: {
    nameRequired: "Name is required",
    fullNameRequired: "Full name is required",
    firstNameRequired: "First name is required",
    lastNameRequired: "Last name is required",
    emailRequired: "Email is required",
    emailInvalid: "Invalid email",
    phoneRequired: "Phone is required",
    passwordRequired: "Password is required",
    passwordMinLength: "Password must be at least 8 characters",
    passwordsDoNotMatch: "Passwords do not match",
    siretRequired: "SIRET is required",
    addressRequired: "Address is required",
    cityRequired: "City is required",
    postalCodeRequired: "Postal code is required",
    displayNameRequired: "Display name is required",
    priceMustBePositive: "Price must be positive",
    frequencyRequired: "Frequency is required",
    titleRequired: "Title is required",
    titleMaxLength: "Title cannot exceed 255 characters",
    numberplateRequired: "Plate is required",
    tankCapacity: "Between 1 and 1500 litres",
    markRequired: "Make is required",
    modelRequired: "Model is required",
    motorTypeRequired: "Engine type is required",
    roleRequired: "Role is required",
    codeRequired: "Code is required",
    labelRequired: "Label is required",
    installMethodRequired: "Install method is required",
    numberNonNegative: "Value cannot be negative",
    vatRateInvalid: "VAT rate must be between 0 and 100",
    referencePrefixRequired: "Reference prefix is required",
    minUnitsInvalid: "Minimum units must be at least 1",
    weightsMustTotal100: "Weights must total 100",
  },
  forms: {
    name: "Name",
    firstName: "First name",
    lastName: "Last name",
    email: "Email",
    phone: "Phone",
    password: "Password",
    newPassword: "New password",
    role: "Role",
    status: "Status",
    company: "Company",
    description: "Description",
  },
  notFound: {
    title: "Page not found",
    description: "The page you are looking for doesn't exist or has been moved.",
    backToDashboard: "Back to dashboard",
  },
  dashboard: {
    periods: {
      "7d": "7 days",
      "30d": "30 days",
      "90d": "90 days",
      "12m": "12 months",
    },
    charts: {
      verified: "Verified",
      newF: "New",
      newM: "New",
      connected: "Connected",
      active: "Active",
      trial: "Trial",
      expired: "Expired",
      companyGrowth: "Company growth",
      companyGrowthDesc: "Trend over period",
      vehicleGrowth: "Vehicle growth",
      vehicleGrowthDesc: "New and connected",
      subscriptionTimeline: "Subscriptions timeline",
      subscriptionTimelineDesc: "Active, trial and expired",
      planDistribution: "Plan distribution",
      planDistributionDesc: "Breakdown by plan type",
      motorTypes: "Motor types",
      motorTypesDesc: "Breakdown by engine type",
    },
    stats: {
      companies: "Companies",
      users: "Users",
      vehicles: "Vehicles",
      subscriptions: "Subscriptions",
      sites: "Sites",
      planDistribution: "Plan distribution",
      plansSuffix: " plans",
      withVehicles: (n: number) => `${n} with vehicles`,
      newCompanies: (n: number) => `${n} new`,
      connected: (n: number) => `${n} connected`,
      onTrial: (n: number) => `${n} on trial`,
    },
    loadError: "Unable to load statistics",
  },
  companies: {
    toasts: {
      created: "Company created successfully",
      updated: "Company updated",
      deleted: "Company deleted",
      restored: "Company restored",
      lookupSuccess: "Company information retrieved",
      siretInvalid: "SIRET must contain exactly 14 digits",
      accessUpdating: "Updating access...",
      accessEnabled: "Company access enabled",
      accessDisabled: "Company access disabled",
      testFlagged: "Marked as test account — excluded from Customer Health statistics",
      testUnflagged: "Test flag removed — included in Customer Health statistics",
      refacturationGranted: "Inter-company refacturation enabled for this group",
      refacturationRevoked: "Inter-company refacturation disabled for this group",
      clientStatusSaved: (status: string) => `Group set to "${status}"`,
    },
    sort: {
      label: "Order by",
      newest: "Newest first",
      oldest: "Oldest first",
      disabledFirst: "Disabled first",
      enabledFirst: "Enabled first",
    },
    clientStatusFilter: { all: "All", client: "Clients", prospect: "Prospects", dormant: "Dormant prospects", former: "Former clients", test: "Test accounts" },
    actions: {
      enableAccess: "Enable Company Access",
      disableAccess: "Disable Company Access",
      markTest: "Mark as test account",
      unmarkTest: "Remove test flag",
      grantRefacturation: "Enable inter-company refacturation",
      revokeRefacturation: "Disable inter-company refacturation",
      clientStatus: "Group's client status",
    },
    testBadge: "TEST",
    refacturationBadge: "REFACT.",
    clientStatus: { client: "Client", prospect: "Prospect (not signed yet)", dormant: "Dormant prospect (not signed, kept for later)", former: "Former client" },
    clientStatusBadge: { client: "CLIENT", prospect: "PROSPECT", dormant: "DORMANT", former: "FORMER" },
    searchPlaceholder: "Search a company...",
    empty: "No company found",
    stats: {
      total: "Total",
      withVehicles: "With vehicles",
      withSubscription: "With subscription",
      new30d: "New (30d)",
    },
    dialog: {
      titleEdit: "Edit company",
      titleCreate: "New company",
      siretPlaceholder: "14 digits",
      siretLookupTitle: "Look up company by SIRET",
    },
    fields: {
      siret: "SIRET",
    },
    delete: {
      title: "Delete company",
      description: (name: string | undefined) =>
        `Are you sure you want to delete "${name}"? This action is reversible.`,
    },
    countLabel: (n: number) => `${n} compan${n > 1 ? "ies" : "y"}`,
  },
  users: {
    toasts: {
      created: "User created",
      updated: "User updated",
      deleted: "User deleted",
      statusChanged: "Status changed",
      emailVerified: "Email verified",
      passwordReset: "Password reset",
    },
    columns: {
      emailVerified: "Email verified",
    },
    actions: {
      verifyEmail: "Verify email",
      resetPassword: "Reset password",
    },
    stats: {
      total: "Total",
      active: "Active",
      disabled: "Disabled",
      emailVerified: "Email verified",
    },
    statusFilter: {
      pending: "Pending",
      active: "Active",
      disabled: "Disabled",
    },
    roles: {
      company: "Company",
      driver: "Driver",
      siteManager: "Manager",
      siteManagerLong: "Site manager",
      companyClient: "Client",
      companyClientLong: "Company client",
    },
    roleLabels: {
      admin: "Administrator",
      manager: "Manager",
      user: "User",
      technician: "Technician",
      super_admin: "Super Admin",
    },
    dialog: {
      titleEdit: "Edit user",
      titleCreate: "New user",
      resetPasswordTitle: "Reset password",
      resetPasswordSubmit: "Reset",
    },
    delete: {
      title: "Delete user",
      description: (firstName?: string, lastName?: string) =>
        `Are you sure you want to delete "${firstName ?? ""} ${lastName ?? ""}"?`,
    },
    toggleStatus: {
      title: "Change status",
      description: (active: boolean) =>
        `Do you want to ${active ? "deactivate" : "activate"} this user?`,
    },
  },
  vehicles: {
    toasts: {
      updated: "Vehicle updated",
      deleted: "Vehicle deleted",
      linkbycarConnected: "Vehicle successfully connected to LinkByCar",
      eligibilityChecked: "Vehicle is eligible, you can now connect it",
      eligibilityChecking: "Checking eligibility...",
      linkbycarDisconnecting: "Disconnecting from LinkByCar...",
      linkbycarDisconnected: "Vehicle disconnected from LinkByCar",
      linkbycarNotRegistered: "This vehicle was not registered with LinkByCar — its local status has been corrected",
    },
    columns: {
      numberplate: "Plate",
      vin: "VIN",
      mark: "Make",
      model: "Model",
      motorType: "Engine",
      connection: "Connection",
      provider: "Provider",
    },
    fields: {
      motorTypeLong: "Engine type",
      tankCapacity: "Fuel tank (L)",
      tankHint: "Empty if unknown. A value typed here is never replaced by an estimate.",
      tankSource: { manual: "Typed by hand", estimated: "Estimated from the model" },
    },
    actions: {
      connectLinkbycar: "Connect LinkByCar",
      testEligibility: "Test eligibility",
      disconnectLinkbycar: "Disconnect from LinkByCar",
      disconnectCompany: "Disconnect a company",
    },
    stats: {
      total: "Total",
      connected: "Connected",
      notConnected: "Not connected",
      new30d: "New (30d)",
    },
    connectionFilter: {
      notConnected: "Not connected",
      eligible: "Eligible",
      pending: "Pending",
      connected: "Connected",
    },
    disconnect: {
      title: "Disconnect from LinkByCar",
      description: (numberplate: string | undefined) =>
        `Vehicle "${numberplate}" will be removed from LinkByCar: data collection and the related subscription stop. It can be reconnected later.`,
      confirm: "Disconnect",
    },
    companyDisconnect: {
      title: "Disconnect a company from LinkByCar",
      trigger: "Disconnect a company",
      pickCompany: "Pick a company in the “Company” filter above first.",
      loading: "Reading LinkByCar status...",
      warning:
        "Vehicles will be removed from LinkByCar: data collection and the related subscriptions stop immediately.",
      counts: {
        total: "Vehicles",
        connected: "Connected",
        pending: "Pending",
        eligible: "Eligible",
        notConnected: "Not connected",
      },
      targetLinked: (n: number) =>
        `${n} connected or pending vehicle${n !== 1 ? "s" : ""} will be removed from LinkByCar.`,
      includeAllLabel: "Catch-up: process every vehicle that has a VIN",
      includeAllHint: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} will be sent to LinkByCar, including those the local status already calls disconnected. Slower, but it fixes stale statuses.`,
      nothing: "No vehicle to disconnect for this company.",
      confirm: "Start disconnection",
      queued: (n: number) => `Disconnection started for ${n} vehicle${n !== 1 ? "s" : ""}.`,
      progressTitle: "Disconnection running",
      progressRemaining: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} still linked to LinkByCar.`,
      progressDone: "Done — no vehicle is linked to LinkByCar any more.",
      progressCatchUp:
        "The catch-up sweep continues in the background on vehicles the local status already called disconnected.",
      progressStalled:
        "Processing continues in the background. Reopen this window later to see where it stands.",
      loadError: "Could not read this company's LinkByCar status.",
      close: "Close",
      verify: {
        trigger: "Check with LinkByCar",
        running: "Asking LinkByCar...",
        error: "Could not reach LinkByCar. Try again in a moment.",
        clean: "LinkByCar no longer holds any vehicle of this company.",
        remaining: (n: number) =>
          `LinkByCar still holds ${n} vehicle${n !== 1 ? "s" : ""} of this company.`,
        checked: (n: number, total: number) =>
          `${n} vehicle${n !== 1 ? "s" : ""} with a VIN cross-referenced against the ${total} registrations on the LinkByCar account.`,
        staleHint: (n: number) =>
          `${n} of them the local status already calls disconnected — only the catch-up mode will process them.`,
        absentHint: (n: number) =>
          `${n} vehicle${n !== 1 ? "s" : ""} marked connected on our side but unknown to LinkByCar.`,
        archived: "archived",
        columns: { plate: "Vehicle", local: "Local status", provider: "LinkByCar" },
      },
    },
    dialog: {
      titleEdit: "Edit vehicle",
    },
    delete: {
      title: "Delete vehicle",
      description: (numberplate: string | undefined) =>
        `Are you sure you want to delete vehicle "${numberplate}"?`,
    },
  },
  sites: {
    toasts: {
      updated: "Site updated",
      deleted: "Site deleted",
    },
    columns: {
      address: "Address",
      city: "City",
      postalCode: "Postal code",
      capacity: "Capacity",
      manager: "Manager",
    },
    stats: {
      total: "Total",
      withVehicles: "With vehicles",
      withoutVehicles: "Without vehicles",
      new30d: "New (30d)",
    },
    dialog: {
      titleEdit: "Edit site",
    },
    delete: {
      title: "Delete site",
      description: (name: string | undefined) =>
        `Are you sure you want to delete site "${name}"?`,
    },
  },
  subscriptions: {
    toasts: {
      planCreated: "Plan created",
      planUpdated: "Plan updated",
    },
    tabs: {
      subscriptions: "Subscriptions",
      plans: "Plans",
      billing: "Billing",
      products: "Billed products",
      signals: "Sales signals",
      donna: "Donna (AI)",
    },
    stats: {
      total: "Total",
      active: "Active",
      trial: "On trial",
      expiredTrial: "Expired trial",
    },
    columns: {
      id: "ID",
      plan: "Plan",
      trial: "Trial",
    },
    trialFilter: {
      label: "Trial",
      trial: "Trial",
      standard: "Standard",
    },
    plans: {
      newPlan: "New plan",
      popular: "Popular",
      popularField: "Popular",
      activeField: "Active",
      unlimited: "Unlimited",
      perMonth: "month",
      perYear: "year",
      companiesCount: (n: number) => `${n} companies`,
    },
    dialog: {
      titleEdit: "Edit plan",
      titleCreate: "New plan",
      identifier: "Identifier",
      displayName: "Display name",
      originalPrice: "Original price",
      discountedPrice: "Discounted price",
      frequency: "Frequency",
      monthly: "Monthly",
      yearly: "Yearly",
    },
  },
  donna: {
    intro: (markup: string, rate: string) =>
      `Donna = the whole AI product (chat + background agents). Every call is charged at provider cost × ${markup}. Monthly gift: ${rate} of what the client pays for the fleet. Platform AI (OCR, analyses) is counted separately and offered.`,
    month: "Month",
    searchPlaceholder: "Search a client...",
    empty: "No client on the list: add one to give them Donna credit",
    addClient: "Add a client",
    remove: "Remove",
    removeTitle: (name: string) => `Remove ${name} from the list?`,
    removeDescription: "This month's gift is taken back and Donna stops for this client once he has no credit, unless he accepts to pay beyond it.",
    removed: "Client removed",
    add: {
      title: "Add a client",
      intro: "The client gets Donna credit without having to use it first. Without credit, Donna does not work for him until he accepts to pay beyond it.",
      change: "Change",
      price: "Price paid per vehicle / month (€)",
      priceHint: "Optional: editable afterwards in the list.",
      amount: "This month's gift (€)",
      amountPlaceholder: "Computed from the price per vehicle",
      amountHint: "Leave empty for the automatic gift (needs a price per vehicle).",
      note: "Note (optional)",
      none: "No company to add",
      submit: "Add",
      added: "Client added",
    },
    giftOff: "Automatic gift switched off (Settings)",
    stats: {
      gifts: "Gifts granted",
      donnaUsed: "Donna usage (client price)",
      donnaCost: "Donna cost (provider)",
      overage: "Overage to invoice",
      platformCost: "Offered platform AI (cost)",
      net: "AI result of the month",
      netHint: "Invoiced overage − every AI cost",
      unassigned: (amount: string) => `incl. ${amount} not tied to a client`,
    },
    columns: {
      client: "Client",
      pricePerVehicle: "Price / vehicle",
      gift: "Gift",
      donna: "Donna used",
      overage: "Overage",
      cost: "Real cost",
      platform: "Platform (offered)",
      net: "Result",
    },
    noPrice: "to fill in",
    revoked: "revoked",
    custom: "custom",
    grantAll: "Grant this month's gifts",
    grantedAll: (n: number, amount: string) => `${n} gift(s) granted, ${amount} in all`,
    settings: {
      button: "Settings",
      title: "Donna settings",
      intro: "All of Donna's pricing is set here. A change applies to the calls made after it; what is already counted keeps its price.",
      saved: "Settings saved",
      cancel: "Cancel",
      markup: "Markup (multiplier)",
      markupHint: "Client price = provider cost × this multiplier. 1.20 = +20%.",
      usdToEur: "USD → EUR rate",
      usdToEurHint: "Providers bill in dollars; our costs are kept in euros.",
      giftRate: "Monthly gift (%)",
      giftRateHint: "Share of what the client pays for its fleet (billable vehicles × price per vehicle).",
      creditRequestDefault: "Credit offered for a request (€)",
      creditRequestDefaultHint: "Amount pre-filled when a prospect or a former client asks for credit to try Donna.",
      giftEnabled: "Automatic gift enabled",
      giftEnabledHint: "Off: no more automatic gift. Gifts already granted and custom gifts stay.",
      prices: "Model prices (USD per million tokens)",
      pricesHint: "The providers' public prices. A dated model (gpt-4o-2024-08-06) takes the price of the name it starts with.",
      model: "Model",
      input: "Input",
      output: "Output",
      cacheRead: "Cache read",
      cacheWrite: "Cache write",
      otherModels: "Any other model",
      addModel: "Add a model",
      ocrPage: "OCR (USD per page)",
      ocrPageHint: "Pages read by Azure Vision.",
    },
    save: "Save",
    saved: "Price saved",
    details: "Details",
    detail: {
      title: (name: string, period: string) => `${name} — ${period}`,
      priceLabel: "Price paid per vehicle / month (temporary)",
      priceHint: "Typed by hand until the pricing module is ready.",
      giftEnabled: "Monthly gift enabled",
      quote: (amount: string, vehicles: number, price: string) => `This month's gift if granted now: ${amount} (${vehicles} vehicles × ${price} × gift rate)`,
      noQuote: "No gift possible: missing price, gift disabled or no billable vehicle.",
      grant: "Grant this month's gift",
      granted: "Gift granted",
      revoke: "Revoke the gift",
      revokedToast: "Gift revoked",
      restore: "Restore the gift",
      restoredToast: "Gift restored",
      customTitle: "Custom gift",
      customHint: "An amount of your choice for this month: a goodwill gesture, a client with no price, or the computed gift corrected. It replaces the month's gift.",
      customAmount: "Amount in €",
      customNote: "Reason (internal)",
      customGrant: "Give this amount",
      customNoteShown: (note: string) => `Reason: ${note}`,
      gift: "Gift",
      used: "Used",
      remaining: "Remaining",
      overage: "Overage",
      ourCost: "Our cost",
      donnaLines: "Donna — where the usage went",
      workers: "Background agents",
      platformLines: "Platform AI (offered)",
      feature: "Item",
      calls: "Calls",
      price: "Client price",
      cost: "Cost",
      on: "On",
      off: "Off",
      nothing: "Nothing this month",
    },
  },
  billing: {
    searchPlaceholder: "Search a client, contact, email...",
    empty: "No client",
    settingsButton: "Settings",
    manageButton: "Manage",
    months: (n: number) => `${n} month${n !== 1 ? "s" : ""}`,
    perMonth: (amount: string) => `${amount} / mo`,
    unpaidOf: (n: number, tol: number) => `${n} / ${tol}`,
    stats: {
      totalDue: "Total amount due",
      withUnpaid: "Clients with unpaid",
      atRisk: "At risk of suspension",
      suspended: "Suspended accounts",
    },
    columns: {
      client: "Client",
      plan: "Plan",
      vehicles: "Vehicles",
      status: "Status",
      unpaid: "Unpaid",
      amountDue: "Amount due",
      nextDue: "Next due date",
      tolerance: "Tolerance",
      action: "Action",
    },
    settings: {
      title: "Billing settings",
      toleranceLabel: "Default tolerance period (months)",
      toleranceHelp: "Applied to new clients. Adjustable individually from each client's record.",
      save: "Save",
      saved: "Settings saved",
    },
    products: {
      intro:
        "The products invoiced to contract clients, at their list price excl. VAT per vehicle and month. A new price applies from the next invoice to the clients without a price of their own; the others keep their price, only the discount shown changes. Invoices already issued do not move.",
      newProduct: "New product",
      edit: "Edit",
      columns: { product: "Product", role: "Invoiced on", price: "List price excl. VAT", pennylane: "Pennylane product", clients: "Clients", status: "Status" },
      roles: {
        fleet: "Every vehicle in the fleet",
        telematics: "Every connected vehicle",
        bundle: "Every vehicle with a box",
      } as Record<string, string>,
      active: "Active",
      inactive: "Switched off",
      perVehicle: (price: string) => `${price} / vehicle / month`,
      saved: "Product saved",
      created: "Product created",
      dialog: {
        titleCreate: "New product",
        titleEdit: "Edit product",
        label: "Name on the invoice",
        role: "Invoiced on",
        roleFixed: "Set at creation: it says which vehicles the line counts.",
        price: "List price excl. VAT / vehicle / month",
        description: "Text under the invoice line",
        pennylane: "Pennylane product ID (optional)",
        pennylaneHint: "Pennylane then fills the line from its catalog.",
        active: "Offered in contracts",
        activeLocked: (n: number) => `Invoiced to ${n} client${n > 1 ? "s" : ""}: change their contract first to switch it off.`,
        create: "Create the product",
        save: "Save",
      },
    },
    manage: {
      title: "Billing management",
      contact: "Contact",
      paymentMode: "Payment mode",
      subscriptionStart: "Subscription start",
      lastPayment: "Last payment",
      statut: "Status",
      unpaidMonths: "Unpaid months",
      amountDue: "Amount due",
      autoLockTitle: "Automatic account lock",
      autoLockHelp: "Automatically suspends the client account after the tolerance period of consecutive unpaid months.",
      toleranceTitle: "Tolerance period (months)",
      toleranceHelp: "Number of unpaid months tolerated before automatic lock.",
      useDefault: (n: number) => `Reset to default (${n} months)`,
      inheritsDefault: "Inherits the default value",
      warnDisabled: "Automatic lock is disabled for this client. No suspension will be applied for unpaid invoices.",
      warnWillLock: (unpaid: number, tol: number) =>
        `With these settings, this account will be locked immediately (${unpaid} unpaid months ≥ ${tol} months tolerance).`,
      accessTitle: "Account access",
      lockState: "Current state",
      suspend: "Suspend now",
      reactivate: "Reactivate",
      backToAuto: "Back to automatic",
      invoicesTitle: "Invoices to reconcile",
      markPaid: "Mark paid",
      save: "Save",
      notFound: "Client not found",
      mandate: {
        title: "SEPA direct debit",
        phases: {
          none: "No mandate",
          waiting: "Awaiting signature",
          active: "Active",
          inactive: "Inactive",
        },
        off: "Direct debit is not open yet (BILLING_SEPA_ENABLED).",
        none: "Pennylane e-mails the mandate to the client, who signs it online.",
        waiting: (on: string, source: string) => `Mandate sent on ${on} (${source}), not signed yet.`,
        active: (on: string) => `Mandate signed on ${on}: Pennylane debits the invoices.`,
        activeNoDate: "Mandate signed: Pennylane debits the invoices.",
        inactive: (status: string) => `Mandate ${status}: no more debits.`,
        // Pennylane's mandate statuses, in words (only "enabled" is documented).
        statuses: { revoked: "revoked", canceled: "cancelled", cancelled: "cancelled", refused: "refused", expired: "expired", failed: "failed" } as Record<string, string>,
        // Why the bank rejected a debit, in Pennylane's payment statuses.
        debitStatuses: { failed: "failed", charged_back: "charged back", customer_approval_denied: "denied by the customer" } as Record<string, string>,
        sources: { client: "by the client", admin: "by an admin", auto: "automatic", command: "bulk send" } as Record<string, string>,
        send: "Send the mandate",
        resend: "Send the mandate again",
        sent: "Mandate sent by Pennylane",
        email: "Company e-mail",
        lastError: "Last error",
        rejects: "Rejected debits (12 months)",
        reject: (number: string, amount: string, on: string) => `Invoice ${number}, ${amount} incl. VAT, reject seen on ${on}`,
        settled: "settled since",
        owed: "owed",
      },
      contract: {
        title: "Billing contract",
        active: "Invoiced by the platform",
        activeHelp: "The monthly run invoices active clients only.",
        mode: "Rule",
        modes: {
          contract: "Contract: the month just ended, counted on its last day",
          plan: "Plan: the plan's price on every vehicle (Telematics: the connected ones, the others at Fleet Business), the month ahead",
        } as Record<string, string>,
        roles: {
          fleet: "Fleet (every vehicle)",
          telematics: "Telematics (every connected vehicle)",
          bundle: "Box bundle (every vehicle with a box)",
        } as Record<string, string>,
        notInvoiced: "Not invoiced",
        clientPrice: "Client price",
        priceHint: (list: string) => `Client price excl. VAT / vehicle / month. Empty: list price, ${list}.`,
        notes: "Contract terms",
        save: "Save the contract",
        saved: "Contract saved",
        none: "No contract: this client is not invoiced by the platform.",
        lastMonth: (month: string) => `Invoice for ${month}`,
        thisMonth: (month: string) => `${month}, running (counted today)`,
        nextMonth: (month: string) => `Next invoice: ${month}, issued on the 1st (counted today)`,
        counts: (fleet: number, boxes: number, cars: number) => `${fleet} vehicles, ${boxes} boxes, ${cars} connected cars`,
        columns: { product: "Product", quantity: "Qty", list: "List price", discount: "Discount", total: "Total excl. VAT" },
        total: "Total excl. VAT",
        empty: "Nothing to invoice",
      },
      vehiclePlans: {
        title: "Vehicle plans",
        inUse: "Billed by its vehicles' plans: only the vehicles holding a plan are billed, each at the client's price for its plans.",
        contractNotInUse: "No plan yet: this client is billed by its contract. From the first plan set on a vehicle, only the vehicles holding a plan are billed, on the month's last day: set the whole fleet's plans at once.",
        offerNotInUse: (plan: string, count: number) =>
          `No plan chosen yet: the ${plan} offer is billed on ${count} vehicle${count > 1 ? "s" : ""}. On the first choice, ${count > 1 ? "they keep it" : "it keeps it"}, then each vehicle follows its plans.`,
        notBilled: "This client is not invoiced by the platform: plans change nothing until its billing is active.",
        columns: { plan: "Plan", list: "List price", price: "Client price excl. VAT", vehicles: "Vehicles", vehicle: "Vehicle" },
        offSale: "off sale",
        priceHint: "Empty: list price. The price applies from the next invoice.",
        savePrices: "Save the prices",
        pricesSaved: "Prices saved",
        search: "Plate, make, model",
        selectAll: "Select all",
        selected: (n: number) => `${n} selected`,
        choosePlan: "Plan",
        add: "Add",
        remove: "Remove",
        updated: "Vehicle plans updated",
        prorata: (amount: string) => `Prorata on the next invoice: ${amount} excl. VAT`,
        connected: "connected",
        byOffer: "by the offer",
        none: "no plan",
        noVehicle: "No vehicle in the fleet.",
        totals: (withPlan: number, total: number, amount: string) =>
          `${withPlan} of ${total} vehicle${total > 1 ? "s" : ""} billed · ${amount} excl. VAT / month`,
      },
      pennylane: {
        title: "Pennylane customer",
        help: "The Pennylane customer this company's invoices go to.",
        off: "Pennylane is switched off on this platform (PENNYLANE_ENABLED): the link is not checked.",
        none: "No link: on the first invoice, a new customer would be created in Pennylane.",
        linked: (name: string, id: string) => `${name} (no. ${id})`,
        unchecked: (id: string) => `Customer no. ${id}`,
        sirenDiffers: (siren: string) => `SIREN differs from the company's (${siren}): check it is the entity invoiced.`,
        alsoLinked: (names: string) => `Also linked to: ${names}`,
        search: "Name or SIREN / SIRET",
        searchButton: "Search",
        noResult: "No Pennylane customer found",
        link: "Link",
        unlink: "Unlink",
        linkedToast: "Pennylane customer linked",
        unlinkedToast: "Link removed",
      },
    },
    suspendConfirm: {
      title: "Suspend account",
      description: (name: string) =>
        `"${name}" will be locked: app access is blocked regardless of the unpaid level. This does not remove vehicles from ANTAI.`,
    },
    toasts: {
      configSaved: "Configuration updated",
      suspended: "Account suspended",
      reactivated: "Account reactivated",
      backToAuto: "Automatic policy restored",
      invoicePaid: "Invoice marked as paid",
    },
  },
  tickets: {
    toasts: {
      updated: "Ticket updated",
      deleted: "Ticket deleted",
    },
    columns: {
      ticket: "Ticket",
      category: "Category",
      priority: "Priority",
      createdBy: "Created by",
    },
    actions: {
      viewDetails: "View details",
    },
    searchPlaceholder: "Search a ticket...",
    empty: "No ticket found",
    stats: {
      total: "Total",
      open: "Open",
      resolved: "Resolved",
      new30d: "New (30d)",
      awaitingReply: "Awaiting reply",
    },
    filters: {
      allStatuses: "All statuses",
      allPriorities: "All priorities",
      allCategories: "All categories",
      allAssignees: "All assignees",
      unassigned: "Unassigned",
      assignee: "Assigned to",
      conversation: "Conversation",
      allConversations: "All conversations",
      awaitingReply: "Client awaiting reply",
    },
    awaitingReplyBadge: "Client replied",
    columnsExtra: {
      assignee: "Assigned to",
      lastClientMessage: "Last client message",
      lastDadycarReply: "Last Dadycar reply",
    },
    delete: {
      title: "Delete ticket",
      description: (title: string | undefined) =>
        `Are you sure you want to delete "${title}"? This action is reversible.`,
    },
  },
  ticketDetail: {
    notFound: "Ticket not found",
    ticketIdLabel: (id: number) => `Ticket #${id}`,
    editTitle: "Edit ticket",
    sections: {
      description: "Description",
      documents: (n: number) => `Documents (${n})`,
      info: "Information",
      history: "History",
    },
    fields: {
      title: "Title",
      noDescription: "No description",
      createdAt: "Created at",
      updatedAt: "Last updated",
      assignee: "Assigned to",
      lastClientMessage: "Last client message",
      lastDadycarReply: "Last Dadycar reply",
    },
    assignee: {
      placeholder: "Select a member",
      search: "Search a member...",
      empty: "No member",
      unassign: "Unassign",
      activeCount: (n: number) => `(${n})`,
    },
    communications: {
      tabs: {
        client: "Client conversation",
        internal: "Internal communications",
      },
      empty: "No message yet",
      composerPlaceholderClient: "Reply to the client...",
      composerPlaceholderInternal: "Internal note... (type @ to mention)",
      sendClient: "Send to client",
      sendInternal: "Post note",
      privateBadge: "Private note - not visible to the client",
      clientFooter: (ticketId: number) =>
        `Sent via support@dadycar.fr - Subject: [Ticket #${ticketId}]`,
      mention: {
        header: "Mention a member",
        empty: "No result",
      },
      attachmentsHint: "Drag & drop files (max 10 files, 10 MB each)",
      fileTooLarge: (name: string) => `File too large: "${name}" exceeds 10 MB`,
      tooManyFiles: "Maximum 10 files per message",
      internalOnly: "Internal only",
      edit: "Edit",
      delete: "Delete",
      editedAt: "(edited)",
      clientImmutable: "Client conversations cannot be modified.",
      toastMessageSent: "Message posted",
      toastMessageEdited: "Message updated",
      toastMessageDeleted: "Message deleted",
      confirmDeleteTitle: "Delete note",
      confirmDeleteDescription:
        "Are you sure you want to delete this internal note? This action is irreversible.",
    },
    history: {
      readOnly: "Read-only - Internal",
      loadMore: "Load more",
      empty: "No history entry",
      labels: {
        create: "created the ticket",
        deleted: "deleted the ticket",
        status_change: "changed the status",
        priority_change: "changed the priority",
        category_change: "changed the category",
        title_change: "edited the title",
        description_change: "edited the description",
        assign: "assigned the ticket",
        unassign: "unassigned the ticket",
        message_client: "replied to the client",
        message_from_client: "wrote to Dadycar",
        message_internal: "added an internal note",
        message_edited: "edited a message",
        message_deleted: "deleted a message",
        attachment_added: "added an attachment",
        attachment_removed: "removed an attachment",
      },
      unassigned: "Unassigned",
      system: "System",
    },
  },
  rfid: {
    stats: {
      total: "Total batches",
      processing: "Processing",
      processed: "Processed",
      changesPending: "Pending changes",
      companies: "Companies",
    },
    searchPlaceholder: "Search a reference...",
    empty: "No RFID card batches",
    columns: {
      reference: "Reference",
      company: "Company",
      status: "Status",
      changes: "Changes",
      submittedBy: "Submitted by",
      submittedAt: "Submitted at",
    },
    filters: {
      status: "Status",
      allStatuses: "All statuses",
      company: "Company",
      allCompanies: "All companies",
    },
    statuses: {
      processing: "Processing",
      processed: "Processed",
    },
    actions: {
      viewDetails: "View details",
      process: "Process batch",
    },
    toasts: {
      processed: "Batch processed",
    },
    detail: {
      notFound: "Batch not found",
      referenceLabel: (ref: string) => `Batch ${ref}`,
      sections: {
        info: "Information",
        changes: (n: number) => `Changes (${n})`,
      },
      fields: {
        reference: "Reference",
        company: "Company",
        status: "Status",
        changesCount: "Changes",
        submittedBy: "Submitted by",
        submittedAt: "Submitted at",
        processedBy: "Processed by",
        processedAt: "Processed at",
        empty: "—",
      },
      change: {
        card: (num: string) => `Card ${num}`,
        noCard: "No card",
        requestedBy: "Requested by",
        empty: "No changes in this batch",
      },
      changeTypes: {
        create: "Create",
        assign: "Assign",
        vehicles: "Vehicles",
        activate: "Activate",
        deactivate: "Deactivate",
        archive: "Archive",
      },
      process: {
        button: "Process batch",
        confirmTitle: "Process this batch?",
        confirmDescription:
          "This finalises the changes (activation/deactivation) and syncs driver badges to the devices. It is irreversible.",
        alreadyProcessed: "This batch has already been processed.",
      },
    },
  },
  health: {
    periods: { month: "This month", week: "Last week", "3months": "Last 3 months", custom: "Custom" },
    tiers: { healthy: "Healthy", attention: "Needs attention", at_risk: "At risk" },
    watchlist: "Watchlist",
    needsCompute: {
      title: "Analytics not computed yet",
      description: "The nightly computation has not run. Metrics will appear once snapshots are generated.",
    },
    exec: {
      portfolioScore: "Portfolio score",
      clients: "Clients",
      totalClients: "Total clients",
      activeThisMonth: "Active this month",
      inactive: "Inactive",
      newClients: "New (30 days)",
      churnRisk: "Churn risk",
      users: "Users",
      totalUsers: "Total users",
      activeToday: "Active today",
      activeWeek: "Active this week",
      activeMonth: "Active this month",
      adoption: "Adoption",
      avgLoginFrequency: "Avg login frequency",
      avgModules: "Avg modules / client",
      avgSession: "Avg session",
      avgFeatureAdoption: "Avg feature adoption",
      engagement: "Portfolio engagement",
      actionsPerWeek: "Total actions / week",
      vsPrev: "vs prev",
      distribution: "Health distribution",
      clientsLower: "clients",
      bandHealthy: (n: number) => `Healthy (${n}+)`,
      bandAttention: "Needs attention",
      bandAtRisk: (n: number) => `At risk (<${n})`,
      churnListTitle: "Churn risk · needs attention",
      noChurn: "No client below the at-risk threshold.",
      viewAll: "View all →",
      noLoginDays: (n: number) => `No login in ${n} days`,
      daysAgo: (n: number) => `${n}d ago`,
      moduleUtil: "Module utilization · portfolio avg",
      perMonth: "/mo",
      minutes: (n: number) => `${n}m`,
    },
    list: {
      searchPlaceholder: "Search a client…",
      new: "NEW",
      accounts: (n: number) => `${n} account${n !== 1 ? "s" : ""}`,
      columns: {
        company: "Company", plan: "Plan", vehicles: "Vehicles", users: "Users",
        active: "Active", modules: "Modules", trend: "Trend", health: "Health",
      },
      tabs: { all: "All", healthy: "Healthy", attention: "Attention", at_risk: "At risk" },
    },
    profile: {
      back: "Back to all clients",
      score: "/ 100",
      clientSince: (y: string) => `Client since ${y}`,
      tiles: { vehicles: "Vehicles", users: "Users", active: "Active", mau: "MAU" },
      tabs: { overview: "Overview", activity: "Activity & Logins", adoption: "Feature Adoption", behavior: "Behavior", benchmark: "Benchmark" },
      breakdown: "Health score breakdown",
      weight: (n: number) => `${n}% weight`,
      excluded: "Excluded (not applicable)",
      alerts: "Adoption & engagement alerts",
      noAlerts: "No active alerts — account is healthy.",
      engagementTrend: "Engagement trend",
      thisMonth: "This month", lastMonth: "Last month", actionsLower: "actions",
      fleetMaturity: "Fleet maturity",
      components: { activity: "User activity", adoption: "Module adoption", frequency: "Session frequency", completeness: "Data completeness", growth: "Growth trend" },
      maturityItems: {
        vehicles_data: "Vehicles data entered", employees: "Employees assigned", sites: "Sites created",
        suppliers: "Suppliers recorded", finance_documents: "Finance documents uploaded", fuel_energy: "Fuel & Energy tracked",
      },
      dau: "Daily active users", wau: "Weekly active users", mau: "Monthly active users",
      today: "today", last7: "last 7 days", last30: "last 30 days",
      loginAnalytics: "Login analytics", logins30d: "Logins · last 30 days", avgLoginsUser: "Avg logins / user",
      mostActive: "Most active users", inactiveUsers: "Inactive users",
      noLogin30: "No login in 30+ days", noLogin60: "No login in 60+ days", noLogin90: "No login in 90+ days",
      byModule: "Feature adoption · by module", ranking: "Utilization ranking", discovery: "Feature discovery timeline",
      status: { active: "Active", low: "Low usage", unused: "Unused", "n/a": "N/A" },
      threshold: (n: number) => `target ${n}`,
      workflow: "Workflow analysis · top navigation paths", avgSession: "Avg session",
      minutes: (n: number) => `${n} min`,
      heatmap: "Activity heatmap", byHour: "By hour of day", byWeekday: "By day of week",
      low: "Low", high: "High",
      annual: "Annual activity · last 12 months", activeDays: (n: number) => `${n} active days in the last year`,
      less: "Less", more: "More", lowActivity: "Low activity — few paths to show.",
      benchmarkTitle: "Benchmark vs all clients", benchmarkUnavailable: "Benchmark needs a computed snapshot set.",
      benchmarkAgainst: (n: number) => `Compared against the portfolio average across all ${n} other accounts.`,
      thisClient: "This client", peerAvg: "Peer avg", vsPeers: "vs peers",
      benchmarkSummary: (n: number) => `Underutilizing in ${n} of 5 metrics vs the portfolio average.`,
      benchmarkOutperforms: "Outperforms peers on all metrics.",
    },
    config: {
      scoreWeights: "Score weights", weightsHint: "Each component's contribution to the 0–100 score. Should total 100.",
      total: "Total",
      weights: { activity: "User activity", adoption: "Module adoption", frequency: "Session frequency", completeness: "Data completeness", growth: "Growth trend" },
      targets: "Targets & calibration",
      targetActions: "Target actions / user", targetLogins: "Target logins / user", growthBand: "Growth band",
      perMonth: "/month", band: "±% mapping to 0 and 100",
      moduleThresholds: "Per-module adoption thresholds",
      moduleThresholdsHint: "Usage % (per-vehicle) or minimum count (account/record) at which each module counts as adopted.",
      completenessItems: "Vehicle completeness items",
      tierCutoffs: "Health tier cut-offs", tierHealthy: "Healthy ≥", tierAtRisk: "At risk <",
      alertThresholds: "Alert thresholds",
      alerts: {
        inactivity_amber_days: "Inactivity — amber (business days)", inactivity_red_days: "Inactivity — red (business days)",
        weak_adoption_amber: "Weak adoption — amber (%)", weak_adoption_red: "Weak adoption — red (%)", tenure_gate_months: "Tenure gate (months)",
        weekly_drop_enabled: "Weekly active-user drop (1 = on)", monthly_drop_enabled: "Monthly active-user drop (1 = on)",
      },
      defaultPeriod: "Default reporting period",
      save: "Save changes", reset: "Reset to defaults",
      resetTitle: "Reset to defaults?", resetDescription: "This restores every scoring parameter to its shipped default value.",
      readOnly: "You have read-only access to this configuration.",
      toasts: { saved: "Configuration saved", reset: "Configuration reset to defaults" },
    },
    weekdays: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
  },
  activityLogs: {
    stats: {
      userActivity: "User activity",
      vehicleHistory: "Vehicle history",
      statusChanges: "Status changes",
      siteChanges: "Site changes",
      todayCount: (today: number, last30: number) => `${today} today, ${last30} this month`,
      last30Days: (n: number) => `${n} in the last 30 days`,
    },
    tabs: {
      activity: "Activity",
      vehicles: "Vehicles",
      statuses: "Statuses",
      sites: "Sites",
    },
    columns: {
      action: "Action",
      method: "Method",
      module: "Module",
      page: "Page",
      user: "User",
      ip: "IP",
      description: "Description",
      vehicle: "Vehicle",
      oldStatus: "Old status",
      newStatus: "New status",
      oldSite: "Old site",
      newSite: "New site",
    },
    search: {
      userActivity: "User (name, email) or exact IP...",
      vehicleHistory: "Search description, action...",
    },
    filters: {
      dateFrom: "From",
      dateTo: "To",
      vehicleActions: {
        archived: "Archived",
        unarchived: "Unarchived",
      },
    },
    export: {
      button: "Export",
      running: "Exporting...",
      done: (n: number) => `${n.toLocaleString("en-US")} row${n !== 1 ? "s" : ""} exported`,
      error: "The export failed",
    },
  },
  telematics: {
    tabs: {
      orders: "Orders",
      catalog: "Product catalog",
    },
    catalog: {
      subtitle:
        "Manage products available for order, their specifications, covered needs and prices.",
      addButton: "New product",
      searchPlaceholder: "Search by name, SKU, need or description...",
      empty: "No product",
      stats: {
        products: "Products",
        active: "Active",
        outOfStock: "Out of stock",
        stockValue: "Stock value",
      },
      filters: {
        category: "Category",
        allCategories: "All categories",
      },
      columns: {
        sku: "SKU",
        product: "Product",
        category: "Category",
        needs: "Needs covered",
        price: "Price excl. tax",
        stock: "Stock",
        status: "Status",
      },
      categories: {
        boitier: "Box",
        module: "Module",
        capteur: "Sensor",
        accessoire: "Accessory",
      },
      dialog: {
        titleCreate: "New product",
        titleEdit: "Edit product",
        submitCreate: "Create product",
        submitEdit: "Save",
      },
      fields: {
        sku: "SKU",
        skuPlaceholder: "TLT-FMC003",
        category: "Category",
        name: "Product name",
        namePlaceholder: "Teltonika FMC003",
        description: "Description",
        priceHt: "Price excl. tax (€)",
        stock: "Stock",
        statusActive: "Product active",
        needsCovered: "Needs covered",
        needsHelp: "Select the features provided by this product.",
        addCustomNeed: "Add a custom need...",
        addNeedButton: "Add",
        specifications: "Specifications",
        addSpec: "Add",
        specKeyPlaceholder: "Key",
        specValuePlaceholder: "Value",
      },
      toasts: {
        created: "Product created",
        updated: "Product updated",
        deleted: "Product deleted",
      },
      delete: {
        title: "Delete product",
        description: (name?: string) =>
          `Are you sure you want to delete "${name ?? ""}"?`,
      },
    },
    orders: {
      searchPlaceholder: "Search by reference, organization or product...",
      empty: "No order",
      stats: {
        total: "Total orders",
        pending: "Pending",
        inProgress: "In progress",
        installed: "Installed",
      },
      filters: {
        status: "Status",
        allStatuses: "All statuses",
      },
      columns: {
        reference: "Reference",
        organization: "Organization",
        products: "Boxes",
        quantity: "Quantity",
        delivery: "Delivery",
        date: "Date",
        totalHt: "Total excl. tax",
        status: "Status",
      },
      actions: {
        accept: "Accept",
        reject: "Reject",
        view: "View order",
      },
      lifecycle: {
        acceptTitle: "Accept order",
        acceptDescription:
          "The order will move to \"In progress\" and be forwarded to the supplier.",
        acceptOrderDateLabel: "Order date",
        acceptNotePlaceholder: "Internal note (optional)",
        rejectTitle: "Reject order",
        rejectDescription:
          "The order will be marked as \"Rejected\" and the fleet manager will be notified.",
        rejectReasonPlaceholder: "Rejection reason",
        confirm: "Confirm",
      },
      toasts: {
        accepted: "Order accepted",
        rejected: "Order rejected",
      },
    },
    orderDetail: {
      notFound: "Order not found",
      subtitle: (org: string, date: string) => `${org} · submitted on ${date}`,
      sections: {
        delivery: (n: number) => `Delivery (${n} site${n > 1 ? "s" : ""})`,
        needs: "Expressed needs",
        totalCommande: "Order total",
        ttc: "Incl. tax",
        summary: "Summary",
        dates: "Dates",
        demandeur: "Requester",
      },
      fields: {
        units: (n: number) => `${n} unit${n > 1 ? "s" : ""}`,
        unitPrice: (qty: number, price: string) => `${qty} × ${price}`,
        lines: "Lines",
        boxes: "Boxes",
        sites: "Sites",
        orderDate: "Order date",
        receivedDate: "Reception date",
        dateNotSet: "Not set",
        installation: "Installation",
        totalHt: "Total excl. tax",
        vat: (rate: number) => `VAT (${rate}%)`,
        totalTtc: "Total incl. tax",
        noNeeds: "No expressed need",
      },
    },
    requestInstallation: {
      action: "Request installation",
      title: "Start installation request",
      description:
        "Notify one or more installers: each proposes their slots, the client validates the one that suits them.",
      installerLabel: "Installer",
      installerPlaceholder: "Select an installer",
      vehiclesLabel: "Boxes",
      noInstallers: "No installer available.",
      missingInstaller: "Select at least one installer.",
      confirm: "Start request",
      success: "Installation request(s) started",
      step1Title: "Order delivered",
      step1Lead: (ref: string) =>
        `Order ${ref} — has just been delivered. Do you want to start the installation request?`,
      step1Heading: "An order has been delivered",
      step1Body: (boxes: number, location: string, vehicles: number) =>
        `${boxes} telematics box(es) to deliver to ${location}, for installation on ${vehicles} vehicle(s). Do you want to start the installation request?`,
      remindLater: "Remind me later",
      launch: "Start installation request",
      step2Title: "Order summary",
      step2Lead: (ref: string) =>
        `Order ${ref} — review the information before notifying installers.`,
      summaryTitle: "Order summary",
      boxesLabel: "Telematics boxes",
      qtyLabel: "Qty",
      clientLabel: "Client",
      deliveryLabel: "Delivery location",
      contactLabel: "On-site contact",
      sitesTitle: "Delivery sites",
      sitesCount: (n: number) => `${n} site${n > 1 ? "s" : ""}`,
      unitsLabel: (n: number) => `${n} box${n > 1 ? "es" : ""}`,
      noContact: "No contact provided",
      vehiclesTitle: "Vehicles",
      colPlate: "Plate",
      colVehicle: "Vehicle",
      colYear: "Year",
      colVin: "VIN",
      colBox: "Box",
      back: "Back",
      next: "Continue",
      step3Title: "Assign installers",
      step3Lead: (ref: string) =>
        `Order ${ref} — select the vehicles, then the installer(s) who will handle them.`,
      // Vehicle selection to assign (many-to-many relationship).
      selectVehiclesTitle: "Vehicles to assign",
      vehiclesSelectedCount: (n: number) => `${n} selected`,
      selectAll: "Select all",
      deselectAll: "Deselect all",
      allAssigned: "All vehicles are already assigned to an installer.",
      assignedTo: (name: string) => `Assigned to ${name}`,
      colAssignment: "Assignment",
      noVehicles: "No vehicle to install for this order.",
      // Grouping vehicles by delivery site.
      siteGroupNoSite: "No site",
      siteVehiclesCount: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""}`,
      selectSiteAll: "Select all",
      selectSiteNone: "Deselect all",
      // Building groups (vehicles → installers) before submission.
      assignSelected: (n: number) => `Assign ${n} vehicle${n !== 1 ? "s" : ""}`,
      pickInstallersTitle: "Choose installers",
      pickInstallersLead: (n: number) =>
        `For ${n} selected vehicle${n !== 1 ? "s" : ""}.`,
      confirmGroup: "Confirm group",
      groupBadge: (index: number, names: string) => `Group ${index} · ${names}`,
      groupsTitle: "Assignment groups",
      groupVehiclesCount: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""}`,
      remainingToAssign: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} left to assign`,
      allAssignedReady: "All vehicles are assigned.",
      submitGroups: (n: number) =>
        `Submit request (${n} group${n !== 1 ? "s" : ""})`,
      personnelTitle: "Installation staff",
      selectedCount: (n: number) => `${n} selected`,
      submit: (n: number) => `Submit request (${n})`,
      submitToast: (n: number) => `Email sent to ${n} installer${n !== 1 ? "s" : ""}`,
    },
    installerAvailabilities: {
      action: "Installer availabilities",
      title: "Installer availabilities",
      lead: (ref: string) => `Order ${ref} — responses from notified installers.`,
      responsesTitle: "Responses received",
      responsesCount: (responded: number, total: number) =>
        `${responded} / ${total}`,
      responded: "Responded",
      awaiting: "Pending",
      scheduledBanner: (date: string) => `Installation scheduled on ${date}`,
      scheduledWith: (name: string) => `with ${name}`,
      noResponses: "No installer notified for this order.",
      close: "Close",
      loadError: "Unable to load availabilities.",
    },
    markDelivered: {
      action: "Mark as delivered",
      success: "Order marked as delivered.",
      title: "Mark order as delivered",
      description:
        "The order will move to \"Delivered\". Enter the reception date.",
      receivedDateLabel: "Reception date",
      confirm: "Confirm",
    },
  },
  installers: {
    badge: "installer",
    searchPlaceholder: "Search for an installer...",
    noResults: "No installer matches your search.",
    empty: "No installer",
    emptyHint: "Members of the installation team will appear here.",
    archivedBadge: "archived",
    archivedSince: (date: string) => `Archived on ${date}`,
    archivedEmpty: "No archived installer",
    archivedEmptyHint: "Installers you archive will appear here.",
    tabs: {
      active: "Active",
      archived: "Archived",
    },
    details: "View details",
    since: (date: string) => `Since ${date}`,
    recentTitle: "Recent installations",
    noPlate: "No plate",
    deviceUnknown: "Unknown device",
    validatedCount: (n: number) => `${n} validated`,
    errorsCount: (n: number) => `${n} error${n !== 1 ? "s" : ""}`,
    stats: {
      installations: "Installations",
      okRate: "OK rate",
      avgMin: "Avg min",
    },
    manage: {
      add: "Add installer",
      edit: "Edit",
      delete: "Delete",
      createTitle: "New installer",
      editTitle: "Edit installer",
      createLead: "Create an installer account. They will use it to sign in to the app.",
      editLead: "Update the installer's name and email.",
      nameLabel: "Name",
      namePlaceholder: "Full name",
      emailLabel: "Email",
      emailPlaceholder: "installer@example.com",
      passwordLabel: "Password",
      passwordPlaceholder: "At least 8 characters",
      passwordConfirmLabel: "Confirm password",
      cancel: "Cancel",
      save: "Save",
      create: "Create",
      createSuccess: "Installer created.",
      updateSuccess: "Installer updated.",
      passwordMismatch: "Passwords do not match.",
      // Password change
      changePassword: "Change password",
      passwordTitle: "Change password",
      passwordLead: (name: string) => `Set a new password for ${name}.`,
      newPasswordLabel: "New password",
      passwordSuccess: "Password updated.",
      // Archive (soft delete of an active installer)
      archive: "Archive",
      archiveTitle: "Archive installer",
      archiveConfirm: (name: string) =>
        `Are you sure you want to archive ${name}? You can restore them later.`,
      archiveSuccess: "Installer archived.",
      // Restore
      restore: "Restore",
      restoreSuccess: "Installer restored.",
      // Permanent deletion (irreversible)
      deleteForever: "Delete permanently",
      deleteTitle: "Delete permanently",
      deleteConfirm: (name: string) =>
        `Are you sure you want to permanently delete ${name}? This action cannot be undone.`,
      deleteSuccess: "Installer permanently deleted.",
    },
  },
  installations: {
    searchPlaceholder: "Search by plate, IMEI, model...",
    empty: "No installation",
    emptyHint: "Installations performed by the team will appear here.",
    results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
    stats: {
      total: "Total",
      validated: "Validated",
      toFix: "To fix",
      pending: "Pending",
      avgMin: "Avg min",
    },
    filters: {
      title: "Filters",
      status: "Status",
      allStatuses: "All statuses",
      installer: "Installer",
      allInstallers: "All installers",
      dateFrom: "From",
      dateTo: "To",
      reset: "Reset",
    },
    statusLabels: {
      in_progress: "In progress",
      validated: "Validated",
      gps_error: "To fix",
      pending: "Pending",
    } as Record<string, string>,
    card: {
      noPlate: "No license plate",
      deviceUnknown: "Unknown device",
      fleetVehicle: (id: number) => `Fleet #${id}`,
      photos: (n: number) => `${n} photo${n !== 1 ? "s" : ""}`,
      minutes: (n: number) => `${n} min`,
    },
    edit: {
      title: "Edit installation",
      backToList: "Back to list",
      next: "Next",
      previous: "Previous",
      save: "Save",
      saveAndValidate: "Save and validate",
      saving: "Saving…",
      savedToast: "Installation saved",
      saveError: "Saving failed.",
      steps: {
        vehicle: "Vehicle",
        device: "Device",
        wiring: "Wiring & accessories",
        summary: "Summary",
      },
      summaryHint:
        "Review the information then save. “Save and validate” applies the changes and finalizes the installation.",
    },
    detail: {
      notFound: "Installation not found",
      actions: {
        edit: "Edit",
        validate: "Validate installation",
        validating: "Validating…",
        save: "Save",
        saving: "Saving…",
        cancel: "Cancel",
        editTitle: "Edit installation",
        incomplete: "Installation incomplete:",
        actionError: "The action failed. Please retry.",
        addWiring: "Add wire",
        unlinkFleet: "Unlink from fleet",
        fleetSearchPlaceholder: "Search a plate or VIN in the fleet…",
        fleetSearchEmpty: "No vehicle found",
      },
      sections: {
        intervention: "Intervention",
        vehicle: "Vehicle",
        device: "Device",
        wiring: "Wiring",
        validation: "GPS validation",
        accessories: "Accessories",
        photos: "Photos",
        notes: "Comments",
      },
      fields: {
        installer: "Installer",
        interventionDate: "Intervention date",
        location: "Location",
        duration: "Duration",
        licensePlate: "License plate",
        vin: "VIN",
        fleetVehicle: "Fleet vehicle",
        fleetLinked: (id: number) => `Linked — vehicle #${id}`,
        fleetNotLinked: "Not linked to the fleet",
        odometer: "Odometer (entered)",
        hourMeter: "Hour meter (entered)",
        fuelLevel: "Fuel level (entered)",
        odometerGps: "Odometer (GPS test)",
        hourMeterGps: "Hour meter (GPS test)",
        fuelLevelGps: "Fuel level (GPS test)",
        model: "Model",
        productLine: "Product line",
        telematicsBox: "Box (catalog)",
        imei: "IMEI",
        stockOrigin: "Stock origin",
        canModule: "CAN module",
        canModuleType: "CAN module type",
        simIccid: "SIM ICCID",
        simOperator: "SIM operator",
        simApn: "SIM APN",
        contactDetected: "Contact detected",
        gpsDate: "GPS position on",
        gpsAddress: "GPS address",
        satellites: "Satellites",
        wire: "Wire",
        accessory: "Accessory",
      },
      fuelLevels: {
        none: "Empty",
        quarter: "1/4",
        half: "1/2",
        three_quarters: "3/4",
        full: "Full",
      } as Record<string, string>,
      stockOrigins: {
        client: "Client stock",
        installer: "Installer stock",
        both: "Mixed",
      } as Record<string, string>,
      photoTypes: {
        vin: "VIN",
        before_install: "Before installation",
        after_install: "After installation",
        device_position: "Device position",
        incident: "Incident",
      } as Record<string, string>,
    },
  },
  antai: {
    searchPlaceholder: "Search by company, vehicle, plate or VIN...",
    empty: "No vehicle",
    refresh: "Refresh",
    queuedHint: "Processing is queued — refresh to see the result.",
    stats: {
      total: "Total vehicles",
      visible: "ANTAI visible",
      hidden: "Hidden",
      exceptions: "Exceptions",
      openExceptions: (n: number) => `${n} open`,
      archivedSuffix: (n: number) => `incl. ${n} archived`,
    },
    sort: {
      label: "Sort",
      recentSync: "Recent sync",
      oldestSync: "Oldest sync",
      plateAsc: "Plate A-Z",
      plateDesc: "Plate Z-A",
      newest: "Newest",
      oldest: "Oldest",
    },
    filters: {
      title: "Filters",
      company: "Company",
      companyStatus: "Company account",
      vehicleStatus: "Vehicle status",
      visibility: "ANTAI visibility",
      binding: "Binding",
      archived: "Archiving",
      unbindingReason: "Unbinding reason",
      exceptionType: "Exception type",
      exceptionStatus: "Exception status",
      reset: "Reset",
      activeCount: (n: number) => `${n} active`,
    },
    columns: {
      vehicle: "Vehicle",
      vin: "VIN",
      company: "Company",
      vehicleStatus: "Status",
      visibility: "ANTAI visibility",
      binding: "Binding",
      archive: "Archiving",
      exception: "Exception",
      lastUpdate: "Last update",
    },
    actions: {
      view: "View details",
      enable: "Enable visibility",
      disable: "Disable visibility",
      manageException: "Manage exception",
    },
    enable: {
      title: "Enable ANTAI visibility",
      description: (name: string) => `Vehicle "${name}" will be added to ANTAI (Visible status).`,
    },
    disable: {
      title: "Disable ANTAI visibility",
      description: (name: string) => `Vehicle "${name}" will be removed from ANTAI (Hidden status).`,
      reasonLabel: "Reason",
    },
    bulk: {
      selected: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} selected`,
      enable: "Enable visibility",
      disable: "Disable visibility",
      clear: "Clear selection",
      enableTitle: "Enable visibility (bulk)",
      enableDescription: (n: number) =>
        `ANTAI visibility will be enabled for ${n} vehicle${n !== 1 ? "s" : ""}. Processing is queued.`,
      disableTitle: "Disable visibility (bulk)",
      disableDescription: (n: number) =>
        `ANTAI visibility will be disabled for ${n} vehicle${n !== 1 ? "s" : ""}. Processing is queued.`,
      queued: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} queued`,
    },
    cascade: {
      action: "Disable all ANTAI vehicles",
      title: "Disable company vehicles",
      description: (company: string) =>
        `Every non-hidden vehicle of "${company}" will be removed from ANTAI (reason: company disabled). Processing is queued.`,
      queued: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} queued`,
    },
    exception: {
      badge: (type: string, status: string) => `${type} · ${status}`,
      title: "Manage exception",
      subtitle: "Resolution tracking. This does not change the real ANTAI state — use Enable/Disable for that.",
      statusLabel: "Resolution status",
      typeLabel: "Exception type",
      resolutionLabel: "Resolution",
      resolutionHelp: "Can the issue be resolved internally or does it require external intervention (ANTAI)?",
      detailLabel: "Detail",
      detailPlaceholder: "Tracking notes, ANTAI ticket reference...",
      detailMaxLength: "Detail cannot exceed 2000 characters",
      none: "None",
      submit: "Save",
      resolvedAt: (date: string) => `Resolved on ${date}`,
      updated: "Exception updated",
    },
    toasts: {
      enabled: "Visibility enabled",
      disabled: "Visibility disabled",
    },
    detail: {
      notFound: "Vehicle not found",
      sections: {
        antaiStatus: "ANTAI state",
        vehicle: "Vehicle",
        company: "Company",
        exception: "Exception",
      },
      fields: {
        plate: "Plate",
        vin: "VIN",
        mark: "Make",
        model: "Model",
        motorType: "Engine",
        vehicleStatus: "Vehicle status",
        companyAccount: "Company account",
        visibility: "ANTAI visibility",
        binding: "Binding",
        archive: "Archiving",
        unbindingReason: "Unbinding reason",
        clientCode: "ANTAI client code",
        lastUpdate: "Last synchronization",
        createdAt: "Created on",
        exceptionType: "Type",
        exceptionStatus: "Status",
        exceptionResolution: "Resolution",
        exceptionDetail: "Detail",
        resolvedAt: "Resolved on",
      },
    },
    enums: {
      visibility: {
        visible: "Visible",
        hidden: "Hidden",
        exception: "Exception",
      },
      binding: {
        bound: "Bound",
        unbound: "Unbound",
        exception: "Exception",
      },
      companyStatus: {
        active: "Active",
        disabled: "Disabled",
      },
      archived: {
        active: "Active",
        archived: "Archived",
      },
      unbindingReason: {
        manual: "Manual",
        company_disabled: "Company disabled",
        external_removal: "External removal",
        exception: "Exception",
      },
      exceptionType: {
        already_linked_other_client: "Already linked to another client code",
        removed_externally: "Removed externally",
        sync_failure: "Synchronization failure",
        antai_rejection: "ANTAI rejection",
        other: "Other",
      },
      exceptionStatus: {
        open: "Open",
        in_progress: "In progress",
        resolved: "Resolved",
      },
      exceptionResolution: {
        internal: "Internal",
        external: "External",
      },
      disableReason: {
        manual: "Manual",
        external_removal: "External removal",
        company_disabled: "Company disabled",
      },
    },
  },
  internalUsers: {
    inviteButton: "Invite a user",
    roleSettingsButton: "Role settings",
    searchPlaceholder: "Search by name or email...",
    empty: "No internal user found",
    noActivity: "—",
    stats: {
      total: "Total",
      active: "Active",
      invited: "Invitations",
      suspended: "Suspended",
    },
    filters: {
      role: "Role",
      allRoles: "All roles",
      status: "Status",
      allStatuses: "All statuses",
    },
    columns: {
      user: "User",
      role: "Role",
      status: "Status",
      lastActivity: "Last activity",
      createdAt: "Created at",
    },
    actions: {
      edit: "Edit",
      permissions: "Permissions",
      resendInvitation: "Resend invitation",
      delete: "Delete",
    },
    roleLabels: {
      super_admin: "Super Admin",
      admin: "Admin",
      support: "Support",
      commercial: "Commercial",
      read_only: "Read only",
    } as Record<string, string>,
    statusLabels: {
      active: "Active",
      invited: "Invited",
      suspended: "Suspended",
    } as Record<string, string>,
    permissionLabels: {
      "tickets.manage": "Manage tickets",
      "tickets.view": "View tickets",
      "companies.manage": "Manage companies",
      "users.manage": "Manage client users",
      "internal.manage": "Manage internal users",
      "telematic.manage": "Manage telematics orders",
      "catalog.manage": "Manage product catalog",
      "subscriptions.manage": "Manage subscriptions",
      "admin_vehicles.manage": "Manage vehicles",
      "logs.view": "View logs",
      "rfid.manage": "Manage RFID cards",
      "impersonate.use": "Impersonate users",
      "donna.manage": "Manage Donna",
    } as Record<string, string>,
    invite: {
      title: "Invite a user",
      subtitle: "An invitation email will be sent.",
      submit: "Send invitation",
    },
    edit: {
      title: "Edit user",
      subtitle: "Update the member's information.",
      submit: "Save",
    },
    form: {
      fullName: "Full name",
      email: "Email",
      role: "Role",
      status: "Status",
    },
    roleHint: (role: string, count: number) =>
      `The ${role} role includes ${count} permission(s) by default. You can adjust them from the « Permissions » action.`,
    permissionsDialog: {
      title: (name: string) => `Permissions of ${name}`,
      baseRole: (role: string) => `Base role: ${role}`,
      modified: "Modified",
    },
    roleSettings: {
      title: "Role settings",
      subtitle: "Define default permissions for each role.",
    },
    delete: {
      title: "Delete user",
      description: (name?: string) =>
        `Are you sure you want to delete "${name ?? ""}"?`,
    },
    toasts: {
      invited: "Invitation sent",
      updated: "User updated",
      deleted: "User deleted",
      invitationResent: "Invitation resent",
      permissionsSaved: "Permissions saved",
      roleUpdated: "Role updated",
    },
  },
  dormantAccounts: {
    hint: "Free accounts left unused for the time their plan sets (the \"Closing after inactivity\" setting, 12 months on the free plan): warned by e-mail 30 days before, then closed. A closed account keeps all its data; \"Restore\" gives its users their access back.",
    searchPlaceholder: "Search a company or an e-mail...",
    empty: "No dormant account",
    status: { all: "All", notified: "Warned", closed: "Closed", restored: "Restored" },
    badges: { notified: "Warned", closed: "Closed", restored: "Restored" },
    columns: { company: "Company", lastActivity: "Last activity", status: "State", action: "" },
    notified: (on: string, closeOn: string) => `Warned on ${on} · closing on ${closeOn}`,
    closed: (date: string) => `Closed on ${date}`,
    restored: (date: string, who?: string | null) => (who ? `Restored on ${date} by ${who}` : `Restored on ${date}`),
    restore: "Restore",
    confirm: {
      title: "Restore this account?",
      description: (name?: string) =>
        `${name ?? "This account"} gets its access back: its users can sign in to Dadycar Fleet and DadycarGo again, with all their data. The inactivity count starts again from today.`,
    },
    toasts: { restored: "Account restored" },
  },
  upsellSignals: {
    hint: "Companies that hit a limit of their plan: to call. New signals also go to the sales team by e-mail each morning.",
    searchPlaceholder: "Search a company or an e-mail...",
    empty: "No signal",
    status: { open: "To follow", handled: "Handled", all: "All" },
    allKinds: "All signals",
    columns: {
      company: "Company",
      contact: "Contact",
      signal: "Signal",
      occurrences: "Times",
      lastSeen: "Last",
      follow: "Follow-up",
    },
    vehicles: (n: number) => `${n} vehicle${n > 1 ? "s" : ""}`,
    seenAgain: "again",
    handledBy: (who: string, date: string) => `Handled by ${who} on ${date}`,
    handledOn: (date: string) => `Handled on ${date}`,
    markHandled: "Mark handled",
    reopen: "Reopen",
    toasts: { handled: "Signal marked handled", reopened: "Signal reopened" },
  },
  entitlements: {
    planButton: "Features",
    planTitle: (name: string) => `Features — ${name}`,
    planHint: "What the plan includes. A module not listed follows the plan's default.",
    defaultLabel: "Default behaviour",
    states: { allow: "Included", preview: "Preview", deny: "Excluded" },
    capabilities: "Modules",
    quotas: "Limits",
    fromDefault: "default",
    unlimited: "Unlimited",
    periods: { lifetime: "Lifetime", month: "Per month" },
    counters: { live: "Counted from the data", setting: "Setting" } as Record<string, string>,
    save: "Save",
    saved: "Features saved",
    unlimitedPlanNotice: "This plan is unlimited: it includes everything, whatever these lines say.",
    search: "Search…",
    companyMenu: "Plan and features",
    companyTitle: (name: string) => `Plan and features — ${name}`,
    companyHint: "The company's plan, and the exceptions that apply to it only.",
    plan: "Plan",
    noPlan: "No plan",
    planChanged: "Company plan updated",
    planState: "Plan",
    effective: "Effective",
    override: "Exception",
    setOverride: "Exception",
    removeOverride: "Remove",
    overrideTitle: (label: string) => `Exception — ${label}`,
    overrideSaved: "Exception saved",
    overrideRemoved: "Exception removed",
    note: "Note",
    expiresAt: "Until (optional)",
    expired: "expired",
    used: "Used",
    limit: "Ceiling",
    planLimit: "Plan ceiling",
    resetUsage: "Reset",
    usageReset: "Counter reset",
    cancel: "Cancel",
  },
  store: {
    hint: "The modules sold in the Fleet Store. Each client activates them from their own app.",
    columns: { order: "Order", module: "Module", category: "Category", price: "Price € excl. VAT / month", published: "Publication", server: "Server", clients: "Active clients" },
    published: "Published",
    unpublished: "Hidden",
    availableOnServer: "Available on this server",
    disabledOnServer: "Disabled on the server",
    empty: "No module",
    editTitle: (name: string) => `Module — ${name}`,
    fields: {
      name: "Name",
      tagline: "Tagline",
      problem: "Problem",
      solution: "Solution",
      gains: "Gains",
      where: "Where to find it",
      needs: "Requirements (optional)",
      icon: "Icon",
      category: "Category",
      path: "Path in Fleet",
      price: "Price € excl. VAT / month",
      published: "Published in the Store",
      position: "Order",
    },
    icons: { sectors: "Sectors", truck: "Truck", trend: "Trend", book: "Book", invoice: "Invoice" },
    categories: ["Exploitation", "Coûts et finance"],
    addLine: "Add a line",
    removeLine: "Remove the line",
    saved: "Module saved",
    save: "Save",
    cancel: "Cancel",
    companyMenu: "Store",
    companyTitle: (name: string) => `Store — ${name}`,
    companyHint: "The client activates and deactivates modules themselves. Here, only their discount per module (100 % = free).",
    status: {
      available: "Available",
      active: (date: string) => `Active since ${date}`,
      ending: (date: string) => `Ends on ${date}`,
      locked: "Paid plan required",
    },
    module: "Module",
    price: "Price",
    discount: "Discount",
    finalPrice: "Final price",
    perMonth: "€ excl. VAT / month",
    history: (n: number) => `History (${n})`,
    noHistory: "Never activated",
    ongoing: "ongoing",
    by: (name: string) => `by ${name}`,
    discountTitle: (name: string) => `Discount — ${name}`,
    percent: "Discount (%)",
    note: "Note (optional)",
    offer: "Offer (100 %)",
    setDiscount: "Discount",
    removeDiscount: "Remove the discount",
    discountSaved: "Discount saved",
    discountRemoved: "Discount removed",
    percentInvalid: "The discount must be between 0 and 100",
  },
  // Plan changes during the month and cancellation (billing automation, part 2).
  subscriptionChanges: {
    title: "Subscription",
    confirmPlanTitle: (name: string) => `Move to the ${name} plan`,
    appliesNow: "The change applies at once. The rights follow the plan from the next request.",
    supplement: (amount: string, vehicles: number, days: number, month: number) =>
      `This month: +${amount} excl. VAT added to the next invoice (${vehicles} vehicles, ${days} days out of ${month}).`,
    credit: (amount: string, vehicles: number, days: number, month: number) =>
      `This month: ${amount} excl. VAT deducted from the next invoice (${vehicles} vehicles, ${days} days out of ${month}).`,
    noAdjustment: "No adjustment on the current month.",
    nextMonth: (vehicles: number, amount: string) =>
      `Then, each month: ${vehicles} vehicle${vehicles > 1 ? "s" : ""} = ${amount} excl. VAT.`,
    // Billed by its vehicles' plans: the offer moves on the vehicles holding it, the other plans stay.
    nextMonthVehiclePlans: (vehicles: number, amount: string) =>
      `Then, each month: the plans of ${vehicles} vehicle${vehicles > 1 ? "s" : ""} = ${amount} excl. VAT.`,
    confirmChange: "Confirm the change",
    planChanged: "Plan changed",
    noCancellation: "No cancellation in progress.",
    endsOn: (date: string, source: string) => `Cancellation scheduled: ends on ${date} (requested by ${source}).`,
    endedOn: (date: string) => `Subscription ended on ${date}.`,
    reason: "Reason",
    sources: { client: "the client", admin: "Dadycar" },
    cancel: "Cancel subscription",
    cancelTitle: "Cancel the subscription",
    cancelHint: "Access stays open until the end date included; no invoice is issued for the following months. Default: the end of the current month, already invoiced.",
    endDate: "End date",
    reasonPlaceholder: "Reason (optional)",
    confirmCancel: "Confirm the cancellation",
    cancelled: "Cancellation recorded",
    undo: "Undo the cancellation",
    undone: "Cancellation undone",
    pending: "On the next invoice",
    history: "History",
    kinds: {
      vehicle_plans: "Vehicle plans",
      plan_change: "Plan change",
      cancellation: "Cancellation",
      cancellation_undone: "Cancellation undone",
      trial_started: "Trial started",
      trial_stopped: "Trial stopped by the client",
      trial_resumed: "Trial resumed",
      trial_converted: "End of the trial: paid plan",
      trial_ended: "End of the trial: free plan",
    },
    trialUntil: (date: string) => `until ${date}`,
    trialEndsOn: (date: string) => `ends on ${date}`,
    trialRunning: (plan: string, date: string, how: string) => `${plan} trial until ${date}, ${how}: billed from the day after.`,
    trialStopped: (date: string) => `Trial stopped by the client: back on the free plan after ${date}, nothing billed.`,
    trialConverted: (from: string, to: string) => `Trial from ${from} to ${to}, then the paid plan.`,
    trialEnded: (from: string, to: string) => `Trial from ${from} to ${to}, then back on the free plan.`,
    trialCard: (brand: string, last: string) => `${brand} card •••• ${last}`,
    trialSepa: "SEPA direct debit",
    date: "Date",
    event: "Event",
    by: "By",
    invoiced: "invoiced",
    empty: "No change recorded.",
    close: "Close",
    frequencies: { monthly: "monthly", yearly: "yearly", quarterly: "quarterly", half_yearly: "half-yearly" },
  },
  compliance: {
    scope: {
      label: "KPI scope",
      allCompanies: "All clients",
      kpisFor: (name: string) => `Indicators for ${name}`,
    },
    computedAt: (date: string) => `Last computed: ${date}`,
    recompute: "Recompute",
    recomputeQueued: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} queued for recompute`,
    mockBanner: "Demo data: the /compliance API is not connected yet.",
    loadError: "Unable to load fleet compliance.",
    kpis: {
      averageScore: "Average fleet score",
      averageScoreSub: (n: number) => `across ${n} tracked vehicle${n !== 1 ? "s" : ""}`,
      distribution: "Vehicle breakdown",
      taxBlocked: "TAI tax blocked",
      taxBlockedSub: "Vehicles without CO2: TAI/TVS cannot be computed",
      deadlines: "Overdue deadlines",
      deadlinesSub: (d30: number, d90: number) => `${d30} within 30 d · ${d90} within 90 d`,
      alerts: "Alerts sent (30 d)",
      alertsSub: (n: number) => `${n} resolved after alert`,
    },
    status: { compliant: "Compliant", incomplete: "Incomplete", critical: "Critical" },
    statusPlural: { compliant: "Compliant", incomplete: "Incomplete", critical: "Critical" },
    severity: { critical: "Critical", high: "High", medium: "Medium", low: "Info" },
    categories: {
      identification: "Identification",
      fiscal: "Tax & CO2",
      telematics: "Telematics",
      finance: "Financing",
      documents: "Documents",
      driver: "Driver",
      deadlines: "Deadlines",
      antai: "ANTAI",
      extras: "Equipment",
    },
    categoryCard: {
      complete: (pct: number) => `${pct}% complete`,
      missing: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} to complete`,
    },
    topMissing: {
      title: "Most frequently missing",
      subtitle: "Click a row to filter the table",
    },
    tabs: { vehicles: "Vehicles", companies: "Companies", alerts: "Alerts sent" },
    quickFilters: {
      all: "All",
      critical: "Critical",
      noCo2: "No CO2",
      noTelematics: "No telematics",
      documents: "Missing documents",
      finance: "Incomplete financing",
      deadlines: "Deadlines",
    },
    filters: {
      severity: "Severity",
      fuel: "Energy",
      category: "Category",
      status: "Status",
      missing: "Missing item",
      reset: "Reset",
      searchVehicles: "Plate, VIN, model, company...",
      searchCompanies: "Search a company...",
    },
    columns: {
      vehicle: "Vehicle",
      company: "Company / Site",
      score: "Score",
      status: "Status",
      missing: "Detected gaps",
      nextDeadline: "Next deadline",
      lastAlert: "Last alert",
      vehicles: "Vehicles",
      averageScore: "Average score",
      topMissing: "Top gaps",
      date: "Date",
      target: "Target",
      sentBy: "Sent by",
      channels: "Channels",
      resolution: "Resolution",
    },
    actions: {
      view: "View details",
      alert: "Alert the company",
      openFleet: "Open in Dadycar Fleet",
      viewVehicles: "View its vehicles",
      digest: "Send a digest",
    },
    noMissing: "Nothing missing",
    never: "Never",
    empty: "No vehicle matches these filters",
    deadlineTypes: {
      technical_control: "Technical inspection",
      maintenance: "Maintenance",
      contract_end: "Contract end",
      insurance: "Insurance",
      licence: "Licence",
    },
    deadlineStatus: { overdue: "Overdue", due_soon: "Soon", upcoming: "Upcoming" },
    sheet: {
      checklist: "Compliance checklist",
      documents: "Documents",
      deadlines: "Deadlines",
      financing: "Financing",
      driver: "Driver",
      alerts: "Alert history",
      warnings: "Points of attention",
      noAlerts: "No alert sent for this vehicle",
      noDeadlines: "No deadline recorded",
      notApplicable: "Not applicable",
      missingValue: "Missing",
      required: "Required",
      optional: "Optional",
      notRequired: "Not required",
      present: "Provided",
      absent: "Missing",
      expires: (date: string) => `Expires on ${date}`,
      passedCount: (ok: number, total: number) => `${ok}/${total}`,
    },
    documents: {
      CG: "Registration certificate",
      CA: "Insurance certificate",
      CL: "Signed LLD/LOA contract",
      CT: "Technical inspection report",
      CJ: "Green card",
      invoice: "Purchase invoice",
    },
    financingModes: { lld: "Long-term lease", loa: "Lease with purchase option", credit: "Loan", cash: "Cash purchase" },
    financingFields: {
      mode: "Mode",
      lessor: "Lessor",
      contractNumber: "Contract no.",
      period: "Period",
      kmLimit: "Mileage allowance",
      monthlyRent: "Monthly rent (excl. VAT)",
      duration: "Duration",
      months: (n: number) => `${n} months`,
    },
    driverFields: { name: "Assigned driver", licence: "Driving licence", none: "No assigned driver" },
    licenceStatus: { active: "Valid", expiring_soon: "Expiring soon", expired: "Expired", missing: "Not provided" },
    alertDialog: {
      vehicleTitle: (plate: string) => `Alert the company: ${plate}`,
      companyTitle: (name: string) => `Digest: ${name}`,
      description: "Check the message before sending. It is generated from the missing items.",
      recipients: "Recipients",
      subject: "Subject",
      message: "Message",
      channels: "Channels",
      email: "Email",
      inApp: "Dadycar Fleet notification",
      vehiclesCovered: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} covered`,
      recentlySent: (date: string) => `An alert was sent recently. Next send allowed on ${date}.`,
      force: "Send anyway",
      send: "Send alert",
      sent: "Alert sent",
      noChannel: "Pick at least one channel",
    },
    alertsTab: {
      digest: "Company digest",
      resolved: "Resolved",
      pending: "Pending",
      channels: { email: "Email", in_app: "In-app" },
      missingCount: (n: number) => `${n} gap${n !== 1 ? "s" : ""}`,
    },
    rules: {
      "identity.numberplate": "Registration plate",
      "identity.vin": "Chassis number (VIN)",
      "identity.make_model": "Make & model",
      "identity.category": "Category (VP / VU / VF)",
      "identity.first_registration": "First registration date",
      "identity.park_entry": "Fleet entry date",
      "identity.site": "Site / branch",
      "identity.odometer": "Up-to-date odometer (< 90 d)",
      "fiscal.co2": "CO2 emissions (WLTP g/km)",
      "fiscal.energy": "Energy / fuel",
      "fiscal.crit_air": "Crit'Air sticker",
      "fiscal.fiscal_power": "Fiscal horsepower (CV)",
      "fiscal.aen_mode": "Benefit-in-kind method",
      "telematics.connected": "Telematics connected",
      "telematics.device": "Box or OEM connector",
      "finance.mode": "Financing mode",
      "finance.lessor": "Lessor",
      "finance.contract_number": "Lease contract number",
      "finance.contract_dates": "Contract start and end dates",
      "finance.km_limit": "Mileage allowance",
      "finance.monthly_rent": "Monthly rent (excl. VAT)",
      "finance.duration": "Contract duration",
      "documents.carte_grise": "Registration certificate",
      "documents.insurance": "Insurance certificate",
      "documents.insurance_valid": "Valid insurance",
      "documents.leasing_contract": "Signed LLD/LOA contract",
      "documents.purchase_invoice": "Purchase invoice",
      "documents.technical_control": "Technical inspection report",
      "driver.assigned": "Assigned driver",
      "driver.licence": "Valid driving licence",
      "deadline.technical_control": "Technical inspection up to date",
      "deadline.maintenance": "Maintenance scheduled and up to date",
      "deadline.contract_end": "Lease contract running",
      "antai.binding": "ANTAI binding",
      "extras.fuel_card": "Fuel card",
      "extras.toll_badge": "Toll badge",
      "extras.duplicate_keys": "Duplicate keys",
    },
  },
  announcements: {
    mockBanner: "Demo data: the /announcements API is not connected yet.",
    newButton: "New announcement",
    menuLabels: {
      button: "Menu labels",
      shown: "Shown",
      text: "Text",
      textPlaceholder: "Beta",
      save: "Save",
      saved: "Label saved: Fleet shows it on the next page load.",
      help: "A label shows beside the menu entry, for every client. Empty text: “BETA”.",
      readOnly: "Read only: changing a label needs the publish right.",
      loadError: "Fleet's menu could not be loaded.",
      loading: "Loading the menu…",
    },
    states: {
      draft: "Draft",
      scheduled: "Scheduled",
      live: "Live",
      ended: "Ended",
      archived: "Archived",
    },
    formats: {
      badge: { name: "\"New\" badge", use: "Small feature: a \"New\" mark on a menu entry or an element. Not intrusive." },
      sidebar_spotlight: { name: "Menu spotlight", use: "A feature in a new or moved menu entry: a short popover on that entry." },
      banner: { name: "Banner", use: "Medium feature or news for everybody: a dismissible bar at the top of a page." },
      modal: { name: "Modal", use: "Major launch only. One per user per day." },
      page_widget: { name: "Step card", use: "Explain a page in 2 to 4 steps, in a floating card." },
      tour: { name: "Guided tour", use: "Steps that point at precise buttons of a page." },
    },
    singleStepTour: "Tooltip on an element",
    singleStepTourHelp: "A one-step guided tour: a tooltip pointing at one button.",
    practicesTitle: "Good practices",
    practices: [
      "Match the format to the importance: a badge for small features, a banner for medium ones, a modal for major launches.",
      "Cap the frequency: few messages per session and per day.",
      "Target: showing a feature to users who cannot use it creates fatigue.",
      "Adoption is a sequence: make it known, explain it, then remind if the feature is still unused.",
      "Measure usage, not impressions: success means more users really use the feature.",
    ],
    list: {
      searchPlaceholder: "Search by title or key…",
      allStates: "All",
      allFormats: "All formats",
      columns: {
        title: "Announcement",
        format: "Format",
        state: "State",
        dates: "Period",
        audience: "Audience",
        seen: "Seen",
        clicked: "Clicked",
        completed: "Completed",
        results: "Seen · Clicked · Completed",
      },
      empty: "No announcements yet. Create the first one with \"New announcement\".",
      from: (d: string) => `From ${d}`,
      until: (d: string) => `to ${d}`,
      noEnd: "no end",
      immediately: "From publication",
      audienceEveryone: "All users",
      audienceParts: (n: number) => `${n} criteri${n > 1 ? "a" : "on"}`,
      round: (n: number) => `Round ${n}`,
    },
    actions: {
      edit: "Edit",
      duplicate: "Duplicate",
      publish: "Publish",
      unpublish: "Unpublish",
      archive: "Archive",
      delete: "Delete",
      reset: "Reset",
      preview: "Preview in Fleet",
      stats: "Statistics",
      saveDraft: "Save",
      saving: "Saving…",
      back: "Back to announcements",
    },
    confirm: {
      cancel: "Cancel",
      deleteTitle: "Delete this draft?",
      deleteBody: "The draft is deleted permanently.",
      archiveTitle: "Archive this announcement?",
      archiveBody: "It is no longer shown. Its statistics are kept.",
      unpublishTitle: "Unpublish this announcement?",
      unpublishBody: "It is no longer shown and becomes a draft again. It can be published again.",
      resetTitle: "Reset the announcement?",
      resetBody: (n: number) =>
        `Everybody will see it again: ${n.toLocaleString("en-US")} user${n > 1 ? "s" : ""} of the audience. A new round starts; the statistics of previous rounds are kept.`,
      resetReason: "Reason (optional)",
      resetReasonPlaceholder: "E.g. corrected text, new version of the feature",
    },
    toasts: {
      saved: "Announcement saved",
      published: "Announcement published",
      scheduled: "Announcement scheduled",
      unpublished: "Announcement unpublished",
      archived: "Announcement archived",
      deleted: "Draft deleted",
      duplicated: "Copy created as a draft",
      reset: "New round started",
      fixErrors: "Fix the highlighted fields.",
    },
    editor: {
      newTitle: "New announcement",
      editTitle: "Edit announcement",
      tabEditor: "Editor",
      sections: {
        format: { title: "Format", help: "How the announcement is shown. Choose according to how important the feature is." },
        content: { title: "Content", help: "French is required. Without English, Fleet shows the French." },
        placement: { title: "Where it shows", help: "Page, element of the page, then position. Everything is chosen from lists." },
        steps: { title: "Steps", help: "Add, remove and order the steps." },
        audience: { title: "Audience", help: "Who may see it. The user count updates on every change." },
        schedule: { title: "Schedule and rules", help: "All dates are Paris time." },
        adoption: { title: "Measure, remind, notify", help: "Success is measured by the use of the feature." },
      },
      key: "Key",
      keyHelp: "Unique identifier, generated from the title. Editable until the first publication.",
      keyLocked: "Locked since the first publication.",
      title: "Title",
      body: "Text",
      badgeText: "Badge text",
      chipText: "Label text",
      chipTextHelp: "The small label at the top of the card. Empty: “New”.",
      category: "Category",
      categoryPlaceholder: "E.g. Telematics, Documents…",
      icon: "Icon",
      noIcon: "None",
      backgroundColor: "Background colour",
      backgroundDefault: "Default",
      backgroundCustom: "Other colour",
      backgroundHelp: "Text turns white on a dark colour.",
      image: "Image",
      imageHelp: "JPG, PNG or WebP, 2 MB maximum. 16:9 recommended, at least 800 px wide.",
      imageUpload: "Choose an image",
      imageRemove: "Remove",
      imageTooBig: "Image too large (2 MB maximum).",
      imageBadType: "Format refused: JPG, PNG or WebP.",
      imageAlt: "Image alt text",
      imageAltHelp: "Describes the image for screen readers. Required with an image.",
      cta: "Button",
      ctaLabel: "Button text",
      ctaPath: "Button link",
      ctaPathHelp: "Internal Fleet path only, for example /fleet/vehicles.",
      fr: "FR",
      en: "EN",
      frRequired: "required",
      enFallback: "Falls back to FR",
      chars: (n: number, max: number) => `${n} / ${max}`,
      richBold: "Bold",
      richItalic: "Italic",
      richLink: "Internal link",
      richLinkPrompt: "Internal Fleet path (e.g. /fleet/vehicles)",
      richLinkInvalid: "Link refused: only /fleet/... paths are allowed.",
      page: "Page",
      pagePlaceholder: "Choose a page",
      allPages: "All pages",
      element: "Element",
      elementPlaceholder: "Choose an element",
      menuEntry: "Menu entry",
      menuGroup: "Menu",
      menuGroups: "Menu groups",
      pageGroup: (page: string) => `Page "${page}"`,
      elementNote: "If the element is not displayed for a user (rights, plan), the announcement is not shown to them.",
      elementCleared: "The chosen element is not on this page: it was removed.",
      position: "Position",
      positionFixed: {
        banner: "Fixed position: top of the page.",
        modal: "Fixed position: centre of the screen.",
      },
      placements: { auto: "Automatic", top: "Above", right: "Right", bottom: "Below", left: "Left" },
      corner: "Card corner",
      corners: { bottom_right: "Bottom right", bottom_left: "Bottom left" },
      lockedField: "Locked since the first publication. To change it, duplicate the announcement.",
      formatLocked: "The format can no longer change since the first publication. Duplicate the announcement to change it.",
      autosaveFound: "Unsaved changes were found.",
      autosaveRestore: "Restore",
      autosaveDiscard: "Discard",
      unsaved: "Unsaved changes",
      allSaved: "Everything is saved",
      leaveConfirm: "Some changes are not saved. Leave anyway?",
      liveEditNote: "Live announcement: your text changes are visible as soon as you save.",
      exampleVehicle: "Example vehicle (preview only)",
      exampleVehicleHelp: "This page needs a vehicle: pick one of the demo company. It is not saved with the announcement.",
      exampleVehiclePlaceholder: "Search a registration…",
      exampleRecordHelp: "The announcement applies to every record of this kind. The preview opens one of the demo company, else the list.",
    },
    steps: {
      add: "Add a step",
      remove: "Remove the step",
      moveUp: "Move up",
      moveDown: "Move down",
      step: (n: number) => `Step ${n}`,
      title: "Step title",
      subtitle: "Subtitle",
      body: "Step text",
      element: "Highlighted element",
      elementOptional: "optional",
      elementRequired: "required",
      noElement: "None (step without a pointer)",
      chooseElement: "Choose a button or an area…",
      count: (min: number, max: number) => (min === max ? `${min} step` : `${min} to ${max} steps`),
      countLocked: "The number and order of the steps are locked since the first publication.",
      changeWarning: "You changed the element of a live step: check the preview.",
      collapseAll: "Collapse all",
      expandAll: "Expand all",
      noTitle: "Untitled step",
      notAttached: "Not attached to an element yet",
      toFix: "To fix",
      attachedTo: "Attached to",
      attachHelp: "The button or area of the page the bubble points at.",
      attachHow: "To attach a step to a button: choose it in \"Attached to\", or click it directly in the preview on the right.",
      bubblePosition: "Bubble position",
    },
    audience: {
      plans: "Plans",
      capabilitiesRequired: "Features included in the plan",
      capabilitiesMissing: "Features missing from the plan (upsell)",
      upsellHint: "Upsell announcement: point the button to the plans page.",
      permissions: "User rights",
      roles: "Roles",
      companiesInclude: "Only these companies",
      companiesExclude: "Except these companies",
      languages: "Languages",
      newUsersOnly: "New users only (account younger than 30 days)",
      any: "All",
      searchPlaceholder: "Search…",
      none: "No results",
      selected: (n: number) => `${n} selected`,
      everyoneConfirm: "I confirm: show it to all users",
      everyoneHelp: "No criteria chosen: the announcement would go to everybody. Tick to confirm.",
      match: (n: number) => `${n.toLocaleString("en-US")} user${n > 1 ? "s" : ""} match`,
      ofTotal: (total: number) => `of ${total.toLocaleString("en-US")}`,
      counting: "Counting…",
      warnZero: "Nobody matches: nobody will see the announcement.",
      warnEveryone: "Everybody matches: check that this is intended.",
      eligibility: {
        title: "Why isn't it shown?",
        help: "Pick a company to see who would see it, and why the others would not.",
        pick: "Choose a company",
        check: "Check",
        eligible: (m: number, n: number) => `${m} user${m > 1 ? "s" : ""} out of ${n} would see it.`,
        notEligible: "Nobody in this company would see it.",
        matchButHidden: (m: number, n: number) => `${m} user${m > 1 ? "s" : ""} out of ${n} match the audience, but the announcement is not shown right now:`,
        reasonsTitle: "Reasons",
      },
    },
    schedule: {
      startsAt: "Start",
      endsAt: "End",
      startsAtHelp: "Empty: from publication.",
      endsAtHelp: "Empty: no end.",
      parisHint: "Paris time",
      priority: "Priority",
      priorityHelp: "From 1 to 10. When several announcements could show, the highest goes first (one modal per day).",
      rules: "Display rules",
      dismissible: "The user can close it",
      dismissibleModalNote: "A modal always has a close button.",
      maxImpressions: "Maximum impressions per user",
      hideAfterVisit: "Stop showing it once the page was visited",
      accountAgeMin: "Minimum account age (days)",
      accountAgeMax: "Maximum account age (days)",
      frequency: (n: number, modal: boolean) =>
        `At most ${n} impression${n > 1 ? "s" : ""} per user${modal ? ", and only one modal per day" : ""}.`,
      overlapTitle: "Other modals in the same period",
      overlapBody: "Only one modal per day is shown: the one with the highest priority goes first.",
    },
    adoption: {
      successEvent: "Success event",
      successEventHelp: "The action that proves the feature is really used.",
      noEvent: "None",
      reminder: "Reminder",
      reminderEnabled: "Remind users who have not used it",
      reminderNeedsEvent: "Choose a success event first.",
      afterDays: "After (days)",
      reminderFormat: "Reminder format",
      maxReminders: "Maximum reminders",
      reminderHelp: "If the user saw the announcement but has not triggered the success event after this delay, Fleet shows the reminder.",
      notify: "Notification",
      notifyEnabled: "Also send a notification at publication",
      notifyHelp: "For major launches. Sent once, to the audience, through the existing notification system.",
      channels: { in_app: "In the app", email: "E-mail" },
      notifyMessage: "Notification message",
    },
    panel: {
      simulation: "Simulation",
      audience: "Audience",
      history: "History",
      approx: "Approximate preview: the real rendering is in Fleet.",
      lang: "Language",
    },
    simulation: {
      menu: ["Dashboard", "Vehicles", "Live map", "Drivers", "Documents"],
      pageTitle: "Fleet page",
      allPages: "All pages",
      noPage: "Choose a page",
      close: "Close",
      next: "Next",
      previous: "Previous",
      done: "Done",
      stepOf: (i: number, n: number) => `${i} / ${n}`,
      elementHere: "Targeted element",
      placeholderTitle: "Announcement title",
      placeholderBody: "The announcement text shows here.",
      replay: "Show it again",
      pickHint: (n: number) => `Click an element to attach step ${n} to it.`,
      pickTitle: (label: string, n: number) => `Attach step ${n} to "${label}"`,
    },
    history: {
      empty: "No actions yet.",
      actions: {
        created: "Created",
        updated: "Edited",
        published: "Published",
        unpublished: "Unpublished",
        reset: "Reset",
        archived: "Archived",
        duplicated: "Duplicated",
      },
      by: (name: string) => `by ${name}`,
    },
    preview: {
      title: "Preview in Fleet",
      body: "Fleet opens in a new tab with the announcement, recording nothing. The link is valid for 30 minutes.",
      needsSave: "Save the announcement before opening it in Fleet.",
      vehicle: "Example vehicle",
      open: "Open in Fleet",
      mockNote: "Demo mode: the link is generated but Fleet does not know this announcement yet.",
      expires: (d: string) => `Expires at ${d}`,
    },
    publish: {
      title: "Publish the announcement",
      scheduleTitle: "Schedule the announcement",
      errorsTitle: "To fix before publishing",
      fixFields: "Show the fields to fix",
      warningsTitle: "Points to check",
      ready: "Everything is ready.",
      starts: (d: string) => `It will be visible from ${d} (Paris time).`,
      startsNow: "It will be visible right away.",
      notifyConfirm: (n: number) =>
        `I confirm sending a notification to ${n.toLocaleString("en-US")} user${n > 1 ? "s" : ""}.`,
      confirm: "Publish",
      confirmSchedule: "Schedule",
      audienceChangeTitle: "The audience of a live announcement changes",
      audienceChange: (before: number, after: number) => {
        const delta = after - before;
        const sign = delta > 0 ? "+" : "";
        return `${before.toLocaleString("en-US")} → ${after.toLocaleString("en-US")} users (${sign}${delta.toLocaleString("en-US")}).`;
      },
      audienceChangeConfirm: "Save anyway",
    },
    stats: {
      title: "Statistics",
      round: "Round",
      allRounds: "All rounds",
      eligible: "Eligible",
      seen: "Seen",
      clicked: "Clicked",
      dismissed: "Dismissed",
      completed: "Completed",
      dismissRate: "Dismiss rate",
      funnel: "Funnel",
      perStep: "Per step",
      stepSeen: "Seen",
      stepCompleted: "Passed",
      anchorMissing: "Element not found",
      anchorMissingWarn: (n: number) =>
        `The targeted element was not found ${n} times: the placement may be broken.`,
      adoption: "Adoption",
      adoptionHelp: "Users who triggered the success event, among those who saw the announcement and those who did not.",
      adoptedSeen: "Saw the announcement",
      adoptedNotSeen: "Did not see it",
      noEvent: "No success event chosen: adoption cannot be measured.",
      reminderTargets: (n: number) => `${n.toLocaleString("en-US")} user${n > 1 ? "s" : ""} would be reminded.`,
      posthog: "Open the PostHog dashboard",
      notPublished: "Statistics appear after publication.",
      ofPrevious: (p: number) => `${p}% of the previous step`,
    },
    validation: {
      required: "Required field.",
      tooLong: (max: number) => `${max} characters maximum.`,
      internalPath: "Only internal Fleet paths (/fleet/...) are allowed.",
      altRequired: "Alt text is required with an image.",
      stepsMin: (min: number) => `At least ${min} step${min > 1 ? "s" : ""}.`,
      stepsMax: (max: number) => `${max} steps maximum.`,
      stepAnchorRequired: "Every step of a guided tour points at an element.",
      pageRequired: "Choose a page.",
      elementRequired: "Choose an element.",
      menuRequired: "Choose a menu entry.",
      endBeforeStart: "The end must be after the start.",
      audienceEmpty: "Choose at least one criterion, or confirm sending to everybody.",
      keyFormat: "Lowercase letters, digits and dashes only.",
      keyTaken: "This key is already used.",
      ctaIncomplete: "The button text and link go together.",
      notifyMessage: "The notification message is required.",
      fieldNames: {
        key: "Key",
        title: "Title",
        body: "Text",
        badge_text: "Badge text",
        cta: "Button",
        media: "Image",
        page_key: "Page",
        anchor_key: "Element",
        steps: "Steps",
        ends_at: "End",
        audience: "Audience",
        notify: "Notification",
      } as Record<string, string>,
    },
    reasons: {
      notPublished: "The announcement is not published.",
      outOfPeriod: "Outside the broadcast period.",
      plan: (p: string) => `Plan "${p}" not included.`,
      capabilityMissing: (c: string) => `Feature "${c}" missing from the plan.`,
      capabilityPresent: (c: string) => `Already has "${c}" (upsell announcement).`,
      notIncluded: "Company not in the \"Only these companies\" list.",
      excluded: "Company excluded.",
      permission: (n: number) => `${n} user${n > 1 ? "s" : ""} without the required right.`,
      role: (n: number) => `${n} user${n > 1 ? "s" : ""} without the required role.`,
      language: (n: number) => `${n} user${n > 1 ? "s" : ""} in another language.`,
      accountAge: (n: number) => `${n} user${n > 1 ? "s" : ""} outside the requested account age.`,
    },
    errors: {
      load: "Could not load the announcements.",
      notFound: "Announcement not found.",
    },
  },
  donnaJudgements: {
    stats: { judged: "Answers judged", met: "Met", metRate: "Met rate", averageScore: "Average score" },
    filters: { all: "All", failed: "Not met" },
    columns: { date: "Date", request: "Request", answer: "Answer", parts: "Parts", verdict: "Verdict", score: "Score", issues: "Issues" },
    met: "Met",
    notMet: "Not met",
    donnaHerself: "Donna herself",
    empty: "No answer judged yet: the judge reads a sample of the answers (ONLINE_JUDGE_SAMPLE).",
  },
  donnaMonitor: {
    search: "Search a question, an answer, a client...",
    empty: "No message",
    good: "Good",
    bad: "Bad",
    none: "Not rated",
    from: "From",
    to: "To",
    untitled: "Untitled conversation",
    questionUnknown: "Question not recorded (conversation older than the log)",
    session: "Conversation",
    tabs: { all: "All", good: "Good", bad: "Bad", none: "Not rated" },
    columns: { date: "Date", client: "Client", question: "Question", answer: "Answer", rating: "Rating", comment: "Comment" },
    stats: {
      messages: "Messages",
      good: "Good answers",
      bad: "Bad answers",
      none: "Not rated",
      satisfaction: "Satisfaction",
      satisfactionHint: (rated: number) => `over ${rated} rated answer${rated === 1 ? "" : "s"}`,
    },
  },
  donnaCreditRequests: {
    intro: "Prospects and former clients cannot pay Donna as they go: they ask for offered credit to try it.",
    status: { pending: "Pending", approved: "Granted", refused: "Refused", all: "All" },
    statusOne: { pending: "Pending", approved: "Granted", refused: "Refused" },
    columns: { company: "Company", requestedBy: "Requested by", message: "Message", requestedAt: "Date", amount: "Credit", actions: "" },
    clientStatus: { client: "Client", prospect: "Prospect", dormant: "Dormant prospect", former: "Former client" },
    empty: "No requests",
    approve: "Grant",
    refuse: "Refuse",
    approveTitle: (company: string) => `Grant Donna credit to ${company}`,
    amount: "Amount offered for this month (€)",
    note: "Note (optional, seen by admins only)",
    confirmApprove: "Grant the credit",
    refuseTitle: (company: string) => `Refuse ${company}'s request?`,
    refuseDescription: "The company can ask again.",
    approved: "Credit granted",
    refused: "Request refused",
    cancel: "Cancel",
  },
  donnaCorrections: {
    sections: { discussions: "Discussions", corrections: "Corrections", judgements: "Judgements", creditRequests: "Credit requests", bindings: "Audit bindings" },
    allAgents: "All agents",
    unreachable: "Unreachable",
    agents: { "orchestrator-agent": "Routing", "mcp-agent": "Data", "fleet-agent": "Guide", "audit-agent": "Audit", "executor-agent": "Actions" },
    status: { pending: "To review", confirmed: "Confirmed", rejected: "Rejected", all: "All" },
    statusOne: { pending: "To review", confirmed: "Confirmed", rejected: "Rejected" },
    mistakeTypes: {
      misunderstood_intent: "Misunderstood request",
      user_provided_correction: "Corrected by the client",
      insufficient_answer: "Insufficient answer",
      incorrect_answer: "Wrong answer",
      repeated_question_after_wrong_answer: "Question asked again",
      rephrased_same_intent: "Question rephrased",
    },
    columns: { date: "Date", agent: "Agent", type: "Type", asked: "Client's request", answered: "Agent's answer", rule: "Rule", fired: "Applied", status: "Status" },
    empty: "No correction",
    hasNotes: "Notes",
    detail: {
      asked: "Client's request",
      answered: "Agent's answer",
      followup: "What the client said next",
      context: "Conversation",
      pattern: "Spotted on requests like",
      rule: "Rule given to the agent",
      ruleHint: "Once confirmed, the agent follows it on similar requests.",
      notes: "Notes",
      notesHint: "For the team: never given to the agent.",
    },
    actions: { confirm: "Confirm", reject: "Reject", reopen: "Back to review", save: "Save", delete: "Delete" },
    toasts: { confirm: "Correction confirmed", reject: "Correction rejected", pending: "Correction back to review", saved: "Correction saved", deleted: "Correction deleted" },
    deleteTitle: "Delete this correction?",
    deleteDescription: "It is removed from the agent: if the agent followed it, it no longer does.",
  },
  donnaBindings: {
    platform: "Platform",
    catalogVersion: "catalog",
    status: { pending: "To review", confirmed: "Confirmed", rejected: "Rejected", all: "All" },
    statusOne: { pending: "To review", confirmed: "Confirmed", rejected: "Rejected" },
    summary: { unboundGroups: "Groups without a binding", unavailable: "Unavailable concepts", unverified: "Unverified concepts", none: "None" },
    problems: { title: "What the catalog did not confirm", group: "Group", concept: "Concept", kind: "Problem", detail: "Detail" },
    problemKinds: { unknown_tool: "Tool missing", missing_field: "Field missing", type_mismatch: "Type differs", unknown_concept: "Unknown concept", unverifiable: "Unverifiable" },
    columns: { concept: "Concept", tool: "Tool", field: "Field", rowsKey: "Rows key", rowsKeyHint: "new group only", confidence: "Confidence", reason: "Why", status: "Status" },
    actions: { refresh: "Propose again", confirm: "Confirm", reject: "Reject", reopen: "Back to review" },
    toasts: { refreshed: "Proposals refreshed", confirm: "Binding confirmed: the auditor reads it from the next audit", reject: "Proposal rejected", pending: "Proposal back to review" },
    empty: "No proposal",
    hint: "A confirmed proposal is written in the auditor's binding file; until then the concept stays unavailable and its rules \"not audited\". Proposals are made at each new catalog version, after an audit.",
  },
};
