Start Session, instrument cards, bulk-assignment errors and dashboard dates ignore the interface language
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- internationalization
Direzione di ricerca
Start with the listed components and routes in apps/web, then read apps/web/src/utils/bulk-assignments.ts and its tests to understand how error messages reach the wizard. Compare date formatting with the existing LineGraph and audit-log behavior, which the issue says already uses resolvedLanguage. Done means the named labels, enum values, parse errors, notifications, and dates follow the selected interface language, with the listed tests passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Several user-facing strings in apps/web do not go through useTranslation, and some dates are formatted with the browser's locale instead of the interface language. A clinician using the French or Spanish interface sees English labels on the Start Session page and the instrument cards, English-only error lists in the bulk-assignment wizard, raw enum values such as INTERACTIVE, and month names in whatever language the browser happens to be set to. react/jsx-no-literals does not catch any of these, because each one is a prop value, an object property or a value computed outside JSX.
Where
Hard-coded English
apps/web/src/components/StartSessionForm/StartSessionForm.tsx:107andapps/web/src/components/IdentificationForm/IdentificationForm.tsx:30: the identification-method select is labelledlabel: 'Method', on the Start Session page and in Datahub's Subject Lookup dialog.apps/web/src/components/InstrumentCard/InstrumentCard.tsx:131:label: 'Tags'on every instrument card in Administer Instrument and Remote Assignment.apps/web/src/components/InstrumentShowcase/InstrumentKindDropdown.tsx:38-41: the Kind filter's third option islabel: 'Series'(the other two are translated).apps/web/src/utils/bulk-assignments.ts:123-402: everyBulkParseFailuremessage the wizard'sErrorListrenders, e.g.'Missing subject ID','Date of birth must be written as YYYY-MM-DD','Sex must be male or female','The workbook contains no sheets.'(14 in all).parseDelimitedText(:258-261) also passes Papa Parse's own Englisherror.message(e.g. "Quoted field unterminated") straight through for pasted text and CSV files.ErrorListtranslates its own heading, so a French user reads a French sentence followed by an English list.apps/web/src/routes/_app/datahub/subjects/$subjectId/table/$recordId.tsx:48: the failed-download notification hastitle: 'Error'.
Raw enum values shown as text
apps/web/src/routes/_app/dashboard.tsx:315(Total Instruments dialog, "Kind" column),apps/web/src/routes/_app/admin/instrument-repos/index.tsx:338(repository View dialog) andapps/web/src/routes/_app/upload/index.tsx:29(Upload, "Kind" column) all renderinstrument.kind, i.e.FORM,INTERACTIVE,SERIESorFILE.
Dates in the browser's locale
apps/web/src/routes/_app/dashboard.tsx:455,:474,:578and:597: the chart axis ticks and tooltips calltoLocaleDateString(undefined, …).apps/web/src/routes/_app/admin/instrument-repos/index.tsx:204: "Last Synced" callstoLocaleDateString()with no locale, so anen-USbrowser shows10/7/2026even in the French interface, which a French reader takes as 10 July.
// dashboard.tsx:453-456
tickFormatter={(timestamp: number) => {
const date = new Date(timestamp);
return date.toLocaleDateString(undefined, { day: 'numeric', month: 'short' });
}}
Reproduce
- In a browser whose language is English, sign in and switch the interface to Français.
- Open Start Session, Administer Instrument (during a session), the Dashboard, and Admin Panel → Instrument Repos.
- In Group Actions → Remote Assignments → Create Assignments, upload a CSV with a row missing its subject ID.
Actual: "Method", "Tags", "Series" and INTERACTIVE appear in English; the dashboard axes read "Oct 7"; "Last Synced" reads 10/7/2026; the wizard lists "Missing subject ID" under a French heading.
Expected: all of these follow the selected interface language, and dates are formatted with resolvedLanguage, as LineGraph and the audit logs already do.
Tests
apps/web/src/utils/__tests__/bulk-assignments.test.ts:it('should return every parse error as localized text, so the wizard can show it in the interface language').apps/web/src/components/StartSessionForm/__tests__/StartSessionForm.test.tsx:it('should label the identification method in the interface language').apps/web/src/routes/_app/__tests__/dashboard.test.tsx:it('should format chart dates in the interface language rather than the browser locale').testing/src/specs/start-session.spec.ts: switch to French and assert the method select's label is not "Method".
Suggested fix
Translate the labels inline with t({ en, es, fr }). Have BulkParseError.message carry a LocalizedText (or a code that ErrorList maps to copy) instead of an English string, and map Papa Parse's error codes to translated copy rather than forwarding its message. Map InstrumentKind to translated labels in one helper and reuse it in the three tables. Pass resolvedLanguage to every toLocaleDateString call.
- Lingua principale
- TypeScript
- Stelle
- 119
- Fork
- 19
- Merge medio
- 3g 5h
- PR unite (30g)
- 33
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 DouglasNeuroInformatics/OpenDataCapture
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Shared Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Shared Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1812 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Playground Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
DouglasNeuroInformatics/OpenDataCapture#1805 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DouglasNeuroInformatics/OpenDataCapture#1801 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DouglasNeuroInformatics/OpenDataCapture
Issue simili
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
devdotfast/whiteboard#1415 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area/sessions comp/desktop desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NousResearch/hermes-agent#145383 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement p2 setup
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
vercel/eve#5419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno