Skip to content

fix(i18n): address Codex review findings#1158

Open
JamieRuderman wants to merge 1 commit into
i18n/extract-longtailfrom
i18n/review-fixes
Open

fix(i18n): address Codex review findings#1158
JamieRuderman wants to merge 1 commit into
i18n/extract-longtailfrom
i18n/review-fixes

Conversation

@JamieRuderman

Copy link
Copy Markdown
Member

Addresses the Codex review findings across the i18n PR stack. Verified each against source before fixing.

P1

  • Signed-out screens now follow the OS locale. i18n init resolved lng from a hard-coded 'en' only, and the language was re-resolved solely on sign-in — so translated Cognito sign-in/signup/MFA screens always rendered English. Init now calls resolveLanguage() (→ navigator.language); the persisted per-account override is session-scoped and still re-applied by ui.setLanguage after sign-in.

P2 — concrete bugs

  • Confirmation dialog buttons (Confirm.tsx) were hard-coded Ok/Cancel → now common.ok/common.cancel. Affects every confirm dialog app-wide.
  • Relative dates (Duration.tsx) appended a literal English " ago" ("3 Tage ago") and formatted month/year/date branches with navigator.language. Now uses a translated duration.ago phrase (word-order per locale: vor {{d}} / {{d}}前 / hace {{d}}) and getLocale().
  • Empty attribute labels (Attributes.tsx) leaked the raw columns.<id> key (e.g. the enterprise-license actions column) under returnEmptyString:false → blank labels now pass through untranslated.
  • networkName classified system networks by name, so a user network named "Local"/"Recent"/etc. got relabeled. Now gated on the reserved synthetic id (local/recent/public).
  • Gravatar link ran into preceding text in de/es (bittegravatar.com) → added {' '}.
  • Sidebar count/tooltip number formatting now uses getLocale().

P2 — reactivity (module-level strings didn't re-resolve)

  • RouteSetting.ROUTES was evaluated at import (while i18n was still en) → converted to getRoutes() resolved at render (also updated ServiceAttributesForm).
  • Added useTranslation() at the App root so render-time translations resolved outside React (Attribute label getters, value functions, date/duration helpers) re-render on language switch and when a lazy locale chunk finishes loading.

Deliberately deferred

  • applications.ts launch-method labels (Command/Terminal/…) are set in constructors and memoized by selectApplication, so they stay stale on a live language switch until the service/connection changes. Fixing this cleanly means a getter refactor in the shared common/ package; deferred as low-impact (narrow surface, only on live switch) rather than risk an untested shared-package change.
  • Admin table header collisions (created → "Created date", license) — left as-is: admin pages are internal-only and don't need translation.

Verification: tsc clean, production build clean (locale chunks code-split), i18n parity check passes.

…ative dates, reactive labels, network/column scoping
@JamieRuderman

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 7cbc327aad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant