Changeset 2308
- Timestamp:
- 11/24/07 20:39:55 (14 months ago)
- Files:
-
- 6 modified
-
tags/deluge-0.5.6.95/plugins/WebUi/scripts/extract_template_strings.py (modified) (1 diff)
-
tags/deluge-0.5.6.95/plugins/WebUi/scripts/template_strings.py (modified) (6 diffs)
-
tags/deluge-0.5.6.95/plugins/WebUi/webserver_framework.py (modified) (2 diffs)
-
trunk/plugins/WebUi/scripts/extract_template_strings.py (modified) (1 diff)
-
trunk/plugins/WebUi/scripts/template_strings.py (modified) (6 diffs)
-
trunk/plugins/WebUi/webserver_framework.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/deluge-0.5.6.95/plugins/WebUi/scripts/extract_template_strings.py
r2142 r2308 2 2 import os 3 3 import re 4 template_dir = '~/prj/WebUi/templates/deluge' 5 template_dir = os.path.expanduser(template_dir ) 4 template_dirs = ['~/prj/WebUi/templates/deluge', 5 '~/prj/WebUi/templates/advanced'] 6 7 template_dirs = [os.path.expanduser(template_dir ) for template_dir in template_dirs] 6 8 7 9 8 files = [os.path.join(template_dir,fname) 9 for fname in os.listdir(template_dir) 10 if fname.endswith('.html')] 10 files = [] 11 for template_dir in template_dirs: 12 files += [os.path.join(template_dir,fname) 13 for fname in os.listdir(template_dir) 14 if fname.endswith('.html')] 15 11 16 12 17 all_strings = [] -
tags/deluge-0.5.6.95/plugins/WebUi/scripts/template_strings.py
r2142 r2308 1 1 _('# Of Files') 2 2 _('About') 3 _('Add') 3 4 _('Add Torrent') 4 5 _('Add torrent') … … 14 15 _('Details') 15 16 _('Disable') 17 _('Down') 16 18 _('Down Speed') 17 19 _('Download') … … 28 30 _('Password') 29 31 _('Password is invalid,try again') 32 _('Pause') 30 33 _('Pause all') 31 34 _('Peers') … … 33 36 _('Progress') 34 37 _('Queue Down') 38 _('Queue Position') 35 39 _('Queue Up') 36 _('Queue pos:')37 40 _('Ratio') 38 41 _('Reannounce') 39 42 _('Refresh page every:') 40 43 _('Remove') 41 _('Remove %s')42 _('Re move %s?')44 _('Remove torrent') 45 _('Resume') 43 46 _('Resume all') 44 47 _('Seeders') … … 48 51 _('Size') 49 52 _('Speed') 53 _('Start') 50 54 _('Submit') 51 55 _('Torrent list') … … 53 57 _('Tracker') 54 58 _('Tracker Status') 59 _('Up') 55 60 _('Up Speed') 56 61 _('Upload') -
tags/deluge-0.5.6.95/plugins/WebUi/webserver_framework.py
r2304 r2308 222 222 url = urlparse(status.tracker) 223 223 if hasattr(url,'hostname'): 224 status.category = url.hostname 224 status.category = url.hostname or 'unknown' 225 225 else: 226 226 status.category = 'No-tracker' … … 266 266 267 267 def get_categories(torrent_list): 268 trackers = [ torrent['category']for torrent in torrent_list]268 trackers = [(torrent['category'] or 'unknown') for torrent in torrent_list] 269 269 categories = {} 270 270 for tracker in trackers: -
trunk/plugins/WebUi/scripts/extract_template_strings.py
r2142 r2308 2 2 import os 3 3 import re 4 template_dir = '~/prj/WebUi/templates/deluge' 5 template_dir = os.path.expanduser(template_dir ) 4 template_dirs = ['~/prj/WebUi/templates/deluge', 5 '~/prj/WebUi/templates/advanced'] 6 7 template_dirs = [os.path.expanduser(template_dir ) for template_dir in template_dirs] 6 8 7 9 8 files = [os.path.join(template_dir,fname) 9 for fname in os.listdir(template_dir) 10 if fname.endswith('.html')] 10 files = [] 11 for template_dir in template_dirs: 12 files += [os.path.join(template_dir,fname) 13 for fname in os.listdir(template_dir) 14 if fname.endswith('.html')] 15 11 16 12 17 all_strings = [] -
trunk/plugins/WebUi/scripts/template_strings.py
r2142 r2308 1 1 _('# Of Files') 2 2 _('About') 3 _('Add') 3 4 _('Add Torrent') 4 5 _('Add torrent') … … 14 15 _('Details') 15 16 _('Disable') 17 _('Down') 16 18 _('Down Speed') 17 19 _('Download') … … 28 30 _('Password') 29 31 _('Password is invalid,try again') 32 _('Pause') 30 33 _('Pause all') 31 34 _('Peers') … … 33 36 _('Progress') 34 37 _('Queue Down') 38 _('Queue Position') 35 39 _('Queue Up') 36 _('Queue pos:')37 40 _('Ratio') 38 41 _('Reannounce') 39 42 _('Refresh page every:') 40 43 _('Remove') 41 _('Remove %s')42 _('Re move %s?')44 _('Remove torrent') 45 _('Resume') 43 46 _('Resume all') 44 47 _('Seeders') … … 48 51 _('Size') 49 52 _('Speed') 53 _('Start') 50 54 _('Submit') 51 55 _('Torrent list') … … 53 57 _('Tracker') 54 58 _('Tracker Status') 59 _('Up') 55 60 _('Up Speed') 56 61 _('Upload') -
trunk/plugins/WebUi/webserver_framework.py
r2301 r2308 222 222 url = urlparse(status.tracker) 223 223 if hasattr(url,'hostname'): 224 status.category = url.hostname 224 status.category = url.hostname or 'unknown' 225 225 else: 226 226 status.category = 'No-tracker' … … 266 266 267 267 def get_categories(torrent_list): 268 trackers = [ torrent['category']for torrent in torrent_list]268 trackers = [(torrent['category'] or 'unknown') for torrent in torrent_list] 269 269 categories = {} 270 270 for tracker in trackers:
