Opened 12 years ago
Closed 12 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 12 years ago by
Milestone: | → CKEditor 4.0 |
---|
comment:2 Changed 12 years ago by
Component: | General → UI : Language |
---|---|
Owner: | set to Garry Yao |
Status: | new → assigned |
comment:3 Changed 12 years ago by
Status: | assigned → review |
---|
comment:4 Changed 12 years ago by
Status: | review → review_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.
comment:5 Changed 12 years ago by
Owner: | changed from Garry Yao to Piotrek Koszuliński |
---|---|
Status: | review_failed → assigned |
comment:6 Changed 12 years ago by
Status: | assigned → review |
---|
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 12 years ago by
Status: | review → review_failed |
---|
t/9688b is OK...but it doesn't help that much on the issue:
- "En" doesn't have to be the default language configured by user.
- There's no fix for the language entries of plugin dialog.
- There's no fallback for local languages with non-local version. (zh-cn -> zh)
comment:8 Changed 12 years ago by
Owner: | changed from Piotrek Koszuliński to Garry Yao |
---|---|
Status: | review_failed → review |
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 12 years ago by
Status: | review → review_failed |
---|
Indeed, t/9688 is not acceptable at this stage.
comment:10 Changed 12 years ago by
Owner: | changed from Garry Yao to Frederico Caldeira Knabben |
---|---|
Status: | review_failed → assigned |
comment:11 Changed 12 years ago by
Status: | assigned → review |
---|
t/9688b is good, but in fact misses the fallback feature. I've just pushed this.
comment:12 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:13 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:e096626.
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.