summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-07-18 21:46:37 (GMT)
committer Alex Pott2013-07-18 21:46:37 (GMT)
commit92f74b2824b4d8ff8438600cde8771df24099c58 (patch)
treee64eb21f2d7a23c53c4a9cc10187976067a12724
parent982488c3dfc6ee695f7230e99d05b5bbe6439a93 (diff)
Issue #2038285 by vijaycs85, Gábor Hojtsy: Update configuration schema for date formats as entities.
-rw-r--r--core/modules/system/config/schema/system.data_types.schema.yml22
-rw-r--r--core/modules/system/config/schema/system.schema.yml41
-rw-r--r--core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php2
3 files changed, 38 insertions, 27 deletions
diff --git a/core/modules/system/config/schema/system.data_types.schema.yml b/core/modules/system/config/schema/system.data_types.schema.yml
index 15e4c63..7c5a420 100644
--- a/core/modules/system/config/schema/system.data_types.schema.yml
+++ b/core/modules/system/config/schema/system.data_types.schema.yml
@@ -78,25 +78,3 @@ filter:
status:
type: boolean
label: 'Enabled'
-
-# Date format with name and pattern.
-date_format:
- type: mapping
- label: 'Date Format'
- mapping:
- name:
- type: label
- label: 'Name'
- pattern:
- type: mapping
- label: 'Format string'
- mapping:
- php:
- type: label
- label: 'PHP date format'
- intl:
- type: label
- label: 'International'
- locked:
- type: boolean
- label: 'Locked'
diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml
index e0d9dce..d44927d 100644
--- a/core/modules/system/config/schema/system.schema.yml
+++ b/core/modules/system/config/schema/system.schema.yml
@@ -90,12 +90,45 @@ system.date:
default:
type: string
label: 'Default country'
- formats:
+ langcode:
+ type: string
+ label: 'Default language'
+
+system.date_format.*:
+ type: mapping
+ label: 'Date format'
+ mapping:
+ id:
+ type: string
+ label: 'Date format identifier'
+ uuid:
+ type: string
+ label: 'UUID'
+ label:
+ type: label
+ label: 'Date format label'
+ status:
+ type: boolean
+ label: 'Enabled'
+ locked:
+ type: boolean
+ label: 'Locked'
+ locales:
type: sequence
- label: 'Date formats'
+ label: 'Languages'
sequence:
- - type: date_format
- label: 'Date format'
+ - type: string
+ label: 'Language'
+ pattern:
+ type: mapping
+ label: 'Format string'
+ mapping:
+ php:
+ type: string
+ label: 'PHP date format'
+ intl:
+ type: string
+ label: 'Intl date format'
langcode:
type: string
label: 'Default language'
diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
index 4d347c5..d6aac67 100644
--- a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
+++ b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
@@ -171,7 +171,7 @@ abstract class DateFormatFormBase extends EntityFormController implements Entity
if (!empty($options)) {
$form['locales'] = array(
- '#title' => t('Select localizations'),
+ '#title' => t('Languages'),
'#type' => 'select',
'#options' => $options,
'#multiple' => TRUE,