Implementiere i18n für Frontend, Admin und Datenbank

This commit is contained in:
Hördle Bot
2025-11-28 15:36:06 +01:00
parent 9df9a808bf
commit 771d0d06f3
37 changed files with 3717 additions and 560 deletions

View File

@@ -1,6 +1,7 @@
'use client';
import { useState, useEffect } from 'react';
import { useTranslations } from 'next-intl';
interface Song {
id: number;
@@ -14,6 +15,7 @@ interface GuessInputProps {
}
export default function GuessInput({ onGuess, disabled }: GuessInputProps) {
const t = useTranslations('Game');
const [query, setQuery] = useState('');
const [songs, setSongs] = useState<Song[]>([]);
const [filteredSongs, setFilteredSongs] = useState<Song[]>([]);
@@ -53,7 +55,7 @@ export default function GuessInput({ onGuess, disabled }: GuessInputProps) {
value={query}
onChange={(e) => setQuery(e.target.value)}
disabled={disabled}
placeholder={disabled ? "Game Over" : "Know it? Search for the artist / title"}
placeholder={disabled ? t('gameOverPlaceholder') : t('knowItSearch')}
className="guess-input"
/>