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

New source gets `und` as its gloss language instead of the interface language

Aperta
#496 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
70/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by reading InterlinearizerLoader and useDraftProject, which the issue identifies as the setting read and the draft initialization path. Check how the interface language loading state relates to the empty analysisLanguages branch, then reproduce with a draft that has no analysis languages and English selected. Done when the saved draft uses en instead of und.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When the interlinearizer opens a source whose draft has no analysis languages, it can give the draft und instead of the platform's interface language. Glosses are then written under und.

Steps

  1. Pick a source whose draft has no analysis languages: interlinearizer.getDraft <sourceProjectId> returns "analysisLanguages": [].
  2. With the interface language set to English, open the interlinearizer on that source, gloss a word, and wait for autosave.
  3. Run interlinearizer.getDraft <sourceProjectId> again. It returns "analysisLanguages": ["und"].

Expected: ["en"]

Reproduced on two sources.

Suspected cause: InterlinearizerLoader reads useSetting('platform.interfaceLanguage', ['und']) without checking the setting's loading flag (the platform.interfaceMode read just above it does check). useDraftProject takes whatever platformLanguage is when the draft finishes loading, in its analysisLanguages.length === 0 branch. A draft that finishes loading before the setting resolves therefore gets the und default.

Fix: either wait for the setting to load before filling in the language, or fill it in at the first save instead of on load.

Lingua principale
TypeScript
Stelle
2
Fork
0
Merge medio
1g 19h
PR unite (30g)
55

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.