diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php index f68c12d..21c8a7c 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php @@ -58,8 +58,8 @@ class TimestampAgoFormatter extends FormatterBase implements ContainerFactoryPlu * @param \Drupal\Core\Datetime\DateFormatter $date_formatter * The date formatter service. */ - public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, $settings_mangcode, DateFormatter $date_formatter) { - parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $settings_mangcode); + public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, $settings_langcode, DateFormatter $date_formatter) { + parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $settings_langcode); $this->dateFormatter = $date_formatter; } @@ -77,7 +77,7 @@ public static function create(ContainerInterface $container, array $configuratio $configuration['label'], $configuration['view_mode'], $configuration['third_party_settings'], - $configuration['settings_mangcode'], + $configuration['settings_langcode'], $container->get('date.formatter') ); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php index eb26f9c..719164a 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php @@ -127,16 +127,20 @@ public function testEntityDisplaySettings() { $expected['settings'] = array( 'thousand_separator' => ',', 'prefix_suffix' => TRUE, + 'format_plural' => FALSE, + 'format_plural_string' => '1' . LOCALE_PLURAL_DELIMITER . '@count' ); $component = $display->getComponent('field_test_two'); $this->assertIdentical($expected, $component); $expected['weight'] = 2; $expected['type'] = 'number_decimal'; $expected['settings'] = array( - 'scale' => 2, - 'decimal_separator' => '.', - 'thousand_separator' => ',', - 'prefix_suffix' => TRUE, + 'scale' => 2, + 'decimal_separator' => '.', + 'thousand_separator' => ',', + 'prefix_suffix' => TRUE, + 'format_plural' => FALSE, + 'format_plural_string' => '1' . LOCALE_PLURAL_DELIMITER . '@count' ); $component = $display->getComponent('field_test_three'); $this->assertIdentical($expected, $component); diff --git a/core/modules/views/src/Plugin/views/field/Field.php b/core/modules/views/src/Plugin/views/field/Field.php index 4937348..137221c 100644 --- a/core/modules/views/src/Plugin/views/field/Field.php +++ b/core/modules/views/src/Plugin/views/field/Field.php @@ -479,7 +479,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { 'type' => $format, 'settings' => $settings, // @todo could use double-check from dawehner / plach :-) - 'settings_langcode' => $this->view->storage->language()->id(), + 'settings_langcode' => $this->view->storage->language()->getId(), 'label' => '', 'weight' => 0, ),