Skip to content

Commit 1fc6ce5

Browse files
committed
Fixed language localization.
1 parent b541da3 commit 1fc6ce5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

assets/js/localization.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ var localizedLanguageCodes /*: {[string]: string} */ = {}, localizedLanguageName
1313

1414
/* global config, getPairs, getGenerators, getAnalyzers, persistChoices, getURLParam, cache, ajaxSend, ajaxComplete, sendEvent,
1515
srcLangs, dstLangs, generators, analyzers, readCache, modeEnabled, populateTranslationList, populateGeneratorList,
16-
populateAnalyzerList, analyzerData, generatorData, curSrcLang, curDstLang, restoreChoices, refreshLangList, onlyUnique,
17-
getSpellers */
16+
populateAnalyzerList, populatePrimarySpellCheckerList, analyzerData, generatorData, spellerData, curSrcLang, curDstLang,
17+
restoreChoices, refreshLangList, onlyUnique, getSpellers */
1818

1919
var dynamicLocalizations /*: {[lang: string]: {[string]: string}} */ = {
2020
'fallback': {
@@ -310,6 +310,9 @@ function localizeLanguageNames(localizedNamesFromJSON) {
310310
if(modeEnabled('analyzation')) {
311311
populateAnalyzerList(analyzerData);
312312
}
313+
if(modeEnabled('spellchecking')) {
314+
populatePrimarySpellCheckerList(spellerData);
315+
}
313316
}
314317
}
315318

@@ -385,7 +388,8 @@ function localizeInterface() {
385388
'#originalText': curSrcLang,
386389
'#translatedText': curDstLang,
387390
'#morphAnalyzerInput': $('#primaryAnalyzerMode').val(),
388-
'#morphGeneratorInput': $('#primaryGeneratorMode').val()
391+
'#morphGeneratorInput': $('#primaryGeneratorMode').val(),
392+
'#spellCheckerInput': $('#primarySpellCheckerMode').val()
389393
};
390394

391395
$.each(elements, function (selector, lang /*: string */) {
@@ -433,4 +437,4 @@ function setLocale(newLocale /*: string */) {
433437
/*:: import {generatorData, generators, getGenerators, populateGeneratorList} from "./generator.js" */
434438
/*:: import {analyzerData, analyzers, getAnalyzers, populateAnalyzerList} from "./analyzer.js" */
435439
/*:: import {cache, persistChoices, readCache, restoreChoices} from "./persistence.js" */
436-
/*:: import {getSpellers} from "./spellchecker.js" */
440+
/*:: import {getSpellers, populatePrimarySpellCheckerList, spellerData} from "./spellchecker.js" */

assets/js/spellchecker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var spellers = {}, spellerData = {};
44
var currentSpellCheckerRequest;
55

6-
/* exported getSpellers */
6+
/* exported getSpellers, spellerData */
77
/* global config, modeEnabled, persistChoices, readCache, ajaxSend, ajaxComplete, filterLangPairList, allowedLang, cache,
88
localizeInterface, getLangByCode, restoreChoices, callApy */
99
/* global ENTER_KEY_CODE */
@@ -227,7 +227,7 @@ function spellCheckerNotAvailable(data) {
227227
$('#spellCheckerInput').append($('<div></div>').text(data.explanation));
228228
}
229229

230-
/*:: export {getSpellers} */
230+
/*:: export {getSpellers, spellerData} */
231231

232232
/*:: import {modeEnabled, ajaxSend, ajaxComplete, allowedLang, filterLangPairList, callApy, ENTER_KEY_CODE} from "./util.js" */
233233
/*:: import {persistChoices, restoreChoices} from "./persistence.js" */

0 commit comments

Comments
 (0)