(js) Fix SCAYT automatic language selection
parent
682f699e2f
commit
a02fa44dc7
1
NEWS
1
NEWS
|
@ -22,6 +22,7 @@ Bug fixes
|
|||
- [web] fixed handling of contact organizations (#4028)
|
||||
- [web] fixed handling of attachments in mail editor (#4058, #4063)
|
||||
- [web] fixed saving draft outside Mail module (#4071)
|
||||
- [web] fixed SCAYT automatic language selection in HTML editor
|
||||
|
||||
3.2.7 (2017-02-14)
|
||||
------------------
|
||||
|
|
|
@ -56,7 +56,16 @@
|
|||
if (attr.ckLocale) {
|
||||
locale = $parse(attr.ckLocale)($scope);
|
||||
options.language = locale;
|
||||
options.scayt_sLang = locale;
|
||||
|
||||
// Pickup the first matching language supported by SCAYT
|
||||
// See http://docs.ckeditor.com/#!/guide/dev_howtos_scayt
|
||||
options.scayt_sLang = _.find(['en_US', 'en_GB', 'pt_BR', 'da_DK', 'nl_NL', 'en_CA', 'fi_FI', 'fr_FR', 'fr_CA', 'de_DE', 'el_GR', 'it_IT', 'nb_NO', 'pt_PT', 'es_ES', 'sv_SE'], function(sLang) {
|
||||
return sLang.lastIndexOf(locale, 0) == 0;
|
||||
}) || 'en_US';
|
||||
|
||||
// Disable caching of the language
|
||||
// See https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/126
|
||||
options.scayt_disableOptionsStorage = 'lang';
|
||||
}
|
||||
|
||||
if (attr.ckMargin) {
|
||||
|
|
Loading…
Reference in New Issue