partial fix to #640. more work needed

This commit is contained in:
Marcos Pinto 2008-12-09 03:28:30 +00:00
parent 44223592b0
commit ae07d8c2d0
3 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ def fpcnt(value):
def fspeed(value, max_value=-1):
if max_value > -1:
return "%s [%s KiB/s]" % (deluge.common.fspeed(value), max_value)
return "%s [%s _(KiB/s)]" % (deluge.common.fspeed(value), max_value)
else:
return deluge.common.fspeed(value)

View File

@ -344,7 +344,7 @@ class StatusBar(component.Component):
self.upload_item.set_text(label_string)
def update_traffic_label(self):
label_string = "%.2f/%.2f KiB/s" % (self.download_protocol_rate, self.upload_protocol_rate)
label_string = "%.2f/%.2f %s" % (self.download_protocol_rate, self.upload_protocol_rate, _("KiB/s"))
self.traffic_item.set_text(label_string)
def update(self):
@ -367,7 +367,7 @@ class StatusBar(component.Component):
value = -1
elif widget.get_name() == _("Other..."):
value = common.show_other_dialog(
_("Set Maximum Download Speed"), "KiB/s", None, "downloading.svg", self.max_download_speed)
_("Set Maximum Download Speed"), _("KiB/s"), None, "downloading.svg", self.max_download_speed)
if value == None:
return
else:
@ -395,7 +395,7 @@ class StatusBar(component.Component):
value = -1
elif widget.get_name() == _("Other..."):
value = common.show_other_dialog(
_("Set Maximum Upload Speed"), "KiB/s", None, "seeding.svg", self.max_upload_speed)
_("Set Maximum Upload Speed"), _("KiB/s"), None, "seeding.svg", self.max_upload_speed)
if value == None:
return
else:

View File

@ -187,11 +187,11 @@ class SystemTray(component.Component):
if max_download_speed == -1:
max_download_speed = _("Unlimited")
else:
max_download_speed = "%s KiB/s" % (max_download_speed)
max_download_speed = "%s %s" % (max_download_speed, _("KiB/s"))
if max_upload_speed == -1:
max_upload_speed = _("Unlimited")
else:
max_upload_speed = "%s KiB/s" % (max_upload_speed)
max_upload_speed = "%s %s" % (max_upload_speed, _("KiB/s"))
msg = '%s\n%s: %s (%s)\n%s: %s (%s)' % (\
_("Deluge"), _("Down"), self.download_rate, \
@ -336,7 +336,7 @@ class SystemTray(component.Component):
value = -1
if value == _("Other..."):
value = common.show_other_dialog(string, "KiB/s", None, image, default)
value = common.show_other_dialog(string, _("KiB/s"), None, image, default)
if value == None:
return