Opened 11 years ago

Closed 11 years ago

#9688 closed Bug (fixed)

Wrong translation is loaded when translation is not vailable

Reported by: Wiktor Walc Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 4.0
Component: UI : Language Version: 4.0 Beta
Keywords: Cc:

Description

When opening a plugin with its own language files, and the selected language is not available, the first available translation is loaded.

Which means that the same instance is using: user language (e.g. Italian) AND Afrikaans, Arabic, Bulgarian etc.

To reproduce, take the uicolor plugin, remove "it" from "lang" property, configure the Italian language to be the default one and launch samples/uicolor.html

Happens both, in source and release version.

Change History (13)

comment:1 Changed 11 years ago by Wiktor Walc

Milestone: CKEditor 4.0

comment:2 Changed 11 years ago by Garry Yao

Component: GeneralUI : Language
Owner: set to Garry Yao
Status: newassigned

comment:3 Changed 11 years ago by Garry Yao

Status: assignedreview

Opened dev branch t/9688 for review.

Language probing feature is now added to plugin language loading, although plugin language loading requires further simplification I'd not propose them in this patch.

Last edited 11 years ago by Garry Yao (previous) (diff)

comment:4 Changed 11 years ago by Piotrek Koszuliński

Status: reviewreview_failed

It'd be unwise to masterise today branch with these stats:

 core/editor.js                |   17 ++++++++---------
 core/lang.js                  |   35 ++++++++++++++++++++++-------------
 core/tools.js                 |   16 ++++++++++++++++
 plugins/a11yhelp/plugin.js    |    8 ++++----
 plugins/specialchar/plugin.js |    9 ++++-----

If possible, simpler fix should be proposed.

Last edited 11 years ago by Piotrek Koszuliński (previous) (diff)

comment:5 Changed 11 years ago by Piotrek Koszuliński

Owner: changed from Garry Yao to Piotrek Koszuliński
Status: review_failedassigned

comment:6 Changed 11 years ago by Piotrek Koszuliński

Status: assignedreview

Pushed t/9688b with very simple fix. If there's no translation for current editor's language, it tries to load english and if that fails, first one.

comment:7 Changed 11 years ago by Garry Yao

Status: reviewreview_failed

t/9688b is OK...but it doesn't help that much on the issue:

  1. "En" doesn't have to be the default language configured by user.
  2. There's no fix for the language entries of plugin dialog.
  3. There's no fallback for local languages with non-local version. (zh-cn -> zh)

comment:8 Changed 11 years ago by Garry Yao

Owner: changed from Piotrek Koszuliński to Garry Yao
Status: review_failedreview

I hope a review can be still taken on t/9688, in fact it's not actually a big change, it's not more than a signature change.

comment:9 Changed 11 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

Indeed, t/9688 is not acceptable at this stage.

comment:10 Changed 11 years ago by Frederico Caldeira Knabben

Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: review_failedassigned

comment:11 Changed 11 years ago by Frederico Caldeira Knabben

Status: assignedreview

t/9688b is good, but in fact misses the fallback feature. I've just pushed this.

comment:12 Changed 11 years ago by Garry Yao

Status: reviewreview_passed

comment:13 Changed 11 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: review_passedclosed

Fixed with git:e096626.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy