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.
*/
(function() {
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);
});
}
Diaspora.Widgets.TimeAgo = function() {
var self = this;
});
this.subscribe("widget/ready", function(evt, element) {
self.element = element.timeago();