Skip to content

fix(web): singular and plural forms in every count - #401

Merged
samuelmbabhazi merged 1 commit into
mainfrom
fix/plural-counts
Nov 21, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
fix/plural-counts

Conversation

@samuelmbabhazi

@samuelmbabhazi samuelmbabhazi commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • A count pipe ({{ n | count: '{n} environment' : '{n} environments' }}) uses I18n.count, which now accepts extra values. The form follows the interface language's plural rules (Intl.PluralRules).
  • Every remaining count in the interface uses it:
    • the applications list ("8 applications in 1 environment");
    • the projects cards and the project page;
    • the connected agents, in the header and on the Overview (French "0 agent connecté");
    • the recovery codes left;
    • the members note on the Organization page;
    • the replicas running ("0 of 1 replica running").
  • The French texts follow: singular forms are added, and two combined keys are replaced by per-count keys.

Why

The demo recording showed "8 applications in 1 environments". #399 fixed the Overview and Organization summaries; this fixes the rest, found by searching every {n} …s text. The certificate countdown is left as it is: it only says "{n} days" for 2 days or more.

How it was tested

  • Pipe unit test: English singular with extra values, unknown count, French zero.
  • The application screen test now expects "0 of 1 replica running".
  • web:lint and web:test (237) pass.

Security considerations

Text only.

Summary by CodeRabbit

  • Improvements
    • Count labels across the dashboard, projects, applications, environments, replicas, members, and recovery codes now use singular or plural wording that matches the displayed count.
    • Unknown counts display an em dash, and replica summaries retain both running and total counts.
    • French translations have been updated for the revised count labels.

A count pipe gives each count the form of the interface language, with
the same rules as I18n.count. The applications list ("1 environments"),
the projects and project pages, the connected agents (French "0 agent
connecté"), the recovery codes left, the organization's members and
the replicas running ("0 of 1 replica running") use it.

Signed-off-by: samuel mbabhazi <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds a count pipe that selects singular or plural translations and supports additional interpolation values. Dashboard, delivery, identity, and workspace labels use the pipe. French translations and a replica-count test expectation are updated.

Changes: Count-aware labels

Layer / File(s) Summary
Count helper and pipe
apps/web/src/app/ui/i18n.ts, apps/web/src/app/ui/i18n.spec.ts
I18n.count accepts optional interpolation values. The new Count pipe forwards nullable counts to the helper. Tests cover singular and plural messages, interpolation, and undefined counts.
Dashboard count labels
apps/web/src/app/dashboard/*
Application, environment, and connected-agent labels use the count pipe with singular and plural templates.
Delivery, identity, and workspace labels
apps/web/src/app/delivery/*, apps/web/src/app/identity/*, apps/web/src/app/workspace/*, apps/web/src/app/ui/fr.ts
Replica, recovery-code, member, and environment labels use the count pipe. French translations and the stopped-replica expectation are updated for singular wording.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • shipkeepdev/shipkeep#399: Adds I18n.count and updates French count translations and singular/plural labels in overlapping views.
Merge Risk: Minimal · up to b2c12

This change makes counts such as applications, replicas, members and recovery codes use the right singular or plural wording, including in French. It only touches interface text in the web app and is easy to roll back. No merge-blocking risk was found.

Security architecture risk: Minimal · up to b2c12

The change centralizes singular and plural wording without changing the inspected authorization, recovery-code, or deployment operations. No introduced or worsened security-architecture risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(web): singular and plural forms in every count" matches the main change. The PR adds a Count pipe backed by I18n.count that applies interface-language plural rules, and it switches coun…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(web): singular and plural forms in every count" matches the main change. The PR adds a Count pipe backed by I18n.count that applies interface-language plural rules, and it switches count displays across the web app (applications, projects, connected agents, recovery codes, members, replicas) to singular and plural forms. The title is specific and concise, and it follows a conventional commit style. The title does not mention the French translation additions or the new replica key names, but those are supporting details, not the main point.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bd92831 and b2c12c4.

Files selected for processing: 15

  • apps/web/src/app/dashboard/applications-page.ts
  • apps/web/src/app/dashboard/dashboard-layout.html
  • apps/web/src/app/dashboard/dashboard-layout.ts
  • apps/web/src/app/dashboard/overview-page.html
  • apps/web/src/app/dashboard/overview-page.ts
  • apps/web/src/app/dashboard/projects-page.ts
  • apps/web/src/app/delivery/application-page.ts
  • apps/web/src/app/delivery/delivery-pages.spec.ts
  • apps/web/src/app/identity/mfa-panel.html
  • apps/web/src/app/identity/mfa-panel.ts
  • apps/web/src/app/ui/fr.ts
  • apps/web/src/app/ui/i18n.spec.ts
  • apps/web/src/app/ui/i18n.ts
  • apps/web/src/app/workspace/organization-page.ts
  • apps/web/src/app/workspace/project-page.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@samuelmbabhazi
samuelmbabhazi merged commit ac2dac4 into main Nov 21, 2026
24 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/plural-counts branch November 21, 2026 11:39
samuelmbabhazi added a commit that referenced this pull request Nov 21, 2026
## What

The landing page has shown the two chevrons of the Cadre design since
#372, and its favicon since #389. These places still drew the old arrow:

- **Web UI logo** (`sk-logo`), in the dashboard sidebar and on the
public pages (sign-in, account): now the chevron mark and the "SHIPKEEP"
wordmark in spaced capitals, as on the landing.
- **Web UI favicons:** `favicon.svg`, `favicon.ico` (16, 32 and 48 px)
and `apple-touch-icon.png` are now the landing's files.
- **README banner** (`docs/assets/readme-banner.jpg`) **and social
preview** (`docs/assets/social-preview.png`): rendered again from the
current landing page (English, 1280 × 640, the banner at 2×). The
banner's alt text follows the new page.
- **README demo** (`docs/assets/demo.webp`): recorded again on the lab,
from `main` with the new mark and the plural fixes of #401. It now opens
the Deployments tab, so the steps show while the deployment runs. 222
KB, about 27 s, the wait played 10 times faster. The caption says how it
was recorded.

A search for the arrow's path finds nothing else in the repository (API,
scripts, docs).

## Not done here

The social preview GitHub shows is set in the repository settings
(Settings → Social preview). Only the maintainer can upload the new
`docs/assets/social-preview.png` there.

## How it was tested

- `web:lint` and `web:test` (230) pass. The shell test now expects
"Shipkeep" (the capitals come from CSS).
- On the lab: dashboard and sign-in page at 1440 px and 390 px, favicons
served (200). The demo was checked frame by frame. No console error.

## Security considerations

Images and text only. The demo shows no token, password or secret; the
account address is `[email protected]`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Style**
* Updated the Shipkeep logo with a two-chevron mark and a more prominent
uppercase wordmark.
* **Documentation**
* Refreshed the README banner description and demo caption, including
the metrics shown, test environment details, and recording date.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: samuel mbabhazi <[email protected]>
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