diff --git a/src/App.jsx b/src/App.jsx index e6354f1..0f0db53 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -880,6 +880,7 @@ useEffect(() => { id: makeId(), query: '', strongNumber: '', + englishGloss: '', lexeme: '', transliteration: '', partOfSpeech: '', @@ -1039,6 +1040,7 @@ useEffect(() => { id: makeId(), query: w.strongKey, strongNumber: w.strongKey, + englishGloss: w.def, lexeme: w.lexeme, transliteration: w.translit, partOfSpeech: '', @@ -1172,7 +1174,10 @@ useEffect(() => { const raw = word.query.trim(); const normalized = /^\d+$/.test(raw) ? `G${raw}` : /^[gGhH]\d+$/.test(raw) ? raw.toUpperCase() : raw; - const definitions = await fetchBollsDefinition(normalized); + const [definitions, gloss] = await Promise.all([ + fetchBollsDefinition(normalized), + loadNtGloss().catch(() => ({})), + ]); if (!definitions || definitions.length === 0) { updateChunkWord(chunkId, wordId, { strongNumber: '', @@ -1182,9 +1187,11 @@ useEffect(() => { return; } const first = definitions[0]; + const strongKey = (first.topic || normalized).toUpperCase(); const extractedPartOfSpeech = extractPartOfSpeech(first.definition || ''); updateChunkWord(chunkId, wordId, { strongNumber: first.topic || normalized, + englishGloss: gloss[strongKey] || '', lexeme: first.lexeme || '', transliteration: first.transliteration || '', partOfSpeech: extractedPartOfSpeech || word.partOfSpeech || '', @@ -2046,6 +2053,16 @@ const restoreRemoteProject = async (id) => {