Fix: Topic "Alle laden" always searches in EN (topics are English word lists)
When user selects DE and types "Auge", the topic "Eye/Auge" is found correctly. But "Alle laden" must search words with lang=en because the topic word list is English (eye, pupil, iris...). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,7 @@ export default function VocabularyPage() {
|
|||||||
setIsSearching(true)
|
setIsSearching(true)
|
||||||
const topicWords: VocabWord[] = []
|
const topicWords: VocabWord[] = []
|
||||||
for (const w of topic.words) {
|
for (const w of topic.words) {
|
||||||
const r = await fetch(`${getApiBase()}/api/vocabulary/search?q=${encodeURIComponent(w)}&lang=${searchLang}&limit=1&source=kaikki`)
|
const r = await fetch(`${getApiBase()}/api/vocabulary/search?q=${encodeURIComponent(w)}&lang=en&limit=1&source=kaikki`)
|
||||||
if (r.ok) {
|
if (r.ok) {
|
||||||
const d = await r.json()
|
const d = await r.json()
|
||||||
if (d.words?.[0]) topicWords.push(d.words[0])
|
if (d.words?.[0]) topicWords.push(d.words[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user