Commit 8f028e64 authored by alexpott's avatar alexpott

Issue #2533746 by Gábor Hojtsy, webflo, tstoeckler, Jose Reyero: Remove the...

Issue #2533746 by Gábor Hojtsy, webflo, tstoeckler, Jose Reyero: Remove the the ability to translate locked date formats (e.g. html_datetime)
parent ed3bc9bf
......@@ -421,9 +421,19 @@ core.date_format.*:
type: boolean
label: 'Locked'
type: date_format
type: core_date_format_pattern.[%parent.locked]
label: 'PHP date format'
# Unlocked date formats should use the translatable type.
type: date_format
label: 'Date format'
# Locked date formats are just used to transport the value.
type: string
label: 'Date format'
# Generic field settings schemas.
......@@ -282,8 +282,12 @@ protected function replaceVariable($value, $data) {
return $value;
elseif (!$parts) {
$value = $data[$name];
if (is_bool($value)) {
$value = (int) $value;
// If no more parts left, this is the final property.
return (string)$data[$name];
return (string) $value;
else {
// Get nested value and continue processing.
* @file
* Contains \Drupal\config_translation\Tests\ConfigTranslationDateFormatUiTest.
namespace Drupal\config_translation\Tests;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\simpletest\WebTestBase;
* Tests the content translation behaviours on date formats.
* @group config_translation
class ConfigTranslationDateFormatUiTest extends WebTestBase {
public static $modules = array(
protected function setUp() {
// Enable additional languages.
$langcodes = ['de', 'es'];
foreach ($langcodes as $langcode) {
$user = $this->drupalCreateUser(array(
'administer site configuration',
'translate configuration',
* Tests date format translation behaviour.
public function testDateFormatUI() {
// Assert translation link unlocked date format.
// Assert translation link locked date format.
// Date pattern is visible on unlocked date formats.
// Date pattern is not visible on locked date formats.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment