You are here

public function LocalePluralFormatTest::getPoFileWithMissingPlural in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php \Drupal\Tests\locale\Functional\LocalePluralFormatTest::getPoFileWithMissingPlural()

Returns a .po file with a missing plural formula.

1 call to LocalePluralFormatTest::getPoFileWithMissingPlural()
LocalePluralFormatTest::testGetPluralFormat in core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
Tests locale_get_plural() and \Drupal::translation()->formatPlural() functionality.

File

core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php, line 452

Class

LocalePluralFormatTest
Tests plural handling for various languages.

Namespace

Drupal\Tests\locale\Functional

Code

public function getPoFileWithMissingPlural() {
  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"

msgid "Monday"
msgstr "lundi"
EOF;
}