public function LocalePluralFormatTest::getPoFileWithSimplePlural in Drupal 9
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::getPoFileWithSimplePlural()
Returns a .po file with a simple plural formula.
3 calls to LocalePluralFormatTest::getPoFileWithSimplePlural()
- LocalePluralFormatTest::testGetPluralFormat in core/
modules/ locale/ tests/ src/ Functional/ LocalePluralFormatTest.php - Tests locale_get_plural() and \Drupal::translation()->formatPlural() functionality.
- LocalePluralFormatTest::testPluralEditDateFormatter in core/
modules/ locale/ tests/ src/ Functional/ LocalePluralFormatTest.php - Tests plural editing of DateFormatter strings.
- LocalePluralFormatTest::testPluralEditExport in core/
modules/ locale/ tests/ src/ Functional/ LocalePluralFormatTest.php - Tests plural editing and export functionality.
File
- core/
modules/ locale/ tests/ src/ Functional/ LocalePluralFormatTest.php, line 400
Class
- LocalePluralFormatTest
- Tests plural handling for various languages.
Namespace
Drupal\Tests\locale\FunctionalCode
public function getPoFileWithSimplePlural() {
return <<<EOF
msgid ""
msgstr ""
"Project-Id-Version: Drupal 8\\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
"Content-Transfer-Encoding: 8bit\\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\\n"
msgid "1 hour"
msgid_plural "@count hours"
msgstr[0] "@count heure"
msgstr[1] "@count heures"
msgid "1 second"
msgid_plural "@count seconds"
msgstr[0] "@count seconde"
msgstr[1] "@count secondes"
msgid "Monday"
msgstr "lundi"
EOF;
}