diff --git a/customize.dist/messages.js b/customize.dist/messages.js index f1062ada3..b35e5897c 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -1,11 +1,13 @@ define(['/customize/languageSelector.js', '/customize/translations/messages.js', + //'/customize/translations/messages.es.js', // uncomment when we're ready to merge 'espanol' '/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 map = { - 'fr': French + 'fr': French, + //'es': Spanish, }; var defaultLanguage = 'en'; @@ -32,6 +34,21 @@ define(['/customize/languageSelector.js', } 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 messages._getKey = function (key, argArray) {