Repository navigation
fix(action-center): say "1 prompt" and "1 day" in action history - #1092
Merged
Merged
Conversation
History's Affected column and the drawer's Affected badges read "1 prompts", "1 pages", "1 signals" and so on for a count of one, and the drawer's Time to Close card read "1 days". Make those messages ICU plurals and cover every counted type, plus the days, with render tests against en.json. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
@gkhngyk a small follow-up to #1091 is ready for review: History's Affected column and badges and the drawer's Time to Close now say "1 prompt", "1 page", "1 signal" and "1 day" for a count of one. Only |
This was referenced Oct 16, 2026
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.
Summary
Action Center History says "1 prompt", "1 page", "1 signal" and "1 day" instead of "1 prompts", "1 pages", "1 signals" and "1 days".
These History messages put the count in front of a fixed plural noun, so a count of one read wrong:
actionCenter.historyPage.affected.*): the table's Affected column and the drawer's Affected badges. Theprompt,url,citation,keyword,topicandplatformmessages are ICU plurals now, in the style the file already uses ({count, plural, one {# page} other {# pages}}).competitorhas no count and is unchanged.actionCenter.historyPage.drawer.days): the drawer's card. Now{n, plural, one {# day} other {# days}}; the call site passesn, so the variable staysn.These keys are used only in
history-table.tsxandhistory-drawer.tsx, anden.jsonis the only locale. No component code changes.Tests
New
web/src/components/action-center/history-table.test.tsxrendersHistoryTableandHistoryDrawerinsideNextIntlClientProviderwith the realen.json. It checks:Against the old messages, all 8 cases with a count of one fail (e.g.
expected '1 signals' to be '1 signal'); the plural cases pass. With this change all 16 pass.Related issue
None. Found next to #1091, which fixes the drawer's "Consolidated from 1 signals" line. The two PRs change different lines of
en.jsonand merge cleanly together. The drawer tests are in this new file so they don't collide with #1091's newhistory-drawer.test.tsx; they can move there once both are in.Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
{"promptCount":1,"pageCount":1,"citationCount":1}, closed a day after it was created.yarn test src/components/action-center/history-table.test.tsxfromweb/.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): 0 errors; the 7 warnings are in untouched filesyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also checked:
yarn test: 75 files and 734 tests pass.yarn buildpasses with CI's Stripe placeholder key.Known, left as is:
npm run version:checkfails onmaintoo (docker-compose images 0.2.0 vs packages 0.3.0); version bumps are for maintainers.🤖 Generated with Claude Code