fix timeago widget
This commit is contained in:
parent
56ab1991c2
commit
1d0109d4cb
1 changed files with 8 additions and 6 deletions
|
|
@ -3,15 +3,17 @@
|
|||
* the COPYRIGHT file.
|
||||
*/
|
||||
(function() {
|
||||
if(Diaspora.I18n.language !== "en") {
|
||||
$.each($.timeago.settings.strings, function(index) {
|
||||
$.timeago.settings.strings[index] = Diaspora.I18n.t("timeago." + index);
|
||||
});
|
||||
}
|
||||
|
||||
Diaspora.Widgets.TimeAgo = function() {
|
||||
var self = this;
|
||||
|
||||
this.subscribe("widget/ready", function() {
|
||||
if(Diaspora.I18n.language !== "en") {
|
||||
$.each($.timeago.settings.strings, function(index) {
|
||||
$.timeago.settings.strings[index] = Diaspora.I18n.t("timeago." + index);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.subscribe("widget/ready", function(evt, element) {
|
||||
self.element = element.timeago();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue