Skip to content

Pluralize the zero comment count in post meta - #89

Open
deepench wants to merge 2 commits into
developfrom
fix/zero-comments-plural
Open

deepench wants to merge 2 commits into
developfrom
fix/zero-comments-plural

Conversation

@deepench

@deepench deepench commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Free-theme counterpart of themegrill/accelerate-pro#52.

Changes proposed in this Pull Request:

A post with no comments showed "0 Comment" in the post meta while two or more showed "2 Comments". The zero argument of comments_popup_link() in inc/functions.php was a fixed singular string. It now reads "0 Comments". The msgid is updated in accelerate.pot, hu_HU.po and pl_PL.po (their existing translations are kept) so the string still matches. hu_HU.mo and pl_PL.mo are rebuilt with only that msgid changed (every other entry and the header are identical, checked by loading both files with the WordPress MO reader), so the existing translations still apply.

Verified live on the blog listing with a post's comment count forced to 0 (temporary, since removed): before, "0 Comment"; after, "0 Comments".

How to test the changes in this Pull Request:

  1. View the blog listing (or a single post) with a post that has no comments.
  2. Confirm the meta line reads "0 Comments".
  3. Confirm a post with one comment still reads "1 Comment" and two or more read "N Comments".

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (modification of the currently available functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Other information:

  • Have you added an explanation of what your changes do and why you would like us to include them?
  • Have you successfully ran tests with your changes locally?
  • Have you updated the documentation accordingly?

Changelog entry

Fix - Zero comment count now reads "0 Comments" instead of "0 Comment".

The zero case of comments_popup_link() was the fixed string "0 Comment",
so a post with no comments read "0 Comment" while two or more read
"2 Comments". It now reads "0 Comments". The msgid is updated in the
.pot and the Hungarian and Polish .po files so the existing translations
still match.

Verified live: a post with zero comments rendered "0 Comment" before and
"0 Comments" after.
@deepench deepench added the bug label Oct 1, 2026
@tg-autopilot
tg-autopilot requested a lite review from Copilot October 1, 2026 04:24
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

QA suite — refused, no regression spec

This PR changes product source but adds no spec, so the suite was
refused before booting WordPress — running it just to report the same
thing at the end costs runner minutes for nothing. Run
/claudegrill:verify-fix locally and let write-spec add the guard
to this branch, then push again.

Source files changed with no matching spec
inc/functions.php

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Rebuild and include the updated Hungarian and Polish MO catalogs.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates the zero-comment post meta label from “0 Comment” to “0 Comments” and synchronizes translation source files.

Changes:

  • Updated the PHP display string.
  • Updated POT and Hungarian/Polish PO entries.
  • Compiled MO catalogs remain stale.
File Summary
languages/​pl_PL.po Updates the Polish translation entry.
languages/​hu_HU.po Updates the Hungarian translation entry.
languages/​accelerate.pot Updates the source catalog entry.
inc/​functions.php Changes the zero-comment label to plural.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread inc/functions.php
… string

The compiled catalogs still held the old msgid, so those translations would
stop applying. Only that msgid is changed; every other entry and the header
are identical, checked by loading both files with WordPress's MO reader.
@deepench deepench self-assigned this Oct 1, 2026
@deepench
deepench requested a review from subin-shk October 1, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants