function LocalePluralFormatTest::getPoFileWithSimplePlural

Returns a .po file with a simple plural formula.

2 calls to LocalePluralFormatTest::getPoFileWithSimplePlural()
LocalePluralFormatTest::testGetPluralFormat in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
Tests locale_get_plural() and format_plural() functionality.
LocalePluralFormatTest::testPluralEditExport in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
Tests plural editing and export functionality.

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php, line 279
Definition of Drupal\locale\Tests\LocalePluralFormatTest.

Class

LocalePluralFormatTest
Tests plural format handling functionality.

Namespace

Drupal\locale\Tests

Code

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 "Monday"
msgstr "lundi"
EOF;
}