From 2646af19b3256acafbb8c4ed5973cc3cd328246a Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.>
Date: Mon, 20 May 2024 18:18:26 +0100
Subject: [PATCH 1/4] config fix and book icons
---
.../java/stirling/software/SPDF/config/ConfigInitializer.java | 2 --
src/main/resources/templates/home.html | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java b/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java
index e82e8f3f..e8433588 100644
--- a/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java
+++ b/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java
@@ -70,7 +70,6 @@ public class ConfigInitializer
if (!entry.isEmpty()) {
// Check if this comment has been uncommented in userLines
String key = entry.split(":")[0].trim();
- System.out.println("key=" + key + ", entry=" + entry );
addLine(resultLines, userLines, templateLine, key);
} else {
resultLines.add(templateLine);
@@ -104,7 +103,6 @@ public class ConfigInitializer
boolean added = false;
int templateIndentationLevel = getIndentationLevel(templateLine);
for (String settingsLine : userLines) {
- if(settingsLine.contains("oauth2") || settingsLine.contains("enabled") )
if (settingsLine.trim().startsWith(key + ":")) {
int settingsIndentationLevel = getIndentationLevel(settingsLine);
// Check if it is correct settingsLine and has the same parent as templateLine
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html
index 9f78c128..24e7472f 100644
--- a/src/main/resources/templates/home.html
+++ b/src/main/resources/templates/home.html
@@ -219,10 +219,10 @@
th:replace="~{fragments/card :: card(id='split-pdf-by-sections', cardTitle=#{home.split-by-sections.title}, cardText=#{home.split-by-sections.desc}, cardLink='split-pdf-by-sections', toolIcon='grid_on', tags=#{split-by-sections.tags}, toolGroup='advance')}">
+ th:replace="~{fragments/card :: card(id='book-to-pdf', cardTitle=#{home.BookToPDF.title}, cardText=#{home.BookToPDF.desc}, cardLink='book-to-pdf', toolIcon='book', tags=#{BookToPDF.tags}, toolGroup='convert')}">
+ th:replace="~{fragments/card :: card(id='pdf-to-book', cardTitle=#{home.PDFToBook.title}, cardText=#{home.PDFToBook.desc}, cardLink='pdf-to-book', toolIcon='book', tags=#{PDFToBook.tags}, toolGroup='convert')}">
From 6adeecac9c1f9f20161a618b722a55c2e11e84a3 Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.>
Date: Mon, 20 May 2024 18:43:47 +0100
Subject: [PATCH 2/4] fix tool removal in navbar
---
.../resources/static/js/languageSelection.js | 31 +++++++++----------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/src/main/resources/static/js/languageSelection.js b/src/main/resources/static/js/languageSelection.js
index 7af113d0..55f0647e 100644
--- a/src/main/resources/static/js/languageSelection.js
+++ b/src/main/resources/static/js/languageSelection.js
@@ -60,23 +60,22 @@ function handleDropdownItemClick(event) {
}
document.addEventListener("DOMContentLoaded", function () {
- document.querySelectorAll(".nav-item.dropdown").forEach((element) => {
- const dropdownMenu = element.querySelector(".dropdown-menu");
- if (
- dropdownMenu.id !== "favoritesDropdown" &&
- dropdownMenu.children.length <= 2 &&
- dropdownMenu.querySelectorAll("hr.dropdown-divider").length === dropdownMenu.children.length
- ) {
- if (
- element.previousElementSibling &&
- element.previousElementSibling.classList.contains("nav-item") &&
- element.previousElementSibling.classList.contains("nav-item-separator")
- ) {
- element.previousElementSibling.remove();
- }
- element.remove();
+
+document.querySelectorAll(".col-lg-2.col-sm-6").forEach((element) => {
+ const dropdownItems = element.querySelectorAll(".dropdown-item");
+ const items = Array.from(dropdownItems).filter(item => !item.querySelector("hr.dropdown-divider"));
+
+ if (items.length <= 2) {
+ if (
+ element.previousElementSibling &&
+ element.previousElementSibling.classList.contains("col-lg-2") &&
+ element.previousElementSibling.classList.contains("nav-item-separator")
+ ) {
+ element.previousElementSibling.remove();
+ }
+ element.remove();
}
- });
+});
//Sort languages by alphabet
const list = Array.from(document.querySelector('.dropdown-menu[aria-labelledby="languageDropdown"]').children).filter(
From 4232f359c73bfaa9b5bfcbaf6a2ed86a6d7d9acc Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.>
Date: Mon, 20 May 2024 18:44:13 +0100
Subject: [PATCH 3/4] bump
---
build.gradle | 2 +-
chart/stirling-pdf/Chart.yaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index 48aafae2..a451efd2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,7 +12,7 @@ plugins {
import com.github.jk1.license.render.*
group = 'stirling.software'
-version = '0.24.3'
+version = '0.24.4'
//17 is lowest but we support and recommend 21
sourceCompatibility = '17'
diff --git a/chart/stirling-pdf/Chart.yaml b/chart/stirling-pdf/Chart.yaml
index 59519584..d5b6019d 100644
--- a/chart/stirling-pdf/Chart.yaml
+++ b/chart/stirling-pdf/Chart.yaml
@@ -1,5 +1,5 @@
apiVersion: v2
-appVersion: 0.24.3
+appVersion: 0.24.4
description: locally hosted web application that allows you to perform various operations
on PDF files
home: https://github.com/Stirling-Tools/Stirling-PDF
From bfb82e38ab991a5b018b6e8f2d3502add48b3a39 Mon Sep 17 00:00:00 2001
From: Ugur Yilmaz
Date: Mon, 20 May 2024 21:48:11 +0000
Subject: [PATCH 4/4] Add missing translation and improve some wordings to be
more natural for Turkish
---
src/main/resources/messages_tr_TR.properties | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties
index c4dfefc4..fd4660b7 100644
--- a/src/main/resources/messages_tr_TR.properties
+++ b/src/main/resources/messages_tr_TR.properties
@@ -5,14 +5,14 @@
language.direction=ltr
pdfPrompt=PDF(leri) seçin
-multiPdfPrompt=PDF seçin (2+)
+multiPdfPrompt=PDFleri seçin (2+)
multiPdfDropPrompt=Tüm gerekli PDF'leri seçin (ya da sürükleyip bırakın)
imgPrompt=Resim(leri) seçin
genericSubmit=Gönder
processTimeWarning=Uyarı: Bu işlem, dosya boyutuna bağlı olarak bir dakikaya kadar sürebilir.
pageOrderPrompt=Özel Sayfa Sırası (Virgülle ayrılmış sayfa numaraları veya 2n+1 gibi bir fonksiyon girin) :
pageSelectionPrompt=Özel Sayfa Seçimi (1,5,6 sayfa numaralarının virgülle ayrılmış bir listesini veya 2n+1 gibi bir fonksiyon girin) :
-goToPage=Git
+goToPage=Sayfaya Git
true=Doğru
false=Yanlış
unknown=Bilinmeyen
@@ -130,7 +130,7 @@ settings.downloadOption.1=Aynı pencerede aç
settings.downloadOption.2=Yeni pencerede aç
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.signOut=Çıkış Yap
settings.accountSettings=Hesap Ayarları
settings.bored.help=Paskalya yumurtası oyunu etkinleştirir
settings.cacheInputs.name=Form girdilerini kaydet
@@ -138,7 +138,7 @@ settings.cacheInputs.help=Gelecekteki çalıştırmalar için önceden kullanıl
changeCreds.title=Giriş Bilgilerini Değiştir
changeCreds.header=Hesap Detaylarınızı Güncelleyin
-changeCreds.changePassword=You are using default login credentials. Please enter a new password
+changeCreds.changePassword=Varsayılan giriş bilgilerini kullanıyorsunuz. Lütfen yeni bir şifre girin.
changeCreds.newUsername=Yeni Kullanıcı Adı
changeCreds.oldPassword=Mevcut Şifre
changeCreds.newPassword=Yeni Şifre
@@ -738,7 +738,7 @@ ocr.selectText.11=OCR'den sonra resimleri kaldır (TÜM resimleri kaldırır, sa
ocr.selectText.12=Render Türü (İleri Seviye)
ocr.help=Lütfen bu belgede başka dillerde nasıl kullanılacağı ve/veya docker'da kullanılmaması hakkında bilgi edinin
ocr.credit=Bu hizmet OCR için OCRmyPDF ve Tesseract'ı kullanır.
-ocr.submit=PDF'i OCR ile İşle
+ocr.submit=PDF'i OCR(Metin Tanıma) ile İşle
#extractImages
@@ -772,7 +772,7 @@ compress.submit=Sıkıştır
#Add image
addImage.title=Resim Ekle
addImage.header=PDF'e resim ekle
-addImage.everyPage=Her Sayfa?
+addImage.everyPage=Her Sayfa mı?
addImage.upload=Resim ekle
addImage.submit=Resim ekle