Skip to content

fix(ui): say "1 commit", "1 uncommitted change" and the like for a count of one - #64

Merged
ShortArrow merged 2 commits into
mainfrom
fix/singular-counts
Oct 28, 2026
Merged

ShortArrow merged 2 commits into
mainfrom
fix/singular-counts

Conversation

@ShortArrow

@ShortArrow ShortArrow commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

In English, a count of one read in the plural in five places: the commit count over a repository and while it loads, the drawer's indicators for unpushed commits, uncommitted changes and local-only branches, and the chart's and calendar's count of commits still being counted. Each now says "1 commit", "1 uncommitted change" and so on. Japanese counts read the same either way, so their singular messages repeat the plural ones.

The choice of message moves into countKey, which takes a key's One form when the count is 1. Call sites used to compare the count with 1 themselves. Its type admits only keys that have a One form, so a new count message without one does not compile at a countKey call. The existing singular messages for files and selected lines were renamed to this form, and the chart's list of commits under the cursor now shares the commit count.

A unit test renders each of the five messages for one.

Each call site chose between a singular and a plural key itself; countKey now takes the key's One form when the count is 1, and the chart's and calendar's list share the commit count.
…unt of one

The repository's commit count, the drawer's indicators and the chart's count still being counted read in the plural for one.
@ShortArrow
ShortArrow marked this pull request as ready for review October 28, 2026 08:53
@ShortArrow
ShortArrow merged commit 06f1a9c into main Oct 28, 2026
15 checks passed
@ShortArrow
ShortArrow deleted the fix/singular-counts branch October 28, 2026 08:53
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