diff --git a/src/contexts/LanguageContext.tsx b/src/contexts/LanguageContext.tsx
index 61f877f666aecef2582e102af93e66f454c9c08f..fd3d976e8e4da200d618f31f507af38aab4c5e34 100644
--- a/src/contexts/LanguageContext.tsx
+++ b/src/contexts/LanguageContext.tsx
@@ -20,14 +20,17 @@ export const LanguageProvider = ({ children }: LanguageProviderProps) => {
useEffect(() => {
const savedLang = localStorage.getItem('language') as Language;
+ console.log('[LanguageContext] Initial load - Saved language:', savedLang);
if (savedLang && ['en', 'fr', 'de', 'it', 'es'].includes(savedLang)) {
setLanguage(savedLang);
}
}, []);
const handleSetLanguage = (lang: Language) => {
+ console.log('[LanguageContext] Setting new language:', lang);
setLanguage(lang);
localStorage.setItem('language', lang);
+ console.log('[LanguageContext] Updated localStorage:', localStorage.getItem('language'));
};
return (
diff --git a/src/hooks/useTranslation.ts b/src/hooks/useTranslation.ts
index d272510488431e2638583fb46e28f4a30e0021f4..f09571ba22fbff09f2ddd4e9c4d95875b3a18921 100644
--- a/src/hooks/useTranslation.ts
+++ b/src/hooks/useTranslation.ts
@@ -4,5 +4,6 @@ import { translations } from '@/i18n/translations';
export const useTranslation = () => {
const { language } = useContext(LanguageContext);
+ console.log('[useTranslation] Getting translations for language:', language);
return translations[language];
};
\ No newline at end of file
diff --git a/src/i18n/translations/de.ts b/src/i18n/translations/de.ts
index e216640c7d0924cbf0f61eb7addb8135c96ac5d8..2e0b1166be80f2d8fbe5683007b69b386a26f32c 100644
--- a/src/i18n/translations/de.ts
+++ b/src/i18n/translations/de.ts
@@ -1,128 +1,129 @@
export const de = {
- game: {
- title: "Think in Sync",
- round: "Runde",
- buildDescription: "Baut gemeinsam einen Satz",
- buildSubtitle: "Fügt abwechselnd Wörter hinzu, um einen Satz zu bilden",
- startSentence: "Beginne deinen Satz...",
- inputPlaceholder: "Gib EIN Wort ein...",
- addWord: "Wort hinzufügen",
- makeGuess: "Raten",
- aiThinking: "KI denkt nach...",
- aiDelayed: "Die KI ist derzeit beschäftigt. Bitte versuche es gleich noch einmal.",
- invalidWord: "Ungültiges Wort",
- cantUseTargetWord: "Verwende nicht das geheime Wort",
- lettersOnly: "Bitte nur Buchstaben verwenden",
- singleWordOnly: "Bitte nur ein Wort eingeben",
- leaveGameTitle: "Spiel verlassen?",
- leaveGameDescription: "Dein aktueller Fortschritt geht verloren. Bist du sicher, dass du das Spiel verlassen möchtest?",
- cancel: "Abbrechen",
- confirm: "Bestätigen",
- describeWord: "Dein Ziel ist es folgendes Wort zu beschreiben",
- nextRound: "Nächste Runde",
- playAgain: "Erneut spielen",
- saveScore: "Punktzahl speichern"
- },
- leaderboard: {
- title: "Bestenliste",
- yourScore: "Deine Punktzahl",
- roundCount: "Runden",
- wordsPerRound: "Wörter pro Runde",
- enterName: "Gib deinen Namen ein",
- submitting: "Wird übermittelt...",
- submit: "Punktzahl einreichen",
- rank: "Rang",
- player: "Spieler",
- roundsColumn: "Runden",
- avgWords: "Durchschn. Wörter",
- noScores: "Noch keine Punktzahlen",
- previous: "Vorherige",
- next: "Nächste",
- success: "Punktzahl erfolgreich übermittelt!",
- error: {
- invalidName: "Bitte gib einen gültigen Namen ein",
- noRounds: "Du musst mindestens eine Runde abschließen",
- alreadySubmitted: "Punktzahl bereits eingereicht",
- newHighScore: "Neuer Highscore!",
- beatRecord: "Du hast deinen bisherigen Rekord von {score} geschlagen!",
- notHigher: "Punktzahl von {current} nicht höher als dein Bester von {best}",
- submitError: "Fehler beim Einreichen der Punktzahl"
- }
+ game: {
+ title: "Think in Sync",
+ round: "Runde",
+ buildDescription: "Baut gemeinsam einen Satz",
+ buildSubtitle: "Fügt abwechselnd Wörter hinzu, um einen Satz zu bilden",
+ startSentence: "Beginne deinen Satz...",
+ inputPlaceholder: "Gib EIN Wort ein...",
+ addWord: "Wort hinzufügen",
+ makeGuess: "Raten",
+ aiThinking: "KI denkt nach...",
+ aiDelayed: "Die KI ist derzeit beschäftigt. Bitte versuche es gleich noch einmal.",
+ invalidWord: "Ungültiges Wort",
+ cantUseTargetWord: "Verwende nicht das geheime Wort",
+ lettersOnly: "Bitte nur Buchstaben verwenden",
+ singleWordOnly: "Bitte nur ein Wort eingeben",
+ leaveGameTitle: "Spiel verlassen?",
+ leaveGameDescription: "Dein aktueller Fortschritt geht verloren. Bist du sicher, dass du das Spiel verlassen möchtest?",
+ cancel: "Abbrechen",
+ confirm: "Bestätigen",
+ describeWord: "Dein Ziel ist es folgendes Wort zu beschreiben",
+ nextRound: "Nächste Runde",
+ playAgain: "Erneut spielen",
+ saveScore: "Punktzahl speichern"
+ },
+ leaderboard: {
+ title: "Bestenliste",
+ yourScore: "Deine Punktzahl",
+ roundCount: "Runden",
+ wordsPerRound: "Wörter pro Runde",
+ enterName: "Gib deinen Namen ein",
+ submitting: "Wird übermittelt...",
+ submit: "Punktzahl einreichen",
+ rank: "Rang",
+ player: "Spieler",
+ roundsColumn: "Runden",
+ avgWords: "Durchschn. Wörter",
+ noScores: "Noch keine Punktzahlen",
+ previous: "Vorherige",
+ next: "Nächste",
+ success: "Punktzahl erfolgreich übermittelt!",
+ theme: "Thema",
+ error: {
+ invalidName: "Bitte gib einen gültigen Namen ein",
+ noRounds: "Du musst mindestens eine Runde abschließen",
+ alreadySubmitted: "Punktzahl bereits eingereicht",
+ newHighScore: "Neuer Highscore!",
+ beatRecord: "Du hast deinen bisherigen Rekord von {score} geschlagen!",
+ notHigher: "Punktzahl von {current} nicht höher als dein Bester von {best}",
+ submitError: "Fehler beim Einreichen der Punktzahl"
+ }
+ },
+ guess: {
+ title: "KI-Vermutung",
+ goalDescription: "Dein Ziel war es folgendes Wort zu beschreiben",
+ providedDescription: "Du hast folgende Beschreibung gegeben",
+ aiGuessedDescription: "Basierend auf deiner Beschreibung hat die KI geraten",
+ correct: "Das ist richtig!",
+ incorrect: "Das ist falsch.",
+ nextRound: "Nächste Runde",
+ playAgain: "Erneut spielen",
+ viewLeaderboard: "In Bestenliste eintragen",
+ cheatingDetected: "Betrugsversuch erkannt!"
+ },
+ themes: {
+ title: "Wähle ein Thema",
+ subtitle: "Wähle ein Thema für das Wort, das die KI erraten soll",
+ standard: "Standard",
+ technology: "Technologie",
+ sports: "Sport",
+ food: "Essen",
+ custom: "Eigenes Thema",
+ customPlaceholder: "Gib dein eigenes Thema ein...",
+ continue: "Weiter",
+ generating: "Wird generiert...",
+ pressKey: "Drücke",
+ playing: "Thema"
+ },
+ welcome: {
+ title: "Think in Sync",
+ subtitle: "Arbeite mit KI zusammen, um einen Hinweis zu erstellen und lass eine andere KI dein geheimes Wort erraten!",
+ startButton: "Spiel starten",
+ howToPlay: "Spielanleitung",
+ leaderboard: "Bestenliste",
+ credits: "Erstellt während des",
+ likeGameText: "Wenn du dieses Spiel unterstützen möchtest",
+ contest: {
+ prize: "Wir kochen etwas...",
+ terms: "Erfahre mehr",
+ howTo: "So bereitest du dich vor:",
+ conditions: [
+ "Spiele Think in Sync mit der Standard-Wortliste",
+ "Setze deinen Bestenlisten-Namen gleich deinem Hugging Face Benutzernamen",
+ "Like unser Projekt auf Hugging Face"
+ ],
+ deadline: "Wir werden die Details bald hier bekannt geben",
+ prizes: {
+ title: "Kämpfe um die Top 5 Plätze und gewinne:",
+ list: [
+ "🥇 1. Platz: 50€",
+ "🥈 2. Platz: 20€",
+ "🥉 3. Platz: 10€",
+ "🎖️ 4. & 5. Platz: je 10€"
+ ]
+ },
+ fairPlay: "🚨 Faires Spielen wird überwacht. Betrug führt zur Disqualifikation!"
},
- guess: {
- title: "KI-Vermutung",
- goalDescription: "Dein Ziel war es folgendes Wort zu beschreiben",
- providedDescription: "Du hast folgende Beschreibung gegeben",
- aiGuessedDescription: "Basierend auf deiner Beschreibung hat die KI geraten",
- correct: "Das ist richtig!",
- incorrect: "Das ist falsch.",
- nextRound: "Nächste Runde",
- playAgain: "Erneut spielen",
- viewLeaderboard: "In Bestenliste eintragen",
- cheatingDetected: "Betrugsversuch erkannt!"
+ likeOnHuggingface: "Auf Hugging Face liken"
+ },
+ howToPlay: {
+ setup: {
+ title: "Vorbereitung",
+ description: "Wähle ein Thema und erhalte ein geheimes Wort, das die KI erraten soll."
},
- themes: {
- title: "Wähle ein Thema",
- subtitle: "Wähle ein Thema für das Wort, das die KI erraten soll",
- standard: "Standard",
- technology: "Technologie",
- sports: "Sport",
- food: "Essen",
- custom: "Eigenes Thema",
- customPlaceholder: "Gib dein eigenes Thema ein...",
- continue: "Weiter",
- generating: "Wird generiert...",
- pressKey: "Drücke",
- playing: "Thema"
+ goal: {
+ title: "Ziel",
+ description: "Baue gemeinsam mit der KI Sätze, die dein Wort beschreiben, ohne es direkt zu verwenden."
},
- welcome: {
- title: "Think in Sync",
- subtitle: "Arbeite mit KI zusammen, um einen Hinweis zu erstellen und lass eine andere KI dein geheimes Wort erraten!",
- startButton: "Spiel starten",
- howToPlay: "Spielanleitung",
- leaderboard: "Bestenliste",
- credits: "Erstellt während des",
- likeGameText: "Wenn dir das Spiel gefällt, dann",
- contest: {
- prize: "Spiele und gewinne bis zu 50€!",
- terms: "Bedingungen ansehen",
- howTo: "So nimmst du teil:",
- conditions: [
- "Spiele Think in Sync mit der Standard-Wortliste",
- "Setze deinen Bestenlisten-Namen gleich deinem Hugging Face Benutzernamen",
- "Like unser Projekt auf Hugging Face"
- ],
- deadline: "Ende: 5. Februar, 10:00 Uhr",
- prizes: {
- title: "Kämpfe um die Top 5 Plätze und gewinne:",
- list: [
- "🥇 1. Platz: 50€",
- "🥈 2. Platz: 20€",
- "🥉 3. Platz: 10€",
- "🎖️ 4. & 5. Platz: je 10€"
- ]
- },
- fairPlay: "🚨 Faires Spielen wird überwacht. Betrug führt zur Disqualifikation!"
- },
- likeOnHuggingface: "Auf Hugging Face liken"
- },
- howToPlay: {
- setup: {
- title: "Vorbereitung",
- description: "Wähle ein Thema und erhalte ein geheimes Wort, das die KI erraten soll."
- },
- goal: {
- title: "Ziel",
- description: "Baue gemeinsam mit der KI Sätze, die dein Wort beschreiben, ohne es direkt zu verwenden."
- },
- rules: {
- title: "Regeln",
- items: [
- "Füge abwechselnd Wörter hinzu, um beschreibende Sätze zu bilden",
- "Verwende nicht das geheime Wort oder seine Variationen",
- "Sei kreativ und beschreibend",
- "Die KI wird nach jedem Satz versuchen, dein Wort zu erraten"
- ]
- }
+ rules: {
+ title: "Regeln",
+ items: [
+ "Füge abwechselnd Wörter hinzu, um beschreibende Sätze zu bilden",
+ "Verwende nicht das geheime Wort oder seine Variationen",
+ "Sei kreativ und beschreibend",
+ "Die KI wird nach jedem Satz versuchen, dein Wort zu erraten"
+ ]
}
+ }
};
diff --git a/src/i18n/translations/en.ts b/src/i18n/translations/en.ts
index f5822dd80a655942e95f0df9bd3f25aad53797ea..8dfa8dab120db6d6aba03161a46ef34eb34e4d02 100644
--- a/src/i18n/translations/en.ts
+++ b/src/i18n/translations/en.ts
@@ -1,128 +1,130 @@
export const en = {
- game: {
- title: "Think in Sync",
- round: "Round",
- buildDescription: "Build a sentence together",
- buildSubtitle: "Take turns adding words to create a sentence",
- startSentence: "Start building your sentence...",
- inputPlaceholder: "Enter a SINGLE word...",
- addWord: "Add Word",
- makeGuess: "Make Guess",
- aiThinking: "AI is thinking...",
- aiDelayed: "The AI is currently busy. Please try again in a moment.",
- invalidWord: "Invalid Word",
- cantUseTargetWord: "Do not use the secret word",
- lettersOnly: "Please use letters only",
- singleWordOnly: "Please enter only one word",
- leaveGameTitle: "Leave Game?",
- leaveGameDescription: "Your current progress will be lost. Are you sure you want to leave?",
- cancel: "Cancel",
- confirm: "Confirm",
- describeWord: "Your goal is to describe the word",
- nextRound: "Next Round",
- playAgain: "Play Again",
- saveScore: "Save Score"
- },
- leaderboard: {
- title: "High Scores",
- yourScore: "Your Score",
- roundCount: "rounds",
- wordsPerRound: "words per round",
- enterName: "Enter your name",
- submitting: "Submitting...",
- submit: "Submit Score",
- rank: "Rank",
- player: "Player",
- roundsColumn: "Rounds",
- avgWords: "Avg. Words",
- noScores: "No scores yet",
- previous: "Previous",
- next: "Next",
- success: "Score submitted successfully!",
- error: {
- invalidName: "Please enter a valid name",
- noRounds: "You need to complete at least one round",
- alreadySubmitted: "Score already submitted",
- newHighScore: "New High Score!",
- beatRecord: "You beat your previous record of {score}!",
- notHigher: "Score of {current} not higher than your best of {best}",
- submitError: "Error submitting score"
- }
+ game: {
+ title: "Think in Sync",
+ round: "Round",
+ buildDescription: "Build a sentence together",
+ buildSubtitle: "Take turns adding words to create a sentence",
+ startSentence: "Start building your sentence...",
+ inputPlaceholder: "Enter a SINGLE word...",
+ addWord: "Add Word",
+ makeGuess: "Make Guess",
+ aiThinking: "AI is thinking...",
+ aiDelayed: "The AI is currently busy. Please try again in a moment.",
+ invalidWord: "Invalid Word",
+ cantUseTargetWord: "Do not use the secret word",
+ shorterWord: "Use a shorter word",
+ lettersOnly: "Please use letters only",
+ singleWordOnly: "Please enter only one word",
+ leaveGameTitle: "Leave Game?",
+ leaveGameDescription: "Your current progress will be lost. Are you sure you want to leave?",
+ cancel: "Cancel",
+ confirm: "Confirm",
+ describeWord: "Your goal is to describe the word",
+ nextRound: "Next Round",
+ playAgain: "Play Again",
+ saveScore: "Save Score"
+ },
+ leaderboard: {
+ title: "High Scores",
+ yourScore: "Your Score",
+ roundCount: "rounds",
+ wordsPerRound: "words per round",
+ enterName: "Enter your name",
+ submitting: "Submitting...",
+ submit: "Submit Score",
+ rank: "Rank",
+ player: "Player",
+ roundsColumn: "Rounds",
+ avgWords: "Avg. Words",
+ noScores: "No scores yet",
+ previous: "Previous",
+ next: "Next",
+ success: "Score submitted successfully!",
+ theme: "Theme",
+ error: {
+ invalidName: "Please enter a valid name",
+ noRounds: "You need to complete at least one round",
+ alreadySubmitted: "Score already submitted",
+ newHighScore: "New High Score!",
+ beatRecord: "You beat your previous record of {score}!",
+ notHigher: "Score of {current} not higher than your best of {best}",
+ submitError: "Error submitting score"
+ }
+ },
+ guess: {
+ title: "AI's Guess",
+ goalDescription: "Your goal was to describe the word",
+ providedDescription: "You provided the description",
+ aiGuessedDescription: "Based on your description, the AI guessed",
+ correct: "This is right!",
+ incorrect: "This is wrong.",
+ nextRound: "Next Round",
+ playAgain: "Play Again",
+ viewLeaderboard: "Save your score",
+ cheatingDetected: "Cheating detected!"
+ },
+ themes: {
+ title: "Choose a Theme",
+ subtitle: "Select a theme for the word that the AI will try to guess",
+ standard: "Standard",
+ technology: "Technology",
+ sports: "Sports",
+ food: "Food",
+ custom: "Custom Theme",
+ customPlaceholder: "Enter your custom theme...",
+ continue: "Continue",
+ generating: "Generating...",
+ pressKey: "Press",
+ playing: "Theme"
+ },
+ welcome: {
+ title: "Think in Sync",
+ subtitle: "Team up with AI to craft a clue and have a different AI guess your secret word!",
+ startButton: "Start Game",
+ howToPlay: "How to Play",
+ leaderboard: "Leaderboard",
+ credits: "Created during the",
+ likeGameText: "If you want to support this game",
+ contest: {
+ prize: "We are cooking something...",
+ terms: "Find out more",
+ howTo: "To get a head start:",
+ conditions: [
+ "Play Think in Sync using the Standard wordlist",
+ "Set your leaderboard name to match your Hugging Face username",
+ "Like our project on Hugging Face"
+ ],
+ deadline: "We're gonna announce the details soon here",
+ prizes: {
+ title: "Compete for the top 5 spots and win:",
+ list: [
+ "🥇 1st: 50€",
+ "🥈 2nd: 20€",
+ "🥉 3rd: 10€",
+ "🎖️ 4th & 5th: 10€ each"
+ ]
+ },
+ fairPlay: "🚨 Fair play is monitored. Any cheating will result in disqualification!"
},
- guess: {
- title: "AI's Guess",
- goalDescription: "Your goal was to describe the word",
- providedDescription: "You provided the description",
- aiGuessedDescription: "Based on your description, the AI guessed",
- correct: "This is right!",
- incorrect: "This is wrong.",
- nextRound: "Next Round",
- playAgain: "Play Again",
- viewLeaderboard: "Save your score",
- cheatingDetected: "Cheating detected!"
+ likeOnHuggingface: "Like on Hugging Face"
+ },
+ howToPlay: {
+ setup: {
+ title: "Setup",
+ description: "Choose a theme and get a secret word that the AI will try to guess."
},
- themes: {
- title: "Choose a Theme",
- subtitle: "Select a theme for the word that the AI will try to guess",
- standard: "Standard",
- technology: "Technology",
- sports: "Sports",
- food: "Food",
- custom: "Custom Theme",
- customPlaceholder: "Enter your custom theme...",
- continue: "Continue",
- generating: "Generating...",
- pressKey: "Press",
- playing: "Theme"
+ goal: {
+ title: "Goal",
+ description: "Build sentences together with the AI that describe your word without using it directly."
},
- welcome: {
- title: "Think in Sync",
- subtitle: "Team up with AI to craft a clue and have a different AI guess your secret word!",
- startButton: "Start Game",
- howToPlay: "How to Play",
- leaderboard: "Leaderboard",
- credits: "Created during the",
- likeGameText: "If you want to show you like this game, please",
- contest: {
- prize: "Play to win up to 50€!",
- terms: "See Terms",
- howTo: "How to participate:",
- conditions: [
- "Play Think in Sync using the Standard wordlist",
- "Set your leaderboard name to match your Hugging Face username",
- "Like our project on Hugging Face"
- ],
- deadline: "Ends: February 5, 10:00 AM",
- prizes: {
- title: "Compete for the top 5 spots and win:",
- list: [
- "🥇 1st: 50€",
- "🥈 2nd: 20€",
- "🥉 3rd: 10€",
- "🎖️ 4th & 5th: 10€ each"
- ]
- },
- fairPlay: "🚨 Fair play is monitored. Any cheating will result in disqualification!"
- },
- likeOnHuggingface: "Like on Hugging Face"
- },
- howToPlay: {
- setup: {
- title: "Setup",
- description: "Choose a theme and get a secret word that the AI will try to guess."
- },
- goal: {
- title: "Goal",
- description: "Build sentences together with the AI that describe your word without using it directly."
- },
- rules: {
- title: "Rules",
- items: [
- "Take turns adding words to build descriptive sentences",
- "Don't use the secret word or its variations",
- "Try to be creative and descriptive",
- "The AI will try to guess your word after each sentence"
- ]
- }
+ rules: {
+ title: "Rules",
+ items: [
+ "Take turns adding words to build descriptive sentences",
+ "Don't use the secret word or its variations",
+ "Try to be creative and descriptive",
+ "The AI will try to guess your word after each sentence"
+ ]
}
+ }
};
diff --git a/src/i18n/translations/es.ts b/src/i18n/translations/es.ts
index d18eb49f8273e9f29c2bf2f12ea372a5099b81d6..7a5c284b598252da1314a30c799968e4ada43f58 100644
--- a/src/i18n/translations/es.ts
+++ b/src/i18n/translations/es.ts
@@ -1,128 +1,129 @@
export const es = {
- game: {
- title: "Think in Sync",
- round: "Ronda",
- buildDescription: "Construyan una frase juntos",
- buildSubtitle: "Añadan palabras por turnos para crear una frase",
- startSentence: "Empieza a construir tu frase...",
- inputPlaceholder: "Ingresa UNA palabra...",
- addWord: "Añadir palabra",
- makeGuess: "Adivinar",
- aiThinking: "La IA está pensando...",
- aiDelayed: "La IA está ocupada en este momento. Por favor, inténtalo de nuevo en un momento.",
- invalidWord: "Palabra inválida",
- cantUseTargetWord: "No uses la palabra secreta",
- lettersOnly: "Por favor, usa solo letras",
- singleWordOnly: "Por favor, ingresa solo una palabra",
- leaveGameTitle: "¿Salir del juego?",
- leaveGameDescription: "Tu progreso actual se perderá. ¿Estás seguro de que quieres salir?",
- cancel: "Cancelar",
- confirm: "Confirmar",
- describeWord: "Tu objetivo es describir la palabra",
- nextRound: "Siguiente Ronda",
- playAgain: "Jugar de Nuevo",
- saveScore: "Guardar Puntuación"
- },
- leaderboard: {
- title: "Puntuaciones Más Altas",
- yourScore: "Tu Puntuación",
- roundCount: "rondas",
- wordsPerRound: "palabras por ronda",
- enterName: "Ingresa tu nombre",
- submitting: "Enviando...",
- submit: "Enviar Puntuación",
- rank: "Posición",
- player: "Jugador",
- roundsColumn: "Rondas",
- avgWords: "Prom. Palabras",
- noScores: "Aún no hay puntuaciones",
- previous: "Anterior",
- next: "Siguiente",
- success: "¡Puntuación enviada con éxito!",
- error: {
- invalidName: "Por favor, ingresa un nombre válido",
- noRounds: "Debes completar al menos una ronda",
- alreadySubmitted: "Puntuación ya enviada",
- newHighScore: "¡Nueva Puntuación Más Alta!",
- beatRecord: "¡Has superado tu récord anterior de {score}!",
- notHigher: "Puntuación de {current} no superior a tu mejor de {best}",
- submitError: "Error al enviar la puntuación"
- }
+ game: {
+ title: "Think in Sync",
+ round: "Ronda",
+ buildDescription: "Construyan una frase juntos",
+ buildSubtitle: "Añadan palabras por turnos para crear una frase",
+ startSentence: "Empieza a construir tu frase...",
+ inputPlaceholder: "Ingresa UNA palabra...",
+ addWord: "Añadir palabra",
+ makeGuess: "Adivinar",
+ aiThinking: "La IA está pensando...",
+ aiDelayed: "La IA está ocupada en este momento. Por favor, inténtalo de nuevo en un momento.",
+ invalidWord: "Palabra inválida",
+ cantUseTargetWord: "No uses la palabra secreta",
+ lettersOnly: "Por favor, usa solo letras",
+ singleWordOnly: "Por favor, ingresa solo una palabra",
+ leaveGameTitle: "¿Salir del juego?",
+ leaveGameDescription: "Tu progreso actual se perderá. ¿Estás seguro de que quieres salir?",
+ cancel: "Cancelar",
+ confirm: "Confirmar",
+ describeWord: "Tu objetivo es describir la palabra",
+ nextRound: "Siguiente Ronda",
+ playAgain: "Jugar de Nuevo",
+ saveScore: "Guardar Puntuación"
+ },
+ leaderboard: {
+ title: "Puntuaciones Más Altas",
+ yourScore: "Tu Puntuación",
+ roundCount: "rondas",
+ wordsPerRound: "palabras por ronda",
+ enterName: "Ingresa tu nombre",
+ submitting: "Enviando...",
+ submit: "Enviar Puntuación",
+ rank: "Posición",
+ player: "Jugador",
+ roundsColumn: "Rondas",
+ avgWords: "Prom. Palabras",
+ noScores: "Aún no hay puntuaciones",
+ previous: "Anterior",
+ next: "Siguiente",
+ success: "¡Puntuación enviada con éxito!",
+ theme: "Tema",
+ error: {
+ invalidName: "Por favor, ingresa un nombre válido",
+ noRounds: "Debes completar al menos una ronda",
+ alreadySubmitted: "Puntuación ya enviada",
+ newHighScore: "¡Nueva Puntuación Más Alta!",
+ beatRecord: "¡Has superado tu récord anterior de {score}!",
+ notHigher: "Puntuación de {current} no superior a tu mejor de {best}",
+ submitError: "Error al enviar la puntuación"
+ }
+ },
+ guess: {
+ title: "Suposición de la IA",
+ goalDescription: "Tu objetivo era describir la palabra",
+ providedDescription: "Proporcionaste la descripción",
+ aiGuessedDescription: "Basado en tu descripción, la IA adivinó",
+ correct: "¡Esto es correcto!",
+ incorrect: "Esto es incorrecto.",
+ nextRound: "Siguiente Ronda",
+ playAgain: "Jugar de Nuevo",
+ viewLeaderboard: "Ver Clasificación",
+ cheatingDetected: "¡Trampa detectada!"
+ },
+ themes: {
+ title: "Elige un Tema",
+ subtitle: "Selecciona un tema para la palabra que la IA intentará adivinar",
+ standard: "Estándar",
+ technology: "Tecnología",
+ sports: "Deportes",
+ food: "Comida",
+ custom: "Tema Personalizado",
+ customPlaceholder: "Ingresa tu tema personalizado...",
+ continue: "Continuar",
+ generating: "Generando...",
+ pressKey: "Presiona",
+ playing: "Tema"
+ },
+ welcome: {
+ title: "Think in Sync",
+ subtitle: "¡Forma equipo con la IA para crear una pista y deja que otra IA adivine tu palabra secreta!",
+ startButton: "Comenzar juego",
+ howToPlay: "Cómo jugar",
+ leaderboard: "Clasificación",
+ credits: "Creado durante el",
+ likeGameText: "Si quieres apoyar este juego",
+ contest: {
+ prize: "Estamos cocinando algo...",
+ terms: "Descubre más",
+ howTo: "Para adelantarte a lo que planeamos:",
+ conditions: [
+ "Juega Think in Sync usando la lista de palabras estándar",
+ "Establece tu nombre en la tabla de clasificación igual a tu nombre de usuario de Hugging Face",
+ "Dale me gusta a nuestro proyecto en Hugging Face"
+ ],
+ deadline: "Pronto anunciaremos los detalles aquí",
+ prizes: {
+ title: "Compite por los 5 primeros puestos y gana:",
+ list: [
+ "🥇 1º: 50€",
+ "🥈 2º: 20€",
+ "🥉 3º: 10€",
+ "🎖️ 4º y 5º: 10€ cada uno"
+ ]
+ },
+ fairPlay: "🚨 El juego limpio está monitoreado. ¡Cualquier trampa resultará en descalificación!"
},
- guess: {
- title: "Suposición de la IA",
- goalDescription: "Tu objetivo era describir la palabra",
- providedDescription: "Proporcionaste la descripción",
- aiGuessedDescription: "Basado en tu descripción, la IA adivinó",
- correct: "¡Esto es correcto!",
- incorrect: "Esto es incorrecto.",
- nextRound: "Siguiente Ronda",
- playAgain: "Jugar de Nuevo",
- viewLeaderboard: "Ver Clasificación",
- cheatingDetected: "¡Trampa detectada!"
+ likeOnHuggingface: "Me gusta en Hugging Face"
+ },
+ howToPlay: {
+ setup: {
+ title: "Preparación",
+ description: "Elige un tema y obtén una palabra secreta que la IA intentará adivinar."
},
- themes: {
- title: "Elige un Tema",
- subtitle: "Selecciona un tema para la palabra que la IA intentará adivinar",
- standard: "Estándar",
- technology: "Tecnología",
- sports: "Deportes",
- food: "Comida",
- custom: "Tema Personalizado",
- customPlaceholder: "Ingresa tu tema personalizado...",
- continue: "Continuar",
- generating: "Generando...",
- pressKey: "Presiona",
- playing: "Tema"
+ goal: {
+ title: "Objetivo",
+ description: "Construye frases junto con la IA que describan tu palabra sin usarla directamente."
},
- welcome: {
- title: "Think in Sync",
- subtitle: "¡Forma equipo con la IA para crear una pista y deja que otra IA adivine tu palabra secreta!",
- startButton: "Comenzar juego",
- howToPlay: "Cómo jugar",
- leaderboard: "Tabla de clasificación",
- credits: "Creado durante el",
- likeGameText: "Si quieres mostrar que te gusta este juego,",
- contest: {
- prize: "¡Juega para ganar hasta 50€!",
- terms: "Ver términos",
- howTo: "Cómo participar:",
- conditions: [
- "Juega Think in Sync usando la lista de palabras estándar",
- "Establece tu nombre en la tabla de clasificación igual a tu nombre de usuario de Hugging Face",
- "Dale me gusta a nuestro proyecto en Hugging Face"
- ],
- deadline: "Finaliza: 5 de febrero, 10:00 AM",
- prizes: {
- title: "Compite por los 5 primeros puestos y gana:",
- list: [
- "🥇 1º: 50€",
- "🥈 2º: 20€",
- "🥉 3º: 10€",
- "🎖️ 4º y 5º: 10€ cada uno"
- ]
- },
- fairPlay: "🚨 El juego limpio está monitoreado. ¡Cualquier trampa resultará en descalificación!"
- },
- likeOnHuggingface: "Me gusta en Hugging Face"
- },
- howToPlay: {
- setup: {
- title: "Preparación",
- description: "Elige un tema y obtén una palabra secreta que la IA intentará adivinar."
- },
- goal: {
- title: "Objetivo",
- description: "Construye frases junto con la IA que describan tu palabra sin usarla directamente."
- },
- rules: {
- title: "Reglas",
- items: [
- "Añade palabras por turnos para construir frases descriptivas",
- "No uses la palabra secreta o sus variaciones",
- "Sé creativo y descriptivo",
- "La IA intentará adivinar tu palabra después de cada frase"
- ]
- }
+ rules: {
+ title: "Reglas",
+ items: [
+ "Añade palabras por turnos para construir frases descriptivas",
+ "No uses la palabra secreta o sus variaciones",
+ "Sé creativo y descriptivo",
+ "La IA intentará adivinar tu palabra después de cada frase"
+ ]
}
+ }
};
diff --git a/src/i18n/translations/fr.ts b/src/i18n/translations/fr.ts
index 91f51da9a332fe5080a17065b4e18804c5641a26..7c69dca487005604e19fb4fa7b0e0cfacf97b7b8 100644
--- a/src/i18n/translations/fr.ts
+++ b/src/i18n/translations/fr.ts
@@ -1,127 +1,128 @@
export const fr = {
- game: {
- title: "Think in Sync",
- round: "Tour",
- buildDescription: "Construisez une phrase ensemble",
- startSentence: "Commencez à construire votre phrase...",
- inputPlaceholder: "Entrez UN mot...",
- addWord: "Ajouter un mot",
- makeGuess: "Deviner",
- aiThinking: "L'IA réfléchit...",
- aiDelayed: "L'IA est actuellement occupée. Veuillez réessayer dans un moment.",
- invalidWord: "Mot invalide",
- cantUseTargetWord: "N'utilisez pas le mot secret",
- lettersOnly: "Veuillez utiliser uniquement des lettres",
- singleWordOnly: "Veuillez entrer un seul mot",
- leaveGameTitle: "Quitter le jeu ?",
- leaveGameDescription: "Votre progression actuelle sera perdue. Êtes-vous sûr de vouloir quitter ?",
- cancel: "Annuler",
- confirm: "Confirmer",
- describeWord: "Votre objectif est de décrire le mot",
- nextRound: "Tour Suivant",
- playAgain: "Rejouer",
- saveScore: "Sauvegarder le Score"
- },
- leaderboard: {
- title: "Meilleurs Scores",
- yourScore: "Votre Score",
- roundCount: "tours",
- wordsPerRound: "mots par tour",
- enterName: "Entrez votre nom",
- submitting: "Envoi en cours...",
- submit: "Soumettre le Score",
- rank: "Rang",
- player: "Joueur",
- roundsColumn: "Tours",
- avgWords: "Moy. Mots",
- noScores: "Pas encore de scores",
- previous: "Précédent",
- next: "Suivant",
- success: "Score soumis avec succès !",
- error: {
- invalidName: "Veuillez entrer un nom valide",
- noRounds: "Vous devez compléter au moins un tour",
- alreadySubmitted: "Score déjà soumis",
- newHighScore: "Nouveau Record !",
- beatRecord: "Vous avez battu votre record précédent de {score} !",
- notHigher: "Score de {current} pas plus élevé que votre meilleur de {best}",
- submitError: "Erreur lors de la soumission du score"
- }
+ game: {
+ title: "Think in Sync",
+ round: "Tour",
+ buildDescription: "Construisez une phrase ensemble",
+ startSentence: "Commencez à construire votre phrase...",
+ inputPlaceholder: "Entrez UN mot...",
+ addWord: "Ajouter un mot",
+ makeGuess: "Deviner",
+ aiThinking: "L'IA réfléchit...",
+ aiDelayed: "L'IA est actuellement occupée. Veuillez réessayer dans un moment.",
+ invalidWord: "Mot invalide",
+ cantUseTargetWord: "N'utilisez pas le mot secret",
+ lettersOnly: "Veuillez utiliser uniquement des lettres",
+ singleWordOnly: "Veuillez entrer un seul mot",
+ leaveGameTitle: "Quitter le jeu ?",
+ leaveGameDescription: "Votre progression actuelle sera perdue. Êtes-vous sûr de vouloir quitter ?",
+ cancel: "Annuler",
+ confirm: "Confirmer",
+ describeWord: "Votre objectif est de décrire le mot",
+ nextRound: "Tour Suivant",
+ playAgain: "Rejouer",
+ saveScore: "Sauvegarder le Score"
+ },
+ leaderboard: {
+ title: "Meilleurs Scores",
+ yourScore: "Votre Score",
+ roundCount: "tours",
+ wordsPerRound: "mots par tour",
+ enterName: "Entrez votre nom",
+ submitting: "Envoi en cours...",
+ submit: "Soumettre le Score",
+ rank: "Rang",
+ player: "Joueur",
+ roundsColumn: "Tours",
+ avgWords: "Moy. Mots",
+ noScores: "Pas encore de scores",
+ previous: "Précédent",
+ next: "Suivant",
+ success: "Score soumis avec succès !",
+ theme: "Thème",
+ error: {
+ invalidName: "Veuillez entrer un nom valide",
+ noRounds: "Vous devez compléter au moins un tour",
+ alreadySubmitted: "Score déjà soumis",
+ newHighScore: "Nouveau Record !",
+ beatRecord: "Vous avez battu votre record précédent de {score} !",
+ notHigher: "Score de {current} pas plus élevé que votre meilleur de {best}",
+ submitError: "Erreur lors de la soumission du score"
+ }
+ },
+ guess: {
+ title: "Devinette de l'IA",
+ goalDescription: "Votre objectif était de décrire le mot",
+ providedDescription: "Vous avez fourni la description",
+ aiGuessedDescription: "Basé sur votre description, l'IA a deviné",
+ correct: "C'est correct !",
+ incorrect: "C'est incorrect.",
+ nextRound: "Tour Suivant",
+ playAgain: "Rejouer",
+ viewLeaderboard: "Voir les Scores",
+ cheatingDetected: "Tentative de triche détectée !"
+ },
+ themes: {
+ title: "Choisissez un Thème",
+ subtitle: "Sélectionnez un thème pour le mot que l'IA essaiera de deviner",
+ standard: "Standard",
+ technology: "Technologie",
+ sports: "Sports",
+ food: "Nourriture",
+ custom: "Thème Personnalisé",
+ customPlaceholder: "Entrez votre thème personnalisé...",
+ continue: "Continuer",
+ generating: "Génération...",
+ pressKey: "Appuyez sur",
+ playing: "Thème"
+ },
+ welcome: {
+ title: "Think in Sync",
+ subtitle: "Faites équipe avec une IA pour créer un indice et laissez une autre IA deviner votre mot secret !",
+ startButton: "Commencer",
+ howToPlay: "Comment Jouer",
+ leaderboard: "Classement",
+ credits: "Créé pendant le",
+ likeGameText: "Si vous voulez soutenir ce jeu,",
+ contest: {
+ prize: "Nous préparons quelque chose...",
+ terms: "En savoir plus",
+ howTo: "Pour prendre de l'avance sur nos plans :",
+ conditions: [
+ "Jouez à Think in Sync avec la liste de mots standard",
+ "Utilisez votre nom d'utilisateur Hugging Face dans le classement",
+ "Aimez notre projet sur Hugging Face"
+ ],
+ deadline: "Nous annoncerons bientôt les détails ici",
+ prizes: {
+ title: "Participez pour les 5 premières places et gagnez :",
+ list: [
+ "🥇 1er : 50€",
+ "🥈 2ème : 20€",
+ "🥉 3ème : 10€",
+ "🎖️ 4ème & 5ème : 10€ chacun"
+ ]
+ },
+ fairPlay: "🚨 Le fair-play est surveillé. Toute triche entraînera une disqualification !"
},
- guess: {
- title: "Devinette de l'IA",
- goalDescription: "Votre objectif était de décrire le mot",
- providedDescription: "Vous avez fourni la description",
- aiGuessedDescription: "Basé sur votre description, l'IA a deviné",
- correct: "C'est correct !",
- incorrect: "C'est incorrect.",
- nextRound: "Tour Suivant",
- playAgain: "Rejouer",
- viewLeaderboard: "Voir les Scores",
- cheatingDetected: "Tentative de triche détectée !"
+ likeOnHuggingface: "Aimer sur Hugging Face"
+ },
+ howToPlay: {
+ setup: {
+ title: "Mise en place",
+ description: "Choisissez un thème et obtenez un mot secret que l'IA essaiera de deviner."
},
- themes: {
- title: "Choisissez un Thème",
- subtitle: "Sélectionnez un thème pour le mot que l'IA essaiera de deviner",
- standard: "Standard",
- technology: "Technologie",
- sports: "Sports",
- food: "Nourriture",
- custom: "Thème Personnalisé",
- customPlaceholder: "Entrez votre thème personnalisé...",
- continue: "Continuer",
- generating: "Génération...",
- pressKey: "Appuyez sur",
- playing: "Thème"
+ goal: {
+ title: "Objectif",
+ description: "Construisez des phrases avec l'IA qui décrivent votre mot sans l'utiliser directement."
},
- welcome: {
- title: "Think in Sync",
- subtitle: "Faites équipe avec une IA pour créer un indice et laissez une autre IA deviner votre mot secret !",
- startButton: "Commencer",
- howToPlay: "Comment Jouer",
- leaderboard: "Classement",
- credits: "Créé pendant le",
- likeGameText: "Si vous souhaitez montrer que vous aimez ce jeu,",
- contest: {
- prize: "Jouez pour gagner jusqu'à 50€ !",
- terms: "Voir conditions",
- howTo: "Comment participer :",
- conditions: [
- "Jouez à Think in Sync avec la liste de mots standard",
- "Utilisez votre nom d'utilisateur Hugging Face dans le classement",
- "Aimez notre projet sur Hugging Face"
- ],
- deadline: "Fin : 5 février, 10h00",
- prizes: {
- title: "Participez pour les 5 premières places et gagnez :",
- list: [
- "🥇 1er : 50€",
- "🥈 2ème : 20€",
- "🥉 3ème : 10€",
- "🎖️ 4ème & 5ème : 10€ chacun"
- ]
- },
- fairPlay: "🚨 Le fair-play est surveillé. Toute triche entraînera une disqualification !"
- },
- likeOnHuggingface: "Aimer sur Hugging Face"
- },
- howToPlay: {
- setup: {
- title: "Mise en place",
- description: "Choisissez un thème et obtenez un mot secret que l'IA essaiera de deviner."
- },
- goal: {
- title: "Objectif",
- description: "Construisez des phrases avec l'IA qui décrivent votre mot sans l'utiliser directement."
- },
- rules: {
- title: "Règles",
- items: [
- "Ajoutez des mots à tour de rôle pour construire des phrases descriptives",
- "N'utilisez pas le mot secret ou ses variations",
- "Soyez créatif et descriptif",
- "L'IA essaiera de deviner votre mot après chaque phrase"
- ]
- }
+ rules: {
+ title: "Règles",
+ items: [
+ "Ajoutez des mots à tour de rôle pour construire des phrases descriptives",
+ "N'utilisez pas le mot secret ou ses variations",
+ "Soyez créatif et descriptif",
+ "L'IA essaiera de deviner votre mot après chaque phrase"
+ ]
}
+ }
};
diff --git a/src/i18n/translations/it.ts b/src/i18n/translations/it.ts
index 1ef432dcaf7d37a0150883830effd4dff5dd09a0..6056489320ee4b029137f57c752983535a509475 100644
--- a/src/i18n/translations/it.ts
+++ b/src/i18n/translations/it.ts
@@ -1,130 +1,131 @@
export const it = {
- game: {
- title: "Think in Sync",
- round: "Turno",
- buildDescription: "Costruite una frase insieme",
- buildSubtitle: "Aggiungete parole a turno per creare una frase",
- startSentence: "Inizia a costruire la tua frase...",
- inputPlaceholder: "Inserisci UNA parola...",
- addWord: "Aggiungi parola",
- makeGuess: "Indovina",
- aiThinking: "L'IA sta pensando...",
- aiDelayed: "L'IA è attualmente occupata. Riprova tra un momento.",
- invalidWord: "Parola non valida",
- cantUseTargetWord: "Non usare la parola segreta",
- lettersOnly: "Usa solo lettere",
- singleWordOnly: "Inserisci una sola parola",
- leaveGameTitle: "Lasciare il gioco?",
- leaveGameDescription: "I tuoi progressi attuali andranno persi. Sei sicuro di voler uscire?",
- cancel: "Annulla",
- confirm: "Conferma",
- describeWord: "Il tuo obiettivo è descrivere la parola",
- nextRound: "Prossimo Turno",
- playAgain: "Gioca Ancora",
- saveScore: "Salva Punteggio"
- },
- leaderboard: {
- title: "Punteggi Migliori",
- yourScore: "Il Tuo Punteggio",
- roundCount: "turni",
- wordsPerRound: "parole per turno",
- enterName: "Inserisci il tuo nome",
- submitting: "Invio in corso...",
- submit: "Invia Punteggio",
- rank: "Posizione",
- player: "Giocatore",
- roundsColumn: "Turni",
- avgWords: "Media Parole",
- noScores: "Ancora nessun punteggio",
- previous: "Precedente",
- next: "Successivo",
- success: "Punteggio inviato con successo!",
- error: {
- invalidName: "Inserisci un nome valido",
- noRounds: "Devi completare almeno un turno",
- alreadySubmitted: "Punteggio già inviato",
- newHighScore: "Nuovo Record!",
- beatRecord: "Hai battuto il tuo record precedente di {score}!",
- notHigher: "Punteggio di {current} non superiore al tuo migliore di {best}",
- submitError: "Errore nell'invio del punteggio"
- }
+ game: {
+ title: "Think in Sync",
+ round: "Turno",
+ buildDescription: "Costruite una frase insieme",
+ buildSubtitle: "Aggiungete parole a turno per creare una frase",
+ startSentence: "Inizia a costruire la tua frase...",
+ inputPlaceholder: "Inserisci UNA parola...",
+ addWord: "Aggiungi parola",
+ makeGuess: "Indovina",
+ aiThinking: "L'IA sta pensando...",
+ aiDelayed: "L'IA è attualmente occupata. Riprova tra un momento.",
+ invalidWord: "Parola non valida",
+ cantUseTargetWord: "Non usare la parola segreta",
+ lettersOnly: "Usa solo lettere",
+ singleWordOnly: "Inserisci una sola parola",
+ leaveGameTitle: "Lasciare il gioco?",
+ leaveGameDescription: "I tuoi progressi attuali andranno persi. Sei sicuro di voler uscire?",
+ cancel: "Annulla",
+ confirm: "Conferma",
+ describeWord: "Il tuo obiettivo è descrivere la parola",
+ nextRound: "Prossimo Turno",
+ playAgain: "Gioca Ancora",
+ saveScore: "Salva Punteggio"
+ },
+ leaderboard: {
+ title: "Punteggi Migliori",
+ yourScore: "Il Tuo Punteggio",
+ roundCount: "turni",
+ wordsPerRound: "parole per turno",
+ enterName: "Inserisci il tuo nome",
+ submitting: "Invio in corso...",
+ submit: "Invia Punteggio",
+ rank: "Posizione",
+ player: "Giocatore",
+ roundsColumn: "Turni",
+ avgWords: "Media Parole",
+ noScores: "Ancora nessun punteggio",
+ previous: "Precedente",
+ next: "Successivo",
+ success: "Punteggio inviato con successo!",
+ theme: "Tema",
+ error: {
+ invalidName: "Inserisci un nome valido",
+ noRounds: "Devi completare almeno un turno",
+ alreadySubmitted: "Punteggio già inviato",
+ newHighScore: "Nuovo Record!",
+ beatRecord: "Hai battuto il tuo record precedente di {score}!",
+ notHigher: "Punteggio di {current} non superiore al tuo migliore di {best}",
+ submitError: "Errore nell'invio del punteggio"
+ }
+ },
+ guess: {
+ title: "Ipotesi dell'IA",
+ sentence: "La tua frase",
+ aiGuessed: "L'IA ha indovinato",
+ goalDescription: "Il tuo obiettivo era descrivere la parola",
+ providedDescription: "Hai fornito la descrizione",
+ aiGuessedDescription: "Basandosi sulla tua descrizione, l'IA ha indovinato",
+ correct: "Corretto! L'IA ha indovinato la parola!",
+ incorrect: "Sbagliato. Riprova!",
+ nextRound: "Prossimo Turno",
+ playAgain: "Gioca Ancora",
+ viewLeaderboard: "Vedi Classifica",
+ cheatingDetected: "Tentativo di imbroglio rilevato!"
+ },
+ themes: {
+ title: "Scegli un Tema",
+ subtitle: "Seleziona un tema per la parola che l'IA cercherà di indovinare",
+ standard: "Standard",
+ technology: "Tecnologia",
+ sports: "Sport",
+ food: "Cibo",
+ custom: "Tema Personalizzato",
+ customPlaceholder: "Inserisci il tuo tema personalizzato...",
+ continue: "Continua",
+ generating: "Generazione...",
+ pressKey: "Premi",
+ playing: "Tema"
+ },
+ welcome: {
+ title: "Think in Sync",
+ subtitle: "Fai squadra con l'IA per creare un indizio e lascia che un'altra IA indovini la tua parola segreta!",
+ startButton: "Inizia gioco",
+ howToPlay: "Come giocare",
+ leaderboard: "Classifica",
+ credits: "Creato durante il",
+ likeGameText: "Se vuoi supportare questo gioco",
+ contest: {
+ prize: "Stiamo preparando qualcosa...",
+ terms: "Scopri di più",
+ howTo: "Per anticipare i nostri piani:",
+ conditions: [
+ "Gioca a Think in Sync usando la lista di parole standard",
+ "Imposta il tuo nome in classifica uguale al tuo nome utente Hugging Face",
+ "Metti mi piace al nostro progetto su Hugging Face"
+ ],
+ deadline: "Annunceremo presto i dettagli qui",
+ prizes: {
+ title: "Competi per i primi 5 posti e vinci:",
+ list: [
+ "🥇 1°: 50€",
+ "🥈 2°: 20€",
+ "🥉 3°: 10€",
+ "🎖️ 4° e 5°: 10€ ciascuno"
+ ]
+ },
+ fairPlay: "🚨 Il fair play è monitorato. Qualsiasi imbroglio porterà alla squalifica!"
},
- guess: {
- title: "Ipotesi dell'IA",
- sentence: "La tua frase",
- aiGuessed: "L'IA ha indovinato",
- goalDescription: "Il tuo obiettivo era descrivere la parola",
- providedDescription: "Hai fornito la descrizione",
- aiGuessedDescription: "Basandosi sulla tua descrizione, l'IA ha indovinato",
- correct: "Corretto! L'IA ha indovinato la parola!",
- incorrect: "Sbagliato. Riprova!",
- nextRound: "Prossimo Turno",
- playAgain: "Gioca Ancora",
- viewLeaderboard: "Vedi Classifica",
- cheatingDetected: "Tentativo di imbroglio rilevato!"
+ likeOnHuggingface: "Mi piace su Hugging Face"
+ },
+ howToPlay: {
+ setup: {
+ title: "Preparazione",
+ description: "Scegli un tema e ottieni una parola segreta che l'IA cercherà di indovinare."
},
- themes: {
- title: "Scegli un Tema",
- subtitle: "Seleziona un tema per la parola che l'IA cercherà di indovinare",
- standard: "Standard",
- technology: "Tecnologia",
- sports: "Sport",
- food: "Cibo",
- custom: "Tema Personalizzato",
- customPlaceholder: "Inserisci il tuo tema personalizzato...",
- continue: "Continua",
- generating: "Generazione...",
- pressKey: "Premi",
- playing: "Tema"
+ goal: {
+ title: "Obiettivo",
+ description: "Costruisci frasi insieme all'IA che descrivono la tua parola senza usarla direttamente."
},
- welcome: {
- title: "Think in Sync",
- subtitle: "Fai squadra con l'IA per creare un indizio e lascia che un'altra IA indovini la tua parola segreta!",
- startButton: "Inizia gioco",
- howToPlay: "Come giocare",
- leaderboard: "Classifica",
- credits: "Creato durante il",
- likeGameText: "Se vuoi mostrare che ti piace questo gioco,",
- contest: {
- prize: "Gioca per vincere fino a 50€!",
- terms: "Vedi termini",
- howTo: "Come partecipare:",
- conditions: [
- "Gioca a Think in Sync usando la lista di parole standard",
- "Imposta il tuo nome in classifica uguale al tuo nome utente Hugging Face",
- "Metti mi piace al nostro progetto su Hugging Face"
- ],
- deadline: "Termina: 5 febbraio, 10:00",
- prizes: {
- title: "Competi per i primi 5 posti e vinci:",
- list: [
- "🥇 1°: 50€",
- "🥈 2°: 20€",
- "🥉 3°: 10€",
- "🎖️ 4° e 5°: 10€ ciascuno"
- ]
- },
- fairPlay: "🚨 Il fair play è monitorato. Qualsiasi imbroglio porterà alla squalifica!"
- },
- likeOnHuggingface: "Mi piace su Hugging Face"
- },
- howToPlay: {
- setup: {
- title: "Preparazione",
- description: "Scegli un tema e ottieni una parola segreta che l'IA cercherà di indovinare."
- },
- goal: {
- title: "Obiettivo",
- description: "Costruisci frasi insieme all'IA che descrivono la tua parola senza usarla direttamente."
- },
- rules: {
- title: "Regole",
- items: [
- "Aggiungi parole a turno per costruire frasi descrittive",
- "Non usare la parola segreta o le sue variazioni",
- "Sii creativo e descrittivo",
- "L'IA cercherà di indovinare la tua parola dopo ogni frase"
- ]
- }
+ rules: {
+ title: "Regole",
+ items: [
+ "Aggiungi parole a turno per costruire frasi descrittive",
+ "Non usare la parola segreta o le sue variazioni",
+ "Sii creativo e descrittivo",
+ "L'IA cercherà di indovinare la tua parola dopo ogni frase"
+ ]
}
+ }
};
diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts
index b5cf4c7d571b833f2ca0b7d78cdc382e59a327ca..da53158f3f89a6cf3a2f9d66e9f640fdb20eb8b9 100644
--- a/src/integrations/supabase/types.ts
+++ b/src/integrations/supabase/types.ts
@@ -69,6 +69,27 @@ export type Database = {
}
Relationships: []
}
+ user_roles: {
+ Row: {
+ created_at: string
+ id: string
+ role: Database["public"]["Enums"]["app_role"]
+ user_id: string
+ }
+ Insert: {
+ created_at?: string
+ id?: string
+ role?: Database["public"]["Enums"]["app_role"]
+ user_id: string
+ }
+ Update: {
+ created_at?: string
+ id?: string
+ role?: Database["public"]["Enums"]["app_role"]
+ user_id?: string
+ }
+ Relationships: []
+ }
}
Views: {
[_ in never]: never
@@ -84,9 +105,15 @@ export type Database = {
}
Returns: boolean
}
+ is_admin: {
+ Args: {
+ user_id: string
+ }
+ Returns: boolean
+ }
}
Enums: {
- [_ in never]: never
+ app_role: "admin" | "user"
}
CompositeTypes: {
[_ in never]: never
diff --git a/src/main.tsx b/src/main.tsx
index 719464e3da4bc77d3adebed4b6c12d3327f5b89f..cd7084e04b68398a55e695584fc9851bc7549946 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,5 +1,10 @@
import { createRoot } from 'react-dom/client'
import App from './App.tsx'
import './index.css'
+import { LanguageProvider } from './contexts/LanguageContext.tsx'
-createRoot(document.getElementById("root")!).render();
+createRoot(document.getElementById("root")!).render(
+
+
+
+);
\ No newline at end of file
diff --git a/src/pages/admin/Index.tsx b/src/pages/admin/Index.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..9134cfa97fec1abc9a0a1578489c973de3c22eff
--- /dev/null
+++ b/src/pages/admin/Index.tsx
@@ -0,0 +1,37 @@
+import { useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import { supabase } from "@/integrations/supabase/client";
+import { useQuery } from "@tanstack/react-query";
+import { AdminHighScoresTable } from "@/components/admin/AdminHighScoresTable";
+
+export const AdminIndex = () => {
+ const navigate = useNavigate();
+
+ useEffect(() => {
+ const checkAdmin = async () => {
+ const { data: { user } } = await supabase.auth.getUser();
+ if (!user) {
+ navigate("/admin/login");
+ return;
+ }
+
+ const { data: isAdmin, error } = await supabase.rpc('is_admin', {
+ user_id: user.id
+ });
+
+ if (error || !isAdmin) {
+ console.error("Not an admin or error checking admin status:", error);
+ navigate("/admin/login");
+ }
+ };
+
+ checkAdmin();
+ }, [navigate]);
+
+ return (
+
+ );
+};
\ No newline at end of file
diff --git a/supabase/functions/guess-word/index.ts b/supabase/functions/guess-word/index.ts
index f88e3dfb458771afc102864386f96aaec22b00a4..ee5dd407e618b59dbe03114a420c1aee1161b7ee 100644
--- a/supabase/functions/guess-word/index.ts
+++ b/supabase/functions/guess-word/index.ts
@@ -8,23 +8,23 @@ const corsHeaders = {
const languagePrompts = {
en: {
- systemPrompt: "You are helping in a word guessing game. Given a description, guess what single word is being described.",
+ systemPrompt: "You are helping in a word guessing game. Given a description, guess what single word is being described. The described word itself was not allowed in the description, so do not expect it to appear.",
instruction: "Based on this description"
},
fr: {
- systemPrompt: "Vous aidez dans un jeu de devinettes. À partir d'une description, devinez le mot unique qui est décrit.",
+ systemPrompt: "Vous aidez dans un jeu de devinettes. À partir d'une description, devinez le mot unique qui est décrit. Le mot décrit n'était pas autorisé dans la description, ne vous attendez donc pas à le voir apparaître.",
instruction: "D'après cette description"
},
de: {
- systemPrompt: "Sie helfen bei einem Worträtsel. Erraten Sie anhand einer Beschreibung, welches einzelne Wort beschrieben wird.",
+ systemPrompt: "Sie helfen bei einem Worträtsel. Erraten Sie anhand einer Beschreibung, welches einzelne Wort beschrieben wird. Das beschriebene Wort durfte nicht in der Beschreibung verwendet werden, also erwarten Sie es nicht.",
instruction: "Basierend auf dieser Beschreibung"
},
it: {
- systemPrompt: "Stai aiutando in un gioco di indovinelli. Data una descrizione, indovina quale singola parola viene descritta.",
+ systemPrompt: "Stai aiutando in un gioco di indovinelli. Data una descrizione, indovina quale singola parola viene descritta. La parola descritta non era permessa nella descrizione, quindi non aspettarti di trovarla.",
instruction: "Basandoti su questa descrizione"
},
es: {
- systemPrompt: "Estás ayudando en un juego de adivinanzas. Dada una descripción, adivina qué palabra única se está describiendo.",
+ systemPrompt: "Estás ayudando en un juego de adivinanzas. Dada una descripción, adivina qué palabra única se está describiendo. La palabra descrita no estaba permitida en la descripción, así que no esperes verla.",
instruction: "Basándote en esta descripción"
}
};
diff --git a/supabase/functions/submit-high-score/index.ts b/supabase/functions/submit-high-score/index.ts
index 563b23cf7db061f6f0b2e7e0eaf073b148b2711e..b5b5c2c1e8bd462737a20ad0a9305a9741380241 100644
--- a/supabase/functions/submit-high-score/index.ts
+++ b/supabase/functions/submit-high-score/index.ts
@@ -27,7 +27,42 @@ Deno.serve(async (req) => {
}
)
- console.log('Submitting score:', { playerName, score, avgWordsPerRound, sessionId, theme })
+ console.log('Verifying game results for session:', sessionId)
+
+ // First verify that the claimed score matches actual game results
+ const { data: gameResults, error: gameError } = await supabaseClient
+ .from('game_results')
+ .select('is_correct')
+ .eq('session_id', sessionId)
+
+ if (gameError) {
+ throw new Error('Failed to verify game results')
+ }
+
+ // Count successful rounds
+ const successfulRounds = gameResults?.filter(result => result.is_correct).length ?? 0
+
+ console.log('Verified game results:', {
+ sessionId,
+ claimedScore: score,
+ actualSuccessfulRounds: successfulRounds
+ })
+
+ // Verify that claimed score matches actual successful rounds
+ if (score !== successfulRounds) {
+ return new Response(
+ JSON.stringify({
+ error: 'Score verification failed',
+ message: 'Submitted score does not match game results'
+ }),
+ {
+ headers: { ...corsHeaders, 'Content-Type': 'application/json' },
+ status: 400,
+ },
+ )
+ }
+
+ console.log('Submitting verified score:', { playerName, score, avgWordsPerRound, sessionId, theme })
const { data, error } = await supabaseClient.rpc('check_and_update_high_score', {
p_player_name: playerName,