|
|
@ -1,11 +1,13 @@
|
|
|
|
define(['/customize/languageSelector.js',
|
|
|
|
define(['/customize/languageSelector.js',
|
|
|
|
'/customize/translations/messages.js',
|
|
|
|
'/customize/translations/messages.js',
|
|
|
|
|
|
|
|
//'/customize/translations/messages.es.js', // uncomment when we're ready to merge 'espanol'
|
|
|
|
'/customize/translations/messages.fr.js',
|
|
|
|
'/customize/translations/messages.fr.js',
|
|
|
|
'/bower_components/jquery/dist/jquery.min.js'], function(LS, Default, French) {
|
|
|
|
'/bower_components/jquery/dist/jquery.min.js'], function(LS, Default, /*Spanish,*/ French) {
|
|
|
|
var $ = window.jQuery;
|
|
|
|
var $ = window.jQuery;
|
|
|
|
|
|
|
|
|
|
|
|
var map = {
|
|
|
|
var map = {
|
|
|
|
'fr': French
|
|
|
|
'fr': French,
|
|
|
|
|
|
|
|
//'es': Spanish,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var defaultLanguage = 'en';
|
|
|
|
var defaultLanguage = 'en';
|
|
|
@ -32,6 +34,21 @@ define(['/customize/languageSelector.js',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
messages._initSelector = LS.main;
|
|
|
|
messages._initSelector = LS.main;
|
|
|
|
|
|
|
|
messages._checkTranslationState = function () {
|
|
|
|
|
|
|
|
var missing = [];
|
|
|
|
|
|
|
|
Object.keys(map).forEach(function (code) {
|
|
|
|
|
|
|
|
var translation = map[code];
|
|
|
|
|
|
|
|
Object.keys(Default).forEach(function (k) {
|
|
|
|
|
|
|
|
if (/^_/.test(k) || /nitialState$/.test(k)) { return; }
|
|
|
|
|
|
|
|
if (!translation[k]) {
|
|
|
|
|
|
|
|
var warning = "key [" + k + "] is missing from translation [" + code + "]";
|
|
|
|
|
|
|
|
missing.push(warning);
|
|
|
|
|
|
|
|
console.log(warning);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return missing;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Get keys with parameters
|
|
|
|
// Get keys with parameters
|
|
|
|
messages._getKey = function (key, argArray) {
|
|
|
|
messages._getKey = function (key, argArray) {
|
|
|
|