function InstallerTranslationMultipleLanguageNonInteractiveTest::getPo

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationMultipleLanguageNonInteractiveTest::getPo()
  2. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationMultipleLanguageNonInteractiveTest::getPo()

Returns the string for the test .po file.

Parameters

string $langcode: The language code.

Return value

string Contents for the test .po file.

2 calls to InstallerTranslationMultipleLanguageNonInteractiveTest::getPo()
InstallerTranslationMultipleLanguageNonInteractiveTest::prepareEnvironment in core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php
Prepares the current environment for running the test.
InstallerTranslationNonStandardFilenamesTest::prepareEnvironment in core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php
Prepares the current environment for running the test.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php, line 50

Class

InstallerTranslationMultipleLanguageNonInteractiveTest
Tests translation files for multiple languages get imported during install.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function getPo($langcode) {
    return <<<PO
msgid ""
msgstr ""

msgid "Save and continue"
msgstr "Save and continue {<span class="php-variable">$langcode</span>}"

msgid "Anonymous"
msgstr "Anonymous {<span class="php-variable">$langcode</span>}"

msgid "Language"
msgstr "Language {<span class="php-variable">$langcode</span>}"

#: Testing site name configuration during the installer.
msgid "Drupal"
msgstr "Drupal"
PO;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.