diff options
author | Jonne Hass <mrzyx@mrzyx.de> | 2011-11-07 19:33:38 +0400 |
---|---|---|
committer | Jonne Hass <mrzyx@mrzyx.de> | 2011-11-07 19:33:38 +0400 |
commit | 1d0109d4cbac6ccfddcb5c619fc447626cfa6089 (patch) | |
tree | 2ea4bf44e004aa7fe2bcd5b07a9bc3472b1fe67a | |
parent | 56ab1991c2eaf4f779f9e9d9a79eed4928e76146 (diff) |
fix timeago widget
-rw-r--r-- | public/javascripts/widgets/timeago.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/public/javascripts/widgets/timeago.js b/public/javascripts/widgets/timeago.js index 9b7e84750..eec0c78eb 100644 --- a/public/javascripts/widgets/timeago.js +++ b/public/javascripts/widgets/timeago.js @@ -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(); }); |