Skip to content

Commit

Permalink
moved message construction to initialize (massiveart#670)
Browse files Browse the repository at this point in the history
* moved message construction to initialize

* Update CHANGELOG.md

* removed unneccessary condition
  • Loading branch information
Marcel Moosbrugger authored and danrot committed Jul 4, 2016
1 parent 1953ef8 commit b319e15
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 39 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG for husky

* dev-develop
* BUGFIX #670 Fixed Globalizing timing issue
* FEATURE #664 Collapse dropdown button without visible items in list
* FEATURE #636 Added possibility to display small labels
* BUGFIX #666 Added auto-start on focus
Expand Down
41 changes: 22 additions & 19 deletions dist/husky.js
Original file line number Diff line number Diff line change
Expand Up @@ -51386,12 +51386,31 @@ define("datepicker-zh-TW", function(){});
}

return cultureName;
},

initializeLanguages = function(app) {
if (!!app.config.culture) {
if (!app.config.culture.messages) {
app.config.culture.messages = {};
}

app.loadLanguage(app.config.culture.name).then(function() {
app.setLanguage(
app.config.culture.name,
app.config.culture.messages,
app.config.culture.defaultMessages
);
});
}

app.sandbox.globalize.setCurrency('');
};

return {
return {
name: 'husky-validation',

initialize: function(app) {

app.sandbox.globalize = {
addCultureInfo: function(cultureName, messages) {
cultureName = normalizeCultureName(cultureName);
Expand Down Expand Up @@ -51560,25 +51579,9 @@ define("datepicker-zh-TW", function(){});
}

return deferred.promise();
}
},

afterAppStart: function(app) {
if (!!app.config.culture && !!app.config.culture) {
if (!app.config.culture.messages) {
app.config.culture.messages = {};
}

app.loadLanguage(app.config.culture.name).then(function() {
app.setLanguage(
app.config.culture.name,
app.config.culture.messages,
app.config.culture.defaultMessages
);
});
}
};

app.sandbox.globalize.setCurrency('');
initializeLanguages(app);
}
};
});
Expand Down
2 changes: 1 addition & 1 deletion dist/husky.min.js

Large diffs are not rendered by default.

41 changes: 22 additions & 19 deletions husky_extensions/globalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,31 @@
}

return cultureName;
},

initializeLanguages = function(app) {
if (!!app.config.culture) {
if (!app.config.culture.messages) {
app.config.culture.messages = {};
}

app.loadLanguage(app.config.culture.name).then(function() {
app.setLanguage(
app.config.culture.name,
app.config.culture.messages,
app.config.culture.defaultMessages
);
});
}

app.sandbox.globalize.setCurrency('');
};

return {
return {
name: 'husky-validation',

initialize: function(app) {

app.sandbox.globalize = {
addCultureInfo: function(cultureName, messages) {
cultureName = normalizeCultureName(cultureName);
Expand Down Expand Up @@ -203,25 +222,9 @@
}

return deferred.promise();
}
},

afterAppStart: function(app) {
if (!!app.config.culture && !!app.config.culture) {
if (!app.config.culture.messages) {
app.config.culture.messages = {};
}

app.loadLanguage(app.config.culture.name).then(function() {
app.setLanguage(
app.config.culture.name,
app.config.culture.messages,
app.config.culture.defaultMessages
);
});
}
};

app.sandbox.globalize.setCurrency('');
initializeLanguages(app);
}
};
});
Expand Down

0 comments on commit b319e15

Please sign in to comment.