Skip to content

Commit

Permalink
Add more translator comments tests
Browse files Browse the repository at this point in the history
These all pass with php-gettext/Gettext#166 applied.
  • Loading branch information
swissspidy committed Feb 22, 2018
1 parent a738aaa commit b4bd421
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions features/makepot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ Feature: Generate a POT file of a WordPress plugin
// translators: let your ears fly!
__( 'on', 'foo-plugin' );
/*
* Translators: If there are characters in your language that are not supported
* by Lato, translate this to 'off'. Do not translate into your own language.
*/
__( 'off', 'foo-plugin' );
/* translators: this should get extracted. */ $foo = __( 'baba', 'foo-plugin' );
/* translators: boo */ /* translators: this should get extracted too. */ /* some other comment */ $bar = g ( __( 'baba', 'foo-plugin' ) );
"""

When I run `wp i18n make-pot foo-plugin`
Expand Down Expand Up @@ -440,3 +450,15 @@ Feature: Generate a POT file of a WordPress plugin
"""
#. translators: let your ears fly!
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
#. Translators: If there are characters in your language that are not supported by Lato, translate this to 'off'. Do not translate into your own language.
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
#. translators: this should get extracted.
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
#. translators: this should get extracted too.
"""

0 comments on commit b4bd421

Please sign in to comment.