Skip to content

fix: use ngettext for pluralized string - #23191

Merged
nijel merged 2 commits into
mainfrom
plural
Nov 29, 2026
Merged

nijel merged 2 commits into
mainfrom
plural

Conversation

@nijel

@nijel nijel commented Nov 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@nijel nijel added this to the 2026.12 milestone Nov 29, 2026
@nijel nijel self-assigned this Nov 29, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T07:27:03.703796Z c5773bc PR opened
🔒 Security Review ✅ Completed 2026-11-29T07:28:38.765487Z c5773bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5773bc2fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate/static/js/account-security.js Outdated
ngettext(
"Processed %(processed)s of %(total)s entry.",
"Processed %(processed)s of %(total)s entries.",
result,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass the total count to ngettext

result is the entire JSON response object, but the third argument to ngettext() must be the numeric count used to select the plural form. Passing an object causes plural rules to evaluate against a nonnumeric value, so a single-entry operation still displays “1 entries” in English and other languages can select incorrect forms as well. Pass result.total here, while retaining result as the interpolation mapping.

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread weblate/static/js/account-security.js Resolved
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@nijel
nijel enabled auto-merge (squash) November 29, 2026 09:11
@nijel
nijel disabled auto-merge November 29, 2026 11:50
@nijel
nijel merged commit 0f28e9f into main Nov 29, 2026
47 of 49 checks passed
@nijel
nijel deleted the plural branch November 29, 2026 11:50
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