From c96ebccae46a8c367f42754c13541ba96eb6011f Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.> Date: Sun, 18 Feb 2024 13:30:56 +0000 Subject: [PATCH] Download message for game --- src/main/resources/messages_ar_AR.properties | 3 ++- src/main/resources/messages_bg_BG.properties | 3 ++- src/main/resources/messages_ca_CA.properties | 3 ++- src/main/resources/messages_de_DE.properties | 3 ++- src/main/resources/messages_el_GR.properties | 3 ++- src/main/resources/messages_en_GB.properties | 3 ++- src/main/resources/messages_en_US.properties | 3 ++- src/main/resources/messages_es_ES.properties | 3 ++- src/main/resources/messages_eu_ES.properties | 3 ++- src/main/resources/messages_fr_FR.properties | 5 +++-- src/main/resources/messages_hi_IN.properties | 3 ++- src/main/resources/messages_hu_HU.properties | 3 ++- src/main/resources/messages_id_ID.properties | 3 ++- src/main/resources/messages_it_IT.properties | 3 ++- src/main/resources/messages_ja_JP.properties | 4 +++- src/main/resources/messages_ko_KR.properties | 3 ++- src/main/resources/messages_nl_NL.properties | 3 ++- src/main/resources/messages_pl_PL.properties | 3 ++- src/main/resources/messages_pt_BR.properties | 3 ++- src/main/resources/messages_ro_RO.properties | 3 ++- src/main/resources/messages_ru_RU.properties | 3 ++- .../resources/messages_sr_LATN_RS.properties | 3 ++- src/main/resources/messages_sv_SE.properties | 3 ++- src/main/resources/messages_tr_TR.properties | 3 ++- src/main/resources/messages_zh_CN.properties | 3 ++- src/main/resources/messages_zh_TW.properties | 3 ++- src/main/resources/static/js/downloader.js | 18 ++++++++++++++++++ src/main/resources/static/js/game.js | 3 --- .../resources/templates/fragments/common.html | 7 +++++-- 29 files changed, 77 insertions(+), 32 deletions(-) diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index bdd14ecd..f2a2a75d 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=\u062D\u0641\u0638 close=\u0625\u063A\u0644\u0627\u0642 filesSelected=الملفات المحددة noFavourites=لم تتم إضافة أي مفضلات +downloadComplete=Download Complete bored=الانتظار بالملل؟ alphabet=\u0627\u0644\u0623\u0628\u062C\u062F\u064A\u0629 downloadPdf=تنزيل PDF diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 9bef411d..9fbee0f4 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Съхранете close=Затворете filesSelected=избрани файлове noFavourites=Няма добавени любими +downloadComplete=Download Complete bored=Отекчени сте да чакате? alphabet=Азбука downloadPdf=Изтеглете PDF diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index e47451b6..0cac1ef3 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Desa close=Tanca filesSelected=fitxers seleccionats noFavourites=No s'ha afegit cap favorit +downloadComplete=Download Complete bored=Avorrit esperant? alphabet=Alfabet downloadPdf=Descarregueu PDF diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 2f043a7c..badb132f 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Speichern close=Schließen filesSelected=Dateien ausgewählt noFavourites=Keine Favoriten hinzugefügt +downloadComplete=Download Complete bored=Langeweile beim Warten? alphabet=Alphabet downloadPdf=PDF herunterladen diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index fa3c4b65..ae4993a9 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 close=\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF filesSelected=\u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C0\u03BF\u03C5 \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B1\u03BD noFavourites=\u039A\u03B1\u03BD\u03AD\u03BD\u03B1 \u03B1\u03B3\u03B1\u03C0\u03AE\u03BC\u03B5\u03BD\u03BF \u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03B9 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF +downloadComplete=Download Complete bored=\u0392\u03B1\u03C1\u03B9\u03AD\u03C3\u03C4\u03B5 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03BC\u03AD\u03BD\u03B5\u03C4\u03B5; alphabet=\u0391\u03BB\u03C6\u03AC\u03B2\u03B7\u03C4\u03BF downloadPdf=\u039A\u03B1\u03C4\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C4\u03BF\u03C5 PDF diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 1dd5262d..5d8a4dbc 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr = left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Save close=Close filesSelected=files selected noFavourites=No favourites added +downloadComplete=Download Complete bored=Bored Waiting? alphabet=Alphabet downloadPdf=Download PDF diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 120ace75..2948fa20 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Save close=Close filesSelected=files selected noFavourites=No favorites added +downloadComplete=Download Complete bored=Bored Waiting? alphabet=Alphabet downloadPdf=Download PDF diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 38c6d6a5..8e28ef35 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Guardar close=Cerrar filesSelected=archivos seleccionados noFavourites=No se agregaron favoritos +downloadComplete=Download Complete bored=¿Cansado de esperar? alphabet=Alfabeto downloadPdf=Descargar PDF diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index 21767b94..9267379f 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Gorde close=Itxi filesSelected=Hautatutako fitxategiak noFavourites=Ez dira gogokoak gehitu +downloadComplete=Download Complete bored=Itxaroten aspertuta? alphabet=Alfabetoa downloadPdf=PDFa deskargatu diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index e40d9291..58ee579d 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -20,6 +20,7 @@ save=Enregistrer close=Fermer filesSelected=fichiers sélectionnés noFavourites=Aucun favori ajouté +downloadComplete=Téléchargement terminé bored=Ennuyé d\u2019attendre\u00a0? alphabet=Alphabet downloadPdf=Télécharger le PDF @@ -925,7 +926,6 @@ PDFToCSV.prompt=Choisir la page pour en extraire le tableau PDFToCSV.submit=Extrait #split-by-size-or-count -split-by-size-or-count.title=Séparer le PDF par taille ou par nombre split-by-size-or-count.header=Séparer le PDF par taille ou par nombre split-by-size-or-count.type.label=Sélectionner le type de division split-by-size-or-count.type.size=Par taille @@ -937,7 +937,6 @@ split-by-size-or-count.submit=Séparer #overlay-pdfs -overlay-pdfs.title=Incrustation de PDF overlay-pdfs.header=Incrustation de PDF overlay-pdfs.baseFile.label=Sélectionner le fichier PDF de base overlay-pdfs.overlayFiles.label=Sélectionner les fichiers PDF à superposer @@ -970,3 +969,5 @@ licenses.header=Licences tierces licenses.module=Module licenses.version=Version licenses.license=Licence + + diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index b17af690..1033b65a 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=सहेजें close=बंद करें filesSelected=फ़ाइलें चयनित हैं noFavourites=कोई पसंदीदा जोड़ा नहीं गया है +downloadComplete=Download Complete bored=बोर हो रहे हैं? alphabet=वर्णमाला downloadPdf=पीडीएफ़ डाउनलोड करें diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index 0fab7e30..b82e1d64 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Mentés close=Bezárás filesSelected=kiválasztott fájlok noFavourites=Nincs hozzáadva kedvenc +downloadComplete=Download Complete bored=Unatkozol? alphabet=Ábécé downloadPdf=PDF letöltése diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 4bbe247b..e3c1cec7 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl=right to left) @@ -20,6 +20,7 @@ save=Simpan close=Tutup filesSelected=berkas dipilih noFavourites=Tidak ada favorit yang ditambahkan +downloadComplete=Download Complete bored=Bosan Menunggu? alphabet=Abjad downloadPdf=Unduh PDF diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 4557da8d..871b28a7 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Salva close=Chiudi filesSelected=file selezionati noFavourites=Nessun preferito +downloadComplete=Download Complete bored=Stanco di aspettare? alphabet=Alfabeto downloadPdf=Scarica PDF diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index fb794c81..46740e68 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=保存 close=閉じる filesSelected=選択されたファイル noFavourites=お気に入りはありません +downloadComplete=Download Complete bored=待ち時間が退屈 alphabet=\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8 downloadPdf=PDFをダウンロード @@ -969,3 +970,4 @@ licenses.module=モジュール licenses.version=バージョン licenses.license=ライセンス + diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index a016e6b3..e710eccf 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=저장 close=닫기 filesSelected=개 파일 선택됨 noFavourites=즐겨찾기 없음 +downloadComplete=Download Complete bored=기다리는 게 지루하신가요? alphabet=\uC54C\uD30C\uBCB3 downloadPdf=PDF 다운로드 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index fed34234..d261f5a1 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Opslaan close=Sluiten filesSelected=Bestanden geselecteerd noFavourites=Geen favorieten toegevoegd +downloadComplete=Download Complete bored=Verveeld met wachten? alphabet=Alfabet downloadPdf=Download PDF diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index c385a13f..14a4f979 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Zapisz close=Zamknij filesSelected=wybrane pliki noFavourites=Nie dodano ulubionych +downloadComplete=Download Complete bored=Znudzony czekaniem? alphabet=Alfabet downloadPdf=Pobierz PDF diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 778f1df5..d7115da7 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Salvar close=Fechar filesSelected=arquivos selecionados noFavourites=Nenhum favorito adicionado +downloadComplete=Download Complete bored=Entediado esperando? alphabet=Alfabeto downloadPdf=baixar PDF diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 4e34c6e3..4c3712e9 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Salvează close=Închide filesSelected=fișiere selectate noFavourites=Niciun favorit adăugat +downloadComplete=Download Complete bored=Plictisit așteptând? alphabet=Alfabet downloadPdf=Descarcă PDF diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index d386167b..14971b97 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Сохранить close=Закрыть filesSelected=файлов выбрано noFavourites=Нет избранного +downloadComplete=Download Complete bored=Скучно ждать? alphabet=Алфавит downloadPdf=Скачать PDF diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index 1cd0eec3..7c4446f7 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Sačuvaj close=Zatvori filesSelected=odabrani fajlovi noFavourites=Nema dodatih favorita +downloadComplete=Download Complete bored=Da li ti je dosadno dok čekaš? alphabet=Alfabet downloadPdf=Skini PDF diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 5908b41c..e2199e00 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Spara close=Stäng filesSelected=filer valda noFavourites=Inga favoriter har lagts till +downloadComplete=Download Complete bored=Utråkad att vänta? alphabet=Alfabet downloadPdf=Ladda ner PDF diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 618e967e..0dd60789 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=Kaydet close=Kapat filesSelected=dosya seçildi noFavourites=Favori eklenmedi +downloadComplete=Download Complete bored=Sıkıldınız mı? alphabet=Alfabe downloadPdf=PDF İndir diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index ea994fbb..c79eb73c 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=保存 close=关闭 filesSelected=选中的文件 noFavourites=没有添加收藏夹 +downloadComplete=Download Complete bored=无聊等待吗? alphabet=字母表 downloadPdf=下载PDF diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index 2122d9f0..fa0e2d35 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -1,4 +1,4 @@ -########### +########### # Generic # ########### # the direction that the language is written (ltr=left to right, rtl = right to left) @@ -20,6 +20,7 @@ save=儲存 close=關閉 filesSelected=已選擇的檔案 noFavourites=未新增收藏 +downloadComplete=Download Complete bored=等待時覺得無聊? alphabet=字母表 downloadPdf=下載 PDF diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index 9871b69d..4d7fa783 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -45,6 +45,24 @@ $(document).ready(function () { } clearTimeout(timeoutId); $("#submitBtn").text(originalButtonText); + + // After process finishes, check for boredWaiting and gameDialog open status + const boredWaiting = localStorage.getItem("boredWaiting") || "disabled"; + const gameDialog = document.getElementById('game-container-wrapper'); + if (boredWaiting === "enabled" && gameDialog && gameDialog.open) { + // Display a green banner at the bottom of the screen saying "Download complete" + let downloadCompleteText = "Download Complete"; + if(window.downloadCompleteText){ + downloadCompleteText = window.downloadCompleteText; + } + $("body").append('
'+ downloadCompleteText + '
'); + setTimeout(function() { + $("#download-complete-banner").fadeOut("slow", function() { + $(this).remove(); // Remove the banner after fading out + }); + }, 5000); // Banner will fade out after 5 seconds + } + } catch (error) { clearTimeout(timeoutId); handleDownloadError(error); diff --git a/src/main/resources/static/js/game.js b/src/main/resources/static/js/game.js index 6ddc392e..c5162127 100644 --- a/src/main/resources/static/js/game.js +++ b/src/main/resources/static/js/game.js @@ -246,13 +246,10 @@ function initializeGame() { function spawnPdfInterval() { - console.log("spawnPdfInterval"); if (gameOver || paused) { - console.log("spawnPdfInterval 2"); clearTimeout(spawnPdfTimeout); return; } - console.log("spawnPdfInterval 3"); spawnPdf(); let spawnRateReduction = Math.min(level * LEVEL_INCREASE_FACTOR_MS, MAX_SPAWN_RATE_REDUCTION_MS); let spawnRate = BASE_SPAWN_INTERVAL_MS - spawnRateReduction; diff --git a/src/main/resources/templates/fragments/common.html b/src/main/resources/templates/fragments/common.html index 517a902b..2bd60360 100644 --- a/src/main/resources/templates/fragments/common.html +++ b/src/main/resources/templates/fragments/common.html @@ -67,7 +67,7 @@ -