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.

Comments

gábor hojtsy’s picture

Indeed, looks like a bug.

segi’s picture

Status: Active » Needs review
StatusFileSize
new907 bytes

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

StatusFileSize
new906 bytes

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.