/**
 * This is a very simple translation system.
 *
 * NO IMPORTS - as we serialize the translations and execute them in the browser.
 *
 * If using a callback, ensure you DONOT have any DEPENDENCIES / IMPORTS.
 */
export const t = {
  meta: {
    lang: 'English',
    testCallback: ({ name }: { name: string }) => {
      return `Hello ${name}`;
    },
  },

  app: {
    common: {
      learnitiveLogoAlt: 'Learnitive logo',
      newNote: 'New File',
      newWorkspace: 'New Project',
      unknown: 'Unknown',
      home: 'Home',
      dismiss: 'Dismiss',
      report: 'Report',
      somethingWentWrong: 'Something went wrong',
      viewAll: 'View all',
      backButton: 'Back',
      nextButton: 'Next',
      createButton: 'Create',
      clearButton: 'Clear',
      closeButton: 'Close',
      cancelButton: 'Cancel',
      continueButton: 'Continue',
      searchLabel: 'Search',
      searchInputPlaceholder: 'Search...',
      starItem: 'Star this item',
      unstarItem: 'Unstar this item',
    },
    toolbar: {
      toggleMaxWidth: 'Toggle Max Width',
    },
    editor: {
      fidelityNotice: {
        label: 'Markdown compatibility',
        title: 'Some Markdown cannot be fully preserved',
        description:
          'This note contains Markdown this editor cannot fully preserve. Opening it is safe and changes nothing, but if you edit and save, the parts it cannot represent are rewritten — some formatting or content may change or be removed.',
      },
      selectionMenu: {
        label: 'Text formatting',
        bold: 'Bold',
        italic: 'Italic',
        strike: 'Strikethrough',
        inlineCode: 'Inline code',
        link: 'Link',
        paragraph: 'Paragraph',
        heading1: 'Heading 1',
        heading2: 'Heading 2',
        heading3: 'Heading 3',
        bulletList: 'Bullet list',
        orderedList: 'Numbered list',
        taskList: 'Task list',
        askAi: 'Ask AI',
      },
      linkEditor: {
        label: 'Edit link',
        inputLabel: 'Link URL',
        placeholder: 'example.com',
        copy: 'Copy link',
        copied: 'Copied!',
        copyFailed: 'Copy failed',
        open: 'Open link',
        remove: 'Remove link',
        invalidUrl: 'Enter a web address or Markdown path.',
      },
      codeBlock: {
        copy: 'Copy',
        copied: 'Copied',
        delete: 'Delete',
        deleteLabel: 'Delete code block',
        editLanguage: 'Code language',
        run: 'Run',
        runLabel: 'Run code block',
      },
      collapsibleHeading: {
        collapse: 'Collapse section',
        expand: 'Expand section',
      },
      frontmatter: {
        delete: 'Delete',
        deleteLabel: 'Delete frontmatter',
      },
      wikiLinkMenu: {
        label: 'Link to a note',
        empty: 'No notes found',
        linkTo: ({ query }: { query: string }) => `Link to “${query}”`,
      },
      wikiLink: {
        unresolvedLabel: ({ label }: { label: string }) =>
          `${label} (note not found)`,
      },
      linkedMentions: {
        heading: 'Linked mentions',
        loading: 'Loading linked mentions...',
        empty:
          'No backlinks yet. Type [[ in another note to create a backlink to this note.',
        error: 'Unable to load linked mentions',
        collapse: 'Collapse linked mentions',
        expand: 'Expand linked mentions',
      },
      placeholder: {
        emptyDoc: "Write something, or press '/' for commands…",
        emptyBlock: "Press '/' for commands",
      },
      blockHandle: {
        addBlock: 'Add block',
        addBelowHint: 'Click to add below',
        addAboveHint: ({ modifier }: { modifier: string }) =>
          `${modifier}-click to add above`,
        dragHandle: 'Drag to move',
      },
      slashCommand: {
        groupBasic: 'Basic blocks',
        groupLists: 'Lists',
        groupAssets: 'Assets',
        groupTime: 'Time',
        groupTable: 'Table',
        empty: 'No results',
        paragraph: 'Text',
        paragraphDesc: 'Plain paragraph text',
        heading1: 'Heading 1',
        heading1Desc: 'Large section heading',
        heading2: 'Heading 2',
        heading2Desc: 'Medium section heading',
        heading3: 'Heading 3',
        heading3Desc: 'Small section heading',
        codeBlock: 'Code block',
        codeBlockDesc: 'Fenced code with highlighting',
        askAi: 'Ask AI',
        askAiDesc: 'Write or improve Markdown with AI',
        mathBlock: 'Math block',
        mathBlockDesc: 'Editable TeX equation',
        table: 'Table',
        tableDesc: 'Insert a simple table',
        frontmatter: 'Frontmatter',
        frontmatterDesc: 'YAML properties at the top',
        bulletList: 'Bullet list',
        bulletListDesc: 'Simple bulleted list',
        numberedList: 'Numbered list',
        numberedListDesc: 'List with numbering',
        todoList: 'To-do list',
        todoListDesc: 'Track tasks with checkboxes',
        uploadFile: 'Upload file',
        uploadFileDesc: 'Insert an image or file',
        date: 'Date',
        dateDesc: 'Pick a date from the calendar',
        today: 'Today',
        todayDesc: "Insert today's date",
        yesterday: 'Yesterday',
        yesterdayDesc: "Insert yesterday's date",
        nextWeek: 'Next week',
        nextWeekDesc: "Insert next week's date",
        nextMonth: 'Next month',
        nextMonthDesc: "Insert next month's date",
        hintSelect: 'Enter to select',
        hintDismiss: 'Escape to dismiss',
      },
      datePicker: {
        hintSelect: 'Click a day to insert',
        hintDismiss: 'Escape to dismiss',
      },
      tableMenu: {
        label: 'Table options',
        addRowAbove: 'Add row above',
        addRowBelow: 'Add row below',
        addColumnLeft: 'Add column left',
        addColumnRight: 'Add column right',
        alignColumn: 'Align column',
        alignNone: 'None',
        alignLeft: 'Left',
        alignCenter: 'Center',
        alignRight: 'Right',
        deleteRow: 'Delete row',
        deleteColumn: 'Delete column',
        deleteTable: 'Delete table',
      },
    },
    editorW: {
      experimentalNotice:
        'Wordgard editor (experimental preview) — this note is read-only.',
      switchEditor: 'Switch editor',
      loadFailed: 'Unable to load this note.',
    },
    omniSearch: {
      dialogTitle: 'Omni command bar',
      inputPlaceholder: 'Type a command or search...',
      viewAllCommands: 'View All Commands',
      recentNotesHeading: 'Recent Notes',
      commandsHeading: '> Commands',
      allFilesHeading: 'All Files',
      filteredHeading: 'Filtered',
      noResults: 'No results found.',
    },
    sidebar: {
      newLabel: 'New',
      appActionsLabel: 'App Actions',
      omniSearch: 'Omni Search',
      allCommands: 'All Commands',
      settings: 'Settings',
      linksLabel: 'Links',
      homepage: 'Homepage',
      whatsNew: "What's New",
      githubProject: 'GitHub Project',
      reportIssue: 'Report an Issue',
      twitter: 'Twitter',
      discord: 'Discord',
      footerTitle: 'Learnitive',
      toggleSidebarSr: 'Toggle Sidebar',
      toggleSidebarRailTitle: 'Resize sidebar. Double-click to reset.',
      installApp: 'Install app',
      installingApp: 'Installing...',
      openInApp: 'Open in app',
    },
    settings: {
      title: 'Settings',
      backToApp: 'Back to app',
      general: {
        title: 'General',
        appSection: 'App',
        versionTitle: 'Version',
        versionDescription: 'The version and build identity of this app.',
        installPwaTitle: 'Install Learnitive',
        installPwaDescription:
          'Add Learnitive to this device and open it in its own app window.',
        installPwaButton: 'Install app',
        installingPwa: 'Installing...',
        openInAppTitle: 'Open in the app',
        openInAppDescription:
          'Learnitive is installed on this device. Switch from the browser tab to the app window.',
        openInAppButton: 'Open in app',
        appearanceSection: 'Appearance',
        themeTitle: 'Theme',
        themeDescription: 'Choose how Learnitive looks on this device.',
        themeLabel: 'Theme preference',
        editorSection: 'Editor',
        assetLocationTitle: 'Asset location',
        assetLocationDescription:
          'Choose where pasted and dropped files are stored beside notes.',
        assetsFolder: 'Assets folder',
        adjacentToNote: 'Adjacent to note',
        wideEditorTitle: 'Editor width',
        wideEditorDescription:
          'Use the available window width for document editing.',
        wideEditorToggle: 'Use wide editor',
        defaultWidth: 'Default',
        wideWidth: 'Wide',
        enabled: 'Enabled',
        disabled: 'Disabled',
      },
      workspaces: {
        title: 'Projects',
        sectionTitle: 'Projects',
        newWorkspace: 'New project',
        emptyTitle: 'No projects',
        emptyDescription: 'Create a project to start editing LaTeX.',
        noteCount: ({ count }: { count: number }) =>
          count === 1 ? '1 file' : `${count} files`,
        noteCountLoading: 'Loading files...',
        noteCountUnavailable: 'Files unavailable',
        lastOpened: 'Last opened',
        neverOpened: 'Never opened',
        actionsLabel: ({ wsName }: { wsName: string }) =>
          `Project actions for ${wsName}`,
        openWorkspace: 'Open project',
        locateFolder: 'Locate folder',
        deleteWorkspace: 'Delete project',
      },
      recovery: {
        title: 'Recover',
        description:
          'Learnitive keeps periodic snapshots of recoverable text files as you edit them. Restore any snapshot as a new file — your current project files are never overwritten.',
        searchPlaceholder: 'Search files...',
        searchLabel: 'Search snapshots',
        workspaceLabel: 'Project',
        allWorkspaces: 'All projects',
        emptyTitle: 'No snapshots yet',
        emptyDescription:
          'Snapshots are captured automatically once you edit Markdown or TeX source files in this project.',
        noMatches: 'No snapshots match your search.',
        noteColumn: 'File',
        timeColumn: 'Captured',
        wordCountColumn: 'Words',
        actionsColumn: 'Actions',
        recoverAction: 'Recover',
        loading: 'Loading snapshots...',
        loadFailed: 'Could not load snapshots.',
        noWorkspaces: 'Create a project to collect file snapshots.',
        previewTitle: ({ fileName }: { fileName: string }) =>
          `Snapshot of ${fileName}`,
        previewLoading: 'Loading snapshot...',
        previewUnavailable:
          'This snapshot is no longer available. It may have been cleaned up.',
        recoverAsNewNote: 'Recover as new file',
        closeButton: 'Close',
      },
      nav: {
        general: 'General',
        workspaces: 'Projects',
        recovery: 'Recover',
      },
    },
    pageAsset: {
      downloadButton: 'Download',
      openExternallyButton: 'Open in another app',
      openExternallyFailed:
        "Couldn't open the system app chooser. Download the file instead.",
      loading: 'Loading asset...',
      unavailable: 'Unable to load this asset.',
      noPreview:
        "This file can't be previewed here. Download it to view the contents.",
      videoUnsupported: "Your browser can't play this video format.",
      audioUnsupported: "Your browser can't play this audio format.",
    },
    dialogs: {
      staleTab: {
        title: 'A newer version of Learnitive is running',
        description:
          'Another tab has opened a newer version of Learnitive. Reload this tab to keep everything in sync — your notes are safe.',
        reloadButton: 'Reload tab',
        retryButton: 'Retry save',
        saveBlocked:
          'This tab was not reloaded because some changes are still saving or could not be saved. Retry to keep your latest edits.',
        savingButton: 'Saving changes…',
      },
      pwaOpenInApp: {
        title: 'Open in the app?',
        description:
          'Learnitive is installed on this device. You can keep using this tab, or switch to the app for a cleaner, focused window.',
        continueText: 'Open in app',
        cancelText: 'Keep using this tab',
      },
      changeTheme: {
        searchPlaceholder: 'Select a theme preference',
        title: 'Change Theme',
        groupLabel: 'Themes',
        emptyMessage: 'No themes available',
        options: {
          system: 'System',
          light: 'Light',
          dark: 'Dark',
        },
      },
      switchEditorEngine: {
        searchPlaceholder: 'Select an editor engine',
        title: 'Switch Editor Engine',
        description:
          'Choose which engine powers the editor. Switching reloads the app in place.',
        groupLabel: 'Editor engines',
        emptyMessage: 'No editor engines available',
        options: {
          prosemirror: 'ProseMirror (stable)',
          wordgard: 'Wordgard (experimental)',
        },
      },
      createFile: {
        title: 'Create Project File',
        description: 'Create a file with the exact name and extension you provide.',
        inputLabel: 'File name',
        placeholder: 'main.tex',
        submitText: 'Create',
      },
      createNote: {
        title: 'Create Note',
        description: 'Name the note before adding it to this workspace.',
        inputLabel: 'Note name',
        placeholder: 'Untitled note',
        submitText: 'Create',
      },
      deleteNote: {
        placeholder: 'Select or type a note to delete',
        badgeText: 'Delete Note',
        groupHeading: 'Notes',
        emptyMessage: 'No notes found',
        hintDelete: 'Select a note to confirm deletion',
      },
      confirmDelete: {
        title: 'Confirm Delete',
        description: ({ fileName }: { fileName: string }) =>
          `Are you sure you want to delete "${fileName}"?`,
        continueText: 'Delete',
      },
      confirmDeleteFiles: {
        title: 'Confirm Delete',
        description: ({
          count,
          fileNames,
        }: {
          count: number;
          fileNames: string[];
        }) =>
          `Delete ${count} files? ${fileNames.slice(0, 5).join(', ')}${
            fileNames.length > 5 ? ', ...' : ''
          } will be removed.`,
        continueText: 'Delete Files',
      },
      renameNote: {
        title: 'Rename Note',
        description: ({
          fileNameWithoutExtension,
        }: {
          fileNameWithoutExtension: string;
        }) => `Choose a new name for "${fileNameWithoutExtension}".`,
        inputLabel: 'New name',
        placeholder: 'New note name',
        submitText: 'Rename',
      },
      renameFile: {
        title: 'Rename File',
        description: ({ fileName }: { fileName: string }) =>
          `Choose a new name for "${fileName}".`,
        inputLabel: 'New file name',
        placeholder: 'New file name',
        submitText: 'Rename',
      },
      moveNote: {
        searchPlaceholder: 'Select a path to move the note',
        title: ({
          fileNameWithoutExtension,
        }: {
          fileNameWithoutExtension: string;
        }) => `Move "${fileNameWithoutExtension}"`,
        emptyMessage: 'No folders to move this note into.',
        emptyActionText: 'Create Folder',
        groupLabel: 'Directories',
        hintClick: 'Press Enter or Click',
        hintDrag: 'Tip: Try dragging a note in the sidebar',
        hintCreateDirectory: 'Create a folder first, then move this note.',
      },
      createDirectory: {
        title: 'Create Folder',
        description: 'Add a folder to organize files in this project.',
        inputLabel: 'Folder name',
        placeholder: 'Folder name',
        submitText: 'Create',
      },
      renameDirectory: {
        placeholder: 'Provide a new folder name',
        badgeText: ({ directoryName }: { directoryName: string }) =>
          `Rename "${directoryName}"`,
        optionTitle: 'Confirm folder rename',
      },
      confirmDeleteDirectory: {
        title: 'Confirm Delete',
        description: ({ directoryName }: { directoryName: string }) =>
          `Delete "${directoryName}" and every file inside it?`,
        continueText: 'Delete Folder',
      },
      switchWorkspace: {
        searchPlaceholder: 'Select a project to switch',
        title: 'Switch Project',
        groupLabel: 'Projects',
        emptyMessage: 'No projects found',
      },
      deleteWorkspace: {
        searchPlaceholder: 'Select a project to delete',
        title: 'Delete Project',
        groupLabel: 'Projects',
        emptyMessage: 'No projects found',
      },
      confirmDeleteWorkspace: {
        title: 'Confirm Delete',
        description: ({ wsName }: { wsName: string }) =>
          `Are you sure you want to delete the project "${wsName}"? This action cannot be undone.`,
        continueText: 'Delete',
      },
      nativeFsAuth: {
        title: 'Grant permission?',
        descriptionRetry: ({ wsName }: { wsName: string }) =>
          `That didn't work. Learnitive needs your permission to access "${wsName}"`,
        continueTextRetry: 'Try Again',
        descriptionInitial: ({ wsName }: { wsName: string }) =>
          `Learnitive needs your permission to access "${wsName}"`,
        continueTextInitial: 'Grant',
      },
      createWorkspace: {
        invalidName: 'Invalid project name',
        browserTitle: 'Browser',
        browserDescription: 'Save project files in browser storage',
        nativeFsTitle: 'Native File System',
        nativeFsDescription: 'Save project files in a local folder',
        errorTitle: 'Error',
        noStorageTypes: 'No storage types are available.',
        selectTypeTitle: 'Choose project storage',
        selectTypeDescription: 'Choose where this project stores its files.',
        dataPrivacyLink: 'Your data stays with you',
        enterNameTitle: 'Enter Project Name',
        enterNameDescription: 'Enter a name for your LaTeX project.',
        nameLabel: 'Project Name',
        invalidNameDefault: 'Invalid project name',
        selectDirectoryTitle: 'Select Directory',
        selectDirectoryDescription: 'Choose a directory for your project files.',
        directoryPickingUnsupported: 'Directory picking is not supported.',
        pickDirectoryButton: 'Pick Directory',
        invalidDirectoryDefault: 'Invalid directory selection',
        createFailed: 'Could not create the project. Please try again.',
      },
      allFiles: {
        title: 'All Files',
        searchPlaceholder: 'Search files...',
        emptyMessage: 'No files found.',
      },
      singleSelect: {
        placeholderDefault: 'Select an option...',
        emptyMessageDefault: 'No items found.',
      },
      singleInput: {
        placeholderDefault: 'Input..',
      },
    },
    errors: {
      workspace: {
        notOpened: 'No workspace open',
        noNoteOpenCannotToggleWideEditor:
          'No note is currently open, cannot toggle wide editor.',
        noNotesToDelete: 'No notes provided or available to delete',
        invalidMetadata: ({ wsName }: { wsName: string }) =>
          `Invalid workspace metadata for ${wsName}. Missing root dir handle`,
        noNoteOpenToClone: 'No note open to clone',
        noWorkspaceForDailyNote: 'No workspace is open to create a daily note.',
        noNoteOpened: 'No note is currently open.',
        reconnectNotFound: ({ wsName }: { wsName: string }) =>
          `The workspace "${wsName}" is no longer available.`,
        reconnectFailed:
          'Learnitive could not reconnect that folder. Your workspace was not changed.',
        reconnectNameMismatch: ({
          expectedName,
          selectedName,
        }: {
          expectedName: string;
          selectedName: string;
        }) =>
          `Choose the folder named "${expectedName}", not "${selectedName}". Your workspace was not changed.`,
        locateNotFound: ({ wsName }: { wsName: string }) =>
          `The workspace "${wsName}" is no longer available.`,
        locateUnsupported:
          'This browser cannot show where a workspace folder lives on disk.',
        locateMissingHandle: ({ wsName }: { wsName: string }) =>
          `Learnitive has lost the link to the folder for "${wsName}". Open the workspace to reconnect it.`,
        locateFailed: 'Learnitive could not open the folder location dialog.',
      },
      file: {
        invalidNotePath: 'Invalid note path provided',
        invalidNoteName: 'Invalid note name provided',
        cannotMoveDuringRename:
          'Cannot move file during rename operation. Use move command.',
        cannotRenameToDifferentWorkspace:
          'Cannot rename note to a different workspace',
        relocationBlockedByUnsavedChanges:
          'Cannot rename or move this note until its latest changes are saved',
        alreadyExistsInDest: ({ fileName }: { fileName: string }) =>
          `A note named "${fileName}" already exists in the destination folder`,
        originalNoteNotFound: 'Original note not found',
      },
      wsPath: {
        invalidNotePath: 'Invalid note path',
        absolutePathNotAllowed: 'Absolute paths are not allowed',
        directoryTraversalNotAllowed: 'Directory traversal is not allowed',
        invalidCharsInPath: 'Invalid characters in path',
        pathTooLong: 'Path exceeds maximum length',
        invalidDirectoryPath: 'Invalid directory path',
      },
      nativeFs: {
        errorOpening: {
          title: 'There was an error opening your notes folder.',
          message:
            'Please make sure your notes folder is inside a common location like Documents or Desktop.',
        },
        clickedTooSoon: {
          title: "That didn't work",
          message:
            'Please try again and choose your notes folder when prompted.',
        },
        accessDenied: {
          title: 'Access was denied',
          message: 'Please allow access to your folder to continue.',
        },
        unknown: {
          title: 'Unknown error occurred',
          message: 'Please try again or reload the page.',
        },
      },
      workspaceValidation: {
        typeRequired: 'Workspace type is required',
        nameRequired: 'Workspace name is required',
        dirRequired: 'Directory selection is required',
      },
    },
    toasts: {
      assetSaveInProgress: ({
        fileName,
        remainingCount,
      }: {
        fileName: string;
        remainingCount: number;
      }) =>
        remainingCount > 0
          ? `Saving ${fileName} + ${remainingCount} more...`
          : `Saving ${fileName}...`,
      assetSavePartial: ({
        failedCount,
        failedFileName,
        failedRemainingCount,
        savedFileName,
        savedRemainingCount,
      }: {
        failedCount: number;
        failedFileName: string;
        failedRemainingCount: number;
        savedFileName?: string;
        savedRemainingCount: number;
      }) => {
        const failedLabel =
          failedRemainingCount > 0
            ? `${failedFileName} + ${failedRemainingCount} more`
            : failedFileName;
        if (!savedFileName) {
          return `Could not save ${failedLabel}.`;
        }
        const savedLabel =
          savedRemainingCount > 0
            ? `${savedFileName} + ${savedRemainingCount} more`
            : savedFileName;
        return `${savedLabel} saved; ${failedCount} failed.`;
      },
      assetSaveSucceeded: ({
        fileName,
        remainingCount,
      }: {
        fileName: string;
        remainingCount: number;
      }) =>
        remainingCount > 0
          ? `Saved ${fileName} + ${remainingCount} more`
          : `Saved ${fileName}`,
      assetTooLarge: ({
        fileName,
        maxFileSize,
      }: {
        fileName: string;
        maxFileSize: string;
      }) => `${fileName} is too large. Maximum file size is ${maxFileSize}.`,
      externalChangeNotApplied: ({ fileName }: { fileName: string }) =>
        `${fileName} changed on disk, but the change could not be applied safely. The editor kept the current version.`,
      externalDiskVersionUnavailable: ({ fileName }: { fileName: string }) =>
        `Could not read ${fileName} from disk. The editor kept the current version.`,
      externalDiskVersionNotApplied: ({ fileName }: { fileName: string }) =>
        `The disk version of ${fileName} was not loaded. The editor kept the current version.`,
      loadDiskVersion: 'Load disk version',
      fileCreated: ({ fileName }: { fileName: string }) =>
        `Created ${fileName}`,
      fileCreateFailed: 'Could not create file',
      snapshotNotFound: 'Snapshot not found. It may have been cleaned up.',
      snapshotRecovered: ({ fileName }: { fileName: string }) =>
        `Recovered snapshot as ${fileName}`,
      snapshotRecoverFailed: 'Could not recover snapshot',
      fileDeleted: ({ fileName }: { fileName: string }) =>
        `Deleted ${fileName}`,
      fileDeleteFailed: 'Could not delete file',
      filesDeleted: ({ count }: { count: number }) =>
        count === 1 ? 'Deleted 1 file' : `Deleted ${count} files`,
      filesDeleteFailed: 'Could not delete files',
      fileMoved: ({ fileName }: { fileName: string }) => `Moved ${fileName}`,
      fileMoveFailed: 'Could not move file',
      fileMoveStarUpdateFailed: ({ fileName }: { fileName: string }) =>
        `Moved ${fileName}, but could not preserve its starred status`,
      fileRenamed: ({ fileName }: { fileName: string }) =>
        `Renamed to ${fileName}`,
      fileRenameFailed: 'Could not rename file',
      fileRenameStarUpdateFailed: ({ fileName }: { fileName: string }) =>
        `Renamed to ${fileName}, but could not preserve its starred status`,
      folderCreated: ({ folderName }: { folderName: string }) =>
        `Created ${folderName}`,
      folderDeleted: ({ folderName }: { folderName: string }) =>
        `Deleted ${folderName}`,
      folderDeleteFailed: 'Could not delete folder',
      folderRenamed: ({ folderName }: { folderName: string }) =>
        `Renamed to ${folderName}`,
      folderRenameFailed: 'Could not rename folder',
      folderRenameStarUpdateFailed: ({ folderName }: { folderName: string }) =>
        `Renamed to ${folderName}, but could not preserve starred notes`,
      openAsset: 'Open',
      pathCopied: 'Path copied',
      pathCopyFailed: 'Could not copy path',
      sourceDownloaded: 'Source downloaded',
      sourceDownloadFailed: 'Could not download source',
      selectionCopied: 'Copied as Markdown',
      selectionCopyFailed: 'Could not copy selection',
      selectionCopyEmpty: 'Select some text to copy',
      pasteMarkdownFailed: 'Could not paste Markdown',
      pasteMarkdownEmpty: 'Clipboard has no text to paste',
      permissionNotGranted: 'Permission not granted',
      retrySave: 'Retry save',
      saveFailed: 'Changes could not be saved. Retry to keep your latest edit.',
      editorEngineSwitchBlockedBySaves:
        'Cannot switch editors: a file has unsaved changes that could not be written. Retry the failed save first.',
      editorCommandUnavailable:
        'That editor command cannot run here. Place the cursor in a regular text block and try again.',
    },
    pageWelcome: {
      newUser: 'Welcome to Learnitive',
      regularUser: 'Welcome back!',
      recentWorkspacesHeading: 'Recent projects',
      createWorkspacePrompt: 'Create a LaTeX project to get started.',
    },
    templates: {
      title: 'Learnitive Templates',
      description: 'Create a normal portable LaTeX project from a curated starter. Published templates are available on every plan.',
      browseTemplates: 'Browse Templates',
      updated: 'updated',
      locked: 'locked',
      proBadge: 'Pro',
      categories: {
        article: 'Article',
        report: 'Report',
        presentation: 'Presentation',
        letter: 'Letter',
        thesis: 'Thesis',
        cv: 'CV',
      },
      workspaceName: 'Project name',
      workspaceNamePlaceholder: 'research-paper',
      invalidWorkspaceName: 'Enter a valid project name.',
      storage: 'Project storage',
      browserStorage: 'Browser storage (OPFS)',
      localFolder: 'Local folder',
      chooseFolder: 'Choose empty local folder',
      chooseFolderFirst: 'Choose an empty local folder first.',
      emptyFolderNotice: 'For safety, Learnitive only creates a template in an empty folder.',
      proRequired: 'Template available',
      proRequiredDescription: 'Published Learnitive templates are available on Free and Pro.',
      activatePro: 'Activate Pro',
      createProject: 'Create Project',
      created: ({ template }: { template: string }) => `Created project from ${template}.`,
      createFailed: 'The template project could not be created. Existing files were not overwritten.',
      catalog: {
        blankArticle: { title: 'Blank Article', description: 'A clean article with sensible typography and a bibliography file.' },
        researchPaper: { title: 'Research Paper', description: 'A structured academic article with abstract, methods, results and references.' },
        technicalReport: { title: 'Technical Report', description: 'A multi-section report for engineering, scientific and operational documentation.' },
        beamerPresentation: { title: 'Beamer Presentation', description: 'A minimal presentation using standard Beamer without external theme assets.' },
        formalLetter: { title: 'Formal Letter', description: 'A standard LaTeX letter with sender, recipient and closing placeholders.' },
        modernThesis: { title: 'Modern Thesis', description: 'A multi-file thesis starter with front matter, chapters, bibliography and appendices.' },
        conferencePaper: { title: 'Conference Paper', description: 'A compact two-column conference-style paper using standard LaTeX packages.' },
        academicCv: { title: 'Academic CV', description: 'A clean CV starter for academic, research and technical profiles.' },
      },
    },
    pageStartupError: {
      title: 'Learnitive could not start',
      description:
        'A required service failed during startup. Your project files were not changed.',
      detailsLabel: 'Startup error details',
      reloadButton: 'Reload App',
    },
    pageNotFound: {
      title: 'Page Not Found',
      goHomeButton: 'Go to Welcome Screen',
      reportButton: 'Report Issue',
    },
    pageWorkspaceNotFound: {
      title: 'Project Not Found',
      createWorkspaceButton: 'Create Project',
      switchWorkspaceButton: 'Switch Project',
    },
    pageWsHome: {
      noNotesMessage: 'No project files found.',
      newNoteButton: 'New File',
      switchWorkspaceButton: 'Switch Project',
      importProjectZipButton: 'Import Project ZIP',
      exportProjectZipButton: 'Export Project ZIP',
      projectMenuButton: 'Project menu',
      importProjectMenuItem: 'Import project…',
      downloadProjectMenuItem: 'Download project',
      storageMenuItem: 'Storage…',
      projectSettingsMenuItem: 'Project settings…',
      projectZipImportSuccess: 'Project imported',
      projectZipImportFailed: 'Project ZIP import failed. No existing files were replaced.',
      projectZipExportSuccess: 'Project ZIP downloaded',
      projectZipExportFailed: 'Project ZIP download failed.',
      projectZipTooLarge: 'That ZIP file is too large to import in the browser.',
      storageDialogTitle: 'Project storage',
      storageDialogDescription: 'Review browser persistence, approximate usage and the latest project backup.',
      storageLoading: 'Checking project storage…',
      storageLocalFolder: 'Local folder',
      storageLocalFolderDescription: 'This project is stored directly in the local folder you granted to Learnitive.',
      storagePersistenceLabel: 'Browser persistence',
      storagePersistentShort: 'Persistent',
      storageNotPersistentShort: 'Not guaranteed',
      storageUsageLabel: 'Approximate browser storage used',
      lastBackupLabel: 'Last project ZIP backup',
      storagePersistent: 'Browser storage is persistent',
      storageNotPersistent: 'Browser storage may be evicted; export ZIP backups regularly',
      storageUsed: 'storage used',
      lastExported: 'last ZIP export',
      neverExported: 'No project ZIP backup exported yet.',
      requestPersistentStorage: 'Request persistent storage',
      storagePersistenceGranted: 'Persistent browser storage granted.',
      storagePersistenceNotGranted: 'The browser did not grant persistent storage. Keep ZIP backups.',
    },
    sourceEditorToolbar: {
      wordWrap: 'Word Wrap',
      editor: 'Editor',
      fontSize: 'Font size',
      lineNumbers: 'Line numbers',
      spellcheck: 'Spellcheck',
      fullscreen: 'Fullscreen editor',
      exitFullscreen: 'Exit fullscreen editor',
      undo: 'Undo edit',
      redo: 'Redo edit',
      save: 'Save file',
      saving: 'Saving…',
      saved: 'Saved',
      unsaved: 'Unsaved',
      loading: 'Loading…',
      saveFailed: 'Could not save file',
    },
    latexSourceEditor: {
      loading: 'Loading source…',
      loadFailed: 'Learnitive could not load this source file. The file was not changed.',
      reloadPage: 'Reload page',
      editorLabel: 'LaTeX source editor',
      undo: 'Undo source edit',
      redo: 'Redo source edit',
      save: 'Save source file',
      syncPdf: 'Locate source in PDF',
      saving: 'Saving…',
      saved: 'Saved',
      saveFailed: 'Save failed',
      externalConflict: 'External change detected',
      externalConflictDescription:
        'This file changed outside Learnitive while you had unsaved edits. Choose which version to keep.',
      useDiskVersion: 'Use disk version',
      keepMyVersion: 'Keep my version',
      insertImage: 'Insert image',
      imageInserted: ({ fileName }: { fileName: string }) =>
        `Inserted ${fileName} into the project and source.`,
      imageInsertFailed: 'Could not store and insert that image.',
      loadingEquation: 'Loading equation editor…',
      insertInlineMath: 'Inline math',
      insertDisplayMath: 'Equation',
      editEquation: 'Edit equation',
      insertEquation: 'Insert equation',
      equationPreview: 'Equation preview',
      equationEditor: 'Equation editor',
      equationSymbols: 'Equation symbols',
      inlineEquation: 'Inline equation',
      displayEquation: 'Display equation',
      closeEquationEditor: 'Close equation editor',
      applyEquation: 'Apply',
      cancelEquation: 'Cancel',
      equationSaveShortcut: 'Ctrl/Cmd+Enter to apply',
      mathSourceChanged:
        'The source changed while the equation editor was open. Reopen the equation and try again.',
      sourceOnlyEquation: 'Source-only equation',
      sourceOnlyEquationDescription:
        'This equation contains structural LaTeX directives that Learnitive will not send through MathLive.',
    },
    latexVisual: {
      source: 'Source',
      visual: 'Visual',
      loading: 'Building visual projection…',
      loadFailed: 'Learnitive could not build the visual projection. The LaTeX source was not changed.',
      losslessNotice: 'Visual mode edits only safe source ranges. Unsupported LaTeX remains protected.',
      rawBlocks: ({ count }: { count: number }) => `${count} protected raw block${count === 1 ? '' : 's'}`,
      sourceChanged: 'The LaTeX source changed while Visual mode was editing the equation. Reopen Visual mode and try again.',
    },
    bibliography: {
      references: 'References',
      entries: ({ count }: { count: number }) => `${count} bibliography entr${count === 1 ? 'y' : 'ies'}`,
      loading: 'Loading bibliography…',
      loadFailed: 'Learnitive could not load the project bibliography.',
      empty: 'No BibTeX/BibLaTeX entries found in this file.',
      losslessNotice: 'Visual bibliography edits only individual field ranges. Comments, ordering and unknown fields remain intact.',
      addField: ({ field }: { field: string }) => `Add ${field}`,
      otherFields: 'Other fields',
      entryChanged: 'That bibliography entry changed. Reopen it and try again.',
      editFailed: 'Could not update that bibliography field.',
      sourceChanged: 'The source changed while this visual editor was open. Reopen the item and try again.',
      insertCitation: 'Insert citation',
      citationDescription: 'Search the project bibliography and select one or more citation keys.',
      searchCitations: 'Search title, author, year or citation key',
      noCitations: 'No matching bibliography entries.',
      applyCitation: ({ count }: { count: number }) => `Use ${count} citation${count === 1 ? '' : 's'}`,
      cancel: 'Cancel',
      apply: 'Apply',
      editFootnote: 'Edit footnote',
      footnoteDescription: 'Only the footnote body is changed; the surrounding LaTeX command is preserved.',
      footnote: 'Footnote',
      sourceOnlyFootnote: 'This footnote contains LaTeX that must be edited in Source mode.',
      referenceMissing: 'The referenced label could not be found in this project.',
      figure: 'Figure',
      table: 'Table',
      figureTableDescription: 'Edit the caption without reserializing the surrounding LaTeX environment.',
      caption: 'Caption',
      label: 'Label',
      widthPercent: 'Width (% of line width)',
      heightPercent: 'Height (% of text height)',
      scale: 'Scale',
      keepAspectRatio: 'Keep aspect ratio',
      centered: 'Center figure',
      placement: 'Placement',
      accessibilityDescription: 'Accessibility description',
      accessibilityExistingOnly: 'Learnitive edits an existing \\Description command but will not add class-specific accessibility markup automatically.',
      tableStructure: 'Table structure',
      tableAlignment: 'Selected column alignment',
      tableImport: 'CSV / tab-separated data',
      replaceTableData: 'Replace table data',
      sourceOnlyStructure: 'This table structure is source-only; use Source mode for this operation.',
      replaceImage: 'Replace image',
      replacementStored: ({ fileName }: { fileName: string }) => `Stored ${fileName} as the replacement image.`,
      imageReplaceFailed: 'Could not store the replacement image.',
      referenceSearchTitle: 'References',
      referenceSearchDescription: 'Search trusted scholarly metadata providers, reuse existing bibliography entries, and cite through Learnitive canonical source edits.',
      searchReferences: 'Search',
      suggested: 'Suggested',
      suggestedDescription: 'Search provider metadata for literature candidates around a manuscript claim. Supporting, contradicting and original-source results remain candidates until you inspect the paper itself.',
      myZotero: 'My Zotero',
      localBibliography: 'Local bibliography',
      providerSettings: 'Provider settings',
      providerPrivacy: 'Provider credentials are stored only in this browser. They are not written to project files or project ZIP exports.',
      providerNetworkNotice: 'External searches send only your search terms and selected filters to the scholarly providers you choose; Learnitive does not upload your manuscript for reference search.',
      zoteroLibraryType: 'Zotero library type',
      zoteroUserLibrary: 'User library',
      zoteroGroupLibrary: 'Group library',
      zoteroLibraryId: 'Zotero user/group library ID',
      zoteroApiKey: 'Zotero API key',
      zoteroCollection: 'Zotero collection key (optional)',
      openAlexApiKey: 'OpenAlex API key (optional)',
      semanticScholarApiKey: 'Semantic Scholar API key (optional)',
      crossrefMailto: 'Crossref contact email (optional)',
      saveProviderSettings: 'Save provider settings',
      providerSettingsSaved: 'Reference provider settings saved in this browser.',
      referenceSearchPlaceholder: 'Search papers by title, author, DOI or topic',
      allProviders: 'All providers',
      searching: 'Searching…',
      referenceSearchFailed: 'Reference search failed.',
      noReferenceResults: 'No matching external references yet.',
      yearFrom: 'Year from',
      yearTo: 'Year to',
      authorFilter: 'Author',
      doiFilter: 'DOI',
      typeFilter: 'Type',
      minimumCitations: 'Min citations',
      relevance: 'Relevance',
      newest: 'Newest',
      mostCited: 'Most cited',
      openAccess: 'Open access',
      targetBibliography: 'Add to',
      newFile: 'new file',
      citations: 'citations',
      alreadyInBibliography: 'Already in bibliography',
      alreadyAdded: 'Already added',
      addToBibliography: 'Add to bibliography',
      addAndCite: 'Add & Cite',
      openReference: 'Open reference source',
      createdBibliography: ({ file }: { file: string }) => `Created ${file}. Add it to your LaTeX bibliography configuration if it is not already referenced.`,
      referenceAdded: ({ key }: { key: string }) => `Added bibliography entry ${key}.`,
      referenceAddFailed: 'Could not add that reference to the bibliography.',
      selectReference: 'Select reference',
      addSelected: 'Add selected',
      saveToShortlist: 'Save to shortlist',
      referencesAdded: ({ count }: { count: number }) => `Added ${count} reference${count === 1 ? '' : 's'} to the bibliography.`,
      shortlistSaved: ({ count }: { count: number }) => `Saved ${count} reference${count === 1 ? '' : 's'} to the local shortlist.`,
      shortlistFailed: 'Could not save the local literature shortlist.',
      metadataConflict: ({ fields }: { fields: string }) => `Provider metadata differs for: ${fields}. Review before relying on these fields.`,
      researchAssistance: 'Research assistance',
      researchClaim: 'Claim or research topic',
      researchClaimPlaceholder: 'Paste a claim or describe the literature you need',
      researchIntent: 'Research intent',
      findSupporting: 'Find supporting papers',
      findContradicting: 'Find contradicting papers',
      findSeminal: 'Find seminal work',
      findRecent: 'Find recent work',
      findOriginalSource: 'Find original source',
      findRelated: 'Find related work',
      findPapers: 'Find papers',
      researchCandidateCaution: 'Learnitive ranks provider metadata and available abstracts only. A result is not proof that a paper supports, contradicts or originated a claim; inspect the paper before citing it.',
      researchScore: ({ score }: { score: number }) => `candidate score ${score}%`,
      intentReason: ({ intent }: { intent: string }) => `Saved from ${intent} literature search`,
      citationChecker: 'Citation checker',
      citationCheckerDescription: 'Checks project citations and bibliography deterministically. No manuscript text is sent to a provider unless you explicitly run a literature or DOI search.',
      refreshChecker: 'Refresh',
      checkMissingDois: 'Check missing DOIs online',
      citationCheckerSummary: ({ errors, warnings, doiCandidates }: { errors: number; warnings: number; doiCandidates: number }) => `${errors} errors · ${warnings} warnings · ${doiCandidates} entries may be eligible for DOI lookup`,
      probableDoiConfidence: ({ confidence }: { confidence: number }) => `metadata match ${confidence}%`,
      addVerifiedDoi: 'Add DOI',
      doiAdded: ({ key, doi }: { key: string; doi: string }) => `Added DOI ${doi} to ${key}.`,
      noProbableDois: 'No high-confidence missing DOI matches were found.',
      noCitationIssues: 'No citation or bibliography integrity issues found.',
      literatureShortlist: 'Literature shortlist',
      shortlistDescription: 'Keep candidate, included and excluded papers with browser-local notes, tags and reasons.',
      shortlistEmpty: 'No shortlisted papers yet.',
      candidate: 'Candidate',
      included: 'Included',
      excluded: 'Excluded',
      removeFromShortlist: 'Remove from shortlist',
      shortlistNotes: 'Notes',
      shortlistTags: 'Tags (comma-separated)',
      shortlistReason: 'Reason / decision',
    },
    projectOutline: {
      title: 'Navigator',
      navigator: 'Project navigator',
      outline: 'Outline',
      labels: 'Labels',
      references: 'References',
      citations: 'Citations',
      bibliography: 'Bibliography',
      refresh: 'Refresh project navigator',
      close: 'Close',
      loading: 'Indexing project…',
      empty: 'No document headings found.',
      emptySection: 'No items in this section.',
      emptyBibliography: 'No bibliography entries found.',
      warning: 'Unresolved or duplicate item',
      issues: ({ count }: { count: number }) => `${count} project issue${count === 1 ? '' : 's'}`,
    },
    compile: {
      button: 'Compile',
      title: 'Browser LaTeX Compile',
      description:
        'Compile the project locally in this browser. Project files and generated PDF output are not uploaded to Learnitive.',
      compile: 'Compile PDF',
      compiling: 'Compiling…',
      cancel: 'Cancel compile',
      downloadPdf: 'Download PDF',
      idle: 'Ready to compile.',
      cancelled: 'Compilation cancelled.',
      success: 'Compilation succeeded.',
      failed: 'Compilation failed.',
      lastGoodPdf: 'The last successful PDF is still available.',
      backend: 'Engine',
      rootFile: 'Root file',
      duration: 'Duration',
      diagnostics: 'Diagnostics',
      openSource: 'Open source',
      generatedFiles: 'Generated files',
      binaryArtifact: 'Binary generated artifact. Download it to inspect it externally.',
      downloadArtifact: 'Download',
      performance: 'Compile performance',
      runtimeInit: 'Runtime init',
      packageFetch: 'Package fetch',
      bibliographyTiming: 'Bibliography',
      engineCompile: 'Engine compile',
      pdfReady: 'PDF ready',
      totalTiming: 'Total',
      runtimeWarm: 'Warm runtime',
      runtimeCold: 'Cold runtime',
      packagesFetched: 'packages fetched',
      noDiagnostics: 'No compiler diagnostics.',
      log: 'Compiler log',
      biberUnsupported:
        'Biber bibliography processing runs locally in the BusyTeX browser compiler.',
      compilerEngine: 'Compiler engine',
      compilerEngineDescription:
        'Only engines installed by this Learnitive deployment can be selected.',
      compilerMode: 'Deployment mode',
      pdfCompileMode: 'pdfLaTeX mode',
      fullSyncMode: 'Full / SyncTeX',
      fastPreviewMode: 'Fast Preview',
      fullSyncDescription:
        'Uses BusyTeX and enables source-to-PDF SyncTeX mapping.',
      fastPreviewDescription:
        'Uses SwiftLaTeX for faster startup. SyncTeX mapping is unavailable.',
      texliveBundle: 'Bundled TeX Live',
      files: 'files',
      unavailable: 'Unavailable',
      remotePackagesEnabled: 'missing packages download on demand',
      remotePackagesDisabled: 'remote package downloads disabled',
    },
    pdfPreview: {
      title: 'PDF Preview',
      compileFirst: 'Compile this project to preview its PDF here.',
      loading: 'Loading PDF…',
      loadFailed: 'Learnitive could not load the compiled PDF.',
      renderFailed: 'Learnitive could not render this PDF page.',
      textLayerUnavailable: 'PDF page rendered. Text selection and text-based search are unavailable on this page.',
      previousPage: 'Previous PDF page',
      nextPage: 'Next PDF page',
      zoomOut: 'Zoom out',
      zoomIn: 'Zoom in',
      fitWidth: 'Toggle fit width',
      fit: 'Fit',
      full: 'Full PDF preview',
      exitFull: 'Exit full PDF preview',
      showFileMap: 'Show mappings for the open source file',
      pages: 'PDF pages',
      synctexReady: 'SyncTeX ready',
      synctexUnavailable: 'No SyncTeX map in the latest successful compile',
      synctexFailed: 'The PDF is available, but its SyncTeX map could not be read',
      pdfFollowsSource: 'PDF follows source cursor',
      sourceFollowsPdf: 'Source follows PDF',
      reverseHint: 'Double-click the PDF to jump to source',
      logNoCompile: 'No compile result yet',
      logCompiling: 'Compilation in progress',
      logSuccess: 'Last compile succeeded',
      logFailure: 'Last compile failed',
    },
    collaboration: {
      button: 'Collaborate',
      title: 'Collaboration',
      description: 'Edit this project together live with Learnitive collaboration.',
      connected: 'Connected',
      connecting: 'Connecting…',
      host: 'Host',
      guest: 'Guest',
      shareCode: 'Project link',
      copyShareCode: 'Copy project link',
      copied: 'Project link copied',
      shareCodeHint: 'Anyone with this live-session link can join. The raw secret stays in the URL fragment and is removed from the address bar after joining.',
      collaborators: 'Collaborators',
      you: 'You',
      waiting: 'No other collaborators are connected yet.',
      missingAssets: 'Project assets are copied when joining',
      missingAssetsDescription: 'Source text is synchronized through Yjs. Binary assets are integrity-checked and copied as part of the immutable project snapshot when the session is joined.',
      importAssets: 'Project assets',
      assetsImported: ({ fileCount }: { fileCount: number }) => `${fileCount} project asset${fileCount === 1 ? '' : 's'} imported`,
      leave: 'Leave session',
      yourName: 'Your name',
      passwordOptional: 'Session secret',
      startTitle: 'Start a session',
      startDescription: 'Share the current project through the same-origin Yjs relay. Live editing is Source-only, project structure is locked, and compilation remains browser-local.',
      start: 'Start collaboration',
      joinTitle: 'Join a session',
      joinDescription: 'For a first-time join, use an empty Learnitive workspace so unrelated local files are never overwritten.',
      join: 'Join collaboration',
      localFirstNotice: 'Document text remains browser/local-first. Live Yjs updates are transiently relayed by Learnitive and continuously mirrored into each participant’s selected workspace storage; the relay does not persist manuscript files.',
      failed: 'Collaboration action failed',
      importBlocked: 'Leave the collaboration session before importing a project ZIP.',
    },
    projectTools: {
      button: 'Tools',
      mobileButton: 'Tools',
      title: 'Project Tools',
      description: 'Search project structure, run Learnitive Doctor, and apply safe project-wide refactors.',
      search: 'Search',
      text: 'Text',
      symbols: 'Symbols',
      meaning: 'Meaning',
      meaningTitle: 'Meaning search · EmbeddingGemma',
      meaningDescription: 'Search the scientific meaning of project passages with a private browser-local embedding index. Exact symbols, references and citation keys remain deterministic searches.',
      meaningPrivacy: 'Project text and vectors stay in this browser. Downloading the embedding runtime/model uses the network, but indexing and search do not upload your project or query.',
      meaningSearchPlaceholder: 'Where do I discuss robustness?',
      downloadEmbedding: 'Download EmbeddingGemma',
      removeEmbedding: 'Remove EmbeddingGemma',
      indexMeaning: 'Index project',
      clearMeaning: 'Clear meaning index',
      meaningUnsupported: 'Local embeddings are unavailable in this browser.',
      meaningFailed: 'Project meaning could not complete this operation.',
      meaningModelReady: 'EmbeddingGemma is ready.',
      meaningModelRemoved: 'EmbeddingGemma removed from this browser.',
      meaningIndexed: 'Project meaning index updated.',
      meaningIndexCleared: 'Project meaning index cleared.',
      meaningNoResults: 'No semantically related project passages were found.',
      meaningDownloading: ({ percent }: { percent: number }) => `Downloading EmbeddingGemma… ${percent}%`,
      meaningProgress: ({ phase, completed, total, reused }: { phase: string; completed: number; total: number; reused: number }) => `${phase} · ${completed}/${total}${reused ? ` · ${reused} reused` : ''}`,
      meaningIndexedPassages: ({ count }: { count: number }) => `${count} indexed passage${count === 1 ? '' : 's'}`,
      cancel: 'Cancel',
      textSearchPlaceholder: 'Search text across the project',
      searchPlaceholder: 'Search headings, labels, references, citations, bibliography, environments or files',
      scope: 'Scope',
      wholeProject: 'Whole project',
      currentFolder: 'Current folder',
      currentFile: 'Current file',
      includeGlobs: 'Include globs (comma separated)',
      excludeGlobs: 'Exclude globs (comma separated)',
      caseSensitive: 'Case sensitive',
      wholeWord: 'Whole word',
      regex: 'Regular expression',
      replaceWith: 'Replace with…',
      replaceOne: 'Replace',
      replaceSelected: 'Replace selected',
      replaceAll: 'Replace all',
      selectAll: 'Select all',
      selectNone: 'Select none',
      noTextResults: 'No matching project text.',
      affectedSummary: ({ matches, files }: { matches: number; files: number }) => `${matches} match${matches === 1 ? '' : 'es'} in ${files} file${files === 1 ? '' : 's'}`,
      replaceComplete: ({ count, files }: { count: number; files: number }) => `Replaced ${count} match${count === 1 ? '' : 'es'} in ${files} file${files === 1 ? '' : 's'}.`,
      replaceFailed: 'Project replace failed.',
      searchFailed: 'Project search failed.',
      noResults: 'No matching project items.',
      doctor: 'Doctor',
      doctorFailed: 'Learnitive Doctor could not inspect this project.',
      doctorRunning: 'Inspecting project health…',
      healthScore: 'Project health',
      errors: 'errors',
      warnings: 'warnings',
      healthy: 'No project-health issues were found.',
      refresh: 'Refresh',
      researchReview: 'Research Review',
      researchReviewDescription: 'Surfaces deterministic research-review candidates such as claim-like prose without indexed citations and figure/table metadata gaps. Findings are suggestions only; Learnitive does not rewrite the manuscript.',
      researchReviewFailed: 'Learnitive could not run the research review.',
      researchReviewSummary: ({ findings, files }: { findings: number; files: number }) => `${findings} review finding${findings === 1 ? '' : 's'} across ${files} source file${files === 1 ? '' : 's'}.`,
      researchReviewClear: 'No deterministic research-review candidates were found.',
      researchReviewNoRewrite: 'Research Review is advisory. It never inserts citations, changes claims, or rewrites LaTeX automatically.',
      refactor: 'Refactor',
      renameLabel: 'Rename label',
      renameCitation: 'Rename citation key',
      moveFile: 'Move/rename file',
      currentName: 'Current name',
      newName: 'New name',
      currentPath: 'Current project path',
      newPath: 'New project path',
      symbolRefactorNotice: 'All indexed uses are updated together. Colliding labels or citation keys are rejected.',
      fileRefactorNotice: 'Learnitive moves the file and updates indexed LaTeX references together; the operation rolls back on failure.',
      applyRefactor: 'Apply refactor',
      refactorComplete: 'Project refactor completed.',
      refactorFailed: 'Project refactor failed.',
    },
    pro: {
      title: 'Learnitive Pro',
      description: 'Activate a Learnitive Pro Lifetime or Pro Monthly licence on this browser.',
      checking: 'Checking local Pro entitlement…',
      active: 'Learnitive Pro is active',
      lifetime: '$29 lifetime Pro',
      includes: 'Pro adds unlimited projects, clean PDF export and Priority support. Core writing, compiling, AI, templates and collaboration features remain available on Free.',
      licenseKey: 'Licence key',
      activate: 'Activate Pro',
      activated: 'Learnitive Pro activated.',
      activationFailed: 'The licence could not be activated.',
      source: 'Licence source',
      predefined: 'Learnitive licence',
      fingerprint: 'Fingerprint',
      offlineUntil: 'Offline entitlement valid until',
      offlineExplanation: 'Normal startup verifies this signed entitlement locally. Learnitive only contacts the licence service when activation or periodic refresh is needed.',
      keyPrivacy: 'The key is sent only to the Learnitive licence endpoint for verification. Payhip secrets remain server-side.',
      refresh: 'Refresh licence',
      refreshed: 'Learnitive Pro licence refreshed.',
      refreshFailed: 'The licence could not be refreshed right now.',
      deactivate: 'Deactivate on this browser',
      manage: 'Learnitive Pro licence',
      requiredForAi: 'Cloud BYOK providers are available on every plan with your own provider key. Local AI remains available without a cloud key.',
    },
    ai: {
      title: 'Learnitive AI',
      open: 'Open Learnitive AI',
      close: 'Close Learnitive AI',
      settings: 'AI settings',
      provider: 'Provider',
      model: 'Model',
      modelPlaceholder: 'Enter the model name',
      baseUrl: 'Base URL',
      apiKey: 'API key',
      clearKey: 'Clear API key',
      rememberKey: 'Keep API key in this browser',
      rememberKeyWarning: 'API keys are stored only in this browser’s IndexedDB, survive reloads, and are never stored in your Learnitive account. Clear the key or site/browser data to remove them.',
      saveConfig: 'Save AI settings',
      configSaved: 'AI settings saved.',
      newChat: 'New chat',
      welcome: 'Ask about the current paper or request a project change.',
      contextHint: 'Cloud mode sends only the context and project files the agent requests directly to your chosen provider. Changes always require review before they are applied.',
      inputPlaceholder: 'Ask Learnitive AI…',
      send: 'Send message',
      stop: 'Stop AI request',
      thinking: 'Thinking…',
      applying: 'Applying reviewed changes…',
      compiling: 'Compiling reviewed changes…',
      requestFailed: 'AI request failed.',
      applyFailed: 'AI changes could not be applied.',
      reject: 'Reject',
      apply: 'Apply',
      applyCompile: 'Apply & compile',
      applied: 'AI changes applied.',
      appliedAndCompiled: 'AI changes applied and compile requested.',
      byokNotice: 'Cloud BYOK: requests go directly from this browser to your selected AI provider. Custom endpoints receive your API key and the context you explicitly allow.',
    },
    aiPlaceholder: {
      title: 'Learnitive AI',
      open: 'Open Learnitive AI',
      close: 'Close Learnitive AI',
      description: 'The AI assistant is available across Source, Visual and PDF views. Use Local AI or a supported BYOK cloud provider on any plan.',
      contextHint: 'It will use the current PDF page, SyncTeX source location, selection and project semantic context without resizing the PDF.',
      inputPlaceholder: 'Ask Learnitive AI…',
    },
    git: {
      button: 'Git',
      title: 'Browser Git',
      repositoryDescription: ({ branch }: { branch: string }) =>
        `Local browser repository · ${branch}`,
      notRepositoryDescription:
        'Initialize Git for this project. Project files stay in your selected Learnitive storage; Git history is kept locally in this browser.',
      cloneRepository: 'Clone Git Repository',
      cloneDescription: 'Clone directly into browser project storage. Learnitive does not store the repository on its server.',
      cloneWorkspaceName: 'Workspace name',
      cloneInvalidName: 'Enter a valid workspace name.',
      cloneUrlRequired: 'Enter a Git repository URL.',
      cloning: 'Cloning…',
      cloned: ({ workspace }: { workspace: string }) => `Cloned repository into ${workspace}.`,
      cloneFailed: 'Repository clone failed. The incomplete workspace was removed.',
      initialize: 'Initialize Git',
      initialized: 'Git repository initialized.',
      refresh: 'Refresh Git status',
      tabs: {
        changes: 'Changes',
        history: 'History',
        branches: 'Branches',
        remote: 'Remote',
      },
      staged: 'Staged',
      changes: 'Changes',
      noStagedChanges: 'No staged changes.',
      noChanges: 'Working tree is clean.',
      stage: 'Stage',
      unstage: 'Unstage',
      stageAll: 'Stage all',
      viewDiff: 'Diff',
      closeDiff: 'Close',
      binaryDiff: 'Binary file changed',
      authorName: 'Author name',
      authorEmail: 'Author email',
      commitMessage: 'Commit message',
      commit: 'Commit',
      committed: 'Changes committed.',
      commitFieldsRequired: 'Author name, email, and commit message are required.',
      noCommits: 'No commits yet.',
      current: 'Current',
      checkout: 'Checkout',
      newBranch: 'New branch name',
      createBranch: 'Create branch',
      branchNameRequired: 'Enter a branch name.',
      branchSwitched: ({ branch }: { branch: string }) => `Switched to ${branch}.`,
      remoteName: 'Remote name',
      remoteUrl: 'Remote URL',
      addRemote: 'Add remote',
      remoteFieldsRequired: 'Remote name and URL are required.',
      token: 'Git access token',
      tokenMemoryOnly: 'The token is kept in memory only and is not stored in the project or on Learnitive servers.',
      corsProxy: 'Trusted CORS proxy (optional)',
      fetch: 'Fetch',
      pull: 'Pull',
      push: 'Push',
      pulled: 'Remote changes pulled.',
      pushed: 'Commits pushed.',
    },
    pageNativeFsRecovery: {
      title: 'Reconnect your workspace folder',
      description: ({ wsName }: { wsName: string }) =>
        `Learnitive can’t find the folder linked to “${wsName}”. It may have moved, been deleted, or be on a disconnected drive. Learnitive has not changed your workspace entry or files. Locate the same folder to reconnect it.`,
      locateFolderButton: 'Locate Folder',
      switchWorkspaceButton: 'Switch Project',
    },
    noteNotFoundView: {
      title: 'Note Not Found',
      description:
        "The note you're looking for doesn't exist or has been moved.",
      viewAllNotesButton: 'View All Notes',
      goBackButton: 'Go Back',
      goHomeButton: 'Go Home',
    },
    fileNotFoundView: {
      title: 'File Not Found',
      description:
        "The file you're looking for doesn't exist or has been moved.",
      viewAllFilesButton: 'View All Files',
    },
    workspaceNotFoundView: {
      title: 'Project Not Found',
      description: ({ wsName }: { wsName: string }) =>
        `The project "${wsName}" doesn't exist or was renamed.`,
      genericDescription: "This project doesn't exist or was renamed.",
      goHomeButton: 'Go to Welcome Screen',
      switchWorkspaceButton: 'Switch Project',
    },
    landingPage: 'Landing page',
    components: {
      appSidebar: {
        openedLabel: 'Opened',
        starredLabel: 'Starred',
        filesLabel: 'Files',
        fileTreeLabel: 'Project files',
        noteCount: ({ count }: { count: number }) =>
          count === 1 ? '1 file' : `${count} files`,
        newFileActionTitle: 'New File',
        newFileActionSr: 'Create File',
        newFolderActionTitle: 'New Folder',
        collapseAllFoldersActionTitle: 'Collapse All Folders',
        showNoteFilesOnlyActionTitle: 'Show Markdown Only',
        newNoteHereActionTitle: 'New File Here',
        newFolderHereActionTitle: 'New Folder Here',
        searchFilesActionLabel: 'Search Files',
        copyPathActionTitle: 'Copy path',
        downloadSourceActionTitle: 'Download source',
        openActionTitle: 'Open',
        renameActionTitle: 'Rename',
        moveActionTitle: 'Move',
        deleteActionTitle: 'Delete',
        deleteSelectedFilesActionTitle: ({ count }: { count: number }) =>
          `Delete ${count} files`,
        moveToWorkspaceRootLabel: 'Move to project root',
        workspacesLabel: 'Projects',
        manageLabel: 'Manage',
        manageWorkspaces: 'Manage Projects',
        noWorkspaceSelectedTitle: 'No project selected',
        noWorkspaceSelectedSubtitle: 'Click to select a project',
        mobileTitle: 'Sidebar',
        mobileDescription: 'Navigate projects, files, and app actions.',
        fileTreeErrorMessage:
          'Could not refresh the file list. Showing the last known files.',
        fileTreeErrorRetry: 'Retry',
      },
      notesTable: {
        searchPlaceholder: 'Filter project files',
        columnsButton: 'Columns',
        nameColumn: 'Name',
        locationColumn: 'Location',
        modifiedColumn: 'Modified',
        lastOpenedColumn: 'Last opened',
        noteCount: ({ count }: { count: number }) =>
          count === 1 ? '1 file' : `${count} files`,
        noResultsMessage: 'No project files match your filter.',
        showMoreButton: ({ count }: { count: number }) => `Show ${count} more`,
        starredIndicatorSr: 'Starred',
        sortSr: ({ column }: { column: string }) => `Sort by ${column}`,
        rowActionsSr: ({ fileName }: { fileName: string }) =>
          `Actions for ${fileName}`,
        openAction: 'Open',
        starAction: 'Star',
        unstarAction: 'Unstar',
        renameAction: 'Rename',
        moveAction: 'Move',
        copyPathAction: 'Copy path',
        deleteAction: 'Delete',
      },
      breadcrumb: {
        moreSr: 'More',
      },
      dialog: {
        closeSr: 'Close',
        commandDescriptionSr: 'Type to search and select an item.',
      },
      sheet: {
        closeSr: 'Close',
      },
    },
    funMessages: [
      'Oops! Looks like we took a wrong turn at Albuquerque!',
      'Houston, we have a problem - something got lost in space! 🚀',
      'Playing hide and seek (and winning!) 🙈',
      'Gone on vacation without leaving a forwarding address 🏖',
      'Practicing social distancing 😷',
      "Plot twist: This doesn't exist! 🎬",
      'Abducted by aliens 👽',
      'Lost in the Matrix',
      'Currently exploring parallel universes 🌌',
      'Whoopsie! Out chasing butterflies 🦋',
      'Currently attending a yoga retreat 🧘‍♀️',
      'Not found: Probably getting coffee ☕',
      'Busy building a snowman ⛄',
      'Last seen heading to Narnia 🦁',
      'Off seeking enlightenment 🕯',
      'Gone fishing! 🎣',
      'Busy learning to juggle 🤹‍♂️',
      'Joined the circus 🎪',
      'Currently climbing Mount Everest 🏔',
      'Not here: Practicing dance moves 💃',
      'Took a wrong turn at the information superhighway 🛣',
      'Currently at ninja training camp 🥷',
      'Busy planting trees 🌱',
      'Missing: Exploring the Mariana Trench 🌊',
      'Off chasing rainbows 🌈',
      'Competing in the Olympics 🏅',
      'Busy inventing time travel ⏰',
      'Away: Writing a memoir 📚',
      'On a quest for the holy grail 🏆',
      'Studying quantum mechanics 🔬',
      'Busy counting stars ⭐',
      'Missing: Learning to play the ukulele 🎸',
      'Participating in a pizza eating contest 🍕',
      'Training for a marathon 🏃‍♀️',
      'Currently solving world peace ✌️',
    ],
  },
};
