Skip to content

Fix/ngettext plural - #106

Merged
ralflang merged 2 commits into
horde:FRAMEWORK_6_0from
jcdelepine:fix/ngettext_plural
Aug 26, 2026
Merged

Fix/ngettext plural#106
ralflang merged 2 commits into
horde:FRAMEWORK_6_0from
jcdelepine:fix/ngettext_plural

Conversation

@jcdelepine

Copy link
Copy Markdown
Contributor

What & why

ngettext() calls had both arguments wrapped in an extra _():

ngettext(_('%d minute'), _('%d minutes'), $minutes)

This causes xgettext to extract %d minute and %d minutes as two independent plain msgids instead of a plural pair, which broke hordectl translation compendium when merging against other modules (e.g. kronolith) that define the same strings with a proper plural form:

msgcat: msgid '%d minute' est utilisé sans et avec le pluriel.

Removing the inner _() calls lets ngettext() be extracted correctly as a plural pair. No behavior change — ngettext() already receives the raw strings it needs at runtime.

The .pot file has been regenerated to reflect the corrected extraction.

@ralflang
ralflang merged commit 2a93d35 into horde:FRAMEWORK_6_0 Aug 26, 2026
1 check passed
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.

2 participants