Repository navigation
🐛 Fixed comment count not respecting theme translations - #1088
Conversation
WalkthroughThe post card footer's comment count display in partials/post-card.hbs was updated to use a pluralization-aware helper call with singular ("comment") and plural ("comments") translation labels, replacing the direct output of the raw comment_count value. Estimated code review effort: 1 (Trivial) | ~2 minutes Changes
Related issues: None provided. Related PRs: None provided. Suggested labels: None provided. Suggested reviewers: None provided. 🐰 A single comment, now two or more, 🚥 Pre-merge checks | ✅ 5
✨ Finishing Touches
Comment |
|
@9larsons This should be fix for all official themes, too! |
|
Agreed, thanks for flagging this! Let’s keep this PR focused on Casper and follow up with separate fixes for the affected usages in other themes. |
- post cards used the bare {{comment_count}} helper, which falls back to the hardcoded English "comment"/"comments" defaults regardless of the publication language
- the comment/comments keys already exist in every locale file but were never wired into the helper call, so translations had no effect
- pass singular/plural through the {{t}} helper, mirroring the reading_time helper on the line above
4c45d5b to
6969279
Compare
Post cards render the comment count with the bare
{{comment_count}}helper. That helper falls back to the hardcoded English comment/comments defaults, so the count is always displayed in English regardless of the site's publication language.This fix pass singular / plural through the
{{t}}helper, using the same translation pattern already applied toreading_timeon the line above.FYI: The same bare
{{comment_count}}pattern appears in other official themes (Edition, Solo, Headline).