From 1a0ade21a50b34ed539db4b671752888547e03b3 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Thu, 28 May 2026 13:26:45 -0400 Subject: [PATCH] Add English word field to Greek word cards - New englishGloss field on every word object (editable input, placeholder "e.g. grace") - Populated automatically from the macula-greek gloss map on lookup and suggest - Shows alongside Short definition in the card's second row Co-Authored-By: Claude Sonnet 4.6 --- src/App.jsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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) => {
+