Problem/Motivation

1. The type of the direction value on languages says boolean, but in practice it is using the ltr and rtl constant from the Language class which are 0 and 1.
2. The recent casting of types based on schemas cast the default direction on English to 'false' due to (1) which is incorrect. This result in no radio button checked when editing English.

Proposed resolution

1. Change type to correct integer.
2. Change default English direction to default 0.

Remaining tasks

Review.

User interface changes

None.

API changes

None.

Files: 
CommentFileSizeAuthor
#4 language-direction_settings-2137599-4.patch906 bytessegi
PASSED: [[SimpleTest]]: [MySQL] 57,999 pass(es). View
#2 language-direction_settings-2137599-1.patch907 bytessegi
PASSED: [[SimpleTest]]: [MySQL] 57,979 pass(es). View

Comments

Gábor Hojtsy’s picture

Indeed, looks like a bug.

segi’s picture

Status: Active » Needs review
FileSize
907 bytes
PASSED: [[SimpleTest]]: [MySQL] 57,979 pass(es). View

I fixed the issue, please test it.

Gábor Hojtsy’s picture

+++ b/core/modules/language/config/schema/language.schema.yml
@@ -60,7 +60,7 @@ language.entity.*:
+      type: interger

Typo!

segi’s picture

FileSize
906 bytes
PASSED: [[SimpleTest]]: [MySQL] 57,999 pass(es). View

I fixed the typo! Thx, the review.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Based on this as well:

  /**
   * Language written left to right. Possible value of $language->direction.
   */
  const DIRECTION_LTR = 0;

  /**
   * Language written right to left. Possible value of $language->direction.
   */
  const DIRECTION_RTL = 1;
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Yay, thanks!

Status: Fixed » Closed (fixed)

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