Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Side panel briefly shows raw localization keys when switching between Concordance and Analysis catalog

Aperta
#402 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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
  1. Open a project in the interlinearizer.
  2. Open the side panel on Analysis catalog.
  3. 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-1735 shows 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, useLocalizedStrings returns each key as its own value (paranext-core src/renderer/hooks/papi-hooks/use-localized-strings-hook.ts:45-49), so the keys are what gets drawn.
  • Both panels ignore the isLoading flag 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 localizedStrings prop. 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sillsdev/interlinearizer-extension

Tutte le issue di sillsdev/interlinearizer-extension

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.