Repository navigation
fix(ui): say "1 commit", "1 uncommitted change" and the like for a count of one - #64
Merged
Merged
Conversation
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.
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.
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'sOneform when the count is 1. Call sites used to compare the count with 1 themselves. Its type admits only keys that have aOneform, so a new count message without one does not compile at acountKeycall. 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.