Opened 7 years ago

Closed 6 years ago

#10368 closed Bug (fixed)

Move language reading direction definition ("dir") from main language file to core

Reported by: Wiktor Walc Owned by: Piotr Jasiun
Priority: Normal Milestone: CKEditor 4.2.1
Component: UI : Language Version:
Keywords: Cc:

Description (last modified by Wiktor Walc)

It happens quite often that translators confuse the "dir" entry in main language file and try to translate it into something (e.g. between 4.1 and 4.1.1 releases two language files would get broken because of that).

Since we already store information about available language files in core/lang.js (CKEDITOR.lang), I'd like to propose moving this meta information about a language also to core.

Language files should contain only things that are supposed to be translated. Any other information should be moved outside of it.

Change History (10)

comment:1 Changed 7 years ago by Wiktor Walc

Description: modified (diff)

comment:2 Changed 7 years ago by Anna Tomanek

Status: newconfirmed

comment:3 Changed 7 years ago by Anna Tomanek

I can confirm that this used to happen quite often outside Transifex and still happens in Transifex even though we do have a comment to that string stating what the allowed values are.

comment:4 Changed 6 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.2.1

comment:5 Changed 6 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedassigned

comment:6 Changed 6 years ago by Piotr Jasiun

Status: assignedreview

comment:7 Changed 6 years ago by Olek Nowodziński

Status: reviewreview_failed
  • There's an unrelated commit in the branch (1765d6abb32c).
  • We could save some bytes by changing:
    languages: { 'af':1,'ar':1,'bg':1,'foo-bar':1 ... }
    
    to
    languages: { af:1,ar:1,bg:1,'foo-bar':1 ... }
    
  • CKEDITOR.lang.languages[ languageCode ]; in scriptLoader.load( ... ) is this.languages[ languageCode ]; (context passed to the loader, isn't it?).
  • We need CKEDITOR.lang.rtl for package builder (Wiktor will explain ;)

comment:8 Changed 6 years ago by Piotr Jasiun

Status: review_failedreview

I've separated list of supported languages and list of right-to-left languages. To save some bytes default is LTR and I keep only list of RTLs. I also fixed rest of issues.

comment:9 Changed 6 years ago by Olek Nowodziński

Status: reviewreview_passed

Pushed a very minor fix to the branch.

comment:10 Changed 6 years ago by Piotr Jasiun

Resolution: fixed
Status: review_passedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy