i18n: build translated sentences in code so they read correctly in every language (TBv3 + Mapper)

Aperta
#2,877 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, react

Direzione di ricerca

Start with the named components in oclweb3 and oclmap: DeleteEntityDialog, ReleaseVersion, ResourceReferences, RepoHome, the event and error components, and SearchInputDrawer; then check constants.js and app startup language handling. Use the related translation PRs to see the affected sentence keys. Done means the listed UI text, dates, and document language follow the selected locale, with Spanish and Chinese event keys added.

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

Descrizione

component/mapper component/web signal/has-dependencies signal/large-scope signal/low-risk signal/well-specified stage/triaged type/bug

Summary

The pt-BR review of oclweb3#60 and oclmap#90 (#2866) found sentences that the UI builds by stitching translated fragments together, or by dropping raw English values into translated text. No catalog edit can make these read correctly in Portuguese (or Spanish). They need code changes so that each sentence is a single translatable string with interpolated values. This ticket holds the code-side fixes that were deliberately kept out of the translation PRs so those could merge.

Acceptance criteria

  • DeleteEntityDialog, ReleaseVersion, ResourceReferences and repo.version.form.* take a translated resource-type label instead of the raw API type (Collection, concept, Source Version). The hardcoded 'versions, ' and 'concepts and mappings' in RepoHome go through i18n. Sentences avoid gendered articles before {{resourceType}}, or use per-type keys. (The unused common.object_types map added in oclweb3#60 can serve here; otherwise remove it.)
  • Activity feed (Events.jsx, DashboardEvents.jsx): each event type × object type is a whole-sentence key with preposition and site name, e.g. "Entrou no OCL", "Entrou em uma Organização X". The no-object "Joined" event stops using the API's English description. Remove the unused event_types.updated and .source. Add event_types / event_object_types for es and zh.
  • Error pages (Error401/403/404, ErrorUI): replace the please + link + or + … fragments with <Trans> sentences.
  • Search placeholders (SearchInputDrawer): replace the fragment chains with <Trans> sentences.
  • Relative times and dates follow the UI language: set the Moment locale at startup from the persisted language (both apps) and on change (oclweb3), and localize the M/D/YYYY formats in constants.js.
  • <html lang> follows the selected language.
  • oclweb3: guard UserMenu when the stored language isn't in LANGUAGES (a stored zh currently throws). Drop the i18n.languages = … overwrite in both apps.
  • Hardcoded English found near the touched code: UserProfile.jsx "Joined {date}" and Mapper ProjectLogs.jsx "{user} at {date}".

Related: #2866, OpenConceptLab/oclweb3#60, OpenConceptLab/oclmap#90

Lingua principale
Nessun dato sulla lingua
Stelle
4
Fork
2
Merge medio
2h 12m
PR unite (30g)
1

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 OpenConceptLab/ocl_issues

Tutte le issue di OpenConceptLab/ocl_issues

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.