function ConfigTranslationInstallTest::getPo

Same name in other branches
  1. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::getPo()
  2. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::getPo()
  3. 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::getPo()

Returns the string for the test .po file.

Parameters

string $langcode: The language code.

Return value

string Contents for the test .po file.

1 call to ConfigTranslationInstallTest::getPo()
ConfigTranslationInstallTest::setUpLanguage in core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
Installer step: Select language.

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php, line 46

Class

ConfigTranslationInstallTest
Installs the config translation module on a site installed in non english.

Namespace

Drupal\Tests\config_translation\Functional

Code

protected function getPo($langcode) {
    return <<<ENDPO
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>}"
ENDPO;
}

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