mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
I18N: Correct and improve inline docs and tests for functionality related to nooped plurals.
See #55646, #55652 git-svn-id: https://develop.svn.wordpress.org/trunk@53543 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -22,7 +22,7 @@ class Tests_L10n extends WP_UnitTestCase {
|
||||
$text_domain = 'text-domain';
|
||||
$nooped_plural = _n_noop( '%s post', '%s posts', $text_domain );
|
||||
|
||||
$this->assertNotEmpty( $nooped_plural['domain'] );
|
||||
$this->assertSame( 'text-domain', $nooped_plural['domain'] );
|
||||
$this->assertSame( '%s posts', translate_nooped_plural( $nooped_plural, 0, $text_domain ) );
|
||||
$this->assertSame( '%s post', translate_nooped_plural( $nooped_plural, 1, $text_domain ) );
|
||||
$this->assertSame( '%s posts', translate_nooped_plural( $nooped_plural, 2, $text_domain ) );
|
||||
@@ -35,8 +35,8 @@ class Tests_L10n extends WP_UnitTestCase {
|
||||
$text_domain = 'text-domain';
|
||||
$nooped_plural = _nx_noop( '%s post', '%s posts', 'my-context', $text_domain );
|
||||
|
||||
$this->assertNotEmpty( $nooped_plural['domain'] );
|
||||
$this->assertNotEmpty( $nooped_plural['context'] );
|
||||
$this->assertSame( 'text-domain', $nooped_plural['domain'] );
|
||||
$this->assertSame( 'my-context', $nooped_plural['context'] );
|
||||
$this->assertSame( '%s posts', translate_nooped_plural( $nooped_plural, 0, $text_domain ) );
|
||||
$this->assertSame( '%s post', translate_nooped_plural( $nooped_plural, 1, $text_domain ) );
|
||||
$this->assertSame( '%s posts', translate_nooped_plural( $nooped_plural, 2, $text_domain ) );
|
||||
|
||||
Reference in New Issue
Block a user