mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
[GTKUI] Fix the translation of tracker status
This commit is contained in:
parent
373c8a14b0
commit
425af00ebf
@ -91,12 +91,12 @@ TORRENT_DATA_FIELD = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TRACKER_STATUS_TRANSLATION = {
|
TRACKER_STATUS_TRANSLATION = [
|
||||||
'Error': _('Error'),
|
_('Error'),
|
||||||
'Warning': _('Warning'),
|
_('Warning'),
|
||||||
'Announce OK': _('Announce OK'),
|
_('Announce OK'),
|
||||||
'Announce Sent': _('Announce Sent')
|
_('Announce Sent')
|
||||||
}
|
]
|
||||||
del _
|
del _
|
||||||
|
|
||||||
DEFAULT_HOST = '127.0.0.1'
|
DEFAULT_HOST = '127.0.0.1'
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from deluge.common import fdate, fsize, fspeed, ftime
|
from deluge.common import fdate, fsize, fspeed, ftime
|
||||||
|
from deluge.ui.common import TRACKER_STATUS_TRANSLATION
|
||||||
|
|
||||||
|
|
||||||
def ftotal_sized(first, second):
|
def ftotal_sized(first, second):
|
||||||
@ -82,8 +83,13 @@ def fcount(value):
|
|||||||
|
|
||||||
|
|
||||||
def ftranslate(text):
|
def ftranslate(text):
|
||||||
if text:
|
if text in TRACKER_STATUS_TRANSLATION:
|
||||||
text = _(text)
|
text = _(text)
|
||||||
|
elif text:
|
||||||
|
for status in TRACKER_STATUS_TRANSLATION:
|
||||||
|
if status in text:
|
||||||
|
text = text.replace(status, _(status))
|
||||||
|
break
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user