Repository navigation
fix(i18n): render relative times in the app language, not the OS locale - #6871
Merged
Rishet11 merged 2 commits intoOct 30, 2026
Merged
Conversation
Intl.RelativeTimeFormat(undefined) picked up the environment locale, so Home rows and session link preview cards leaked the OS language into an English UI and disagreed with the board, which formats through the i18n catalogs. Both call sites now reuse formatTimeCompact from renderer/lib/format-time, the same localized wrapper as the rest of the app; Home rows move to the terse "5m ago" house style. Refs OrchestratorInc#6680 Co-Authored-By: Claude Code <[email protected]>
Contributor
🏆 Review leaderboardOct 10–17, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 8 more reviewers
|
Rishet11
approved these changes
Oct 30, 2026
Rishet11
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Typecheck and the SessionLinkPreviewCard test pass on this merged with current main. ArtifactHistory.tsx still formats with the OS locale, worth a follow-up.
Collaborator
|
Checked on main after merge (ccfa051) in the dev app, AO set to Chinese, macOS on English. Both times now follow the app language. The sidebar session time ("now") and ArtifactHistory still use the system locale, follow-ups. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Relative times on Home (and in session-link preview cards) were rendered with
new Intl.RelativeTimeFormat(undefined, …), which picks the OS locale instead of the application language — an English UI on a non-English OS showed mixed-language timestamps.Fixes #6680
Change
HomePage:relativeProjectTimereuses the app'sformatTimeCompact(already localized throughappI18n, terse "5m ago" style used across Sidebar / NotificationCenter / ArtifactsView), keeping the empty-timestamp fallback.SessionLinkPreviewCard: the localIntl.RelativeTimeFormatcollapses intoformat("shell.updatedAt", { time: formatTimeCompact(timestamp) }).Verification
SessionLinkPreviewCard.test.tsx— renders underappI18n.changeLanguage("zh-CN")and asserts catalog wording (same pattern asSessionsBoard.test.tsx); green withLC_ALL=en_US.UTF-8onen-USmachines.dev:webwith a ru-RU browser locale (dark scheme): Home shows compact "5m ago"-style times in the app language with no OS-locale leakage.🤖 Generated with Claude Code