mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +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 = {
|
||||
'Error': _('Error'),
|
||||
'Warning': _('Warning'),
|
||||
'Announce OK': _('Announce OK'),
|
||||
'Announce Sent': _('Announce Sent')
|
||||
}
|
||||
TRACKER_STATUS_TRANSLATION = [
|
||||
_('Error'),
|
||||
_('Warning'),
|
||||
_('Announce OK'),
|
||||
_('Announce Sent')
|
||||
]
|
||||
del _
|
||||
|
||||
DEFAULT_HOST = '127.0.0.1'
|
||||
|
@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
from deluge.common import fdate, fsize, fspeed, ftime
|
||||
from deluge.ui.common import TRACKER_STATUS_TRANSLATION
|
||||
|
||||
|
||||
def ftotal_sized(first, second):
|
||||
@ -82,8 +83,13 @@ def fcount(value):
|
||||
|
||||
|
||||
def ftranslate(text):
|
||||
if text:
|
||||
if text in TRACKER_STATUS_TRANSLATION:
|
||||
text = _(text)
|
||||
elif text:
|
||||
for status in TRACKER_STATUS_TRANSLATION:
|
||||
if status in text:
|
||||
text = text.replace(status, _(status))
|
||||
break
|
||||
return text
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user