Skip to content
Snippets Groups Projects
Commit eeab24a3 authored by Alex Pott's avatar Alex Pott
Browse files

Revert "Issue #2609874 by tstoeckler, Kristen Pol, tassilogroeper: Boolean...

Revert "Issue #2609874 by tstoeckler, Kristen Pol, tassilogroeper: Boolean field "On label" and "Off label" are not translatable"

This reverts commit 96dc18e8.
parent 96dc18e8
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -605,10 +605,10 @@ field.field_settings.boolean: ...@@ -605,10 +605,10 @@ field.field_settings.boolean:
type: mapping type: mapping
mapping: mapping:
on_label: on_label:
type: label type: string
label: 'On label' label: 'On label'
off_label: off_label:
type: label type: string
label: 'Off label' label: 'Off label'
field.value.boolean: field.value.boolean:
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace Drupal\config_translation\Tests; namespace Drupal\config_translation\Tests;
use Drupal\Component\Serialization\Json; use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup; use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\Unicode;
use Drupal\Core\Language\Language; use Drupal\Core\Language\Language;
...@@ -734,42 +733,6 @@ public function testFieldConfigTranslation() { ...@@ -734,42 +733,6 @@ public function testFieldConfigTranslation() {
$this->assertEscaped($translatable_storage_setting); $this->assertEscaped($translatable_storage_setting);
} }
/**
* Tests the translation of a boolean field settings.
*/
public function testBooleanFieldConfigTranslation() {
// Add a test boolean field.
$field_name = strtolower($this->randomMachineName());
FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',
'type' => 'boolean',
])->save();
$bundle = strtolower($this->randomMachineName());
entity_test_create_bundle($bundle);
$field = FieldConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',
'bundle' => $bundle,
]);
$on_label = $this->randomString();
$field->setSetting('on_label', $on_label);
$off_label = $this->randomString();
$field->setSetting('off_label', $off_label);
$field->save();
$this->drupalLogin($this->translatorUser);
$this->drupalGet("/entity_test/structure/$bundle/fields/entity_test.$bundle.$field_name/translate");
$this->clickLink('Add');
$this->assertText(Html::escape($on_label) . ' Boolean settings');
$this->assertEscaped($on_label);
$this->assertEscaped($off_label);
}
/** /**
* Test translation storage in locale storage. * Test translation storage in locale storage.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment