public function LocaleLookupTest::providerFixOldPluralTranslationProvider in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Unit/LocaleLookupTest.php \Drupal\Tests\locale\Unit\LocaleLookupTest::providerFixOldPluralTranslationProvider()
- 9 core/modules/locale/tests/src/Unit/LocaleLookupTest.php \Drupal\Tests\locale\Unit\LocaleLookupTest::providerFixOldPluralTranslationProvider()
Provides test data for testResolveCacheMissWithFallback().
File
- core/
modules/ locale/ tests/ src/ Unit/ LocaleLookupTest.php, line 324
Class
- LocaleLookupTest
- @coversDefaultClass \Drupal\locale\LocaleLookup @group locale
Namespace
Drupal\Tests\locale\UnitCode
public function providerFixOldPluralTranslationProvider() {
$translations = [
'by' => [
'word1' => '@count[2] word-by',
'word2' => implode(PoItem::DELIMITER, [
'word-by',
'@count[2] word-by',
]),
],
'ru' => [
'word3' => '@count[2] word-ru',
'word4' => implode(PoItem::DELIMITER, [
'word-ru',
'@count[2] word-ru',
]),
],
];
return [
'no-plural' => [
$translations,
'by',
'word1',
FALSE,
],
'no-plural from other language' => [
$translations,
'by',
'word3',
FALSE,
],
'plural' => [
$translations,
'by',
'word2',
TRUE,
],
'plural from other language' => [
$translations,
'by',
'word4',
TRUE,
],
];
}