update translations

make new/old pages based on url parameter so that link sharing is consistent
This commit is contained in:
Alexandra
2025-05-27 20:12:30 -06:00
parent cf70ee7ce0
commit 35d2c5f3e3
19 changed files with 40 additions and 22 deletions

View File

@@ -32,7 +32,7 @@
"published": "الناشر:",
"developed": "المطور:",
"modes": "أنماط اللعب:",
"download": "تحميل:",
"download": "تحميل",
"filename": "اسم الملف:",
"release_group": "مجموعة الإصدار:",
"upload_date": "تاريخ الرفع:",
@@ -129,6 +129,7 @@
"download": "تنزيل",
"play": "تشغيل",
"not_available": "----",
"not_available_tooltip": "المحاكاة عبر الويب غير متوفرة لهذا العنوان إما لأنه ليس لعبة أو لأن المنصة غير مدعومة.",
"disclaimer": "يقوم هذا المحاكي بتحميل الألعاب مباشرة من {{link}}. تعرف على المزيد في صفحة {{about}}."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "প্রকাশক:",
"developed": "ডেভেলপার:",
"modes": "গেমপ্লে মোড:",
"download": "ডাউনলোড:",
"download": "ডাউনলোড",
"filename": "ফাইলের নাম:",
"release_group": "রিলিজ গ্রুপ:",
"upload_date": "আপলোডের তারিখ:",
@@ -129,6 +129,7 @@
"download": "ডাউনলোড",
"play": "প্লে",
"not_available": "----",
"not_available_tooltip": "এই টাইটেলের জন্য ওয়েব এমুলেশন উপলব্ধ নয় কারণ এটি হয় একটি গেম নয় অথবা প্ল্যাটফর্মটি সমর্থিত নয়।",
"disclaimer": "এই এমুলেটর {{link}} থেকে সরাসরি গেম লোড করে। {{about}} পৃষ্ঠায় আরও জানুন।"
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Veröffentlicht von:",
"developed": "Entwickelt von:",
"modes": "Spielmodi:",
"download": "Herunterladen:",
"download": "Herunterladen",
"filename": "Dateiname:",
"release_group": "Release-Gruppe:",
"upload_date": "Upload-Datum:",
@@ -129,6 +129,7 @@
"download": "Herunterladen",
"play": "Spielen",
"not_available": "----",
"not_available_tooltip": "Web-Emulation ist für diesen Titel nicht verfügbar, da es sich entweder nicht um ein Spiel handelt oder die Plattform nicht unterstützt wird.",
"disclaimer": "Dieser Emulator lädt Spiele direkt von {{link}}. Mehr dazu auf der {{about}}-Seite."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Published by:",
"developed": "Developed by:",
"modes": "Gameplay modes:",
"download": "Download:",
"download": "Download",
"filename": "Filename:",
"release_group": "Release group:",
"upload_date": "Upload date:",
@@ -129,6 +129,7 @@
"download": "Download",
"play": "Play",
"not_available": "----",
"not_available_tooltip": "Web emulation is unavailable for this title as it's either not a game or the platform is unsupported.",
"disclaimer": "This emulator loads games directly from {{link}}. Learn more on the {{about}} page."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Publicado por:",
"developed": "Desarrollado por:",
"modes": "Modos de juego:",
"download": "Descargar:",
"download": "Descargar",
"filename": "Nombre del archivo:",
"release_group": "Grupo de lanzamiento:",
"upload_date": "Fecha de subida:",
@@ -129,7 +129,8 @@
"download": "Descargar",
"play": "Jugar",
"not_available": "----",
"disclaimer": "Este emulador carga juegos directamente desde {{link}}. Más información en la página de {{about}}."
"not_available_tooltip": "La emulación web no está disponible para este título ya que no es un juego o la plataforma no es compatible.",
"disclaimer": "Este emulador carga juegos directamente desde {{link}}. Más información en la página {{about}}."
},
"results": {
"table": {

View File

@@ -32,7 +32,7 @@
"published": "प्रकाशक:",
"developed": "डेवलपर:",
"modes": "गेमप्ले मोड:",
"download": "डाउनलोड:",
"download": "डाउनलोड",
"filename": "फ़ाइल का नाम:",
"release_group": "रिलीज़ ग्रुप:",
"upload_date": "अपलोड की तारीख:",
@@ -128,6 +128,7 @@
"recommended": "अनुशंसित एमुलेटर्स",
"play": "खेलें",
"not_available": "----",
"not_available_tooltip": "इस शीर्षक के लिए वेब एमुलेशन उपलब्ध नहीं है क्योंकि यह या तो एक गेम नहीं है या प्लेटफ़ॉर्म समर्थित नहीं है।",
"disclaimer": "यह एमुलेटर {{link}} से सीधे गेम लोड करता है। {{about}} पृष्ठ पर अधिक जानें।"
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Pubblicato da:",
"developed": "Sviluppato da:",
"modes": "Modalità di gioco:",
"download": "Scarica:",
"download": "Scarica",
"filename": "Nome file:",
"release_group": "Gruppo di release:",
"upload_date": "Data di caricamento:",
@@ -129,6 +129,7 @@
"download": "Scarica",
"play": "Gioca",
"not_available": "----",
"not_available_tooltip": "L'emulazione web non è disponibile per questo titolo poiché non è un gioco o la piattaforma non è supportata.",
"disclaimer": "Questo emulatore carica i giochi direttamente da {{link}}. Maggiori informazioni nella pagina {{about}}."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Wydawca:",
"developed": "Deweloper:",
"modes": "Tryby gry:",
"download": "Pobierz:",
"download": "Pobierz",
"filename": "Nazwa pliku:",
"release_group": "Grupa wydania:",
"upload_date": "Data przesłania:",
@@ -128,6 +128,7 @@
"recommended": "Polecane emulatory",
"play": "Graj",
"not_available": "----",
"not_available_tooltip": "Emulacja internetowa nie jest dostępna dla tego tytułu, ponieważ nie jest to gra lub platforma nie jest obsługiwana.",
"disclaimer": "Ten emulator ładuje gry bezpośrednio z {{link}}. Dowiedz się więcej na stronie {{about}}."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Издатель:",
"developed": "Разработчик:",
"modes": "Режимы игры:",
"download": "Скачать:",
"download": "Скачать",
"filename": "Имя файла:",
"release_group": "Релиз-группа:",
"upload_date": "Дата загрузки:",
@@ -128,6 +128,7 @@
"recommended": "Рекомендуемые эмуляторы",
"play": "Играть",
"not_available": "----",
"not_available_tooltip": "Веб-эмуляция недоступна для этого заголовка, так как это либо не игра, либо платформа не поддерживается.",
"disclaimer": "Этот эмулятор загружает игры напрямую из {{link}}. Узнайте больше на странице {{about}}."
},
"results": {

View File

@@ -32,7 +32,7 @@
"published": "Yayıncı:",
"developed": "Geliştirici:",
"modes": "Oyun modları:",
"download": "İndir:",
"download": "İndir",
"filename": "Dosya adı:",
"release_group": "Yayın grubu:",
"upload_date": "Yükleme tarihi:",
@@ -129,6 +129,7 @@
"download": "İndir",
"play": "Oyna",
"not_available": "----",
"not_available_tooltip": "Bu başlık için web emülasyonu kullanılamıyor çünkü ya bir oyun değil ya da platform desteklenmiyor.",
"disclaimer": "Bu emülatör oyunları doğrudan {{link}} adresinden yükler. {{about}} sayfasında daha fazla bilgi edinin."
},
"results": {

View File

@@ -200,13 +200,14 @@ app.get("/search", async function (req, res) {
if (settings.combineWith != "AND") {
delete settings.combineWith;
}
let loadOldResults = req.query.old === "true" ? true : false
settings.pageSize = settings.useOldResults ? 100 : 10;
settings.page = pageNum - 1;
settings.sort = req.query.o || "";
let results = await search.findAllMatches(query, settings);
debugPrint(results);
let metas = [];
if (!settings.useOldResults) {
if (!loadOldResults) {
metas = await metadataSearch.queueGetGamesMetadata(results.db);
}
if (results.count && pageNum == 1) {
@@ -225,7 +226,7 @@ app.get("/search", async function (req, res) {
urlPrefix: urlPrefix,
settings: settings,
};
let page = settings.useOldResults ? "resultsold" : "results";
let page = loadOldResults ? "resultsold" : "results";
options = buildOptions(page, options);
res.render(indexPage, options);
});

View File

@@ -25,6 +25,15 @@
settingsElem.value = btoa(settingStore)
}
}
if(typeof settingStore == 'string' && window.location.href){
oldResultElem = document.getElementById('oldResults')
if(oldResultElem){
oldResultElem.value = JSON.parse(settingStore).useOldResults.toString()
}
}
}
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js'></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</html>

View File

@@ -90,7 +90,7 @@
<% if (process.env.EMULATOR_ENABLED === 'true') { %>
<% if (isEmulatorCompatible(file.category)) { %>
<a class="btn btn-sm btn-secondary" href="/play/<%= file.id %>"><%= __('emulator.play')%></a></a> <% } else { %>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %></button>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %> <i class="bi bi-question-circle" data-toggle="tooltip" data-placement="right" title="<%= __('emulator.not_available_tooltip') %>"></i></button>
<% }
}%>
</div>

View File

@@ -90,7 +90,7 @@
<% if (isEmulatorCompatible(results[x].category)) { %>
<a href="/play/<%= results[x].id %>" class="btn btn-sm btn-secondary"><%= __('emulator.play') %></a>
<% } else { %>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %></button>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %> <i class="bi bi-question-circle" data-toggle="tooltip" data-placement="top" title="<%= __('emulator.not_available_tooltip') %>"></i></button>
<% } %>
</td>
<% } %>

View File

@@ -7,6 +7,7 @@
<div class="text-center text-white">
<form>
<input type="hidden" name="s" id="searchSettings">
<input type="hidden" name="old" id="oldResults">
<input id="search" type="text" style="width: 80%;display: inline;" class="form-control bg-dark text-white mb-2"
name="q" autocomplete="off" placeholder="<%= __('search.placeholder') %>">
<ul class="SuggestionList col-sm-12" id="suggestionList" style="width: 78%;left: 11%;"></ul>

View File

@@ -1,6 +1,3 @@
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js'></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<div class="row h-50 w-100 m-0">
<div class="col-sm-12 my-auto text-center">
<pre style="font: 20px / 19px monospace; color: white; text-align: center; overflow: hidden;">

View File

@@ -31,7 +31,7 @@
<% if (process.env.EMULATOR_ENABLED === 'true') { %>
<% if (isEmulatorCompatible(file.category)) { %>
<a class="btn btn-sm btn-secondary" href="/play/<%= file.id %>"><%= __('emulator.play')%></a></a> <% } else { %>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %></button>
<button class="btn btn-sm btn-secondary" disabled><%= __('emulator.not_available') %> <i class="bi bi-question-circle" data-toggle="tooltip" data-placement="right" title="<%= __('emulator.not_available_tooltip') %>"></i></button>
<% }
}%>

View File

@@ -1,6 +1,9 @@
$(document).ready(function() {
// Make sure Bootstrap dropdown is properly initialized
$('.dropdown-toggle').dropdown();
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
});
const aTags = document.querySelectorAll('a')

View File

@@ -58,9 +58,6 @@
}
function loadSettings(){
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
if(!settingStore) {
settings = structuredClone(defaults)
settingStore = JSON.stringify(settings)