diff --git a/core/modules/locale/config/tour.tour.locale.yml b/core/modules/locale/config/tour.tour.locale.yml new file mode 100644 index 0000000000000000000000000000000000000000..e3f6d8d98f441386680dc56c907c38bdd3b8fd98 --- /dev/null +++ b/core/modules/locale/config/tour.tour.locale.yml @@ -0,0 +1,77 @@ +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 Languages page, 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 Filter 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 Save translations 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 export them to a .po file and import them later.' + weight: 8 +dependencies: + module: + - locale diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslateStringTourTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslateStringTourTest.php new file mode 100644 index 0000000000000000000000000000000000000000..10db3b94667d13d6f750cd5f06f94ef31131969d --- /dev/null +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslateStringTourTest.php @@ -0,0 +1,58 @@ + '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(); + } + +}