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. 8.9.x 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 51

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 <<<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>}"
PO;
}

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