finalizing tests for I18n class, AJAX loading of translations needs to be tested in browser, mocked for now

This commit is contained in:
El RIDO 2017-03-26 09:24:42 +02:00
parent e1ea14627f
commit 37f5d99bc4
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 80 additions and 11 deletions

View file

@ -306,7 +306,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
* @param {object} document
* @class
*/
var I18n = (function (window, document) {
var I18n = (function () {
var me = {};
/**
@ -544,14 +544,14 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
* @name I18n.reset
* @function
*/
me.reset = function()
me.reset = function(mockLanguage, mockTranslations)
{
language = null;
translations = {};
language = mockLanguage || null;
translations = mockTranslations || {};
}
return me;
})(window, document);
})();
/**
* handles everything related to en/decryption