modified: locales/de-DE.json
modified: locales/en-EN.json modified: templates/quiz.html
This commit is contained in:
@@ -20,5 +20,21 @@
|
|||||||
"tip_year": "Tipp: Gib das Erscheinungsjahr des Songs ein.",
|
"tip_year": "Tipp: Gib das Erscheinungsjahr des Songs ein.",
|
||||||
"correct": "Richtig! 🎉",
|
"correct": "Richtig! 🎉",
|
||||||
"wrong": "Falsch 😢",
|
"wrong": "Falsch 😢",
|
||||||
"right_answer": "Die richtige Antwort ist:"
|
"right_answer": "Die richtige Antwort ist:",
|
||||||
|
"songs_in_playlist": "Songs in Playlist:",
|
||||||
|
"score": "Richtige",
|
||||||
|
"percent": "% richtig",
|
||||||
|
"play_duration": "Abspielzeit",
|
||||||
|
"start_position": "Startposition",
|
||||||
|
"start": "Anfang",
|
||||||
|
"random": "Zufällig",
|
||||||
|
"unlimited": "Unendlich",
|
||||||
|
"pause": "⏸️ Pause",
|
||||||
|
"play": "▶️ Play",
|
||||||
|
"end_quiz": "Quiz beenden",
|
||||||
|
"song": "Song",
|
||||||
|
"artist": "Künstler",
|
||||||
|
"album": "Album",
|
||||||
|
"year": "Jahr",
|
||||||
|
"open_on_spotify": "Auf Spotify öffnen"
|
||||||
}
|
}
|
||||||
@@ -20,5 +20,21 @@
|
|||||||
"tip_year": "Tip: Enter the release year of the song.",
|
"tip_year": "Tip: Enter the release year of the song.",
|
||||||
"correct": "Correct! 🎉",
|
"correct": "Correct! 🎉",
|
||||||
"wrong": "Wrong 😢",
|
"wrong": "Wrong 😢",
|
||||||
"right_answer": "The correct answer is:"
|
"right_answer": "The correct answer is:",
|
||||||
|
"songs_in_playlist": "Songs in playlist:",
|
||||||
|
"score": "Correct",
|
||||||
|
"percent": "% correct",
|
||||||
|
"play_duration": "Play duration",
|
||||||
|
"start_position": "Start position",
|
||||||
|
"start": "Start",
|
||||||
|
"random": "Random",
|
||||||
|
"unlimited": "Unlimited",
|
||||||
|
"pause": "⏸️ Pause",
|
||||||
|
"play": "▶️ Play",
|
||||||
|
"end_quiz": "End quiz",
|
||||||
|
"song": "Song",
|
||||||
|
"artist": "Artist",
|
||||||
|
"album": "Album",
|
||||||
|
"year": "Year",
|
||||||
|
"open_on_spotify": "Open on Spotify"
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
function updatePlayButton(state) {
|
function updatePlayButton(state) {
|
||||||
let playButton = document.getElementById('playPauseBtn');
|
let playButton = document.getElementById('playPauseBtn');
|
||||||
if (state && !state.paused) {
|
if (state && !state.paused) {
|
||||||
playButton.innerHTML = '⏸️ Pause';
|
playButton.innerHTML = i18n.pause;
|
||||||
} else {
|
} else {
|
||||||
playButton.innerHTML = '▶️ Play';
|
playButton.innerHTML = '▶️ Play';
|
||||||
}
|
}
|
||||||
@@ -291,11 +291,11 @@
|
|||||||
resultContainer.innerHTML += `
|
resultContainer.innerHTML += `
|
||||||
<div style="margin-top:10px;">
|
<div style="margin-top:10px;">
|
||||||
<img src="{{ track.album.images[0].url }}" alt="Cover" style="width:80px;border-radius:8px;"><br>
|
<img src="{{ track.album.images[0].url }}" alt="Cover" style="width:80px;border-radius:8px;"><br>
|
||||||
<strong>Song:</strong> {{ track.name }}<br>
|
<strong>${i18n.song}:</strong> {{ track.name }}<br>
|
||||||
<strong>Künstler:</strong> {{ track.artists[0].name }}<br>
|
<strong>${i18n.artist}:</strong> {{ track.artists[0].name }}<br>
|
||||||
<strong>Album:</strong> {{ track.album.name }}<br>
|
<strong>${i18n.album}:</strong> {{ track.album.name }}<br>
|
||||||
<strong>Jahr:</strong> {{ track.album.release_date[:4] }}<br>
|
<strong>${i18n.year}:</strong> {{ track.album.release_date[:4] }}<br>
|
||||||
<a href="{{ track.external_urls.spotify }}" target="_blank" style="color:#1DB954;">Auf Spotify öffnen</a>
|
<a href="{{ track.external_urls.spotify }}" target="_blank" style="color:#1DB954;">${i18n.open_on_spotify}</a>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -326,14 +326,14 @@ window.onload = function() {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="text-align:center; margin-bottom: 10px;">
|
<div style="text-align:center; margin-bottom: 10px;">
|
||||||
<span id="progressInfo">Songs in Playlist: {{ total_questions }}</span>
|
<span id="progressInfo">{{ translations['songs_in_playlist'] }} {{ total_questions }}</span>
|
||||||
<span id="scoreInfo" style="margin-left:20px;">
|
<span id="scoreInfo" style="margin-left:20px;">
|
||||||
Richtige: {{ score }} / {{ answered if answered > 0 else 1 }}
|
{{ translations['score'] }}: {{ score }} / {{ answered if answered > 0 else 1 }}
|
||||||
({{ ((score / (answered if answered > 0 else 1)) * 100) | round(0) if answered > 0 else 0 }}%)
|
({{ ((score / (answered if answered > 0 else 1)) * 100) | round(0) if answered > 0 else 0 }}{{ translations['percent'] }})
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align:center; margin-bottom: 20px;">
|
<div style="text-align:center; margin-bottom: 20px;">
|
||||||
<a href="/reset_quiz/{{ playlist_id }}" class="btn btn-danger" style="margin-top:10px;">Quiz beenden</a>
|
<a href="/reset_quiz/{{ playlist_id }}" class="btn btn-danger" style="margin-top:10px;">{{ translations['end_quiz'] }}</a>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="question-text">{{ translations['question_artist'] }}</h2>
|
<h2 id="question-text">{{ translations['question_artist'] }}</h2>
|
||||||
|
|
||||||
@@ -349,25 +349,25 @@ window.onload = function() {
|
|||||||
|
|
||||||
<!-- Optionen für das Spiel -->
|
<!-- Optionen für das Spiel -->
|
||||||
<div class="game-options">
|
<div class="game-options">
|
||||||
<label>Abspielzeit:
|
<label>{{ translations['play_duration'] }}:
|
||||||
<select id="playDuration" onchange="setOption('playDuration', this.value)">
|
<select id="playDuration" onchange="setOption('playDuration', this.value)">
|
||||||
<option value="10">10s</option>
|
<option value="10">10s</option>
|
||||||
<option value="15">15s</option>
|
<option value="15">15s</option>
|
||||||
<option value="30">30s</option>
|
<option value="30">30s</option>
|
||||||
<option value="0" selected>Unendlich</option>
|
<option value="0" selected>{{ translations['unlimited'] }}</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label style="margin-left:20px;">Startposition:
|
<label style="margin-left:20px;">{{ translations['start_position'] }}:
|
||||||
<select id="startPosition" onchange="setOption('startPosition', this.value)">
|
<select id="startPosition" onchange="setOption('startPosition', this.value)">
|
||||||
<option value="start" selected>Anfang</option>
|
<option value="start" selected>{{ translations['start'] }}</option>
|
||||||
<option value="random">Zufällig</option>
|
<option value="random">{{ translations['random'] }}</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Player Controls -->
|
<!-- Player Controls -->
|
||||||
<div class="controls" style="text-align: center;">
|
<div class="controls" style="text-align: center;">
|
||||||
<button id="playPauseBtn" class="btn" onclick="togglePlay()">⏸️ Pause</button>
|
<button id="playPauseBtn" class="btn" onclick="togglePlay()">{{ translations['pause'] }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Antwort-Eingabe -->
|
<!-- Antwort-Eingabe -->
|
||||||
|
|||||||
Reference in New Issue
Block a user