From 73f90885b448d009262a76d48044355f24ca881f Mon Sep 17 00:00:00 2001 From: diemade Date: Sat, 20 Apr 2024 11:45:58 +0200 Subject: [PATCH 01/38] Update messages_de_DE.properties (#1069) Only full sentences should end in a period, Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> --- src/main/resources/messages_de_DE.properties | 56 ++++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index f5a53881..535a2236 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -188,58 +188,58 @@ home.multiTool.desc=Seiten zusammenführen, drehen, neu anordnen und entfernen multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side home.merge.title=Zusammenführen -home.merge.desc=Mehrere PDF-Dateien zu einer einzigen zusammenführen. +home.merge.desc=Mehrere PDF-Dateien zu einer einzigen zusammenführen merge.tags=zusammenführen,seitenvorgänge,back end,serverseite home.split.title=Aufteilen -home.split.desc=PDFs in mehrere Dokumente aufteilen. +home.split.desc=PDFs in mehrere Dokumente aufteilen split.tags=seitenoperationen,teilen,mehrseitig,ausschneiden,serverseitig home.rotate.title=Drehen -home.rotate.desc=Drehen Sie Ihre PDFs ganz einfach. +home.rotate.desc=Drehen Sie Ihre PDFs ganz einfach rotate.tags=serverseitig home.imageToPdf.title=Bild zu PDF -home.imageToPdf.desc=Konvertieren Sie ein Bild (PNG, JPEG, GIF) in ein PDF. +home.imageToPdf.desc=Konvertieren Sie ein Bild (PNG, JPEG, GIF) in ein PDF imageToPdf.tags=konvertierung,img,jpg,bild,foto home.pdfToImage.title=PDF zu Bild -home.pdfToImage.desc=Konvertieren Sie ein PDF in ein Bild (PNG, JPEG, GIF). +home.pdfToImage.desc=Konvertieren Sie ein PDF in ein Bild (PNG, JPEG, GIF) pdfToImage.tags=konvertierung,img,jpg,bild,foto home.pdfOrganiser.title=Organisieren -home.pdfOrganiser.desc=Seiten entfernen und Seitenreihenfolge ändern. +home.pdfOrganiser.desc=Seiten entfernen und Seitenreihenfolge ändern pdfOrganiser.tags=duplex,gerade,ungerade,sortieren,verschieben home.addImage.title=Bild einfügen -home.addImage.desc=Fügt ein Bild an eine bestimmte Stelle im PDF ein (in Arbeit). +home.addImage.desc=Fügt ein Bild an eine bestimmte Stelle im PDF ein (in Arbeit) addImage.tags=img,jpg,bild,foto home.watermark.title=Wasserzeichen hinzufügen -home.watermark.desc=Fügen Sie ein eigenes Wasserzeichen zu Ihrem PDF hinzu. +home.watermark.desc=Fügen Sie ein eigenes Wasserzeichen zu Ihrem PDF hinzu watermark.tags=text,wiederholend,beschriftung,besitzen,urheberrecht,marke,img,jpg,bild,foto home.permissions.title=Berechtigungen ändern -home.permissions.desc=Die Berechtigungen für Ihr PDF-Dokument verändern. +home.permissions.desc=Die Berechtigungen für Ihr PDF-Dokument verändern permissions.tags=lesen,schreiben,bearbeiten,drucken home.removePages.title=Entfernen -home.removePages.desc=Ungewollte Seiten aus dem PDF entfernen. +home.removePages.desc=Ungewollte Seiten aus dem PDF entfernen removePages.tags=seiten entfernen,seiten löschen home.addPassword.title=Passwort hinzufügen -home.addPassword.desc=Das PDF mit einem Passwort verschlüsseln. +home.addPassword.desc=Das PDF mit einem Passwort verschlüsseln addPassword.tags=sicher,sicherheit home.removePassword.title=Passwort entfernen -home.removePassword.desc=Den Passwortschutz eines PDFs entfernen. +home.removePassword.desc=Den Passwortschutz eines PDFs entfernen removePassword.tags=sichern,entschlüsseln,sicherheit,passwort aufheben,passwort löschen home.compressPdfs.title=Komprimieren -home.compressPdfs.desc=PDF komprimieren um die Dateigröße zu reduzieren. +home.compressPdfs.desc=PDF komprimieren um die Dateigröße zu reduzieren compressPdfs.tags=komprimieren,verkleinern,minimieren @@ -252,7 +252,7 @@ home.fileToPDF.desc=Konvertieren Sie nahezu jede Datei in PDF (DOCX, PNG, XLS, P fileToPDF.tags=transformation,format,dokument,bild,folie,text,konvertierung,büro,dokumente,word,excel,powerpoint home.ocr.title=Führe OCR/Cleanup-Scans aus -home.ocr.desc=Cleanup scannt und erkennt Text aus Bildern in einer PDF-Datei und fügt ihn erneut als Text hinzu. +home.ocr.desc=Cleanup scannt und erkennt Text aus Bildern in einer PDF-Datei und fügt ihn erneut als Text hinzu ocr.tags=erkennung,text,bild,scannen,lesen,identifizieren,erkennung,bearbeitbar @@ -445,7 +445,7 @@ autoRedact.textsToRedactLabel=Zu zensierender Text (einer pro Zeile) autoRedact.textsToRedactPlaceholder=z.B. \nVertraulich \nStreng geheim autoRedact.useRegexLabel=Regex verwenden autoRedact.wholeWordSearchLabel=Ganzes Wort suchen -autoRedact.customPaddingLabel=Benutzerdefinierte Extra-Padding +autoRedact.customPaddingLabel=Zensierten Bereich vergrößern autoRedact.convertPDFToImageLabel=PDF in PDF-Bild konvertieren (zum Entfernen von Text hinter dem Kasten) autoRedact.submitButton=Zensieren @@ -499,16 +499,16 @@ HTMLToPDF.header=HTML zu PDF HTMLToPDF.help=Akzeptiert HTML-Dateien und ZIPs mit html/css/images etc. HTMLToPDF.submit=Konvertieren HTMLToPDF.credit=Verwendet WeasyPrint -HTMLToPDF.zoom=Zoomstufe zur Darstellung der Website. -HTMLToPDF.pageWidth=Breite der Seite in Zentimetern. (Leer auf Standard) -HTMLToPDF.pageHeight=Höhe der Seite in Zentimetern. (Leer auf Standard) -HTMLToPDF.marginTop=Oberer Rand der Seite in Millimetern. (Leer auf Standard) -HTMLToPDF.marginBottom=Unterer Rand der Seite in Millimetern. (Leer auf Standard) -HTMLToPDF.marginLeft=Linker Rand der Seite in Millimetern. (Leer auf Standard) -HTMLToPDF.marginRight=Linker Rand der Seite in Millimetern. (Leer auf Standard) -HTMLToPDF.printBackground=Den Hintergrund der Website rendern. +HTMLToPDF.zoom=Zoomstufe zur Darstellung der Website +HTMLToPDF.pageWidth=Breite der Seite in Zentimetern (Leer auf Standard) +HTMLToPDF.pageHeight=Höhe der Seite in Zentimetern (Leer auf Standard) +HTMLToPDF.marginTop=Oberer Rand der Seite in Millimetern (Leer auf Standard) +HTMLToPDF.marginBottom=Unterer Rand der Seite in Millimetern (Leer auf Standard) +HTMLToPDF.marginLeft=Linker Rand der Seite in Millimetern (Leer auf Standard) +HTMLToPDF.marginRight=Linker Rand der Seite in Millimetern (Leer auf Standard) +HTMLToPDF.printBackground=Den Hintergrund der Website rendern HTMLToPDF.defaultHeader=Standardkopfzeile aktivieren (Name und Seitenzahl) -HTMLToPDF.cssMediaType=CSS-Medientyp der Seite ändern. +HTMLToPDF.cssMediaType=CSS-Medientyp der Seite ändern HTMLToPDF.none=Keine HTMLToPDF.print=Drucken HTMLToPDF.screen=Bildschirm @@ -609,8 +609,8 @@ pageLayout.submit=Abschicken #scalePages scalePages.title=Seitengröße anpassen scalePages.header=Seitengröße anpassen -scalePages.pageSize=Format der Seiten des Dokuments. -scalePages.scaleFactor=Zoomstufe (Ausschnitt) einer Seite. +scalePages.pageSize=Format der Seiten des Dokuments +scalePages.scaleFactor=Zoomstufe (Ausschnitt) einer Seite scalePages.submit=Abschicken @@ -753,7 +753,7 @@ compress.submit=Komprimieren #Add image addImage.title=Bild hinzufügen addImage.header=Ein Bild einfügen -addImage.everyPage=Jede Seite? +addImage.everyPage=In jede Seite einfügen? addImage.upload=Bild hinzufügen addImage.submit=Bild hinzufügen @@ -938,7 +938,7 @@ pdfToPDFA.title=PDF zu PDF/A pdfToPDFA.header=PDF zu PDF/A pdfToPDFA.credit=Dieser Dienst verwendet OCRmyPDF für die PDF/A-Konvertierung pdfToPDFA.submit=Konvertieren -pdfToPDFA.tip=Currently does not work for multiple inputs at once +pdfToPDFA.tip=Dieser Dienst kann nur einzelne Eingangsdateien verarbeiten. #PDFToWord From 06a178cc03024ee266f66cacd56133ce17f2e2e0 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:46:49 +0100 Subject: [PATCH 02/38] Cache form inputs between runs (#1066) * Changes! * lang --- .../api/SplitPdfBySizeController.java | 208 ++++++++++-------- .../api/security/SanitizeController.java | 26 ++- src/main/resources/messages_ar_AR.properties | 14 +- src/main/resources/messages_bg_BG.properties | 14 +- src/main/resources/messages_ca_CA.properties | 14 +- src/main/resources/messages_de_DE.properties | 14 +- src/main/resources/messages_el_GR.properties | 14 +- src/main/resources/messages_en_GB.properties | 14 +- src/main/resources/messages_en_US.properties | 14 +- src/main/resources/messages_es_ES.properties | 14 +- src/main/resources/messages_eu_ES.properties | 14 +- src/main/resources/messages_fr_FR.properties | 14 +- src/main/resources/messages_hi_IN.properties | 14 +- src/main/resources/messages_hu_HU.properties | 14 +- src/main/resources/messages_id_ID.properties | 14 +- src/main/resources/messages_it_IT.properties | 14 +- src/main/resources/messages_ja_JP.properties | 14 +- src/main/resources/messages_ko_KR.properties | 14 +- src/main/resources/messages_nl_NL.properties | 14 +- src/main/resources/messages_pl_PL.properties | 14 +- src/main/resources/messages_pt_BR.properties | 14 +- src/main/resources/messages_pt_PT.properties | 14 +- src/main/resources/messages_ro_RO.properties | 14 +- src/main/resources/messages_ru_RU.properties | 14 +- .../resources/messages_sr_LATN_RS.properties | 14 +- src/main/resources/messages_sv_SE.properties | 14 +- src/main/resources/messages_tr_TR.properties | 14 +- src/main/resources/messages_uk_UA.properties | 26 ++- src/main/resources/messages_zh_CN.properties | 14 +- src/main/resources/messages_zh_TW.properties | 14 +- .../resources/static/js/cacheFormInputs.js | 82 +++++++ src/main/resources/static/js/settings.js | 9 + .../resources/templates/fragments/common.html | 2 +- .../resources/templates/fragments/navbar.html | 6 +- 34 files changed, 569 insertions(+), 168 deletions(-) create mode 100644 src/main/resources/static/js/cacheFormInputs.js diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySizeController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySizeController.java index 45d2dd38..40ac2d16 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySizeController.java @@ -4,8 +4,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -41,117 +39,137 @@ public class SplitPdfBySizeController { + " if 10MB and each page is 1MB and you enter 2MB then 5 docs each 2MB (rounded so that it accepts 1.9MB but not 2.1MB) Input:PDF Output:ZIP-PDF Type:SISO") public ResponseEntity autoSplitPdf(@ModelAttribute SplitPdfBySizeOrCountRequest request) throws Exception { - List splitDocumentsBoas = new ArrayList(); MultipartFile file = request.getFileInput(); - PDDocument sourceDocument = Loader.loadPDF(file.getBytes()); - - // 0 = size, 1 = page count, 2 = doc count - int type = request.getSplitType(); - String value = request.getSplitValue(); - - if (type == 0) { // Split by size - long maxBytes = GeneralUtils.convertSizeToBytes(value); - long currentSize = 0; - PDDocument currentDoc = new PDDocument(); - - for (PDPage page : sourceDocument.getPages()) { - ByteArrayOutputStream pageOutputStream = new ByteArrayOutputStream(); - PDDocument tempDoc = new PDDocument(); - tempDoc.addPage(page); - tempDoc.save(pageOutputStream); - tempDoc.close(); - - long pageSize = pageOutputStream.size(); - if (currentSize + pageSize > maxBytes) { - // Save and reset current document - splitDocumentsBoas.add(currentDocToByteArray(currentDoc)); - currentDoc = new PDDocument(); - currentSize = 0; - } - - currentDoc.addPage(page); - currentSize += pageSize; - } - // Add the last document if it contains any pages - if (currentDoc.getPages().getCount() != 0) { - splitDocumentsBoas.add(currentDocToByteArray(currentDoc)); - } - } else if (type == 1) { // Split by page count - int pageCount = Integer.parseInt(value); - int currentPageCount = 0; - PDDocument currentDoc = new PDDocument(); - - for (PDPage page : sourceDocument.getPages()) { - currentDoc.addPage(page); - currentPageCount++; - - if (currentPageCount == pageCount) { - // Save and reset current document - splitDocumentsBoas.add(currentDocToByteArray(currentDoc)); - currentDoc = new PDDocument(); - currentPageCount = 0; - } - } - // Add the last document if it contains any pages - if (currentDoc.getPages().getCount() != 0) { - splitDocumentsBoas.add(currentDocToByteArray(currentDoc)); - } - } else if (type == 2) { // Split by doc count - int documentCount = Integer.parseInt(value); - int totalPageCount = sourceDocument.getNumberOfPages(); - int pagesPerDocument = totalPageCount / documentCount; - int extraPages = totalPageCount % documentCount; - int currentPageIndex = 0; - - for (int i = 0; i < documentCount; i++) { - PDDocument currentDoc = new PDDocument(); - int pagesToAdd = pagesPerDocument + (i < extraPages ? 1 : 0); - - for (int j = 0; j < pagesToAdd; j++) { - currentDoc.addPage(sourceDocument.getPage(currentPageIndex++)); - } - - splitDocumentsBoas.add(currentDocToByteArray(currentDoc)); - } - } else { - throw new IllegalArgumentException("Invalid argument for split type"); - } - - sourceDocument.close(); - Path zipFile = Files.createTempFile("split_documents", ".zip"); String filename = Filenames.toSimpleFileName(file.getOriginalFilename()) .replaceFirst("[.][^.]+$", ""); - byte[] data; + byte[] data = null; + try (ZipOutputStream zipOut = new ZipOutputStream(Files.newOutputStream(zipFile)); + PDDocument sourceDocument = Loader.loadPDF(file.getBytes())) { - try (ZipOutputStream zipOut = new ZipOutputStream(Files.newOutputStream(zipFile))) { - for (int i = 0; i < splitDocumentsBoas.size(); i++) { - String fileName = filename + "_" + (i + 1) + ".pdf"; - ByteArrayOutputStream baos = splitDocumentsBoas.get(i); - byte[] pdf = baos.toByteArray(); + int type = request.getSplitType(); + String value = request.getSplitValue(); - ZipEntry pdfEntry = new ZipEntry(fileName); - zipOut.putNextEntry(pdfEntry); - zipOut.write(pdf); - zipOut.closeEntry(); + if (type == 0) { + long maxBytes = GeneralUtils.convertSizeToBytes(value); + handleSplitBySize(sourceDocument, maxBytes, zipOut, filename); + } else if (type == 1) { + int pageCount = Integer.parseInt(value); + handleSplitByPageCount(sourceDocument, pageCount, zipOut, filename); + } else if (type == 2) { + int documentCount = Integer.parseInt(value); + handleSplitByDocCount(sourceDocument, documentCount, zipOut, filename); + } else { + throw new IllegalArgumentException("Invalid argument for split type"); } + } catch (Exception e) { e.printStackTrace(); } finally { data = Files.readAllBytes(zipFile); - Files.delete(zipFile); + Files.deleteIfExists(zipFile); } return WebResponseUtils.bytesToWebResponse( data, filename + ".zip", MediaType.APPLICATION_OCTET_STREAM); } - private ByteArrayOutputStream currentDocToByteArray(PDDocument document) throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - document.save(baos); - document.close(); - return baos; + private void handleSplitBySize( + PDDocument sourceDocument, long maxBytes, ZipOutputStream zipOut, String baseFilename) + throws IOException { + long currentSize = 0; + PDDocument currentDoc = new PDDocument(); + int fileIndex = 1; + + for (int pageIndex = 0; pageIndex < sourceDocument.getNumberOfPages(); pageIndex++) { + PDPage page = sourceDocument.getPage(pageIndex); + ByteArrayOutputStream pageOutputStream = new ByteArrayOutputStream(); + + try (PDDocument tempDoc = new PDDocument()) { + PDPage importedPage = tempDoc.importPage(page); // This creates a new PDPage object + tempDoc.save(pageOutputStream); + } + + long pageSize = pageOutputStream.size(); + if (currentSize + pageSize > maxBytes) { + if (currentDoc.getNumberOfPages() > 0) { + saveDocumentToZip(currentDoc, zipOut, baseFilename, fileIndex++); + currentDoc.close(); // Make sure to close the document + currentDoc = new PDDocument(); + currentSize = 0; + } + } + + PDPage newPage = new PDPage(page.getCOSObject()); // Re-create the page + currentDoc.addPage(newPage); + currentSize += pageSize; + } + + if (currentDoc.getNumberOfPages() != 0) { + saveDocumentToZip(currentDoc, zipOut, baseFilename, fileIndex++); + currentDoc.close(); + } + } + + private void handleSplitByPageCount( + PDDocument sourceDocument, int pageCount, ZipOutputStream zipOut, String baseFilename) + throws IOException { + int currentPageCount = 0; + PDDocument currentDoc = new PDDocument(); + int fileIndex = 1; + for (PDPage page : sourceDocument.getPages()) { + currentDoc.addPage(page); + currentPageCount++; + + if (currentPageCount == pageCount) { + // Save and reset current document + saveDocumentToZip(currentDoc, zipOut, baseFilename, fileIndex++); + currentDoc = new PDDocument(); + currentPageCount = 0; + } + } + // Add the last document if it contains any pages + if (currentDoc.getPages().getCount() != 0) { + saveDocumentToZip(currentDoc, zipOut, baseFilename, fileIndex++); + } + } + + private void handleSplitByDocCount( + PDDocument sourceDocument, + int documentCount, + ZipOutputStream zipOut, + String baseFilename) + throws IOException { + int totalPageCount = sourceDocument.getNumberOfPages(); + int pagesPerDocument = totalPageCount / documentCount; + int extraPages = totalPageCount % documentCount; + int currentPageIndex = 0; + int fileIndex = 1; + for (int i = 0; i < documentCount; i++) { + PDDocument currentDoc = new PDDocument(); + int pagesToAdd = pagesPerDocument + (i < extraPages ? 1 : 0); + + for (int j = 0; j < pagesToAdd; j++) { + currentDoc.addPage(sourceDocument.getPage(currentPageIndex++)); + } + + saveDocumentToZip(currentDoc, zipOut, baseFilename, fileIndex++); + } + } + + private void saveDocumentToZip( + PDDocument document, ZipOutputStream zipOut, String baseFilename, int index) + throws IOException { + ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + document.save(outStream); + document.close(); // Close the document to free resources + + // Create a new zip entry + ZipEntry zipEntry = new ZipEntry(baseFilename + "_" + index + ".pdf"); + zipOut.putNextEntry(zipEntry); + zipOut.write(outStream.toByteArray()); + zipOut.closeEntry(); } } diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index f33df3aa..dd2c79da 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -139,25 +139,29 @@ public class SanitizeController { for (PDPage page : allPages) { PDResources res = page.getResources(); - - // Remove embedded files from the PDF - res.getCOSObject().removeItem(COSName.getPDFName("EmbeddedFiles")); + if (res != null && res.getCOSObject() != null) { + res.getCOSObject().removeItem(COSName.getPDFName("EmbeddedFiles")); + } } } private void sanitizeMetadata(PDDocument document) { - PDMetadata metadata = document.getDocumentCatalog().getMetadata(); - if (metadata != null) { - document.getDocumentCatalog().setMetadata(null); + if (document.getDocumentCatalog() != null) { + PDMetadata metadata = document.getDocumentCatalog().getMetadata(); + if (metadata != null) { + document.getDocumentCatalog().setMetadata(null); + } } } private void sanitizeLinks(PDDocument document) throws IOException { for (PDPage page : document.getPages()) { for (PDAnnotation annotation : page.getAnnotations()) { - if (annotation instanceof PDAnnotationLink) { + if (annotation != null && annotation instanceof PDAnnotationLink) { PDAction action = ((PDAnnotationLink) annotation).getAction(); - if (action instanceof PDActionLaunch || action instanceof PDActionURI) { + if (action != null + && (action instanceof PDActionLaunch + || action instanceof PDActionURI)) { ((PDAnnotationLink) annotation).setAction(null); } } @@ -167,7 +171,11 @@ public class SanitizeController { private void sanitizeFonts(PDDocument document) { for (PDPage page : document.getPages()) { - page.getResources().getCOSObject().removeItem(COSName.getPDFName("Font")); + if (page != null + && page.getResources() != null + && page.getResources().getCOSObject() != null) { + page.getResources().getCOSObject().removeItem(COSName.getPDFName("Font")); + } } } } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 8985d647..44329a7b 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=تنزيل الملف settings.zipThreshold=ملفات مضغوطة عند تجاوز عدد الملفات التي تم تنزيلها settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 68ab7af5..71983955 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Изтегли файл settings.zipThreshold=Архивирайте файловете, когато броят на изтеглените файлове надвишава settings.signOut=Изход settings.accountSettings=Настройки на акаунта - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Промяна на идентификационните данни changeCreds.header=Актуализирайте данните за акаунта си @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index b73be3d7..1c5fcea3 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Descarrega Arxiu settings.zipThreshold=Comprimiu els fitxers quan el nombre de fitxers baixats superi settings.signOut=Sortir settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 535a2236..57ea05a1 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Datei herunterladen settings.zipThreshold=Dateien komprimieren, wenn die Anzahl der heruntergeladenen Dateien überschritten wird settings.signOut=Abmelden settings.accountSettings=Kontoeinstellungen - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Anmeldeinformationen ändern changeCreds.header=Aktualisieren Sie Ihre Kontodaten @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Anzahl vertikaler Teiler eingeben split-by-sections.submit=PDF teilen split-by-sections.merge=In eine PDF zusammenfügen + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Lizenzen licenses.title=Lizenzen von Drittanbietern diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 5168a1a8..dac14ac7 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Λήψη αρχείου settings.zipThreshold=Αρχεία Zip όταν ο αριθμός των ληφθέντων αρχείων είναι πολύ μεγάλος settings.signOut=Αποσύνδεση settings.accountSettings=Ρυθμίσεις Λογαριασμού - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Αλλαγή Διαπιστευτηρίων changeCreds.header=Ενημέρωση των λεπτομερειών του Λογαριασμού σας @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Εισαγάγετε τον αριθμό split-by-sections.submit=Διαχωρισμός PDF split-by-sections.merge=Συγχώνευση σε ένα PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Άδειες licenses.title=3rd Party Άδειες diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index d35476bd..bae8f923 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Download file settings.zipThreshold=Zip files when the number of downloaded files exceeds settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 78e19201..1126d0ce 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Download file settings.zipThreshold=Zip files when the number of downloaded files exceeds settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index dd779cbc..0da4273f 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Descargar el archivo settings.zipThreshold=Archivos ZIP cuando excede el número de archivos descargados settings.signOut=Desconectar settings.accountSettings=Configuración de la cuenta - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Cambiar Credenciales changeCreds.header=Actualice los detalles de su cuenta @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Introduzca el número de divisiones verti split-by-sections.submit=Dividir PDF split-by-sections.merge=Unir en Un PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licencias licenses.title=Licencias de terceros diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index a2c515b5..ec20aa7f 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Deskargatu fitxategia settings.zipThreshold=ZIP fitxategiak deskargatutako fitxategi kopurua gainditzen denean settings.signOut=Saioa itxi settings.accountSettings=Kontuaren ezarpenak - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index e682f2db..23578dcc 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Télécharger le fichier settings.zipThreshold=Compresser les fichiers en ZIP lorsque le nombre de fichiers téléchargés dépasse settings.signOut=Déconnexion settings.accountSettings=Paramètres du compte - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Modifiez vos identifiants changeCreds.header=Mettez à jour vos identifiants de connexion @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Entrer le nombre de divisions verticales split-by-sections.submit=Diviser le PDF split-by-sections.merge=Fusionner en un seul PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licences licenses.title=Licences tierces diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index 9a50fc77..898e223f 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=फ़ाइल डाउनलोड करें settings.zipThreshold=जब डाउनलोड की गई फ़ाइलों की संख्या सीमा से अधिक हो settings.signOut=साइन आउट settings.accountSettings=खाता सेटिंग्स - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=क्रेडेंशियल बदलें changeCreds.header=अपना खाता विवरण अपडेट करें @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=लंबवत विभाजन की split-by-sections.submit=PDF को विभाजित करें split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index f8621054..03f7f2b3 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Töltse le a fájlt settings.zipThreshold=Fájlok tömörítése, ha a letöltött fájlok száma meghaladja settings.signOut=Kijelentkezés settings.accountSettings=Fiókbeállítások - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Hitelesítés megváltoztatása changeCreds.header=Frissítse fiókadatait @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Adja meg a függőleges szakaszok számá split-by-sections.submit=Felosztás split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 6286bf9d..697bb17b 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Unduh berkas settings.zipThreshold=Berkas zip ketika jumlah berkas yang diunduh melebihi settings.signOut=Keluar settings.accountSettings=Pengaturan Akun - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Ubah Kredensial changeCreds.header=Perbarui Detail Akun Anda @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Input angka untuk pembagian vertikal split-by-sections.submit=Pisahkan PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index a7223018..a913d534 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Scarica file settings.zipThreshold=Comprimi file in .zip quando il numero di download supera settings.signOut=Logout settings.accountSettings=Impostazioni Account - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Cambia credenziali changeCreds.header=Aggiorna i dettagli del tuo account @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Inserire il numero di divisioni verticali split-by-sections.submit=Dividi PDF split-by-sections.merge=Unisci in un unico PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenze licenses.title=Licenze di terze parti diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index c29686ab..b4260c5a 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=ファイルをダウンロード settings.zipThreshold=このファイル数を超えたときにファイルを圧縮する settings.signOut=サインアウト settings.accountSettings=アカウント設定 - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=資格情報の変更 changeCreds.header=アカウントの詳細を更新する @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=垂直方向の分割数を選択 split-by-sections.submit=分割 split-by-sections.merge=1 つの PDF に結合するかどうか + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=ライセンス licenses.title=サードパーティライセンス diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 9438da61..d78d7159 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=다운로드 settings.zipThreshold=다운로드한 파일 수가 초과된 경우 파일 압축하기 settings.signOut=로그아웃 settings.accountSettings=계정 설정 - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=계정 정보 변경 changeCreds.header=계정 정보 업데이트 @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=수직 분할 수를 입력합니다 split-by-sections.submit=PDF 분할 split-by-sections.merge=하나의 PDF로 병합 + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=라이센스 licenses.title=제3자 라이선스 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index d2b6fec3..38bdfdf0 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Download bestand settings.zipThreshold=Bestanden zippen wanneer het aantal gedownloade bestanden meer is dan settings.signOut=Uitloggen settings.accountSettings=Account instellingen - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Inloggegevens wijzigen changeCreds.header=Werk je accountgegevens bij @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Voer het aantal verticale secties in split-by-sections.submit=PDF splitsen split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenties licenses.title=Licenties van derden diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index b9dffda4..7f72cc23 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Pobierz plik settings.zipThreshold=Spakuj pliki, gdy liczba pobranych plików przekroczy settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index a9845e38..5a8d3d1f 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=⇬ Fazer download do arquivo settings.zipThreshold=Compactar arquivos quando o número de arquivos baixados exceder settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 03a37c0c..4abeed7f 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=⇬ Fazer download do ficheiro settings.zipThreshold=Compactar ficheiros quando o número de ficheiros baixados exceder settings.signOut=Terminar Sessão settings.accountSettings=Configuração de Conta - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Alterar senha changeCreds.header=Alterar dados da sua conta @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Introduza o número de divisões verticai split-by-sections.submit=Dividir PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenças licenses.title=Licenças de terceiros diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 15e72483..7edcc2d2 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Descarcă fișierul settings.zipThreshold=Împachetează fișierele când numărul de fișiere descărcate depășește settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index d96b2e43..b0d5cfc7 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Загрузить файл settings.zipThreshold=Zip-файлы, когда количество загруженных файлов превышает settings.signOut=Выйти settings.accountSettings=Настройки аккаунта - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Изменить учетные данные changeCreds.header=Обновите данные вашей учетной записи @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Введите количество ве split-by-sections.submit=Разделить PDF split-by-sections.merge=Объединить в один PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Лицензии licenses.title=Лицензии от третьих сторон diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index 0c5911b4..db5499bc 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Preuzmi fajl settings.zipThreshold=Zipuj fajlove kada pređe broj preuzetih fajlova settings.signOut=Odjava settings.accountSettings=Podešavanja naloga - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Promeni pristupne podatke changeCreds.header=Ažurirajte detalje svog naloga @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Unesite broj vertikalnih podele split-by-sections.submit=Razdvoji PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index b27577c8..a5d7e5f2 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Ladda ner fil settings.zipThreshold=Zip-filer när antalet nedladdade filer överskrider settings.signOut=Sign Out settings.accountSettings=Account Settings - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Change Credentials changeCreds.header=Update Your Account Details @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Enter number of vertical divisions split-by-sections.submit=Split PDF split-by-sections.merge=Merge Into One PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Licenses licenses.title=3rd Party Licenses diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 1320dcc9..bf79403d 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=Dosyayı indir settings.zipThreshold=İndirilen dosya sayısı şu değeri aştığında zip dosyası oluştur: settings.signOut=Oturumu Kapat settings.accountSettings=Hesap Ayarları - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Giriş Bilgilerini Değiştir changeCreds.header=Hesap Detaylarınızı Güncelleyin @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Dikey bölme sayısını girin split-by-sections.submit=PDF'yi Böl split-by-sections.merge=Bir PDF'de Birleştirin + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Lisanslar licenses.title=3. Taraf Lisansları diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index e6ca925f..8016ebd7 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -1,7 +1,7 @@ ########### # Generic # ########### -# the direction that the language is written (ltr = left to right, rtl = right to left) +# the direction that the language is written (ltr=left to right, rtl = right to left) language.direction=ltr pdfPrompt=Оберіть PDF(и) @@ -120,8 +120,9 @@ settings.downloadOption.3=Завантажити файл settings.zipThreshold=Zip-файли, коли кількість завантажених файлів перевищує settings.signOut=Вийти settings.accountSettings=Налаштування акаунта - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=Змінити облікові дані changeCreds.header=Оновіть дані вашого облікового запису @@ -132,6 +133,8 @@ changeCreds.newPassword=Новий пароль changeCreds.confirmNewPassword=Підтвердіть новий пароль changeCreds.submit=Надіслати зміни + + account.title=Налаштування акаунта account.accountSettings=Налаштування акаунта account.adminSettings=Налаштування адміністратора - Перегляд і додавання користувачів @@ -152,6 +155,7 @@ account.webBrowserSettings=Налаштування веб-браузера account.syncToBrowser=Синхронізувати обліковий запис -> Браузер account.syncToAccount=Синхронізувати обліковий запис <- Браузер + adminUserSettings.title=Налаштування контролю користувача adminUserSettings.header=Налаштування контролю користувача адміністратора adminUserSettings.admin=Адміністратор @@ -244,12 +248,10 @@ home.changeMetadata.title=Змінити метадані home.changeMetadata.desc=Змінити/видалити/додати метадані з документа PDF changeMetadata.tags=Title,author,date,creation,time,publisher,producer,stats - home.fileToPDF.title=Конвертувати файл в PDF home.fileToPDF.desc=Конвертуйте майже будь-який файл в PDF (DOCX, PNG, XLS, PPT, TXT та інші) fileToPDF.tags=transformation,format,document,picture,slide,text,conversion,office,docs,word,excel,powerpoint - home.ocr.title=OCR/Очищення сканування home.ocr.desc=Очищення сканування та виявлення тексту на зображеннях у файлі PDF та повторне додавання його як текст. ocr.tags=recognition,text,image,scan,read,identify,detection,editable @@ -403,12 +405,10 @@ home.overlay-pdfs.title=Накладення PDF home.overlay-pdfs.desc=Накладення одного PDF поверх іншого PDF overlay-pdfs.tags=Overlay - home.split-by-sections.title=Розділення PDF за секціями home.split-by-sections.desc=Розділення кожної сторінки PDF на менші горизонтальні та вертикальні секції split-by-sections.tags=Section Split, Divide, Customize - home.AddStampRequest.title=Додати печатку на PDF home.AddStampRequest.desc=Додавання текстової або зображення печатки у вказані місця AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize @@ -418,11 +418,11 @@ home.PDFToBook.title=PDF у книгу/комікс home.PDFToBook.desc=Конвертує PDF у формат книги/комікса за допомогою calibre PDFToBook.tags=Book,Comic,Calibre,Convert,manga,amazon,kindle - home.BookToPDF.title=Книга у PDF home.BookToPDF.desc=Конвертує формати книги/комікса у PDF за допомогою calibre BookToPDF.tags=Book,Comic,Calibre,Convert,manga,amazon,kindle + ########################### # # # WEB PAGES # @@ -606,6 +606,7 @@ pageLayout.pagesPerSheet=Сторінок на одному аркуші: pageLayout.addBorder=Додати рамки pageLayout.submit=Відправити + #scalePages scalePages.title=Відрегулювати масштаб сторінки scalePages.header=Відрегулювати масштаб сторінки @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=Введіть кількість вер split-by-sections.submit=Розділити PDF split-by-sections.merge=Об'єднати в один PDF + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=Ліцензії licenses.title=Ліцензії від третіх сторін diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index c3fee992..f1fb4ced 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=下载文件 settings.zipThreshold=当下载的文件数量超过限制时,将文件压缩。 settings.signOut=登出 settings.accountSettings=帐号设定 - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=更改凭证 changeCreds.header=更新您的账户详情 @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=输入垂直分割数 split-by-sections.submit=分割PDF split-by-sections.merge=是否合并为一个pdf + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=许可证 licenses.title=第三方许可证 diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index db9a3c78..b2d09e10 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -120,8 +120,9 @@ settings.downloadOption.3=下載檔案 settings.zipThreshold=當下載的檔案數量超過時,壓縮檔案 settings.signOut=登出 settings.accountSettings=帳戶設定 - - +settings.bored.help=Enables easter egg game +settings.cacheInputs.name=Save form inputs +settings.cacheInputs.help=Enable to store previously used inputs for future runs changeCreds.title=變更憑證 changeCreds.header=更新您的帳戶詳細資訊 @@ -1022,6 +1023,15 @@ split-by-sections.vertical.placeholder=輸入垂直劃分的數量 split-by-sections.submit=分割 PDF split-by-sections.merge=是否合併為一個pdf + +#printFile +printFile.title=Print File +printFile.header=Print File to Printer +printFile.selectText.1=Select File to Print +printFile.selectText.2=Enter Printer Name +printFile.submit=Print + + #licenses licenses.nav=許可證 licenses.title=第三方許可證 diff --git a/src/main/resources/static/js/cacheFormInputs.js b/src/main/resources/static/js/cacheFormInputs.js new file mode 100644 index 00000000..e61b4449 --- /dev/null +++ b/src/main/resources/static/js/cacheFormInputs.js @@ -0,0 +1,82 @@ +document.addEventListener("DOMContentLoaded", function() { + + var cacheInputs = localStorage.getItem("cacheInputs") || "disabled"; + if (cacheInputs !== "enabled") { + return; // Stop execution if caching is not enabled + } + + // Function to generate a key based on the form's action attribute + function generateStorageKey(form) { + const action = form.getAttribute('action'); + if (!action || action.length < 3) { + return null; // Not a valid action, return null to skip processing + } + return 'formData_' + encodeURIComponent(action); + } + + // Function to save form data to localStorage + function saveFormData(form) { + const formKey = generateStorageKey(form); + if (!formKey) return; // Skip if no valid key + + const formData = {}; + const elements = form.elements; + for (let i = 0; i < elements.length; i++) { + const element = elements[i]; + // Skip elements without names, passwords, files, hidden fields, and submit/reset buttons + if (!element.name || + element.type === 'password' || + element.type === 'file' || + //element.type === 'hidden' || + element.type === 'submit' || + element.type === 'reset') { + continue; + } + // Handle checkboxes: store only if checked + if (element.type === 'checkbox') { + if (element.checked) { + formData[element.name] = element.value; + } else { + continue; // Skip unchecked boxes + } + } else { + // Skip saving empty values + if (element.value === "" || element.value == null) { + continue; + } + formData[element.name] = element.value; + } + } + localStorage.setItem(formKey, JSON.stringify(formData)); + } + + // Function to load form data from localStorage + function loadFormData(form) { + const formKey = generateStorageKey(form); + if (!formKey) return; // Skip if no valid key + + const savedData = localStorage.getItem(formKey); + if (savedData) { + const formData = JSON.parse(savedData); + for (const key in formData) { + if (formData.hasOwnProperty(key) && form.elements[key]) { + const element = form.elements[key]; + if (element.type === 'checkbox') { + element.checked = true; + } else { + element.value = formData[key]; + } + } + } + } + } + + // Attach event listeners and load data for all forms + const forms = document.querySelectorAll('form'); + forms.forEach(form => { + form.addEventListener('submit', function(event) { + saveFormData(form); + }); + loadFormData(form); + }); +}); diff --git a/src/main/resources/static/js/settings.js b/src/main/resources/static/js/settings.js index 77a55a3f..8f6289af 100644 --- a/src/main/resources/static/js/settings.js +++ b/src/main/resources/static/js/settings.js @@ -31,3 +31,12 @@ document.getElementById("boredWaiting").addEventListener("change", function () { boredWaiting = this.checked ? "enabled" : "disabled"; localStorage.setItem("boredWaiting", boredWaiting); }); + +var cacheInputs = localStorage.getItem("cacheInputs") || "disabled"; +document.getElementById("cacheInputs").checked = cacheInputs === "enabled"; + +document.getElementById("cacheInputs").addEventListener("change", function () { + cacheInputs = this.checked ? "enabled" : "disabled"; + localStorage.setItem("cacheInputs", cacheInputs); +}); + diff --git a/src/main/resources/templates/fragments/common.html b/src/main/resources/templates/fragments/common.html index 98bf27e9..3d6cc9fd 100644 --- a/src/main/resources/templates/fragments/common.html +++ b/src/main/resources/templates/fragments/common.html @@ -60,7 +60,7 @@ - + diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index c2a8ec26..09b833dd 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -210,9 +210,13 @@
- +
+
+ + +
Account Settings - \ No newline at end of file + From e74a8e434b1dd8f7a3c68cd42f03d13f7584a7a0 Mon Sep 17 00:00:00 2001 From: albanobattistella <34811668+albanobattistella@users.noreply.github.com> Date: Sun, 21 Apr 2024 10:16:05 +0200 Subject: [PATCH 07/38] Update messages_it_IT.properties (#1096) --- src/main/resources/messages_it_IT.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index a913d534..7b14e61f 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -120,9 +120,9 @@ settings.downloadOption.3=Scarica file settings.zipThreshold=Comprimi file in .zip quando il numero di download supera settings.signOut=Logout settings.accountSettings=Impostazioni Account -settings.bored.help=Enables easter egg game -settings.cacheInputs.name=Save form inputs -settings.cacheInputs.help=Enable to store previously used inputs for future runs +settings.bored.help=Abilita easter egg game +settings.cacheInputs.name=Salva gli input del modulo +settings.cacheInputs.help=Abilitare per memorizzare gli input utilizzati in precedenza per esecuzioni future changeCreds.title=Cambia credenziali changeCreds.header=Aggiorna i dettagli del tuo account @@ -1025,11 +1025,11 @@ split-by-sections.merge=Unisci in un unico PDF #printFile -printFile.title=Print File -printFile.header=Print File to Printer -printFile.selectText.1=Select File to Print -printFile.selectText.2=Enter Printer Name -printFile.submit=Print +printFile.title=Stampa file +printFile.header=Stampa file su stampante +printFile.selectText.1=Seleziona file da stampare +printFile.selectText.2=Inserire il nome della stampante +printFile.submit=Stampare #licenses From a5000fbbc56ab253494f928cb4836873fcef2287 Mon Sep 17 00:00:00 2001 From: Ludy Date: Sun, 21 Apr 2024 13:15:18 +0200 Subject: [PATCH 08/38] UI: settings show/hide update display (#1072) * UI: settings show/hide update display This PR replaces the PR #1003 In this PR, the visual for available update is added to the foreground. There are new settings to generally show/hide the update display, and only administrators receive the update display. * change to `Bean` * Update AppUpdateShowService.java * add update message * revision service * change shouldShow * Update githubVersion.js * rm folder * Update AppUpdateService.java --- README.md | 2 + .../SPDF/config/AppUpdateService.java | 25 ++++++++++ .../SPDF/config/ShowAdminInterface.java | 7 +++ .../config/security/AppUpdateAuthService.java | 46 +++++++++++++++++++ .../controller/web/OtherWebController.java | 1 + .../SPDF/model/ApplicationProperties.java | 22 +++++++++ src/main/resources/messages_ar_AR.properties | 1 + src/main/resources/messages_bg_BG.properties | 1 + src/main/resources/messages_ca_CA.properties | 1 + src/main/resources/messages_de_DE.properties | 1 + src/main/resources/messages_el_GR.properties | 1 + src/main/resources/messages_en_GB.properties | 1 + src/main/resources/messages_en_US.properties | 1 + src/main/resources/messages_es_ES.properties | 1 + src/main/resources/messages_eu_ES.properties | 1 + src/main/resources/messages_fr_FR.properties | 1 + src/main/resources/messages_hi_IN.properties | 1 + src/main/resources/messages_hu_HU.properties | 1 + src/main/resources/messages_id_ID.properties | 1 + src/main/resources/messages_it_IT.properties | 1 + src/main/resources/messages_ja_JP.properties | 1 + src/main/resources/messages_ko_KR.properties | 1 + src/main/resources/messages_nl_NL.properties | 1 + src/main/resources/messages_pl_PL.properties | 1 + src/main/resources/messages_pt_BR.properties | 1 + src/main/resources/messages_pt_PT.properties | 1 + src/main/resources/messages_ro_RO.properties | 1 + src/main/resources/messages_ru_RU.properties | 1 + .../resources/messages_sr_LATN_RS.properties | 1 + src/main/resources/messages_sv_SE.properties | 1 + src/main/resources/messages_tr_TR.properties | 1 + src/main/resources/messages_uk_UA.properties | 1 + src/main/resources/messages_zh_CN.properties | 1 + src/main/resources/messages_zh_TW.properties | 1 + src/main/resources/settings.yml.template | 4 +- src/main/resources/static/css/home.css | 35 ++++++++++++++ src/main/resources/static/images/update.svg | 1 + src/main/resources/static/js/githubVersion.js | 24 +++++++++- src/main/resources/static/js/homecard.js | 6 +++ .../resources/templates/fragments/navbar.html | 5 +- src/main/resources/templates/home.html | 9 ++++ 41 files changed, 210 insertions(+), 5 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/config/AppUpdateService.java create mode 100644 src/main/java/stirling/software/SPDF/config/ShowAdminInterface.java create mode 100644 src/main/java/stirling/software/SPDF/config/security/AppUpdateAuthService.java create mode 100644 src/main/resources/static/images/update.svg diff --git a/README.md b/README.md index d7d2e1aa..5249e3cc 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,8 @@ system: defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc) googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow customStaticFilePath: '/customFiles/static/' # Directory path for custom static files + showUpdate: true # see when a new update is available + showUpdateOnlyAdmin: false # Only admins can see when a new update is available, depending on showUpdate it must be set to 'true' #ui: # appName: exampleAppName # Application's visible name diff --git a/src/main/java/stirling/software/SPDF/config/AppUpdateService.java b/src/main/java/stirling/software/SPDF/config/AppUpdateService.java new file mode 100644 index 00000000..7c7a9a49 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/AppUpdateService.java @@ -0,0 +1,25 @@ +package stirling.software.SPDF.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import stirling.software.SPDF.model.ApplicationProperties; + +@Service +class AppUpdateService { + + @Autowired private ApplicationProperties applicationProperties; + + @Autowired(required = false) + ShowAdminInterface showAdmin; + + @Bean(name = "shouldShow") + @Scope("request") + public boolean shouldShow() { + boolean showUpdate = applicationProperties.getSystem().getShowUpdate(); + boolean showAdminResult = (showAdmin != null) ? showAdmin.getShowUpdateOnlyAdmins() : true; + return showUpdate && showAdminResult; + } +} diff --git a/src/main/java/stirling/software/SPDF/config/ShowAdminInterface.java b/src/main/java/stirling/software/SPDF/config/ShowAdminInterface.java new file mode 100644 index 00000000..e49376e2 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/ShowAdminInterface.java @@ -0,0 +1,7 @@ +package stirling.software.SPDF.config; + +public interface ShowAdminInterface { + default boolean getShowUpdateOnlyAdmins() { + return true; + } +} diff --git a/src/main/java/stirling/software/SPDF/config/security/AppUpdateAuthService.java b/src/main/java/stirling/software/SPDF/config/security/AppUpdateAuthService.java new file mode 100644 index 00000000..0da07c61 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/security/AppUpdateAuthService.java @@ -0,0 +1,46 @@ +package stirling.software.SPDF.config.security; + +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Service; + +import stirling.software.SPDF.config.ShowAdminInterface; +import stirling.software.SPDF.model.ApplicationProperties; +import stirling.software.SPDF.model.User; +import stirling.software.SPDF.repository.UserRepository; + +@Service +class AppUpdateAuthService implements ShowAdminInterface { + + @Autowired private UserRepository userRepository; + @Autowired private ApplicationProperties applicationProperties; + + public boolean getShowUpdateOnlyAdmins() { + boolean showUpdate = applicationProperties.getSystem().getShowUpdate(); + if (!showUpdate) { + return showUpdate; + } + + boolean showUpdateOnlyAdmin = applicationProperties.getSystem().getShowUpdateOnlyAdmin(); + + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + + if (authentication == null || !authentication.isAuthenticated()) { + return !showUpdateOnlyAdmin; + } + + if (authentication.getName().equalsIgnoreCase("anonymousUser")) { + return !showUpdateOnlyAdmin; + } + + Optional user = userRepository.findByUsername(authentication.getName()); + if (user.isPresent() && showUpdateOnlyAdmin) { + return "ROLE_ADMIN".equals(user.get().getRolesAsString()); + } + + return showUpdate; + } +} diff --git a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java index b93a89e4..b373d17a 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; @Controller @Tag(name = "Misc", description = "Miscellaneous APIs") public class OtherWebController { + @GetMapping("/compress-pdf") @Hidden public String compressPdfForm(Model model) { diff --git a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java index a41d641c..1a2aeaec 100644 --- a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java +++ b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java @@ -210,6 +210,24 @@ public class ApplicationProperties { private String rootURIPath; private String customStaticFilePath; private Integer maxFileSize; + private boolean showUpdate; + private Boolean showUpdateOnlyAdmin; + + public boolean getShowUpdateOnlyAdmin() { + return showUpdateOnlyAdmin; + } + + public void setShowUpdateOnlyAdmin(boolean showUpdateOnlyAdmin) { + this.showUpdateOnlyAdmin = showUpdateOnlyAdmin; + } + + public boolean getShowUpdate() { + return showUpdate; + } + + public void setShowUpdate(boolean showUpdate) { + this.showUpdate = showUpdate; + } private Boolean enableAlphaFunctionality; @@ -275,6 +293,10 @@ public class ApplicationProperties { + maxFileSize + ", enableAlphaFunctionality=" + enableAlphaFunctionality + + ", showUpdate=" + + showUpdate + + ", showUpdateOnlyAdmin=" + + showUpdateOnlyAdmin + "]"; } } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 44329a7b..ac90792a 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -112,6 +112,7 @@ navbar.settings=إعدادات ############# settings.title=الإعدادات settings.update=التحديث متاح +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=إصدار التطبيق: settings.downloadOption.title=تحديد خيار التنزيل (للتنزيلات ذات الملف الواحد غير المضغوط): settings.downloadOption.1=فتح في نفس النافذة diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 71983955..6262d46d 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -112,6 +112,7 @@ navbar.settings=Настройки ############# settings.title=Настройки settings.update=Налична актуализация +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Версия на приложението: settings.downloadOption.title=Изберете опция за изтегляне (за изтегляния на един файл без да е архивиран): settings.downloadOption.1=Отваряне в същия прозорец diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 1c5fcea3..6071b16b 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -112,6 +112,7 @@ navbar.settings=Opcions ############# settings.title=Opcions settings.update=Actualització Disponible +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versió App: settings.downloadOption.title=Trieu l'opció de descàrrega (per a descàrregues d'un sol fitxer no zip): settings.downloadOption.1=Obre mateixa finestra diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 57ea05a1..729597be 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -112,6 +112,7 @@ navbar.settings=Einstellungen ############# settings.title=Einstellungen settings.update=Update verfügbar +settings.updateAvailable={0} ist die aktuelle installierte Version. Eine neue Version ({1}) ist verfügbar. settings.appVersion=App-Version: settings.downloadOption.title=Download-Option wählen (für einzelne Dateien, die keine Zip-Downloads sind): settings.downloadOption.1=Im selben Fenster öffnen diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index dac14ac7..93ab31e2 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -112,6 +112,7 @@ navbar.settings=Ρυθμίσεις ############# settings.title=Ρυθμίσεις settings.update=Υπάρχει διαθέσιμη ενημέρωση +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Έκδοση εφαρμογής: settings.downloadOption.title=Επιλέξετε την επιλογή λήψης (Για λήψεις μεμονωμένων αρχείων χωρίς zip): settings.downloadOption.1=Άνοιγμα στο ίδιο παράθυρο diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index bae8f923..30bcb9fd 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -112,6 +112,7 @@ navbar.settings=Settings ############# settings.title=Settings settings.update=Update available +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=App Version: settings.downloadOption.title=Choose download option (For single file non zip downloads): settings.downloadOption.1=Open in same window diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 1126d0ce..3f0c7afb 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -112,6 +112,7 @@ navbar.settings=Settings ############# settings.title=Settings settings.update=Update available +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=App Version: settings.downloadOption.title=Choose download option (For single file non zip downloads): settings.downloadOption.1=Open in same window diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 0da4273f..bdb42a94 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -112,6 +112,7 @@ navbar.settings=Configuración ############# settings.title=Configuración settings.update=Actualización disponible +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versión de la aplicación: settings.downloadOption.title=Elegir la opción de descarga (para descargas de un solo archivo sin ZIP): settings.downloadOption.1=Abrir en la misma ventana diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index ec20aa7f..1f8f6b6d 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -112,6 +112,7 @@ navbar.settings=Ezarpenak ############# settings.title=Ezarpenak settings.update=Eguneratze eskuragarria +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Aplikazioaren bertsioa: settings.downloadOption.title=Hautatu deskargatzeko aukera (fitxategi bakarra deskargatzeko ZIP gabe): settings.downloadOption.1=Ireki leiho berean diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 23578dcc..3aa55d09 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -112,6 +112,7 @@ navbar.settings=Paramètres ############# settings.title=Paramètres settings.update=Mise à jour disponible +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Version de l’application : settings.downloadOption.title=Choisissez l’option de téléchargement (pour les téléchargements à fichier unique non ZIP) : settings.downloadOption.1=Ouvrir dans la même fenêtre diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index 898e223f..b660d678 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -112,6 +112,7 @@ navbar.settings=सेटिंग्स ############# settings.title=सेटिंग्स settings.update=अपडेट उपलब्ध है +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=ऐप संस्करण: settings.downloadOption.title=डाउनलोड विकल्प चुनें (एकल फ़ाइल गैर-ज़िप डाउनलोड के लिए): settings.downloadOption.1=एक ही विंडो में खोलें diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index 03f7f2b3..c9a4957b 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -112,6 +112,7 @@ navbar.settings=Beállítások ############# settings.title=Beállítások settings.update=Frisítés elérhető +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=App Verzió: settings.downloadOption.title=Válassza ki a letöltési lehetőséget (Egyetlen fájl esetén a nem tömörített letöltésekhez): settings.downloadOption.1=Nyissa meg ugyanabban az ablakban diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 697bb17b..3cbcc872 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -112,6 +112,7 @@ navbar.settings=Pengaturan ############# settings.title=Pengaturan settings.update=Pembaruan tersedia +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versi Aplikasi: settings.downloadOption.title=Pilih opsi unduhan (Untuk unduhan berkas tunggal non zip): settings.downloadOption.1=Buka di jendela yang sama diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 7b14e61f..140a27f7 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -112,6 +112,7 @@ navbar.settings=Impostazioni ############# settings.title=Impostazioni settings.update=Aggiornamento disponibile +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versione App: settings.downloadOption.title=Scegli opzione di download (Per file singoli non compressi): settings.downloadOption.1=Apri in questa finestra diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index b4260c5a..fed17883 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -112,6 +112,7 @@ navbar.settings=設定 ############# settings.title=設定 settings.update=利用可能なアップデート +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Appバージョン: settings.downloadOption.title=ダウンロードオプション (zip以外の単一ファイル): settings.downloadOption.1=同じウィンドウで開く diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index d78d7159..3b1d3441 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -112,6 +112,7 @@ navbar.settings=설정 ############# settings.title=설정 settings.update=업데이트 가능 +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=앱 버전: settings.downloadOption.title=다운로드 옵션 선택 (zip 파일이 아닌 단일 파일 다운로드 시): settings.downloadOption.1=현재 창에서 열기 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index 38bdfdf0..e5668210 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -112,6 +112,7 @@ navbar.settings=Instellingen ############# settings.title=Instellingen settings.update=Update beschikbaar +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=App versie: settings.downloadOption.title=Kies download optie (Voor enkelvoudige bestanddownloads zonder zip): settings.downloadOption.1=Open in hetzelfde venster diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 7f72cc23..c94f72cb 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -112,6 +112,7 @@ navbar.settings=Ustawienia ############# settings.title=Ustawienia settings.update=Dostępna aktualizacja +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Wersia aplikacji: settings.downloadOption.title=Wybierz opcję pobierania (w przypadku pobierania pojedynczych plików innych niż ZIP): settings.downloadOption.1=Otwórz w tym samym oknie diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 5a8d3d1f..b03402be 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -112,6 +112,7 @@ navbar.settings=Configurações ############# settings.title=Configurações settings.update=Atualização disponível +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versão do aplicativo: settings.downloadOption.title=Escolha a opção de download (para downloads não compactados de arquivo único): settings.downloadOption.1=Abrir na mesma janela diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 4abeed7f..c1662afe 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -112,6 +112,7 @@ navbar.settings=Configurações ############# settings.title=Configurações settings.update=Atualização disponível +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versão da aplicação: settings.downloadOption.title=Escolha a opção de download (para downloads não compactados de ficheiro único): settings.downloadOption.1=Abrir na mesma janela diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 7edcc2d2..949f34cf 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -112,6 +112,7 @@ navbar.settings=Setări ############# settings.title=Setări settings.update=Actualizare disponibilă +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Versiune aplicație: settings.downloadOption.title=Alege opțiunea de descărcare (pentru descărcarea unui singur fișier non-zip): settings.downloadOption.1=Deschide în aceeași fereastră diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index b0d5cfc7..3d20fc0b 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -112,6 +112,7 @@ navbar.settings=Настройки ############# settings.title=Настройки settings.update=Доступно обновление +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Версия приложения: settings.downloadOption.title=Выберите вариант загрузки (для загрузки одного файла без zip): settings.downloadOption.1=Открыть в том же окне diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index db5499bc..7cdd2f24 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -112,6 +112,7 @@ navbar.settings=Podešavanja ############# settings.title=Podešavanja settings.update=Dostupno ažuriranje +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Verzija aplikacije: settings.downloadOption.title=Odaberite opciju preuzimanja (Za preuzimanje pojedinačnih fajlova bez zip formata): settings.downloadOption.1=Otvori u istom prozoru diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index a5d7e5f2..afa34270 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -112,6 +112,7 @@ navbar.settings=Inställningar ############# settings.title=Inställningar settings.update=Uppdatering tillgänglig +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Appversion: settings.downloadOption.title=Välj nedladdningsalternativ (för nedladdning av en fil utan zip): settings.downloadOption.1=Öppnas i samma fönster diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index cb7cbb07..2ec0bd6b 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -112,6 +112,7 @@ navbar.settings=Ayarlar ############# settings.title=Ayarlar settings.update=Güncelleme mevcut +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Uygulama Sürümü: settings.downloadOption.title=İndirme seçeneği seçin (Zip olmayan tek dosya indirmeler için): settings.downloadOption.1=Aynı pencerede aç diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index 8016ebd7..8a77d064 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -112,6 +112,7 @@ navbar.settings=Налаштування ############# settings.title=Налаштування settings.update=Доступне оновлення +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=Версія додатку: settings.downloadOption.title=Виберіть варіант завантаження (для завантаження одного файлу без zip): settings.downloadOption.1=Відкрити в тому ж вікні diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index f1fb4ced..f10f3930 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -112,6 +112,7 @@ navbar.settings=设置 ############# settings.title=设置 settings.update=可更新 +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=应用程序版本: settings.downloadOption.title=选择下载选项(单个文件非压缩文件): settings.downloadOption.1=在同一窗口打开 diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index b2d09e10..c2cfbadb 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -112,6 +112,7 @@ navbar.settings=設定 ############# settings.title=設定 settings.update=有更新可用 +settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. settings.appVersion=應用版本: settings.downloadOption.title=選擇下載選項(對於單一檔案非壓縮下載): settings.downloadOption.1=在同一視窗中開啟 diff --git a/src/main/resources/settings.yml.template b/src/main/resources/settings.yml.template index 0a326e17..b3d6e954 100644 --- a/src/main/resources/settings.yml.template +++ b/src/main/resources/settings.yml.template @@ -12,7 +12,9 @@ system: defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc) googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow enableAlphaFunctionality: false # Set to enable functionality which might need more testing before it fully goes live (This feature might make no changes) - + showUpdate: true # see when a new update is available + showUpdateOnlyAdmin: false # Only admins can see when a new update is available, depending on showUpdate it must be set to 'true' + #ui: # appName: exampleAppName # Application's visible name # homeDescription: I am a description # Short description or tagline shown on homepage. diff --git a/src/main/resources/static/css/home.css b/src/main/resources/static/css/home.css index d975dd79..ff8d1cf7 100644 --- a/src/main/resources/static/css/home.css +++ b/src/main/resources/static/css/home.css @@ -89,3 +89,38 @@ .jumbotron { padding: 3rem 3rem; /* Reduce vertical padding */ } + +.lookatme { + opacity: 1; + position: relative; + display: inline-block; +} + +.lookatme::after { + color: #e33100; + text-shadow: 0 0 5px #e33100; + /* in the html, the data-lookatme-text attribute must */ + /* contain the same text as the .lookatme element */ + content: attr(data-lookatme-text); + padding: inherit; + position: absolute; + inset: 0 0 0 0; + z-index: 1; + /* 20 steps / 2 seconds = 10fps */ + -webkit-animation: 2s infinite Pulse steps(20); + animation: 2s infinite Pulse steps(20); +} + +@keyframes Pulse { + from { + opacity: 0; + } + + 50% { + opacity: 1; + } + + to { + opacity: 0; + } +} diff --git a/src/main/resources/static/images/update.svg b/src/main/resources/static/images/update.svg new file mode 100644 index 00000000..3edc4c67 --- /dev/null +++ b/src/main/resources/static/images/update.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/resources/static/js/githubVersion.js b/src/main/resources/static/js/githubVersion.js index e17524d5..b312fd85 100644 --- a/src/main/resources/static/js/githubVersion.js +++ b/src/main/resources/static/js/githubVersion.js @@ -30,19 +30,39 @@ async function getLatestReleaseVersion() { async function checkForUpdate() { // Initialize the update button as hidden - var updateBtn = document.getElementById("update-btn"); + var updateBtn = document.getElementById("update-btn") || null; + var updateLink = document.getElementById("update-link") || null; if (updateBtn !== null) { updateBtn.style.display = "none"; } + if (updateLink !== null) { + console.log("hidden!"); + if (!updateLink.classList.contains("visually-hidden")) { + updateLink.classList.add("visually-hidden"); + } + } const latestVersion = await getLatestReleaseVersion(); console.log("latestVersion=" + latestVersion); console.log("currentVersion=" + currentVersion); console.log("compareVersions(latestVersion, currentVersion) > 0)=" + compareVersions(latestVersion, currentVersion)); if (latestVersion && compareVersions(latestVersion, currentVersion) > 0) { - document.getElementById("update-btn").style.display = "block"; + if (updateBtn != null) { + document.getElementById("update-btn").style.display = "block"; + } + if (updateLink !== null) { + document.getElementById("app-update").innerHTML = updateAvailable.replace("{0}", '' + currentVersion + '').replace("{1}", '' + latestVersion + ''); + if (updateLink.classList.contains("visually-hidden")) { + updateLink.classList.remove("visually-hidden"); + } + } console.log("visible"); } else { + if (updateLink !== null) { + if (!updateLink.classList.contains("visually-hidden")) { + updateLink.classList.add("visually-hidden"); + } + } console.log("hidden"); } } diff --git a/src/main/resources/static/js/homecard.js b/src/main/resources/static/js/homecard.js index 8ac2ef44..c461af3c 100644 --- a/src/main/resources/static/js/homecard.js +++ b/src/main/resources/static/js/homecard.js @@ -46,6 +46,12 @@ function reorderCards() { cards.sort(function (a, b) { var aIsFavorite = localStorage.getItem(a.id) === "favorite"; var bIsFavorite = localStorage.getItem(b.id) === "favorite"; + if (a.id === "update-link") { + return -1; + } + if (b.id === "update-link") { + return 1; + } if (aIsFavorite && !bIsFavorite) { return -1; } diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index 09b833dd..414ff51f 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -3,6 +3,7 @@