diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 761a8568..dbebccc0 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -76,6 +76,8 @@ donate=Donate color=Color sponsor=Sponsor info=Info +page=Page +pages=Pages legal.privacy=Privacy Policy legal.terms=Terms and Conditions diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index 1cda3712..21d4669f 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -76,6 +76,8 @@ donate=Donate color=Color sponsor=Sponsor info=Info +page=पृष्ठ +pages=पृष्ठों legal.privacy=Privacy Policy legal.terms=Terms and Conditions diff --git a/src/main/resources/static/js/merge.js b/src/main/resources/static/js/merge.js index 55575727..41d1fe1e 100644 --- a/src/main/resources/static/js/merge.js +++ b/src/main/resources/static/js/merge.js @@ -11,7 +11,7 @@ document.getElementById("fileInput-input").addEventListener("change", function ( /** * @param {FileList} files */ -function displayFiles(files) { +async function displayFiles(files) { const list = document.getElementById("selectedFiles"); while (list.firstChild) { @@ -19,11 +19,16 @@ function displayFiles(files) { } for (let i = 0; i < files.length; i++) { + const pageCount = await getPDFPageCount(files[i]); + const pageLabel = pageCount === 1 ? pageTranslation : pagesTranslation; const item = document.createElement("li"); item.className = "list-group-item"; item.innerHTML = `