/** * {@inheritdoc} */ protected function setUpLanguage() { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', $this->getPo('es')); parent::setUpLanguage(); }
/** * {@inheritdoc} */ protected function setUpLanguage() { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.eo.po', $this->getPo('eo')); parent::setUpLanguage(); $this->translations['Save and continue'] = 'Save and continue eo'; }
/** * {@inheritdoc} */ protected function setUpLanguage() { // Place custom local translations in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Save and continue German\""); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Save and continue Spanish\""); parent::setUpLanguage(); }
/** * Installer step: Select language. */ protected function setUpLanguage() { // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and // metatags as expected to the first page of the installer. $this->assertRaw('core/themes/seven/css/components/buttons.css'); $this->assertRaw('<meta charset="utf-8" />'); parent::setUpLanguage(); }
/** * Overrides InstallerTest::setUpLanguage(). */ protected function setUpLanguage() { // Verify that the distribution name appears. $this->assertRaw($this->info['distribution']['name']); // Verify that the requested theme is used. $this->assertRaw($this->info['distribution']['install']['theme']); // Verify that the "Choose profile" step does not appear. $this->assertNoText('profile'); parent::setUpLanguage(); }
/** * Installer step: Select language. */ protected function setUpLanguage() { // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and // metatags as expected to the first page of the installer. $this->assertRaw('core/themes/seven/css/components/buttons.css'); $this->assertRaw('<meta charset="utf-8" />'); // Assert that the expected title is present. $this->assertEqual('Choose language', $this->cssSelect('main h1')[0]); parent::setUpLanguage(); }
/** * Overrides InstallerTest::setUpLanguage(). */ protected function setUpLanguage() { // Place a custom local translation in the translations directory. mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Save and continue German\""); parent::setUpLanguage(); // After selecting a different language than English, all following screens // should be translated already. $elements = $this->xpath('//input[@type="submit"]/@value'); $this->assertEqual((string) current($elements), 'Save and continue German'); $this->translations['Save and continue'] = 'Save and continue German'; // Check the language direction. $direction = (string) current($this->xpath('/html/@dir')); $this->assertEqual($direction, 'ltr'); }
/** * {@inheritdoc} */ protected function setUpLanguage() { // Place a custom local translation in the translations directory. mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.ar.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Save and continue Arabic\""); parent::setUpLanguage(); // After selecting a different language than English, all following screens // should be translated already. $elements = $this->xpath('//input[@type="submit"]/@value'); $this->assertEqual((string) current($elements), 'Save and continue Arabic'); $this->translations['Save and continue'] = 'Save and continue Arabic'; // Verify that language direction is right-to-left. $direction = (string) current($this->xpath('/html/@dir')); $this->assertEqual($direction, 'rtl'); }
/** * Installer step: Select language. */ protected function setUpLanguage() { // Place a custom local translation in the translations directory. mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); touch(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po'); // Check that all predefined languages show up with their native names. $this->drupalGet($GLOBALS['base_url'] . '/core/install.php'); foreach (LanguageManager::getStandardLanguageList() as $langcode => $names) { $this->assertOption('edit-langcode', $langcode); $this->assertRaw('>' . $names[1] . '<'); } // Check that our custom one shows up with the file name indicated language. $this->assertOption('edit-langcode', 'xoxo'); $this->assertRaw('>xoxo<'); parent::setUpLanguage(); }
/** * Overrides InstallerTest::setUpLanguage(). */ protected function setUpLanguage() { parent::setUpLanguage(); // After selecting a different language than English, all following screens // should be translated already. // @todo Instead of actually downloading random translations that cannot be // asserted, write and supply a German translation file. Until then, take // over whichever string happens to be there, but ensure that the English // string no longer appears. $elements = $this->xpath('//input[@type="submit"]/@value'); $string = (string) current($elements); $this->assertNotEqual($string, 'Save and continue'); $this->translations['Save and continue'] = $string; // Check the language direction. $direction = (string) current($this->xpath('/html/@dir')); $this->assertEqual($direction, 'ltr'); }
/** * {@inheritdoc} */ protected function setUpLanguage() { // Verify that the distribution name appears. $this->assertRaw('thunder'); // Verify that the "Choose profile" step does not appear. $this->assertNoText('profile'); parent::setUpLanguage(); }