translation for tracker alerts

This commit is contained in:
Marcos Pinto 2007-10-02 02:29:12 +00:00
parent 935aa72584
commit 78e797796a
2 changed files with 15 additions and 1 deletions

View File

@ -2,3 +2,4 @@ deluge/ui/gtkui/glade/main_window.glade
deluge/ui/gtkui/glade/preferences_dialog.glade deluge/ui/gtkui/glade/preferences_dialog.glade
deluge/plugins/queue/queue/gtkui.py deluge/plugins/queue/queue/gtkui.py
deluge/ui/gtkui/torrentview.py deluge/ui/gtkui/torrentview.py
deluge/ui/gtkui/torrentdetails.py

View File

@ -130,7 +130,20 @@ class TorrentDetails:
self.eta.set_text(deluge.common.ftime(status["eta"])) self.eta.set_text(deluge.common.ftime(status["eta"]))
self.share_ratio.set_text("%.3f" % status["ratio"]) self.share_ratio.set_text("%.3f" % status["ratio"])
self.tracker.set_text(status["tracker"]) self.tracker.set_text(status["tracker"])
self.tracker_status.set_text(status["tracker_status"]) if status["tracker_status"] == "Announce OK":
tracker_msg = _("Announce OK")
elif status["tracker_status"] == "Announce Sent":
tracker_msg = _("Announce Sent")
elif 'Alert' in status["tracker_status"]:
tracker_msg = status["tracker_status"].replace("Alert", \
_("Alert"))
tracker_msg = tracker_msg.replace("HTTP code", _("HTTP code"))
tracker_msg = tracker_msg.replace("times in a row", \
_("times in a row"))
elif 'Warning' in status["tracker_status"]:
tracker_msg = status["tracker_status"].replace("Warning", \
_("Warning"))
self.tracker_status.set_text(tracker_msg)
self.next_announce.set_text( self.next_announce.set_text(
deluge.common.ftime(status["next_announce"])) deluge.common.ftime(status["next_announce"]))