Skip to content

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

Open

Description

@paynejd

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

Activity

  1. added this to the P5 · Post-launch milestone on Oct 5, 2026
  2. ocl-automation commented on Oct 5, 2026

    @ocl-automation
    Collaborator

    Automated Triage — 2026-10-05

    Dimension Score
    Complexity 3
    Scope 4
    Clarity 4
    Dependency 3
    Risk 2

    Decision: decision/planning-needed
    Type: type/bug
    Signals: signal/low-risk, signal/large-scope, signal/well-specified, signal/has-dependencies

    The body lists eight checklist items across two repos (oclweb3 and oclmap): whole-sentence i18n keys, <Trans> rewrites, Moment locale setup, <html lang> and a UserMenu guard. Each is a well-understood pattern, so clarity is good. Dependency is moderate because oclweb3#60 and oclmap#90 are still open and this work builds on their catalogs and the common.object_types map. Risk is low because the changes are UI text and locale handling, and the milestone is P5 post-launch. The existing type/bug label fits, since sentences currently read wrongly in other languages and a stored zh throws in UserMenu.


    Generated by ticket-triage pipeline v3. Model: anthropic/claude-sonnet-5.5 (openrouter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions