update gettext and strings.

This commit is contained in:
Martijn Voncken 2008-10-31 17:04:30 +00:00
parent cb45b5c41f
commit 41c121b729
4 changed files with 76 additions and 47 deletions

View File

@ -0,0 +1,31 @@
import os
import re
template_dirs = ['../templates/ajax/static/js']
template_dirs = [os.path.expanduser(template_dir ) for template_dir in template_dirs]
files = []
for template_dir in template_dirs:
files += [os.path.join(template_dir,fname)
for fname in os.listdir(template_dir)
if fname.endswith('.js')]
all_strings = []
for filename in files:
f = open(filename,'r')
content = f.read()
all_strings += re.findall("_\(\"(.*?)\"\)",content)
all_strings += re.findall("_\(\'(.*?)\'\)",content)
all_strings += re.findall("Deluge\.Strings\.get\(\'(.*?)\'\)",content)
all_strings += re.findall("Deluge\.Strings\.get\(\'(.*?)\'\)",content)
all_strings = sorted(set(all_strings))
f = open ('./ajax_strings.js','w')
f.write("/*generated code:*/\n")
for value in all_strings:
f.write('GetText.add("%s","$_("%s")");\n' % (value, value) )
f.write("/*end generated code.*/\n")

View File

@ -1,6 +1,6 @@
import os import os
import re import re
template_dirs = ['~/prj/webui06/templates/classic','~/prj/webui06/templates/white'] template_dirs = ['../templates/classic','../templates/white']
template_dirs = [os.path.expanduser(template_dir ) for template_dir in template_dirs] template_dirs = [os.path.expanduser(template_dir ) for template_dir in template_dirs]

View File

@ -1,6 +1,4 @@
_('# Of Files') _('# Of Files')
_('+')
_('++')
_('About') _('About')
_('Active time') _('Active time')
_('Add Torrent') _('Add Torrent')
@ -24,6 +22,8 @@ _('Delete downloaded files.')
_('Deluge : Torrent List') _('Deluge : Torrent List')
_('Deluge Login') _('Deluge Login')
_('Disable') _('Disable')
_('Disk Space')
_('Do not download')
_('Down Speed') _('Down Speed')
_('Download') _('Download')
_('Downloaded') _('Downloaded')
@ -35,6 +35,8 @@ _('False')
_('File') _('File')
_('Filter on a keyword') _('Filter on a keyword')
_('General') _('General')
_('High priority')
_('Highest priority')
_('Keyword') _('Keyword')
_('Label') _('Label')
_('Label torrent') _('Label torrent')
@ -42,9 +44,12 @@ _('Login')
_('Logout') _('Logout')
_('Move') _('Move')
_('Move torrent') _('Move torrent')
_('N')
_('Name') _('Name')
_('Next Announce') _('Next Announce')
_('No Incoming Connections')
_('No Label')
_('None')
_('Normal priority')
_('Not Connected to a daemon') _('Not Connected to a daemon')
_('Off') _('Off')
_('Options') _('Options')
@ -65,12 +70,13 @@ _('Remove torrent')
_('Restart') _('Restart')
_('Resume all') _('Resume all')
_('Save') _('Save')
_('Search')
_('Seed rank') _('Seed rank')
_('Seeders') _('Seeders')
_('Seeding time') _('Seeding time')
_('Select All')
_('Set') _('Set')
_('Set Timeout') _('Set Timeout')
_('Settings')
_('Share Ratio') _('Share Ratio')
_('Size') _('Size')
_('Speed') _('Speed')
@ -86,5 +92,4 @@ _('Up Speed')
_('Update') _('Update')
_('Upload') _('Upload')
_('Uploaded') _('Uploaded')
_('X')
_('seconds') _('seconds')

View File

@ -22,47 +22,40 @@ GetText = {
} }
// Torrent Menu Strings // // Torrent Menu Strings //
GetText.add('Pause', '$_('Pause')');
GetText.add('Resume', '$_('Resume')');
GetText.add('Options', '$_('Options')');
GetText.add('D/L Speed Limit', '$_('D/L Speed Limit')');
GetText.add('U/L Speed Limit', '$_('U/L Speed Limit')');
GetText.add('Unlimited', '$_('Unlimited')');
GetText.add('Connection Limit', '$_('Connection Limit')');
GetText.add('Upload Slot Limit', '$_('Upload Slot Limit')');
GetText.add('Auto Managed', '$_('Auto Managed')');
GetText.add('Queue', '$_('Queue')');
GetText.add('Top', '$_('Top')');
GetText.add('Up', '$_('Up')');
GetText.add('Down', '$_('Down')');
GetText.add('Bottom', '$_('Bottom')');
GetText.add('Update Tracker', '$_('Update Tracker')');
GetText.add('Edit Trackers', '$_('Edit Trackers')');
GetText.add('Remove Torrent', '$_('Remove Torrent')');
GetText.add('From Session', '$_('From Session')');
GetText.add('... and delete Torrent file',
'$_('... and delete Torrent file')');
GetText.add('... and delete Downloaded files',
'$_('... and delete Downloaded files')');
GetText.add('... and delete All files',
'$_('... and delete All files')');
GetText.add('Force Recheck', '$_('Force Recheck')');
GetText.add('Move Storage', '$_('Move Storage')');
// Add Torrents Window // /*generated code:*/
GetText.add('Add Torrents', '$_('Add Torrents')'); GetText.add("... and delete All files","$_("... and delete All files")");
GetText.add('Create Torrent', '$_('Create Torrent')'); GetText.add("... and delete Downloaded files","$_("... and delete Downloaded files")");
GetText.add('Torrents Window', '$_('Torrents Window')'); GetText.add("... and delete Torrent file","$_("... and delete Torrent file")");
GetText.add('From Url', '$_('From Url')'); GetText.add("Add Torrents","$_("Add Torrents")");
GetText.add('Ok', '$_('Ok')'); GetText.add("Auto Managed","$_("Auto Managed")");
GetText.add('Cancel', '$_('Cancel')'); GetText.add("Bottom","$_("Bottom")");
GetText.add("Cancel","$_("Cancel")");
GetText.add("Connection Limit","$_("Connection Limit")");
// Details // GetText.add("Create Torrent","$_("Create Torrent")");
GetText.add('Statistics', '$_('Statistics')'); GetText.add("D/L Speed Limit","$_("D/L Speed Limit")");
GetText.add('Details', '$_('Details')'); GetText.add("Details","$_("Details")");
GetText.add('Files', '$_('Files')'); GetText.add("Down","$_("Down")");
GetText.add('Peers', '$_('Peers')'); GetText.add("Edit Trackers","$_("Edit Trackers")");
GetText.add('Options', '$_('Options')'); GetText.add("Files","$_("Files")");
GetText.add("Force Recheck","$_("Force Recheck")");
GetText.add("From Session","$_("From Session")");
GetText.add("From Url","$_("From Url")");
GetText.add("Move Storage","$_("Move Storage")");
GetText.add("Ok","$_("Ok")");
GetText.add("Options","$_("Options")");
GetText.add("Pause","$_("Pause")");
GetText.add("Peers","$_("Peers")");
GetText.add("Queue","$_("Queue")");
GetText.add("Remove Torrent","$_("Remove Torrent")");
GetText.add("Resume","$_("Resume")");
GetText.add("Statistics","$_("Statistics")");
GetText.add("Top","$_("Top")");
GetText.add("U/L Speed Limit","$_("U/L Speed Limit")");
GetText.add("Unlimited","$_("Unlimited")");
GetText.add("Up","$_("Up")");
GetText.add("Update Tracker","$_("Update Tracker")");
GetText.add("Upload Slot Limit","$_("Upload Slot Limit")");
/*end generated code.*/
_ = GetText.get; _ = GetText.get;