From b4bd421cdbbb172f334976ed54bcbcfb9fd449c8 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 22 Feb 2018 18:00:21 +0100 Subject: [PATCH] Add more translator comments tests These all pass with https://github.com/oscarotero/Gettext/pull/166 applied. --- features/makepot.feature | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/features/makepot.feature b/features/makepot.feature index 51a3cf8e..74efe2e4 100644 --- a/features/makepot.feature +++ b/features/makepot.feature @@ -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` @@ -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. + """