-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
The
#, php-format
comment is not added (anymore?) when running wp i18n make-pot
#121 (comment) provides an example where it should exist, but it seems only the plural issue was fixed there, but the "php-format" comment is/was still missing.
Describe how other contributors can replicate this bug
wp i18n make-pot for printf( _n( '%d cat', '%d cats', 1, 'foo' ), 1 );
See correct results with:
xgettext test.php for
<?php
printf( ngettext( '%d cat', '%d cats', 1 ), 1 );
Describe what you would expect as the correct outcome
#: test.php:2
#, php-format
msgid "%d cat"
msgid_plural "%d cats"
msgstr[0] ""
msgstr[1] ""
Let us know what environment you are running this on
WP-CLI version: 2.11.0
Provide a possible solution
If there is a placeholder add the php-format comment (like it's already done for the "translators:" anyway, so in those cases + those where we don't have a translators comment)