mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Cleanup-conversion-translations (#5906)
Co-authored-by: Anthony Stirling <[email protected]>
This commit is contained in:
co-authored by
Anthony Stirling
parent
b68b406a2a
commit
0545c3f997
@@ -2759,6 +2759,15 @@ webOptions = "Web to PDF Options"
|
||||
wordDoc = "Word Document"
|
||||
wordDocExt = "Word Document (.docx)"
|
||||
zoomLevel = "Zoom Level"
|
||||
cbrToPdf = "CBR → PDF"
|
||||
cbzToPdf = "CBZ → PDF"
|
||||
ebookToPdf = "eBook → PDF"
|
||||
emlToPdf = "Email → PDF"
|
||||
fileToPdf = "Office/Document → PDF"
|
||||
pdfToCbr = "PDF → CBR"
|
||||
pdfToCbz = "PDF → CBZ"
|
||||
pdfToEpub = "PDF → EPUB"
|
||||
svgToPdf = "SVG → PDF"
|
||||
|
||||
[convert.ebookOptions]
|
||||
ebookOptions = "eBook to PDF Options"
|
||||
@@ -5822,30 +5831,6 @@ showTools = "View unavailable tools ▾"
|
||||
title = "Your Stirling-PDF server is unreachable"
|
||||
toolNotAvailableLocally = "Your Stirling-PDF server is offline and \"{{endpoint}}\" is not available on the local backend."
|
||||
|
||||
[selfHosted.offline.conversionTypes]
|
||||
cbr-to-pdf = "CBR → PDF"
|
||||
cbz-to-pdf = "CBZ → PDF"
|
||||
eml-to-pdf = "Email → PDF"
|
||||
ebook-to-pdf = "eBook → PDF"
|
||||
file-to-pdf = "Office/Document → PDF"
|
||||
html-to-pdf = "HTML → PDF"
|
||||
img-to-pdf = "Image → PDF"
|
||||
markdown-to-pdf = "Markdown → PDF"
|
||||
pdf-to-cbr = "PDF → CBR"
|
||||
pdf-to-cbz = "PDF → CBZ"
|
||||
pdf-to-csv = "PDF → CSV"
|
||||
pdf-to-epub = "PDF → EPUB"
|
||||
pdf-to-html = "PDF → HTML"
|
||||
pdf-to-img = "PDF → Image"
|
||||
pdf-to-markdown = "PDF → Markdown"
|
||||
pdf-to-pdfa = "PDF → PDF/A"
|
||||
pdf-to-presentation = "PDF → Presentation"
|
||||
pdf-to-text = "PDF → Text"
|
||||
pdf-to-word = "PDF → Word"
|
||||
pdf-to-xml = "PDF → XML"
|
||||
pdf-to-xlsx = "PDF → XLSX"
|
||||
svg-to-pdf = "SVG → PDF"
|
||||
|
||||
[session]
|
||||
expired = "Your session has expired. Please refresh the page and try again."
|
||||
refreshPage = "Refresh Page"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Stirling-PDF",
|
||||
"version": "2.6.0",
|
||||
"version": "2.7.1",
|
||||
"identifier": "stirling.pdf.dev",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
@@ -71,6 +71,31 @@ export const ENDPOINT_NAMES = {
|
||||
'text-editor-pdf': 'text-editor-to-pdf'
|
||||
} as const;
|
||||
|
||||
/** Maps conversion endpoint → [i18n key, English fallback] for display names */
|
||||
export const ENDPOINT_I18N: Record<string, [string, string]> = {
|
||||
'img-to-pdf': ['imageToPDF.header', 'Image → PDF'],
|
||||
'html-to-pdf': ['HTMLToPDF.header', 'HTML → PDF'],
|
||||
'markdown-to-pdf': ['MarkdownToPDF.header', 'Markdown → PDF'],
|
||||
'pdf-to-img': ['pdfToImage.title', 'PDF → Image'],
|
||||
'pdf-to-word': ['PDFToWord.header', 'PDF → Word'],
|
||||
'pdf-to-presentation': ['PDFToPresentation.header', 'PDF → Presentation'],
|
||||
'pdf-to-text': ['PDFToText.header', 'PDF → Text'],
|
||||
'pdf-to-csv': ['PDFToCSV.header', 'PDF → CSV'],
|
||||
'pdf-to-xlsx': ['PDFToXLSX.header', 'PDF → Excel'],
|
||||
'pdf-to-markdown': ['PDFToMarkdown.header', 'PDF → Markdown'],
|
||||
'pdf-to-html': ['PDFToHTML.header', 'PDF → HTML'],
|
||||
'pdf-to-xml': ['PDFToXML.header', 'PDF → XML'],
|
||||
'pdf-to-pdfa': ['pdfToPDFA.header', 'PDF → PDF/A'],
|
||||
'file-to-pdf': ['convert.fileToPdf', 'Office/Document → PDF'],
|
||||
'cbr-to-pdf': ['convert.cbrToPdf', 'CBR → PDF'],
|
||||
'cbz-to-pdf': ['convert.cbzToPdf', 'CBZ → PDF'],
|
||||
'eml-to-pdf': ['convert.emlToPdf', 'Email → PDF'],
|
||||
'ebook-to-pdf': ['convert.ebookToPdf', 'eBook → PDF'],
|
||||
'svg-to-pdf': ['convert.svgToPdf', 'SVG → PDF'],
|
||||
'pdf-to-cbr': ['convert.pdfToCbr', 'PDF → CBR'],
|
||||
'pdf-to-cbz': ['convert.pdfToCbz', 'PDF → CBZ'],
|
||||
'pdf-to-epub': ['convert.pdfToEpub', 'PDF → EPUB'],
|
||||
};
|
||||
|
||||
// Grouped file extensions for dropdowns
|
||||
export const FROM_FORMAT_OPTIONS = [
|
||||
|
||||
@@ -38,7 +38,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
|
||||
|
||||
const BASE_NO_LOGIN_CONFIG: AppConfig = {
|
||||
enableAnalytics: true,
|
||||
appVersion: '2.6.0',
|
||||
appVersion: '2.7.1',
|
||||
serverCertificateEnabled: false,
|
||||
enableAlphaFunctionality: false,
|
||||
serverPort: 8080,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { selfHostedServerMonitor, type SelfHostedServerState } from '@app/servic
|
||||
import { connectionModeService, type ConnectionMode } from '@app/services/connectionModeService';
|
||||
import { tauriBackendService } from '@app/services/tauriBackendService';
|
||||
import { endpointAvailabilityService } from '@app/services/endpointAvailabilityService';
|
||||
import { EXTENSION_TO_ENDPOINT } from '@app/constants/convertConstants';
|
||||
import { EXTENSION_TO_ENDPOINT, ENDPOINT_I18N } from '@app/constants/convertConstants';
|
||||
import { ENDPOINTS as SPLIT_ENDPOINTS } from '@app/constants/splitConstants';
|
||||
import type { ToolId } from '@app/types/toolId';
|
||||
|
||||
@@ -28,14 +28,6 @@ const SPLIT_ENDPOINT_I18N: Record<string, [string, string]> = {
|
||||
'split-for-poster-print': ['split.methods.byPoster.name', 'Printable Chunks'],
|
||||
};
|
||||
|
||||
/** Conversion endpoint keys that have translations under selfHosted.offline.conversionTypes */
|
||||
const KNOWN_CONVERSION_ENDPOINTS = new Set([
|
||||
'file-to-pdf', 'pdf-to-img', 'img-to-pdf', 'svg-to-pdf', 'cbz-to-pdf',
|
||||
'pdf-to-cbz', 'pdf-to-word', 'pdf-to-presentation', 'pdf-to-text', 'pdf-to-csv',
|
||||
'pdf-to-xlsx', 'pdf-to-markdown', 'pdf-to-html', 'pdf-to-xml', 'pdf-to-pdfa',
|
||||
'html-to-pdf', 'markdown-to-pdf', 'eml-to-pdf', 'cbr-to-pdf', 'pdf-to-cbr',
|
||||
'ebook-to-pdf', 'pdf-to-epub',
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
@@ -136,8 +128,9 @@ export function SelfHostedOfflineBanner() {
|
||||
}
|
||||
const conversionNames = [...unavailableEndpoints]
|
||||
.map(ep => {
|
||||
const suffix = KNOWN_CONVERSION_ENDPOINTS.has(ep)
|
||||
? t(`selfHosted.offline.conversionTypes.${ep}`, ep)
|
||||
const i18n = ENDPOINT_I18N[ep];
|
||||
const suffix = i18n
|
||||
? (i18n[0] ? t(i18n[0], i18n[1]) : i18n[1])
|
||||
: ep;
|
||||
return `${convertPrefix}: ${suffix}`;
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
|
||||
|
||||
const BASE_NO_LOGIN_CONFIG: AppConfig = {
|
||||
enableAnalytics: true,
|
||||
appVersion: '2.6.0',
|
||||
appVersion: '2.7.1',
|
||||
serverCertificateEnabled: false,
|
||||
enableAlphaFunctionality: false,
|
||||
enableDesktopInstallSlide: true,
|
||||
|
||||
Reference in New Issue
Block a user