Changeset 60484 for trunk/tests/phpunit/tests/l10n/wpTranslations.php
- Timestamp:
- 07/18/2025 12:57:14 PM (9 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/l10n/wpTranslations.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/wpTranslations.php
r57518 r60484 227 227 load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/l10n/plural-complex.mo' ); 228 228 229 $this->assertSame( '%s razpoložljiva posodobitev', _n( '%s update available', '%s updates available', '1', 'wp-tests-domain' ) ); // 1, 101, 201 229 230 $this->assertSame( '%s razpoložljiva posodobitev', _n( '%s update available', '%s updates available', 101, 'wp-tests-domain' ) ); // 1, 101, 201 230 231 $this->assertSame( '%s razpoložljivi posodobitvi', _n( '%s update available', '%s updates available', 102, 'wp-tests-domain' ) ); // 2, 102, 202 231 232 $this->assertSame( '%s razpoložljive posodobitve', _n( '%s update available', '%s updates available', 103, 'wp-tests-domain' ) ); // 3, 4, 103 232 233 $this->assertSame( '%s razpoložljivih posodobitev', _n( '%s update available', '%s updates available', 5, 'wp-tests-domain' ) ); // 0, 5, 6 234 235 // Test with strings that are not in the translation files. 236 $this->assertSame( 'Singular', _n( 'Singular', 'Plural', 1, 'wp-tests-domain' ) ); 237 $this->assertSame( 'Singular', _n( 'Singular', 'Plural', '1', 'wp-tests-domain' ) ); 238 $this->assertSame( 'Plural', _n( 'Singular', 'Plural', 2, 'wp-tests-domain' ) ); 233 239 } 234 240 … … 240 246 load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/l10n/plural-complex.php' ); 241 247 248 $this->assertSame( '%s razpoložljiva posodobitev', _n( '%s update available', '%s updates available', '1', 'wp-tests-domain' ) ); // 1, 101, 201 242 249 $this->assertSame( '%s razpoložljiva posodobitev', _n( '%s update available', '%s updates available', 101, 'wp-tests-domain' ) ); // 1, 101, 201 243 250 $this->assertSame( '%s razpoložljivi posodobitvi', _n( '%s update available', '%s updates available', 102, 'wp-tests-domain' ) ); // 2, 102, 202 244 251 $this->assertSame( '%s razpoložljive posodobitve', _n( '%s update available', '%s updates available', 103, 'wp-tests-domain' ) ); // 3, 4, 103 245 252 $this->assertSame( '%s razpoložljivih posodobitev', _n( '%s update available', '%s updates available', 5, 'wp-tests-domain' ) ); // 0, 5, 6 253 254 // Test with strings that are not in the translation files. 255 $this->assertSame( 'Singular', _n( 'Singular', 'Plural', 1, 'wp-tests-domain' ) ); 256 $this->assertSame( 'Singular', _n( 'Singular', 'Plural', '1', 'wp-tests-domain' ) ); 257 $this->assertSame( 'Plural', _n( 'Singular', 'Plural', 2, 'wp-tests-domain' ) ); 246 258 } 247 259
Note: See TracChangeset
for help on using the changeset viewer.