Wire all 7 learn pages to central translation system
All exercise pages now use useNativeLanguage() hook: - Buttons show text in user's native language (Richtig→Dogru, etc.) - Instructions translated (Geschafft→Bitti, Nochmal→Tekrar, etc.) - wordInNative() available for vocab translations (needs data) Pages updated: flashcards, quiz, type, listen, match, pronounce, story. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
import { useTheme } from '@/lib/ThemeContext'
|
||||
import { useNativeLanguage } from '@/lib/useNativeLanguage'
|
||||
import { AudioButton } from '@/components/learn/AudioButton'
|
||||
|
||||
function getApiBase() {
|
||||
@@ -13,6 +14,7 @@ export default function StoryPage() {
|
||||
const { unitId } = useParams<{ unitId: string }>()
|
||||
const router = useRouter()
|
||||
const { isDark } = useTheme()
|
||||
const { t, wordInNative, nativeLang, isThirdLanguage } = useNativeLanguage()
|
||||
|
||||
const [story, setStory] = useState<{ story_html: string; story_text: string; vocab_used: string[]; language: string } | null>(null)
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user