function HelpTopicTranslatedTestBase::getTranslationFileContents

Same name and namespace in other branches
  1. 11.x core/modules/help/tests/src/Functional/HelpTopicTranslatedTestBase.php \Drupal\Tests\help\Functional\HelpTopicTranslatedTestBase::getTranslationFileContents()

Returns the contents of the translation file.

This method should be overridden by the test class to provide a translation file that will be used during the installation.

Return value

string The contents of the translation file.

Overrides InstallerLanguageTrait::getTranslationFileContents

File

core/modules/help/tests/src/Functional/HelpTopicTranslatedTestBase.php, line 71

Class

HelpTopicTranslatedTestBase
Provides a base class for functional help topic tests that use translation.

Namespace

Drupal\Tests\help\Functional

Code

protected function getTranslationFileContents() : string {
  return <<<PO
  msgid ""
  msgstr ""
  
  msgid "ABC Help Test module"
  msgstr "ABC-Hilfetestmodul"
  
  msgid "Test translation."
  msgstr "Übersetzung testen."
  
  msgid "Non-word-item to translate."
  msgstr "Non-word-german sdfwedrsdf."
  
  PO;
}

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