From 8d9f0361d0a7db2c4eae62d8f58530eb55eadf8b Mon Sep 17 00:00:00 2001 From: Ludy Date: Sat, 17 Feb 2024 20:56:56 +0100 Subject: [PATCH] Fix Serbia Language (#822) * Fix Serbia Language * Rename messages_sr_Latn_RS.properties to messages_sr_LATN_RS.properties * Update languages.html * Update README.md --- README.md | 2 +- ...sr-Latn-RS.properties => messages_sr_LATN_RS.properties} | 0 src/main/resources/static/js/languageSelection.js | 2 +- src/main/resources/templates/about.html | 2 +- src/main/resources/templates/account.html | 2 +- src/main/resources/templates/addUsers.html | 2 +- src/main/resources/templates/auto-split-pdf.html | 2 +- src/main/resources/templates/change-creds.html | 2 +- src/main/resources/templates/convert/book-to-pdf.html | 2 +- src/main/resources/templates/convert/file-to-pdf.html | 2 +- src/main/resources/templates/convert/html-to-pdf.html | 2 +- src/main/resources/templates/convert/img-to-pdf.html | 2 +- src/main/resources/templates/convert/markdown-to-pdf.html | 2 +- src/main/resources/templates/convert/pdf-to-book.html | 2 +- src/main/resources/templates/convert/pdf-to-csv.html | 2 +- src/main/resources/templates/convert/pdf-to-html.html | 2 +- src/main/resources/templates/convert/pdf-to-img.html | 2 +- src/main/resources/templates/convert/pdf-to-pdfa.html | 2 +- .../resources/templates/convert/pdf-to-presentation.html | 2 +- src/main/resources/templates/convert/pdf-to-text.html | 2 +- src/main/resources/templates/convert/pdf-to-word.html | 2 +- src/main/resources/templates/convert/pdf-to-xml.html | 2 +- src/main/resources/templates/convert/url-to-pdf.html | 2 +- src/main/resources/templates/crop.html | 2 +- src/main/resources/templates/error.html | 2 +- src/main/resources/templates/extract-page.html | 2 +- src/main/resources/templates/fragments/languages.html | 2 +- src/main/resources/templates/fragments/navbar.html | 1 - src/main/resources/templates/home.html | 2 +- src/main/resources/templates/licenses.html | 2 +- src/main/resources/templates/login.html | 6 +++--- src/main/resources/templates/merge-pdfs.html | 2 +- src/main/resources/templates/misc/add-image.html | 2 +- src/main/resources/templates/misc/add-page-numbers.html | 2 +- src/main/resources/templates/misc/adjust-contrast.html | 2 +- src/main/resources/templates/misc/auto-crop.html | 2 +- src/main/resources/templates/misc/auto-rename.html | 2 +- src/main/resources/templates/misc/change-metadata.html | 2 +- src/main/resources/templates/misc/compare.html | 2 +- src/main/resources/templates/misc/compress-pdf.html | 3 +-- src/main/resources/templates/misc/extract-image-scans.html | 2 +- src/main/resources/templates/misc/extract-images.html | 2 +- src/main/resources/templates/misc/flatten.html | 2 +- src/main/resources/templates/misc/ocr-pdf.html | 2 +- src/main/resources/templates/misc/remove-annotations.html | 2 +- src/main/resources/templates/misc/remove-blanks.html | 2 +- src/main/resources/templates/misc/repair.html | 2 +- src/main/resources/templates/misc/show-javascript.html | 2 +- src/main/resources/templates/misc/stamp.html | 2 +- src/main/resources/templates/multi-page-layout.html | 2 +- src/main/resources/templates/multi-tool.html | 2 +- src/main/resources/templates/overlay-pdf.html | 2 +- src/main/resources/templates/pdf-organizer.html | 2 +- src/main/resources/templates/pdf-to-single-page.html | 2 +- src/main/resources/templates/pipeline.html | 2 +- src/main/resources/templates/remove-pages.html | 2 +- src/main/resources/templates/rotate-pdf.html | 2 +- src/main/resources/templates/scale-pages.html | 2 +- src/main/resources/templates/security/add-password.html | 2 +- src/main/resources/templates/security/add-watermark.html | 2 +- src/main/resources/templates/security/auto-redact.html | 2 +- src/main/resources/templates/security/cert-sign.html | 2 +- .../resources/templates/security/change-permissions.html | 2 +- src/main/resources/templates/security/get-info-on-pdf.html | 2 +- src/main/resources/templates/security/remove-password.html | 2 +- src/main/resources/templates/security/remove-watermark.html | 2 +- src/main/resources/templates/security/sanitize-pdf.html | 2 +- src/main/resources/templates/sign.html | 2 +- src/main/resources/templates/split-by-size-or-count.html | 2 +- src/main/resources/templates/split-pdf-by-sections.html | 2 +- src/main/resources/templates/split-pdfs.html | 2 +- 71 files changed, 71 insertions(+), 73 deletions(-) rename src/main/resources/{messages_sr-Latn-RS.properties => messages_sr_LATN_RS.properties} (100%) diff --git a/README.md b/README.md index b04da526..690adacd 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Stirling PDF currently supports 26! - Hindi (हिंदी) (hi_IN) - Hungarian (Magyar) (hu_HU) - Bulgarian (Български) (bg_BG) -- Sebian Latin alphabet (Srpski) (sr-Latn-RS) +- Sebian Latin alphabet (Srpski) (sr_LATN_RS) ## Contributing (creating issues, translations, fixing bugs, etc.) diff --git a/src/main/resources/messages_sr-Latn-RS.properties b/src/main/resources/messages_sr_LATN_RS.properties similarity index 100% rename from src/main/resources/messages_sr-Latn-RS.properties rename to src/main/resources/messages_sr_LATN_RS.properties diff --git a/src/main/resources/static/js/languageSelection.js b/src/main/resources/static/js/languageSelection.js index af67da48..413bebe0 100644 --- a/src/main/resources/static/js/languageSelection.js +++ b/src/main/resources/static/js/languageSelection.js @@ -26,7 +26,7 @@ document.addEventListener("DOMContentLoaded", function () { }); function setLanguageForDropdown(dropdownClass) { - const defaultLocale = document.documentElement.lang || "en_GB"; + const defaultLocale = document.documentElement.language || "en_GB"; const storedLocale = localStorage.getItem("languageCode") || defaultLocale; const dropdownItems = document.querySelectorAll(dropdownClass); diff --git a/src/main/resources/templates/about.html b/src/main/resources/templates/about.html index 17e79d57..957bf45f 100644 --- a/src/main/resources/templates/about.html +++ b/src/main/resources/templates/about.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html index 9b7f4df9..4398891d 100644 --- a/src/main/resources/templates/account.html +++ b/src/main/resources/templates/account.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/addUsers.html b/src/main/resources/templates/addUsers.html index 0cf3306d..f5e5e87d 100644 --- a/src/main/resources/templates/addUsers.html +++ b/src/main/resources/templates/addUsers.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/auto-split-pdf.html b/src/main/resources/templates/auto-split-pdf.html index e4d213d8..26106b46 100644 --- a/src/main/resources/templates/auto-split-pdf.html +++ b/src/main/resources/templates/auto-split-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/change-creds.html b/src/main/resources/templates/change-creds.html index 4709e40b..b22a9bd2 100644 --- a/src/main/resources/templates/change-creds.html +++ b/src/main/resources/templates/change-creds.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/book-to-pdf.html b/src/main/resources/templates/convert/book-to-pdf.html index 94229ccf..7d9d436c 100644 --- a/src/main/resources/templates/convert/book-to-pdf.html +++ b/src/main/resources/templates/convert/book-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/file-to-pdf.html b/src/main/resources/templates/convert/file-to-pdf.html index 3949688f..26217b56 100644 --- a/src/main/resources/templates/convert/file-to-pdf.html +++ b/src/main/resources/templates/convert/file-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/html-to-pdf.html b/src/main/resources/templates/convert/html-to-pdf.html index 11184606..c9a26a6b 100644 --- a/src/main/resources/templates/convert/html-to-pdf.html +++ b/src/main/resources/templates/convert/html-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html index 4de9e0f6..6d68fdec 100644 --- a/src/main/resources/templates/convert/img-to-pdf.html +++ b/src/main/resources/templates/convert/img-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/markdown-to-pdf.html b/src/main/resources/templates/convert/markdown-to-pdf.html index d0266aac..8df3ad17 100644 --- a/src/main/resources/templates/convert/markdown-to-pdf.html +++ b/src/main/resources/templates/convert/markdown-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-book.html b/src/main/resources/templates/convert/pdf-to-book.html index e8ef9402..2056c7f5 100644 --- a/src/main/resources/templates/convert/pdf-to-book.html +++ b/src/main/resources/templates/convert/pdf-to-book.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-csv.html b/src/main/resources/templates/convert/pdf-to-csv.html index d21156f0..16da051e 100644 --- a/src/main/resources/templates/convert/pdf-to-csv.html +++ b/src/main/resources/templates/convert/pdf-to-csv.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-html.html b/src/main/resources/templates/convert/pdf-to-html.html index b2347f02..f2e914f9 100644 --- a/src/main/resources/templates/convert/pdf-to-html.html +++ b/src/main/resources/templates/convert/pdf-to-html.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-img.html b/src/main/resources/templates/convert/pdf-to-img.html index 61034578..bcf3e8b3 100644 --- a/src/main/resources/templates/convert/pdf-to-img.html +++ b/src/main/resources/templates/convert/pdf-to-img.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-pdfa.html b/src/main/resources/templates/convert/pdf-to-pdfa.html index 1b75a078..866449f1 100644 --- a/src/main/resources/templates/convert/pdf-to-pdfa.html +++ b/src/main/resources/templates/convert/pdf-to-pdfa.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-presentation.html b/src/main/resources/templates/convert/pdf-to-presentation.html index f0a4a44a..408ff151 100644 --- a/src/main/resources/templates/convert/pdf-to-presentation.html +++ b/src/main/resources/templates/convert/pdf-to-presentation.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-text.html b/src/main/resources/templates/convert/pdf-to-text.html index cc6b7dcb..d1616589 100644 --- a/src/main/resources/templates/convert/pdf-to-text.html +++ b/src/main/resources/templates/convert/pdf-to-text.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-word.html b/src/main/resources/templates/convert/pdf-to-word.html index 74e6f314..6fd76f4e 100644 --- a/src/main/resources/templates/convert/pdf-to-word.html +++ b/src/main/resources/templates/convert/pdf-to-word.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/pdf-to-xml.html b/src/main/resources/templates/convert/pdf-to-xml.html index 701220c1..a7d020b0 100644 --- a/src/main/resources/templates/convert/pdf-to-xml.html +++ b/src/main/resources/templates/convert/pdf-to-xml.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/convert/url-to-pdf.html b/src/main/resources/templates/convert/url-to-pdf.html index 68044385..94f0bfa5 100644 --- a/src/main/resources/templates/convert/url-to-pdf.html +++ b/src/main/resources/templates/convert/url-to-pdf.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/crop.html b/src/main/resources/templates/crop.html index 825cfbec..05de3516 100644 --- a/src/main/resources/templates/crop.html +++ b/src/main/resources/templates/crop.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index d3cbecb6..954bcd7d 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/extract-page.html b/src/main/resources/templates/extract-page.html index a14e13d2..4bbd8b22 100644 --- a/src/main/resources/templates/extract-page.html +++ b/src/main/resources/templates/extract-page.html @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/templates/fragments/languages.html b/src/main/resources/templates/fragments/languages.html index f44caef3..07f16cc3 100644 --- a/src/main/resources/templates/fragments/languages.html +++ b/src/main/resources/templates/fragments/languages.html @@ -24,5 +24,5 @@ icon Ελληνικά icon Hungarian icon हिन्दी - icon Srpski + icon Srpski diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index c8ad96b6..4eaa22eb 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -139,7 +139,6 @@ -