Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

10.7 KB
Raw Blame
import type { CustomHeaderIssueCode } from '@/modules/config/config.models';

export const en = {
  papra: 'Papra',
  common: {
    close: 'Close',
    cancel: 'Cancel',
    ok: 'OK',
    anErrorOccurred: 'An error occurred',
    email: 'Email',
    name: 'Name',
    error: 'Error',
    delete: 'Delete',
    share: 'Share',
    invalidName: 'Invalid Name',
    save: 'Save',
    retry: 'Retry',
    open: 'Open',
    goBack: 'Go Back',
    done: 'Done',
    confirm: 'Confirm',
    unknownError: 'unknown error',
  },
  navigation: {
    notFoundTitle: 'Oops!',
    notFoundMessage: "This screen doesn't exist.",
    goHome: 'Go to home screen',
    modalMessage: 'This is a modal',
    modalTitle: 'Modal',
  },
  documents: {
    title: 'Documents',
    loadingMore: 'Loading more documents...',
    loadMoreFailed: 'Failed to load more documents.',
    search: {
      title: 'Search',
      placeholder: 'Search documents',
      clear: 'Clear search text',
      hint: 'Search your documents',
      hintDescription: 'Find documents by name or content',
      empty: 'No documents found',
      noResults: ({ query }: { query: string }) => `No results for "${query}"`,
    },
    import: {
      title: 'Import',
      noOrganization: 'No Organization Selected',
      uploadSuccessful: 'Upload Successful',
      selectBeforeImport: 'Please select an organization before importing documents.',
      pickFailed: 'Failed to pick document',
      drawerTitle: 'Import Document',
      fromFiles: 'Import from Files',
      fromFilesDescription: 'Choose a document from your device',
      scan: 'Scan Document',
      scanDescription: 'Use camera to scan a document',
      uploadFailed: 'Upload Failed',
      uploaded: ({ name }: { name: string }) => `Successfully uploaded: ${name}`,
    },
    sharingFailed: 'Sharing Failed',
    sharingUnavailable:
      'Sharing is not available on this device. Please share the document manually.',
    downloadFailed: 'Failed to download document file',
    renameFailed: 'Failed to rename document',
    deleteTitle: 'Delete Document',
    deleteFailed: 'Failed to delete document',
    view: 'View document',
    rename: 'Rename',
    nameRequired: 'Please enter a document name',
    nameTitle: 'Document Name',
    namePlaceholder: 'Enter document name',
    missingIds: 'Organization ID and Document ID are required',
    loading: 'Loading document...',
    loadFailed: 'Failed to load document',
    fallbackName: 'Document',
    downloaded: 'Downloaded',
    tags: 'Tags',
    manageTags: 'Manage tags',
    tagPicker: {
      searchPlaceholder: 'Search tags',
      loading: 'Loading tags...',
      updating: 'Updating tags...',
      loadFailed: 'Failed to load tags. Please try again.',
      updateFailed: 'Failed to update tags. Please try again.',
      empty: 'No tags in this organization yet.',
      noResults: 'No matching tags.',
      noTags: 'No tags assigned.',
    },
    notes: 'Notes',
    size: 'Size',
    type: 'Type',
    date: 'Date',
    id: 'ID',
    properties: 'Properties',
    preview: {
      pdfFailed: 'Failed to load PDF',
      unavailable: 'Preview not available',
      unsupported: 'This file type cannot be previewed in the app',
    },
    userSettings: 'User settings',
    emptyTitle: 'No documents yet',
    emptySubtitle: 'Upload your first document to get started',
    share: {
      selectOrganization: 'Please select an organization to save the document to.',
      destinationFallback: 'your organization',
      savedTitle: 'Saved to Papra',
      saved: ({ name, destination }: { name: string; destination: string }) =>
        `${name} has been saved to ${destination}.`,
      savedMultiple: ({ count, destination }: { count: number; destination: string }) =>
        `${count} documents have been saved to ${destination}.`,
      save: 'Save to Papra',
      saveMultiple: ({ count }: { count: number }) => `Save ${count} documents`,
      empty: 'No shared file to save.',
      uploading: 'Uploading...',
      uploadError: ({ name, error }: { name: string; error: string }) =>
        `Failed to upload ${name}: ${error}`,
      uploadProgress: ({ current, total }: { current: number; total: number }) =>
        `Uploading ${current} of ${total}...`,
    },
    nameLabel: 'Document name',
    scan: {
      errorTitle: 'Scan Error',
      failed: 'Failed to scan document',
      selectBeforeUpload: 'Please select an organization before uploading.',
      nameRequiredTitle: 'Name Required',
      nameRequired: 'Please enter a document name.',
      uploadFailed: 'Failed to upload documents. Please try again.',
      uploaded: ({ count }: { count: number }) =>
        count > 1
          ? `Successfully uploaded ${count} documents.`
          : `Successfully uploaded ${count} document.`,
      pageCount: ({ count }: { count: number }) => (count > 1 ? `${count} pages` : `${count} page`),
      opening: 'Opening scanner...',
      empty: 'No images to review',
      title: 'Review Scan',
      uploadTo: 'Upload to',
      processing: 'Processing and uploading...',
      outputFormat: 'Output Format',
      formats: {
        pdf: 'PDF',
        pdfDescription: 'Save scan as a PDF',
        mergedDescription: 'All scans merged into a single multi-page PDF',
        pdfs: 'PDFs',
        pdfsDescription: 'Save each scan as individual PDF',
        image: 'Image',
        imageDescription: 'Save scan as an image',
        images: 'Images',
        imagesDescription: 'Save each scan as individual images',
      },
    },
    deleteConfirmation: ({ name }: { name: string }) =>
      `Are you sure you want to delete "${name}"? It will be moved to the trash.`,
    saved: ({ name }: { name: string }) => `${name} has been saved`,
  },
  auth: {
    password: 'Password',
    emailPlaceholder: '[email protected]',
    validation: {
      email: 'Please enter a valid email',
      password: 'Password must be at least 8 characters',
      name: 'Name is required',
    },
    login: {
      failed: 'Login Failed',
      socialFailed: 'Sign In Failed',
      title: 'Welcome Back',
      subtitle: 'Sign in to your account',
      passwordPlaceholder: 'Enter your password',
      submit: 'Sign In',
      or: 'OR',
      signupLink: "Don't have an account? Sign up",
      continueWith: ({ name }: { name: string }) => `Continue with ${name}`,
    },
    twoFactor: {
      title: 'Two-Factor Authentication',
      subtitle: 'Verify your identity to continue',
      failed: 'Verification Failed',
      backupCode: 'Backup code',
      verificationCode: 'Verification code',
      backupDescription: 'Enter one of your backup codes',
      verificationDescription: 'Enter the 6-digit code from your authenticator app',
      backupPlaceholder: 'Enter a backup code',
      verificationPlaceholder: '000000',
      trustDevice: 'Trust this device',
      verify: 'Verify',
      useAuthenticator: 'Use an authenticator code',
      useBackupCode: 'Use a backup code',
      backToLogin: 'Back to login',
    },
    signup: {
      checkEmail: 'Check your email',
      verificationSent:
        'We sent you a verification link. Please check your email to verify your account.',
      failed: 'Signup Failed',
      disabled: 'Registration is currently disabled',
      backToLogin: 'Go back to login',
      title: 'Create Account',
      subtitle: 'Sign up to get started',
      namePlaceholder: 'Your name',
      passwordPlaceholder: 'At least 8 characters',
      submit: 'Sign Up',
      loginLink: 'Already have an account? Sign in',
    },
  },
  organizations: {
    label: 'Organization',
    selectPlaceholder: 'Select an organization',
    selectTitle: 'Select Organization',
    createNew: '+ Create New Organization',
    createFailed: 'Failed to create organization',
    nameRequired: 'Please enter a valid organization name',
    createTitle: 'Create organization',
    createDescription:
      'Your documents will be grouped by organization. You can create multiple organizations to separate your documents, for example, for personal and work documents.',
    nameLabel: 'Organization Name',
    namePlaceholder: 'My Organization',
    create: 'Create Organization',
  },
  appSettings: {
    title: 'App settings',
    about: {
      title: 'About',
      version: 'Version',
      commit: 'Commit',
      unknown: 'Unknown',
    },
    language: {
      title: 'Language',
      description: 'Choose the language used by the app on this device.',
      useDeviceLanguage: 'Use device language',
    },
    errors: {
      saveFailed: {
        title: 'Could not save language',
        message: 'Your language has not been changed. Please try again.',
      },
    },
  },
  settings: {
    title: 'Settings',
    account: 'Account',
    app: 'App',
    name: 'Name',
    email: 'Email',
    emailVerified: 'Email verified',
    yes: 'Yes',
    no: 'No',
    signOut: {
      title: 'Sign out',
      confirmation: 'Are you sure you want to sign out?',
    },
  },
  serverSelection: {
    selectServer: 'Select server',
    title: 'Organize, secure &\narchive your documents.',
    subtitle: 'First, choose where your documents live.',
    continue: 'Continue',
    managedCloud: {
      title: 'Managed Cloud',
      description: 'Use the official Papra cloud service',
    },
    selfHosted: {
      title: 'Self-Hosted',
      description: 'Connect to your own Papra server',
    },
    serverUrl: {
      label: 'Server URL',
      placeholder: 'https://your-server.com',
    },
    customHeaders: {
      label: ({ count }: { count: number }) =>
        count > 0 ? `Custom headers (${count})` : 'Custom headers',
      namePlaceholder: 'Name',
      valuePlaceholder: 'Value',
      deleteLabel: ({ name }: { name: string }) => `Delete header ${name}`,
      add: 'Add header',
      parsingErrors: {
        'empty-name': () => `Header names cannot be empty.`,
        'invalid-name': ({ headerName }) => `The header name "${headerName}" is invalid.`,
        'forbidden-name': ({ headerName }) =>
          `The header name "${headerName}" is managed by the app or by the protocol and cannot be set manually.`,
        'invalid-value': ({ headerName }) =>
          `The value for the header "${headerName}" is invalid. It cannot contain line breaks.`,
      } satisfies Record<CustomHeaderIssueCode, (arg: { headerName: string }) => string>,
    },
    errors: {
      invalidUrl: {
        title: 'Invalid URL',
        message:
          'Please enter a valid server URL. Make sure to include the protocol (http:// or https://).',
      },
      invalidCustomHeader: {
        title: 'Invalid Custom Header',
      },
      connectionFailed: {
        title: 'Connection Failed',
        message: 'Could not reach the server.',
      },
      saveFailed: {
        title: 'Something Went Wrong',
        message: 'Could not save the server configuration. Please try again.',
      },
    },
  },
};