Side panel briefly shows raw localization keys when switching between Concordance and Analysis catalog
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend, localization
Direzione di ricerca
Start in InterlinearizerLoader.tsx around lines 1715-1735, where the side panel picks one of AnalysisCatalogPanel or ConcordancePanel, then read each panel's string lookup at AnalysisCatalogPanel.tsx:185 and ConcordancePanel.tsx:68 and the hook's pre-reply behaviour in paranext-core use-localized-strings-hook.ts. Done means switching tabs never shows a %...% key in the tab labels, header buttons or panel body, and the book name is not shown in English first. The proposed fix moves the lookup into the loader and passes results down as a localizedStrings prop, so check the row components that already take that prop.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Switching the side panel between Analysis catalog and Concordance briefly shows raw keys (e.g. %interlinearizer_analysisCatalog_title%, %interlinearizer_concordance_close%) before the translated text appears. You can see it on the tab labels, the close/refresh button labels, and the body text (loading, empty and "no matches" messages).
Steps to reproduce
- Open a project in the interlinearizer.
- Open the side panel on Analysis catalog.
- Click the Concordance tab, then click Analysis catalog again.
Expected: The tab labels and panel text stay translated throughout the switch.
Actual: For one round-trip to the localization service, the panel shows the %…% keys.
Cause
InterlinearizerLoader.tsx:1715-1735shows only one panel at a time (sidePanel === 'catalog' ? <AnalysisCatalogPanel/> : <ConcordancePanel/>), so every switch unmounts one panel and mounts the other.- Each panel looks up its strings when it mounts (
AnalysisCatalogPanel.tsx:185,ConcordancePanel.tsx:68), and that starts a new subscription. - Until the first reply arrives,
useLocalizedStringsreturns each key as its own value (paranext-coresrc/renderer/hooks/papi-hooks/use-localized-strings-hook.ts:45-49), so the keys are what gets drawn. - Both panels ignore the
isLoadingflag that the hook also returns. The loader itself checks it (!stringsLoading), but the panels don't. - The tab header (
SidePanelTabs) is drawn by whichever panel is showing, so even the labels that look the same on both panels go back to raw keys on every switch. - Smaller version of the same problem: the per-book name lookup (
bookNameKeys) in each panel shows the English book name first, then switches to the localized one in non-English interfaces.
Proposed fix
Look up the side panel's strings in InterlinearizerLoader, which stays mounted the whole time:
- Export each panel's
STRING_KEYS. - Look up their combined set once in the loader, as a module-level constant so the array stays the same between renders.
- Pass the result into both panels as a
localizedStringsprop. Rows already receive their strings this way (ConcordanceRowView,CatalogRowView). - Look up the book name in the loader as well and pass it down.
The strings are then loaded once when the side panel first opens, and a switch never waits on a lookup.
Alternatives considered
- Hide the panel until the strings arrive (
isLoading). This swaps the raw keys for a blank flash; the panel still flickers. - Keep both panels mounted and hide the inactive one. The catalog is heavy (filters, merge state, row loading as you scroll), and its state would leak across switches.
Acceptance criteria
- Switching tabs never shows a
%…%key in the tab labels, header buttons or panel body. - The first time the side panel opens, no raw keys appear in the header, as long as the loader's own strings have finished loading.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 0
- Merge medio
- 2g 21m
- PR unite (30g)
- 49
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sillsdev/interlinearizer-extension
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
sillsdev/interlinearizer-extension#419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
sillsdev/interlinearizer-extension#418 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sillsdev/interlinearizer-extension#479 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
sillsdev/interlinearizer-extension#478 ·
I maintainer di solito rispondono entro 1 giorno
-
Pinned chapter header stays stale after dragging the scrollbar thumbForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
sillsdev/interlinearizer-extension#476 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sillsdev/interlinearizer-extension
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
logto-io/logto#9837 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
lingdojo/kana-dojo#32964 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Documentation status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mastra-ai/mastra#28194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
priority-low refactor-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 3 giorni