Loading core/modules/views/config/schema/views.data_types.schema.yml +2 −2 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ views_display: type: string label: 'Link display' link_url: type: string type: text label: 'Link URL' header: type: sequence Loading Loading @@ -467,7 +467,7 @@ views_field: type: boolean label: 'Output this field as a custom link' path: type: string type: text label: 'Link path' absolute: type: boolean Loading core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php +28 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,34 @@ public function testTranslatedStrings() { $this->drupalGet($edit_url, ['language' => \Drupal::languageManager()->getLanguage('fr')]); $this->assertSession()->titleEquals('Files (File) | Drupal'); $this->assertSession()->pageTextNotContains('Fichiers'); // Ensure that "Link URL" and "Link Path" fields are translatable. // First, Add the block display and change pager's 'link display' to // custom URL. // Second, change filename to use plain text and rewrite output with link. $this->drupalGet($edit_url); $this->submitForm([], 'Add Block'); $this->drupalGet('admin/structure/views/nojs/display/files/block_1/link_display'); $edit = [ 'link_display' => 'custom_url', 'link_url' => '/node', ]; $this->submitForm($edit, 'Apply'); $this->submitForm([], 'Save'); $this->drupalGet('admin/structure/views/nojs/handler/files/block_1/field/filename'); $edit = [ 'override[dropdown]' => 'block_1', 'options[type]' => 'string', 'options[alter][path]' => '/node', 'options[alter][make_link]' => 1, ]; $this->submitForm($edit, 'Apply'); $this->submitForm([], 'Save'); // Visit the translation page and ensure that field exists. $this->drupalGet($translation_url); $this->assertSession()->fieldExists('translation[config_names][views.view.files][display][block_1][display_options][fields][filename][alter][path]'); $this->assertSession()->fieldExists('translation[config_names][views.view.files][display][default][display_options][link_url]'); } } Loading
core/modules/views/config/schema/views.data_types.schema.yml +2 −2 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ views_display: type: string label: 'Link display' link_url: type: string type: text label: 'Link URL' header: type: sequence Loading Loading @@ -467,7 +467,7 @@ views_field: type: boolean label: 'Output this field as a custom link' path: type: string type: text label: 'Link path' absolute: type: boolean Loading
core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php +28 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,34 @@ public function testTranslatedStrings() { $this->drupalGet($edit_url, ['language' => \Drupal::languageManager()->getLanguage('fr')]); $this->assertSession()->titleEquals('Files (File) | Drupal'); $this->assertSession()->pageTextNotContains('Fichiers'); // Ensure that "Link URL" and "Link Path" fields are translatable. // First, Add the block display and change pager's 'link display' to // custom URL. // Second, change filename to use plain text and rewrite output with link. $this->drupalGet($edit_url); $this->submitForm([], 'Add Block'); $this->drupalGet('admin/structure/views/nojs/display/files/block_1/link_display'); $edit = [ 'link_display' => 'custom_url', 'link_url' => '/node', ]; $this->submitForm($edit, 'Apply'); $this->submitForm([], 'Save'); $this->drupalGet('admin/structure/views/nojs/handler/files/block_1/field/filename'); $edit = [ 'override[dropdown]' => 'block_1', 'options[type]' => 'string', 'options[alter][path]' => '/node', 'options[alter][make_link]' => 1, ]; $this->submitForm($edit, 'Apply'); $this->submitForm([], 'Save'); // Visit the translation page and ensure that field exists. $this->drupalGet($translation_url); $this->assertSession()->fieldExists('translation[config_names][views.view.files][display][block_1][display_options][fields][filename][alter][path]'); $this->assertSession()->fieldExists('translation[config_names][views.view.files][display][default][display_options][link_url]'); } }