Merge pull request #298 from Nello-Moreira/fix-pdf-plural

Fix pdf plural
This commit is contained in:
Chesterkxng
2026-03-29 23:40:30 +02:00
committed by GitHub
12 changed files with 58 additions and 44 deletions
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Ändern Sie die Ausrichtung von PDF-Seiten, indem Sie sie um 90, 180 oder 270 Grad drehen. Nützlich zum Korrigieren falsch gescannter Dokumente oder zum Vorbereiten von PDFs für den Druck.",
"pageRangesDescription": "Geben Sie Seitenzahlen oder Bereiche durch Kommas getrennt ein (z. B. 1,3,5-7).",
"pageRangesPlaceholder": "z.B. 1,5-8",
"pagesWillBeRotated": "{{count}} Seite{{count !== 1 ? 's' : ''}} wird gedreht",
"pdfPageCount": "PDF hat {{count}} Seite{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} Seite{{plural}} wird gedreht",
"pdfPageCount": "PDF hat {{count}} Seite{{plural}}",
"resultTitle": "Gedrehtes PDF",
"rotatingPages": "Seiten drehen",
"rotationAngle": "Drehwinkel",
@@ -103,11 +103,11 @@
"description": "Extrahieren Sie bestimmte Seiten aus einem PDF-Dokument.",
"extractingPages": "Seiten extrahieren",
"inputTitle": "Eingabe-PDF",
"pageExtractionPreview": "{{count}} Seite{{count !== 1 ? 's' : ''}} wird extrahiert",
"pageExtractionPreview": "{{count}} Seite{{plural}} wird extrahiert",
"pageRangesDescription": "Geben Sie Seitenzahlen oder Bereiche durch Kommas getrennt ein (z. B. 1,3,5-7).",
"pageRangesPlaceholder": "z.B. 1,5-8",
"pageSelection": "Seitenauswahl",
"pdfPageCount": "PDF hat {{count}} Seite{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF hat {{count}} Seite{{plural}}",
"resultTitle": "Extrahiertes PDF",
"shortDescription": "Extrahieren Sie bestimmte Seiten aus einer PDF-Datei",
"title": "PDF teilen",
+4 -4
View File
@@ -98,8 +98,8 @@
"longDescription": "Change the orientation of PDF pages by rotating them 90, 180, or 270 degrees. Useful for fixing incorrectly scanned documents or preparing PDFs for printing.",
"pageRangesDescription": "Enter page numbers or ranges separated by commas (e.g., 1,3,5-7)",
"pageRangesPlaceholder": "e.g., 1,5-8",
"pagesWillBeRotated": "{{count}} page{{count !== 1 ? 's' : ''}} will be rotated",
"pdfPageCount": "PDF has {{count}} page{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} page{{plural}} will be rotated",
"pdfPageCount": "PDF has {{count}} page{{plural}}",
"resultTitle": "Rotated PDF",
"rotatingPages": "Rotating pages",
"rotationAngle": "Rotation Angle",
@@ -115,11 +115,11 @@
"description": "Extract specific pages from a PDF document.",
"extractingPages": "Extracting pages",
"inputTitle": "Input PDF",
"pageExtractionPreview": "{{count}} page{{count !== 1 ? 's' : ''}} will be extracted",
"pageExtractionPreview": "{{count}} page{{ plural }} will be extracted",
"pageRangesDescription": "Enter page numbers or ranges separated by commas (e.g., 1,3,5-7)",
"pageRangesPlaceholder": "e.g., 1,5-8",
"pageSelection": "Page Selection",
"pdfPageCount": "PDF has {{count}} page{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF has {{count}} page{{plural}}",
"resultTitle": "Extracted PDF",
"shortDescription": "Extract specific pages from a PDF file",
"title": "Split PDF",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Cambie la orientación de las páginas PDF girándolas 90, 180 o 270 grados. Útil para corregir documentos escaneados incorrectamente o preparar archivos PDF para imprimir.",
"pageRangesDescription": "Introduzca números de página o rangos separados por comas (por ejemplo, 1, 3, 5-7)",
"pageRangesPlaceholder": "p. ej., 1,5-8",
"pagesWillBeRotated": "{{count}} página{{count !== 1 ? 's' : ''}} se rotará",
"pdfPageCount": "PDF tiene {{count}} página{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} página{{plural}} se rotará",
"pdfPageCount": "PDF tiene {{count}} página{{plural}}",
"resultTitle": "PDF rotado",
"rotatingPages": "Páginas rotatorias",
"rotationAngle": "Ángulo de rotación",
@@ -103,11 +103,11 @@
"description": "Extraer páginas específicas de un documento PDF.",
"extractingPages": "Extrayendo páginas",
"inputTitle": "PDF de entrada",
"pageExtractionPreview": "{{count}} página{{count !== 1 ? 's' : ''}} se extraerán",
"pageExtractionPreview": "{{count}} página{{ plural }} se extraerán",
"pageRangesDescription": "Introduzca números de página o rangos separados por comas (por ejemplo, 1, 3, 5-7)",
"pageRangesPlaceholder": "p. ej., 1,5-8",
"pageSelection": "Selección de página",
"pdfPageCount": "PDF tiene {{count}} página{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF tiene {{count}} página{{plural}}",
"resultTitle": "PDF extraído",
"shortDescription": "Extraer páginas específicas de un archivo PDF",
"title": "PDF dividido",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Modifiez l'orientation des pages PDF en les faisant pivoter de 90, 180 ou 270 degrés. Utile pour corriger des documents mal numérisés ou préparer des PDF pour l'impression.",
"pageRangesDescription": "Saisissez les numéros de page ou les plages séparés par des virgules (par exemple, 1, 3, 5-7)",
"pageRangesPlaceholder": "par exemple, 1,5-8",
"pagesWillBeRotated": "{{count}} page{{count !== 1 ? 's' : ''}} sera tourné",
"pdfPageCount": "PDF a {{count}} page{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} page{{plural}} sera tourné",
"pdfPageCount": "PDF a {{count}} page{{plural}}",
"resultTitle": "PDF pivoté",
"rotatingPages": "Rotation des pages",
"rotationAngle": "Angle de rotation",
@@ -103,11 +103,11 @@
"description": "Extraire des pages spécifiques d'un document PDF.",
"extractingPages": "Extraire les pages",
"inputTitle": "Entrée PDF",
"pageExtractionPreview": "{{count}} page{{count !== 1 ? 's' : ''}} sera(ont) extrait(s)",
"pageExtractionPreview": "{{count}} page{{plural}} sera(ont) extrait(s)",
"pageRangesDescription": "Saisissez les numéros de page ou les plages séparés par des virgules (par exemple, 1, 3, 5-7)",
"pageRangesPlaceholder": "par exemple, 1,5-8",
"pageSelection": "Sélection de page",
"pdfPageCount": "PDF a {{count}} page{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF a {{count}} page{{plural}}",
"resultTitle": "PDF extrait",
"shortDescription": "Extraire des pages spécifiques d'un fichier PDF",
"title": "Diviser le PDF",
+4 -4
View File
@@ -122,8 +122,8 @@
"pageRangesDescription": "पृष्ठ संख्या या श्रेणियाँ अल्पविराम से अलग करके दर्ज करें (उदाहरण के लिए, 1,3,5-7)",
"pageRangesPlaceholder": "उदाहरणार्थ, 1,5-8",
"pagesPlaceholder": "जैसे 1,3-5,7",
"pagesWillBeRotated": "{{count}} पृष्ठ{{count !== 1 ? 's' : ''}} घुमाया जाएगा",
"pdfPageCount": "पीडीएफ में है {{count}} पृष्ठ{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} पृष्ठ घुमाया जाएगा",
"pdfPageCount": "पीडीएफ में है {{count}} पृष्ठ",
"resultTitle": "घुमाया गया PDF",
"rotatingPages": "घूमते हुए पृष्ठ",
"rotationAngle": "घुमाने का कोण",
@@ -142,12 +142,12 @@
"extractingPages": "पृष्ठ निकालना",
"includeBookmarks": "बुकमार्क शामिल करें",
"inputTitle": "इनपुट PDF",
"pageExtractionPreview": "{{count}} पृष्ठ{{count !== 1 ? 's' : ''}} निकाला जाएगा",
"pageExtractionPreview": "{{count}} पृष्ठ निकाला जाएगा",
"pageRanges": "पेज श्रेणियां",
"pageRangesDescription": "पृष्ठ संख्या या श्रेणियाँ अल्पविराम से अलग करके दर्ज करें (उदाहरण के लिए, 1,3,5-7)",
"pageRangesPlaceholder": "उदाहरणार्थ, 1,5-8",
"pageSelection": "पृष्ठ चयन",
"pdfPageCount": "पीडीएफ में है {{count}} पृष्ठ{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "पीडीएफ में है {{count}} पृष्ठ",
"rangesPlaceholder": "जैसे 1,3-5,7",
"resultTitle": "विभाजित PDF फ़ाइलें",
"shortDescription": "पीडीएफ फ़ाइल से विशिष्ट पेज निकालें",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "PDFページの向きを90度、180度、または270度回転して変更できます。スキャンミスを修正したり、印刷用のPDFを準備したりする際に便利です。",
"pageRangesDescription": "ページ番号または範囲をコンマで区切って入力してください(例:1,3,5-7)",
"pageRangesPlaceholder": "例:1.5-8",
"pagesWillBeRotated": "{{count}} ページ{{count !== 1 ? 's' : ''}} 回転します",
"pdfPageCount": "PDFには {{count}} ページ{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} ページ 回転します",
"pdfPageCount": "PDFには {{count}} ページ",
"resultTitle": "回転したPDF",
"rotatingPages": "ページの回転",
"rotationAngle": "回転角度",
@@ -103,11 +103,11 @@
"description": "PDF ドキュメントから特定のページを抽出します。",
"extractingPages": "ページの抽出",
"inputTitle": "入力PDF",
"pageExtractionPreview": "{{count}} ページ{{count !== 1 ? 's' : ''}} 抽出されます",
"pageExtractionPreview": "{{count}} ページ 抽出されます",
"pageRangesDescription": "ページ番号または範囲をコンマで区切って入力してください(例:1,3,5-7)",
"pageRangesPlaceholder": "例:1.5-8",
"pageSelection": "ページ選択",
"pdfPageCount": "PDFには {{count}} ページ{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDFには {{count}} ページ",
"resultTitle": "抽出されたPDF",
"shortDescription": "PDFファイルから特定のページを抽出する",
"title": "PDFを分割",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Wijzig de oriëntatie van PDF-pagina's door ze 90, 180 of 270 graden te draaien. Handig voor het corrigeren van onjuist gescande documenten of het voorbereiden van PDF's voor afdrukken.",
"pageRangesDescription": "Voer paginanummers of bereiken in, gescheiden door komma's (bijv. 1, 3, 5-7)",
"pageRangesPlaceholder": "bijv. 1,5-8",
"pagesWillBeRotated": "{{count}} pagina{{count !== 1 ? 's' : ''}} zal worden gedraaid",
"pdfPageCount": "PDF heeft {{count}} pagina{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} pagina{{plural}} zal worden gedraaid",
"pdfPageCount": "PDF heeft {{count}} pagina{{plural}}",
"resultTitle": "Gedraaide PDF",
"rotatingPages": "Roterende pagina's",
"rotationAngle": "Rotatiehoek",
@@ -103,11 +103,11 @@
"description": "Specifieke pagina's uit een PDF-document extraheren.",
"extractingPages": "Pagina's extraheren",
"inputTitle": "PDF-invoer",
"pageExtractionPreview": "{{count}} pagina{{count !== 1 ? 's' : ''}} zal worden geëxtraheerd",
"pageExtractionPreview": "{{count}} pagina{{ plural }} zal worden geëxtraheerd",
"pageRangesDescription": "Voer paginanummers of bereiken in, gescheiden door komma's (bijv. 1, 3, 5-7)",
"pageRangesPlaceholder": "bijv. 1,5-8",
"pageSelection": "Paginaselectie",
"pdfPageCount": "PDF heeft {{count}} pagina{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF heeft {{count}} pagina{{plural}}",
"resultTitle": "Geëxtraheerde PDF",
"shortDescription": "Specifieke pagina's uit een PDF-bestand extraheren",
"title": "PDF splitsen",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Altere a orientação das páginas do PDF girando-as 90, 180 ou 270 graus. Útil para corrigir documentos digitalizados incorretamente ou preparar PDFs para impressão.",
"pageRangesDescription": "Insira números de página ou intervalos separados por vírgulas (por exemplo, 1,3,5-7)",
"pageRangesPlaceholder": "por exemplo, 1,5-8",
"pagesWillBeRotated": "{{count}} página{{count !== 1 ? 's' : ''}} será girado",
"pdfPageCount": "PDF tem {{count}} página{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} página{{plural}} será girado",
"pdfPageCount": "PDF tem {{count}} página{{plural}}",
"resultTitle": "PDF girado",
"rotatingPages": "Páginas rotativas",
"rotationAngle": "Ângulo de rotação",
@@ -103,11 +103,11 @@
"description": "Extraia páginas específicas de um documento PDF.",
"extractingPages": "Extraindo páginas",
"inputTitle": "PDF de entrada",
"pageExtractionPreview": "{{count}} página{{count !== 1 ? 's' : ''}} será extraído",
"pageExtractionPreview": "{{count}} página{{ plural }} será extraído",
"pageRangesDescription": "Insira números de página ou intervalos separados por vírgulas (por exemplo, 1,3,5-7)",
"pageRangesPlaceholder": "por exemplo, 1,5-8",
"pageSelection": "Seleção de página",
"pdfPageCount": "PDF tem {{count}} página{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF tem {{count}} página{{plural}}",
"resultTitle": "PDF extraído",
"shortDescription": "Extrair páginas específicas de um arquivo PDF",
"title": "Dividir PDF",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "Измените ориентацию страниц PDF-файла, повернув их на 90, 180 или 270 градусов. Это полезно для исправления неправильно отсканированных документов или подготовки PDF-файлов к печати.",
"pageRangesDescription": "Введите номера страниц или диапазоны, разделенные запятыми (например, 1,3,5-7)",
"pageRangesPlaceholder": "например, 1,5-8",
"pagesWillBeRotated": "{{count}} страница{{count !== 1 ? 's' : ''}} будет вращаться",
"pdfPageCount": "PDF имеет {{count}} страница{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} страница будет вращаться",
"pdfPageCount": "PDF имеет {{count}} страница",
"resultTitle": "Повернутый PDF-файл",
"rotatingPages": "Ротация страниц",
"rotationAngle": "Угол поворота",
@@ -103,11 +103,11 @@
"description": "Извлечение определенных страниц из PDF-документа.",
"extractingPages": "Извлечение страниц",
"inputTitle": "Входной PDF-файл",
"pageExtractionPreview": "{{count}} страница{{count !== 1 ? 's' : ''}} будут извлечены",
"pageExtractionPreview": "{{count}} страница будут извлечены",
"pageRangesDescription": "Введите номера страниц или диапазоны, разделенные запятыми (например, 1,3,5-7)",
"pageRangesPlaceholder": "например, 1,5-8",
"pageSelection": "Выбор страницы",
"pdfPageCount": "PDF имеет {{count}} страница{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF имеет {{count}} страница",
"resultTitle": "Извлеченный PDF-файл",
"shortDescription": "Извлечь определенные страницы из PDF-файла",
"title": "Разделить PDF",
+4 -4
View File
@@ -86,8 +86,8 @@
"longDescription": "通过将 PDF 页面旋转 90 度、180 度或 270 度来更改其方向。这对于修复扫描错误的文档或准备打印 PDF 非常有用。",
"pageRangesDescription": "输入页码或范围,以逗号分隔(例如,1,3,5-7)",
"pageRangesPlaceholder": "例如,1.5-8",
"pagesWillBeRotated": "{{count}} 页{{count !== 1 ? 's' : ''}} 将会轮换",
"pdfPageCount": "PDF 有 {{count}} 页{{count !== 1 ? 's' : ''}}",
"pagesWillBeRotated": "{{count}} 页 将会轮换",
"pdfPageCount": "PDF 有 {{count}} 页",
"resultTitle": "旋转的 PDF",
"rotatingPages": "旋转页面",
"rotationAngle": "旋转角度",
@@ -103,11 +103,11 @@
"description": "从 PDF 文档中提取特定页面。",
"extractingPages": "提取页面",
"inputTitle": "输入 PDF",
"pageExtractionPreview": "{{count}} 页{{count !== 1 ? 's' : ''}} 将被提取",
"pageExtractionPreview": "{{count}} 页 将被提取",
"pageRangesDescription": "输入页码或范围,以逗号分隔(例如,1,3,5-7)",
"pageRangesPlaceholder": "例如,1.5-8",
"pageSelection": "页面选择",
"pdfPageCount": "PDF 有 {{count}} 页{{count !== 1 ? 's' : ''}}",
"pdfPageCount": "PDF 有 {{count}} 页",
"resultTitle": "提取的 PDF",
"shortDescription": "从 PDF 文件中提取特定页面",
"title": "拆分 PDF",
+8 -2
View File
@@ -92,7 +92,10 @@ export default function RotatePdf({
if (applyToAllPages) {
setPageRangePreview(
totalPages > 0
? t('rotatePdf.allPagesWillBeRotated', { count: totalPages })
? t('rotatePdf.allPagesWillBeRotated', {
count: totalPages,
plural: totalPages === 1 ? '' : 's'
})
: ''
);
return;
@@ -191,7 +194,10 @@ export default function RotatePdf({
<Box sx={{ mt: 2 }}>
{totalPages > 0 && (
<Typography variant="body2" sx={{ mb: 1 }}>
{t('rotatePdf.pdfPageCount', { count: totalPages })}
{t('rotatePdf.pdfPageCount', {
count: totalPages,
plural: totalPages === 1 ? '' : 's'
})}
</Typography>
)}
<TextFieldWithDesc
+10 -2
View File
@@ -85,7 +85,12 @@ export default function SplitPdf({ title }: ToolComponentProps) {
}
try {
const count = parsePageRanges(pageRanges, totalPages).length;
setPageRangePreview(t('splitPdf.pageExtractionPreview', { count }));
setPageRangePreview(
t('splitPdf.pageExtractionPreview', {
count,
plural: count === 1 ? '' : 's'
})
);
} catch (error) {
setPageRangePreview('');
}
@@ -137,7 +142,10 @@ export default function SplitPdf({ title }: ToolComponentProps) {
<Box>
{totalPages > 0 && (
<Typography variant="body2" sx={{ mb: 1 }}>
{t('splitPdf.pdfPageCount', { count: totalPages })}
{t('splitPdf.pdfPageCount', {
count: totalPages,
plural: totalPages === 1 ? '' : 's'
})}
</Typography>
)}
<TextFieldWithDesc