Commit ec9d52ba authored by alexpott's avatar alexpott

Issue #2017475 by rodrigoaguilera, Outi, balagan: Multilingual tour for...

Issue #2017475 by rodrigoaguilera, Outi, balagan: Multilingual tour for interface translation section.
parent 85392bfe
id: locale
module: locale
label: 'Translation'
langcode: en
routes:
- route_name: locale.translate_page
tips:
locale-overview:
id: locale-overview
plugin: text
label: 'User interface translation'
body: 'This page allows you to translate the user interface or modify existing translations. If you have installed your site initially in English, you must first add another language on the <a href="[site:url]/admin/config/regional/language">Languages page</a>, in order to use this page.'
weight: 1
locale-language:
id: locale-language
plugin: text
label: 'Translation language'
body: 'Choose the language you want to translate.'
weight: 2
attributes:
data-id: edit-langcode
locale-search:
id: locale-search
plugin: text
label: 'Search'
body: 'Enter the specific word or sentence you want to translate, you can also write just a part of a word.'
weight: 3
attributes:
data-id: edit-string
locale-filter:
id: locale-filter
plugin: text
label: 'Filter the search'
body: 'You can search for untranslated strings if you want to translate something that isn''t translated yet. If you want to modify an existing translation, you might want to search only for translated strings.'
weight: 4
attributes:
data-id: edit-translation
locale-submit:
id: locale-submit
plugin: text
label: 'Apply your search criteria'
body: 'To apply your search criteria, click on the <em>Filter</em> button.'
weight: 5
attributes:
data-id: edit-submit
locale-translate:
id: locale-translate
plugin: text
label: 'Translate'
body: 'You can write your own translation in the text fields of the right column. Try to figure out in which context the text will be used in order to translate it in the appropriate way.'
weight: 6
attributes:
data-class: form-type-textarea
locale-validate:
id: locale-validate
plugin: text
label: 'Validate the translation'
body: 'When you have finished your translations, click on the <em>Save translations</em> button. You must save your translations, each time before changing the page or making a new search.'
weight: 7
attributes:
data-id: edit-submit--2
locale-continue:
id: locale-continue
plugin: text
label: 'Continuing on'
body: 'The translations you have made here will be used on your site''s user interface. If you want to use them on another site or modify them on an external translation editor, you can <a href="[site:url]/admin/config/regional/translate/export">export them</a> to a .po file and <a href="[site:url]/admin/config/regional/translate/import">import them</a> later.'
weight: 8
dependencies:
module:
- locale
<?php
/**
* @file
* Contains \Drupal\locale\Tests\LocaleTranslateStringTourTest.
*/
namespace Drupal\locale\Tests;
use Drupal\tour\Tests\TourTestBase;
/**
* Tests tour functionality.
*/
class LocaleTranslateStringTourTest extends TourTestBase {
/**
* An admin user with administrative permissions to translate.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('locale', 'tour');
public static function getInfo() {
return array(
'name' => 'Translate Interface tour tests',
'description' => 'Tests the Translate Interface tour.',
'group' => 'Tour',
);
}
protected function setUp() {
parent::setUp();
$this->adminUser = $this->drupalCreateUser(array('translate interface', 'access tour', 'administer languages'));
$this->drupalLogin($this->adminUser);
}
/**
* Tests locale tour tip availability.
*/
public function testTranslateStringTourTips() {
// Add Another Language so there is no missing form items
$edit = array();
$edit['predefined_langcode'] = 'es';
$this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
$this->drupalGet('admin/config/regional/translate');
$this->assertTourTips();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment