diff --git a/core/modules/system/src/Plugin/views/field/BulkForm.php b/core/modules/system/src/Plugin/views/field/BulkForm.php index 7270571..f4a2545 100644 --- a/core/modules/system/src/Plugin/views/field/BulkForm.php +++ b/core/modules/system/src/Plugin/views/field/BulkForm.php @@ -81,7 +81,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o */ protected function defineOptions() { $options = parent::defineOptions(); - $options['action_title'] = array('default' => 'With selection'); + $options['action_title'] = array('default' => $this->t('With selection')); $options['include_exclude'] = array( 'default' => 'exclude', ); diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 760bae3..0cf49ae 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -173,7 +173,6 @@ protected function defineOptions() { return array(); } * - (optional) contains: An array which describes the available options * under the key. If contains is set, the default will be ignored and * assumed to be an empty array. - * - (optional) 'translatable': TRUE if it should be translated, else FALSE. * - (optional) 'bool': TRUE if the value is boolean, else FALSE. */ protected function setOptionDefaults(array &$storage, array $options) { diff --git a/core/modules/views/src/Plugin/views/area/Result.php b/core/modules/views/src/Plugin/views/area/Result.php index 8dd56d7..0182c06 100644 --- a/core/modules/views/src/Plugin/views/area/Result.php +++ b/core/modules/views/src/Plugin/views/area/Result.php @@ -28,7 +28,7 @@ protected function defineOptions() { $options = parent::defineOptions(); $options['content'] = array( - 'default' => 'Displaying @start - @end of @total', + 'default' => $this->t('Displaying @start - @end of @total'), ); return $options; diff --git a/core/modules/views/src/Plugin/views/display/Block.php b/core/modules/views/src/Plugin/views/display/Block.php index 391046c..9de84ef 100644 --- a/core/modules/views/src/Plugin/views/display/Block.php +++ b/core/modules/views/src/Plugin/views/display/Block.php @@ -85,7 +85,7 @@ protected function defineOptions() { $options = parent::defineOptions(); $options['block_description'] = array('default' => ''); - $options['block_category'] = array('default' => 'Lists (Views)'); + $options['block_category'] = array('default' => $this->t('Lists (Views)')); $options['block_hide_empty'] = array('default' => FALSE); $options['allow'] = array( diff --git a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php index 3652e8b..f9ba904 100644 --- a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -43,13 +43,13 @@ protected function defineOptions() { $options = parent::defineOptions(); - $options['submit_button'] = array('default' => 'Apply'); + $options['submit_button'] = array('default' => $this->t('Apply')); $options['reset_button'] = array('default' => FALSE); - $options['reset_button_label'] = array('default' => 'Reset'); - $options['exposed_sorts_label'] = array('default' => 'Sort by'); + $options['reset_button_label'] = array('default' => $this->t('Reset')); + $options['exposed_sorts_label'] = array('default' => $this->t('Sort by')); $options['expose_sort_order'] = array('default' => TRUE); - $options['sort_asc_label'] = array('default' => 'Asc'); - $options['sort_desc_label'] = array('default' => 'Desc'); + $options['sort_asc_label'] = array('default' => $this->t('Asc')); + $options['sort_desc_label'] = array('default' => $this->t('Desc')); return $options; } diff --git a/core/modules/views/src/Plugin/views/exposed_form/InputRequired.php b/core/modules/views/src/Plugin/views/exposed_form/InputRequired.php index f883a91..f6ab6bc 100644 --- a/core/modules/views/src/Plugin/views/exposed_form/InputRequired.php +++ b/core/modules/views/src/Plugin/views/exposed_form/InputRequired.php @@ -26,7 +26,7 @@ class InputRequired extends ExposedFormPluginBase { protected function defineOptions() { $options = parent::defineOptions(); - $options['text_input_required'] = array('default' => 'Select any filter and click on Apply to see results', 'translatable' => TRUE); + $options['text_input_required'] = array('default' => $this->t('Select any filter and click on Apply to see results')); $options['text_input_required_format'] = array('default' => NULL); return $options; } diff --git a/core/modules/views/src/Plugin/views/pager/Full.php b/core/modules/views/src/Plugin/views/pager/Full.php index 43a0ca7..3a522e8 100644 --- a/core/modules/views/src/Plugin/views/pager/Full.php +++ b/core/modules/views/src/Plugin/views/pager/Full.php @@ -34,8 +34,8 @@ protected function defineOptions() { // Use the same default quantity that core uses by default. $options['quantity'] = array('default' => 9); - $options['tags']['contains']['first'] = array('default' => '« first'); - $options['tags']['contains']['last'] = array('default' => 'last »'); + $options['tags']['contains']['first'] = array('default' => $this->t('« first')); + $options['tags']['contains']['last'] = array('default' => $this->t('last »')); return $options; } diff --git a/core/modules/views/src/Plugin/views/pager/SqlBase.php b/core/modules/views/src/Plugin/views/pager/SqlBase.php index cf81809..a3d0d22 100644 --- a/core/modules/views/src/Plugin/views/pager/SqlBase.php +++ b/core/modules/views/src/Plugin/views/pager/SqlBase.php @@ -23,19 +23,19 @@ protected function defineOptions() { $options['expose'] = array( 'contains' => array( 'items_per_page' => array('default' => FALSE), - 'items_per_page_label' => array('default' => 'Items per page'), + 'items_per_page_label' => array('default' => $this->t('Items per page')), 'items_per_page_options' => array('default' => '5, 10, 25, 50'), 'items_per_page_options_all' => array('default' => FALSE), - 'items_per_page_options_all_label' => array('default' => '- All -'), + 'items_per_page_options_all_label' => array('default' => $this->t('- All -')), 'offset' => array('default' => FALSE), - 'offset_label' => array('default' => 'Offset'), + 'offset_label' => array('default' => $this->t('Offset')), ), ); $options['tags'] = array( 'contains' => array( - 'previous' => array('default' => '‹ previous'), - 'next' => array('default' => 'next ›'), + 'previous' => array('default' => $this->t('‹ previous')), + 'next' => array('default' => $this->t('next ›')), ), ); return $options; diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php index ce5afb0..a302062 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display_extender/DisplayExtenderTest.php @@ -33,7 +33,7 @@ class DisplayExtenderTest extends DisplayExtenderPluginBase { protected function defineOptions() { $options = parent::defineOptions(); - $options['test_extender_test_option'] = ['default' => 'Empty']; + $options['test_extender_test_option'] = ['default' => $this->t('Empty')]; return $options; }