You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported in wp-cli/i18n-command#96, we're currently facing an issue with the PHP extractor where comments are associated with the wrong function call.
Here's an example code:
$month_abbrev[ __( 'January' ) ] = /* allowed1: three-letter abbreviation of the month */__( 'Jan' );
$month_abbrev[ __( 'February' ) ] = /* allowed1: three-letter abbreviation of the month */__( 'Feb' );
The expected result is like this:
#:./tests/assets/phpcode3/input.php:13msgid"January"msgstr""#. allowed1: three-letter abbreviation of the month#:./tests/assets/phpcode3/input.php:13msgid"Jan"msgstr""#:./tests/assets/phpcode3/input.php:14msgid"February"msgstr""#. allowed1: three-letter abbreviation of the month#:./tests/assets/phpcode3/input.php:14msgid"Feb"msgstr""
What actually happens is that the second allowed1: three-letter abbreviation of the month comment is not associated with the Feb string, but instead with the February string. The January string is fine though.
I'm not yet sure what exactly in \Gettext\Utils\PhpFunctionsScanner::getFunctions() causes this but I wanted to report this already nonetheless.
The text was updated successfully, but these errors were encountered:
As reported in wp-cli/i18n-command#96, we're currently facing an issue with the PHP extractor where comments are associated with the wrong function call.
Here's an example code:
The expected result is like this:
What actually happens is that the second
allowed1: three-letter abbreviation of the month
comment is not associated with theFeb
string, but instead with theFebruary
string. TheJanuary
string is fine though.I'm not yet sure what exactly in
\Gettext\Utils\PhpFunctionsScanner::getFunctions()
causes this but I wanted to report this already nonetheless.The text was updated successfully, but these errors were encountered: