Repository navigation
fix(i18n): say the crewmate schedule countdowns in unit words - #36734
Conversation
The crewmate Schedules tab formatted its countdowns and the patrol's time limit with fmtUnit's narrow default, so Japanese sentences read 次回は13m後, 13m後に実行 and 7dの時間制限に達しました, and English read Next in 13m and Hit its 7d time limit. inDuration, the one source for all three, now uses the short unit display, the form the patrol interval already uses: 13 分後 and 7 日 in Japanese, 13 min and 7 days in English. Closes #35442 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. All four Notes
[DESIGN-REVIEWED] db2342a Description read[DESCRIPTION-READ] 631927d513e306ebcd26e2ca480fcb34efcd0bec1b0f85f57c287171123c3b2a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. A one-line change in the shared helper What this change shipsInventory (5 items) — 5 justifiedIntent: a person using the dashboard in Japanese should see crewmate schedule countdowns and the patrol time limit written with unit words, not a Latin abbreviation inside a Japanese sentence. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] db2342a Description read[DESCRIPTION-READ] 99a6087908df5582fb02aa20e23fcddb1bab82d336927506bd8128fcfe647e58 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The PR changes only the wording of three duration phrases, and all eight before/after screenshots show those phrases, which the blind reader read correctly. Notes
[UX-REVIEWED] db2342a Description read[DESCRIPTION-READ] 1b33ee4f36ed8f5f2916206f5b065a036c12e4d7277224faae45e31142793c20 That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
The review checked head db2342a. The one code change, unitDisplay: 'short' in inDuration (CrewScheduleList.tsx:25), reaches all four countdowns that sit inside a sentence: both CrewScheduleList sites and both CrewOnItsOwn sites. No compact chrome reader is affected. The new ja tests check the real catalog output. Reverted, the fix turns 8 assertions red, which matches the red-before count in the body. The tests are deterministic: the clock is pinned, the language is reset with onTestFinished, and there are no sleeps. The branch merges cleanly onto current main, and PR Readiness is green on this head.
Done well: the fix sits in the one shared helper, so every sentence changes together. The spec, the translator note and the capture script change in the same commit.
Optional: the English stop reason now reads "Hit its 7 days time limit". #36711 tracks that. Changing only the en.json value (for example "Hit its time limit of {{limit}}") would close it, and the other locales would not need to change.
Optional: the sibling line in the body points at #36611. That issue is closed, and #36685 already fixed deployShared.tsx on main.
Problem / Motivation
Goal: In Japanese, a crewmate's Schedules tab says its countdowns and the patrol's time limit in unit words (
次回は13 分後,13 分後に実行,7 日の時間制限に達しました), never with a narrow Latin unit inside the sentence.With the dashboard in Japanese, the profile card's Schedules tab read
次回は13m後on the patrol row and on every schedule row,13m後に実行on the Up next card, and7dの時間制限に達しましたon a patrol stopped by its time budget.Why it matters
Everyone using the dashboard in Japanese sees a Latin abbreviation glued into a Japanese sentence on every crewmate Schedules tab. The patrol interval on the same card already reads
15 分ごとsince #35603, so the card mixed15 分ごとand13m後one line apart.Not a goal
nextCycleinwebsite/src/components/autoNudgeLoop.ts), which keeps its compact13m 57sreading on purpose.timeAgo:Last check 2m ago,前回の実行 50分前).website/src/i18n/locales/*.json. The English stop reason now readsHit its 7 days time limit; rewording it so the duration is not a modifier needs all 12 catalogs and is English: a patrol stopped by its time budget reads "Hit its 7 days time limit" #36711.What changed (motivation → approach → change)
The Schedules tab now says its countdowns and the time limit in unit words, in every language. Japanese reads
13 分後,1 時間30 分後and7 日; English readsNext in 13 min,Runs in 10 minandHit its 7 days time limit.All three sentences take their duration from one helper,
inDurationinwebsite/src/pages/members/CrewScheduleList.tsx. It used the formatter's narrow default, which is meant for tight chrome, not for a word inside a sentence. It now asks for the short unit display, the same one-line change #35603 made for the patrol interval on the same card.The crew-mode spec (
docs/system-specs/modules/crew-mode.md), the expected phrase in the capture harness (website/scripts/capture-crewmate-panel-ia.mjs) and the translator note forpages.membersPage.patrol_stopped_runtime(website/src/i18n/en.context.json) quoted the old narrow form and now quote the new one.Backwards compatibility
Compatible: only the rendered wording of three duration phrases changes; no API, key, stored value or catalog value changes.
Removes nothing: the same three phrases render, with unit words instead of narrow units.
Tests
CrewScheduleList.test.tsx: a new Japanese test renders the list injaand checks13 分後に実行on the Up next card and次回は13 分後/次回は1 時間30 分後on the rows. The English expectations moved toNext in 1 hr … 30 minandRuns in 10 min.CrewOnItsOwn.test.tsx: a new Japanese test checks次回は13 分後in the patrol facts line and7 日の時間制限に達しましたfor aruntime_budgetstop. The English expectations moved toNext in 13 minandHit its 7 days time limit;Last check 2m agois unchanged.CrewScheduleList.tsxput back, the two files run 8 failed / 30 passed, both new Japanese tests among the failures (Received: 次回sooner13m後に実行); with the fix, 38 passed.--sequence.shufflerun (seed 1794573864145) at 38/38. The clocks are pinned the way the existing tests pin them.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Reproduced and smoke-tested on Linux (Ubuntu 24.04.5 LTS) against the real built dashboard bundle, served locally with stubbed
/api/**through the repository's capture harness, with the language set tojaand toen. A fresh gateway cannot hold a crewmate with a running task patrol and a time-budget stop without a live agent backend, which is why the harness was used.Before (base):
After (fixed build):
Nearby happy path: the committed harness's own checks pass on the fixed build (exit 0), including
Hit its 7 days time limitand the #35603 intervalevery 15 min; relative times are unchanged.Screenshots / video
Japanese, running patrol: before, then after.
Japanese, patrol stopped by its time limit: before, then after.
English, before and after
Related Issues
Closes #35442
Sibling sweep
Swept: git grep -nE "fmtDuration(" -- website/src
Sibling: website/src/pages/members/deployShared.tsx:53 -- tracked in #36611
Sibling: website/src/components/autoNudgeLoop.ts:177 -- not affected --
nextCycleis the live countdown chip, which keeps the compact13m 57sreading on purposeSibling: website/src/components/SessionTurnLimitMenu.tsx:33 -- not affected -- the limit is a compact value inside parentheses after a label, not a word in a sentence
Sibling: website/src/pages/settings/InstancesPanel.tsx:70 -- not affected -- the token time left is a compact value after a label, not a word in a sentence
Pattern harvest
Rule candidate: review-prompt
Pattern: a
fmtDuration/fmtUnitresult interpolated into a translated sentence keeps the narrow unit default instead ofunitDisplay: 'short'(#33514, #35442, #36611).Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)