Closed mbertin closed 9 years ago
It's a bug froom your feature. In lazy mode data cannot be different. The condition is valid.
/**
* Build i18n.data.
* @param {Object} data Data from the translation file
*/
function buildI18n(data) {
if(!config.lazy) {
i18n.data = data;
return;
}
i18n.data[i18n.current] = data;
}
So if we are in lazy mode i18n.data contains key such as fr-FR
, en-EN
.
i18n.data is our translations. Not a translation
todo add a test for this case.
In order to update scope values we have to call updateState. But for lazy loading i18n.data is equals to the language so the following condition for updating the scope doesn't work.