[Collect One] Locale-aware number formatting in the UI and PDF reports

Aperta
#2,653 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, typescript

Direzione di ricerca

Start with Measurement.kt, MeasurementText.kt, and PdfReportStrings to trace how measurements and PDF text are formatted; then inspect the common and platform-specific number formatting entry points. Add locale tests for a comma-decimal language and confirm English PDF goldens remain unchanged. Done means UI and generated PDFs use the report language for user-facing numbers, with the stored or exported text rule documented.

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

Descrizione

collect-one type: code health

Numbers in Collect One are shown in a locale-neutral format in every language (for example 3.51, 1575), both in the UI and in PDF reports. Only the measurement unit names are localized, via the typed Measurement(value, unit, decimals) and MeasurementText.kt / PdfReportStrings.

To do

  • Add locale-aware number formatting in common code (decimal separator, grouping, digits where relevant), probably as an expect/actual over the platform formatters (java.text.NumberFormat on JVM/Android, Intl.NumberFormat in the browser), since kotlinx has no locale formatting.
  • Use it wherever a Measurement or other user-facing number is formatted, including PDFs. PDFs must use the language selected when the report is generated, following the PdfReportStrings.load() pattern.
  • Keep English output byte-identical (goldens unchanged). Add tests for at least one comma-decimal locale (e.g. fr, es, pt, vi).
  • Decide whether stored or exported text (record symbols, exports) stays locale-neutral, and document the rule.
Lingua principale
TypeScript
Stelle
254
Fork
114
Merge medio
2g 3h
PR unite (30g)
20

Preparare l'ambiente

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 google/ground-platform

Tutte le issue di google/ground-platform

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.