Skip to content
Extraits de code Groupes Projets
Valider cd602c19 rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

Fix i18n spec

parent 3bc5b673
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -77,9 +77,12 @@ Diaspora.I18n = {
reset: function() {
this.locale.data = {};
this.locale.fallback.data = {};
if( arguments.length > 0 && !(_.isEmpty(arguments[0])) )
if(arguments.length > 0 && !(_.isEmpty(arguments[0]))) {
this.locale.data = arguments[0];
this.locale.fallback.data = arguments[0];
}
}
};
// @license-end
......
......@@ -90,6 +90,7 @@ describe("Diaspora.I18n", function() {
Diaspora.I18n.load(locale, "en", locale);
Diaspora.I18n.reset();
expect(Diaspora.I18n.locale.data).toEqual({});
expect(Diaspora.I18n.locale.fallback.data).toEqual({});
});
it("sets the locale to only a specific value", function() {
......@@ -97,6 +98,7 @@ describe("Diaspora.I18n", function() {
Diaspora.I18n.load(locale, "en", locale);
Diaspora.I18n.reset(data);
expect(Diaspora.I18n.locale.data).toEqual(data);
expect(Diaspora.I18n.locale.fallback.data).toEqual(data);
});
});
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter