mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-19 14:54:21 +00:00
translation fixes
This commit is contained in:
parent
0ba0fb9407
commit
44880135d9
16
src/core.py
16
src/core.py
@ -84,14 +84,14 @@ PREF_FUNCTIONS = {
|
|||||||
def N_(self):
|
def N_(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
STATE_MESSAGES = (N_("Queued"),
|
STATE_MESSAGES = (_("Queued"),
|
||||||
N_("Checking"),
|
_("Checking"),
|
||||||
N_("Connecting"),
|
_("Connecting"),
|
||||||
N_("Downloading Metadata"),
|
_("Downloading Metadata"),
|
||||||
N_("Downloading"),
|
_("Downloading"),
|
||||||
N_("Finished"),
|
_("Finished"),
|
||||||
N_("Seeding"),
|
_("Seeding"),
|
||||||
N_("Allocating"))
|
_("Allocating"))
|
||||||
# Exceptions
|
# Exceptions
|
||||||
|
|
||||||
class DelugeError(Exception):
|
class DelugeError(Exception):
|
||||||
|
@ -219,7 +219,7 @@ class DelugeGTK:
|
|||||||
|
|
||||||
def build_menu_radio_list(self, value_list, callback, pref_value=None,
|
def build_menu_radio_list(self, value_list, callback, pref_value=None,
|
||||||
suffix=None, show_notset=False,
|
suffix=None, show_notset=False,
|
||||||
notset_label="Unlimited", notset_lessthan=0):
|
notset_label=_("Unlimited"), notset_lessthan=0):
|
||||||
# Build a menu with radio menu items from a list and connect them to the callback
|
# Build a menu with radio menu items from a list and connect them to the callback
|
||||||
# The pref_value is what you would like to test for the default active radio item
|
# The pref_value is what you would like to test for the default active radio item
|
||||||
# Setting show_unlimited will include an Unlimited radio item
|
# Setting show_unlimited will include an Unlimited radio item
|
||||||
@ -244,7 +244,7 @@ class DelugeGTK:
|
|||||||
menu.append(menuitem)
|
menu.append(menuitem)
|
||||||
|
|
||||||
if show_notset:
|
if show_notset:
|
||||||
menuitem = gtk.RadioMenuItem(group, _(notset_label))
|
menuitem = gtk.RadioMenuItem(group, notset_label)
|
||||||
if pref_value < notset_lessthan and pref_value != None:
|
if pref_value < notset_lessthan and pref_value != None:
|
||||||
menuitem.set_active(True)
|
menuitem.set_active(True)
|
||||||
menuitem.connect("toggled", callback)
|
menuitem.connect("toggled", callback)
|
||||||
@ -780,7 +780,7 @@ class DelugeGTK:
|
|||||||
message = _("Paused %s")%progress
|
message = _("Paused %s")%progress
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
message = _(core.STATE_MESSAGES[state])
|
message = core.STATE_MESSAGES[state]
|
||||||
if state in (1, 3, 4, 7):
|
if state in (1, 3, 4, 7):
|
||||||
message = '%s %s'%(message, progress)
|
message = '%s %s'%(message, progress)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user