Problem

In #2003892: Convert date formats to config entities, the date formats have been moved from system.date.yml to their own config entity files. We need to cover this in config schema.

1. Remove date format related pieces from system.date.yml config.
2. Introduce config schema for date formats.

Files: 
CommentFileSizeAuthor
#7 2038285-config-schema-date-format-7.patch2.76 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 57,203 pass(es). View
#5 2038285-config-schema-date-format-5.patch2.14 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 57,004 pass(es). View
#5 2038285-diff-2-5.txt499 bytesvijaycs85
#2 2038385-config-schema-date-format-2.patch2.15 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View
#2 2038385-diff-1-2.txt1.01 KBvijaycs85
#2 system.date_format.long_.png49.21 KBvijaycs85
#3 system.date_format.long-3.png36.76 KBvijaycs85
#3 2038285-config-schema-date-format-3.patch2.06 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View
#3 2038285-diff-2-3.txt781 bytesvijaycs85
#1 date-format-schema.patch2.04 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 57,025 pass(es). View

Comments

Gábor Hojtsy’s picture

Status: Active » Needs review
Issue tags: +sprint
FileSize
2.04 KB
PASSED: [[SimpleTest]]: [MySQL] 57,025 pass(es). View

Here is a quick first pass. I did not check if it works or not :) I propose we do not keep the separate data type, since we don't need to reuse it elsewhere and now the date format itself is a config entity, so it is a data type in itself.

vijaycs85’s picture

FileSize
49.21 KB
1.01 KB
2.15 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View

Updating with few label changes and config_inspector screenshot.

vijaycs85’s picture

FileSize
781 bytes
2.06 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View
36.76 KB

After discussed with @Gábor Hojtsy on IRC and looked at DateFormat.php, found that D8 supports only two patterns DrupalDateTime::PHP and DrupalDateTime::INTL and both will be string. So updating pattern to work for both without any date_format.pattern.php or date_format.pattern.intl

Ignore this patch. patch in #2 is the correct one.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Reviewed #2

+++ b/core/modules/system/config/schema/system.schema.ymlundefined
@@ -90,12 +90,45 @@ system.date:
+      label: 'Select localizations'

Can we make this "Languages" on the user interface and here too? Its not localizations as all...

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
499 bytes
2.14 KB
PASSED: [[SimpleTest]]: [MySQL] 57,004 pass(es). View

Updated label in schema here and created new issue for form label update: #2040123: Update 'Select localizations' label in DateFormat to 'Languages'

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Yay! Looks good!

Gábor Hojtsy’s picture

Issue tags: +blocker
FileSize
2.76 KB
PASSED: [[SimpleTest]]: [MySQL] 57,203 pass(es). View

Merged with #2040123: Update 'Select localizations' label in DateFormat to 'Languages' since it uses the same labeling and the two committed separately may have a problem of introducing UI inconsistencies. Still RTBC since that was also RTBC.

Also marking a blocker of config translation (#1952394: Add configuration translation user interface module in core) because this cannot yet be integrated with that until the schemas are fixed.

vijaycs85’s picture

Looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 92f74b2 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gábor Hojtsy’s picture

Issue tags: -sprint

Removing sprint tag.