fix timeago widget

This commit is contained in:
Jonne Hass 2011-11-07 16:33:38 +01:00
parent 56ab1991c2
commit 1d0109d4cb

View file

@ -3,14 +3,16 @@
* the COPYRIGHT file. * the COPYRIGHT file.
*/ */
(function() { (function() {
Diaspora.Widgets.TimeAgo = function() {
var self = this;
this.subscribe("widget/ready", function() {
if(Diaspora.I18n.language !== "en") { if(Diaspora.I18n.language !== "en") {
$.each($.timeago.settings.strings, function(index) { $.each($.timeago.settings.strings, function(index) {
$.timeago.settings.strings[index] = Diaspora.I18n.t("timeago." + index); $.timeago.settings.strings[index] = Diaspora.I18n.t("timeago." + index);
}); });
} }
});
Diaspora.Widgets.TimeAgo = function() {
var self = this;
this.subscribe("widget/ready", function(evt, element) { this.subscribe("widget/ready", function(evt, element) {
self.element = element.timeago(); self.element = element.timeago();