Implementiere i18n für Frontend, Admin und Datenbank
This commit is contained in:
@@ -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"
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user