Merge branch 'translate_updates' into 1.3-stable

This commit is contained in:
Calum Lind 2011-06-05 00:28:20 +01:00
commit 47c9cccd74
16 changed files with 44 additions and 40 deletions

View File

@ -1,18 +1,25 @@
#!/usr/bin/env python #!/usr/bin/env python
import os import os
import re
# Paths to exclude # Paths to exclude
EXCLUSIONS = [ EXCLUSIONS = [
"deluge/scripts" "deluge/scripts",
"deluge/i18n",
] ]
POTFILE_IN = "deluge/i18n/POTFILES.in" POTFILE_IN = "deluge/i18n/POTFILES.in"
print "Creating " + POTFILE_IN + " .." pattern = "deluge\/plugins\/.*\/build"
compiled = re.compile(pattern)
print "Creating " + POTFILE_IN + " ..."
to_translate = [] to_translate = []
for (dirpath, dirnames, filenames) in os.walk("deluge"): for (dirpath, dirnames, filenames) in os.walk("deluge"):
for filename in filenames: for filename in filenames:
if os.path.splitext(filename)[1] in (".py", ".glade") and dirpath not in EXCLUSIONS: if os.path.splitext(filename)[1] in (".py", ".glade") \
and dirpath not in EXCLUSIONS \
and not compiled.match(dirpath):
to_translate.append(os.path.join(dirpath, filename)) to_translate.append(os.path.join(dirpath, filename))
f = open(POTFILE_IN, "wb") f = open(POTFILE_IN, "wb")

View File

@ -29,7 +29,7 @@
<widget class="GtkLabel" id="error_label"> <widget class="GtkLabel" id="error_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0.46000000834465027</property> <property name="xalign">0.46000000834465027</property>
<property name="label" translatable="yes">Error</property> <property name="label" translatable="no">gtk-dialog-error</property>
<property name="wrap">True</property> <property name="wrap">True</property>
</widget> </widget>
<packing> <packing>
@ -833,7 +833,7 @@
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<widget class="GtkRadioButton" id="auto_managed"> <widget class="GtkRadioButton" id="auto_managed">
<property name="label" translatable="yes">Yes</property> <property name="label" translatable="no">gtk-yes</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
@ -846,7 +846,7 @@
</child> </child>
<child> <child>
<widget class="GtkRadioButton" id="isnt_auto_managed"> <widget class="GtkRadioButton" id="isnt_auto_managed">
<property name="label" translatable="yes">No</property> <property name="label" translatable="no">gtk-no</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
@ -901,7 +901,7 @@
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<widget class="GtkRadioButton" id="add_paused"> <widget class="GtkRadioButton" id="add_paused">
<property name="label" translatable="yes">Yes</property> <property name="label" translatable="no">gtk-yes</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
@ -914,7 +914,7 @@
</child> </child>
<child> <child>
<widget class="GtkRadioButton" id="isnt_add_paused"> <widget class="GtkRadioButton" id="isnt_add_paused">
<property name="label" translatable="yes">No</property> <property name="label" translatable="no">gtk-no</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>

View File

@ -84,7 +84,7 @@
</child> </child>
<child> <child>
<widget class="GtkButton" id="edit_button"> <widget class="GtkButton" id="edit_button">
<property name="label" translatable="yes">gtk-edit</property> <property name="label" translatable="no">gtk-edit</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property> <property name="sensitive">False</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>

View File

@ -549,10 +549,7 @@
<widget class="GtkTextView" id="auto_add_trackers"> <widget class="GtkTextView" id="auto_add_trackers">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="text" translatable="yes">tracker1.org <property name="text" translatable="no">tracker1.org</property>
tracker2.com
this doesn't do anything yet..
</property>
</widget> </widget>
</child> </child>
</widget> </widget>

View File

@ -619,11 +619,11 @@ class AddTorrentDialog(component.Component):
elif deluge.common.is_magnet(url): elif deluge.common.is_magnet(url):
self.add_from_magnets([url]) self.add_from_magnets([url])
else: else:
dialogs.ErrorDialog(_("Invalid URL"), _("%s is not a valid URL." % url), self.dialog).run() dialogs.ErrorDialog(_("Invalid URL"), "%s %s" % (url, _("is not a valid URL.")), self.dialog).run()
def add_from_url(self, url): def add_from_url(self, url):
dialog = gtk.Dialog( dialog = gtk.Dialog(
_("Downloading.."), _("Downloading..."),
flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_NO_SEPARATOR, flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_NO_SEPARATOR,
parent=self.dialog) parent=self.dialog)
dialog.set_transient_for(self.dialog) dialog.set_transient_for(self.dialog)
@ -665,7 +665,7 @@ class AddTorrentDialog(component.Component):
else: else:
log.debug("Download failed: %s", result) log.debug("Download failed: %s", result)
dialog.destroy() dialog.destroy()
dialogs.ErrorDialog(_("Download Failed"), _("Failed to download : %s" % url), dialogs.ErrorDialog(_("Download Failed"), "%s %s" % (_("Failed to download:"), url),
details=result.getErrorMessage(), parent=self.dialog).run() details=result.getErrorMessage(), parent=self.dialog).run()
return result return result

View File

@ -370,7 +370,7 @@ class CreateTorrentDialog:
def _on_create_torrent_progress(self, value, num_pieces): def _on_create_torrent_progress(self, value, num_pieces):
percent = float(value)/float(num_pieces) percent = float(value)/float(num_pieces)
pbar = self.glade.get_widget("progressbar") pbar = self.glade.get_widget("progressbar")
pbar.set_text(_("%.2f%%") % (percent*100)) pbar.set_text("%.2f%%" % (percent*100))
if percent >= 0 and percent <= 1.0: if percent >= 0 and percent <= 1.0:
pbar.set_fraction(percent) pbar.set_fraction(percent)

View File

@ -491,7 +491,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-connect</property> <property name="label" translatable="no">gtk-connect</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="response_id">0</property> <property name="response_id">0</property>
<signal name="clicked" handler="on_button_connect_clicked"/> <signal name="clicked" handler="on_button_connect_clicked"/>

View File

@ -34,7 +34,7 @@
<widget class="GtkLabel" id="label_header"> <widget class="GtkLabel" id="label_header">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="no">label</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
</widget> </widget>
<packing> <packing>

View File

@ -119,7 +119,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-edit</property> <property name="label" translatable="no">gtk-edit</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="response_id">0</property> <property name="response_id">0</property>
<signal name="clicked" handler="on_button_edit_clicked"/> <signal name="clicked" handler="on_button_edit_clicked"/>

View File

@ -84,7 +84,7 @@
</child> </child>
<child> <child>
<widget class="GtkImageMenuItem" id="menuitem_quit"> <widget class="GtkImageMenuItem" id="menuitem_quit">
<property name="label" translatable="yes">gtk-quit</property> <property name="label" translatable="no">gtk-quit</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
@ -105,7 +105,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<widget class="GtkImageMenuItem" id="menuitem_preferences"> <widget class="GtkImageMenuItem" id="menuitem_preferences">
<property name="label" translatable="yes">gtk-preferences</property> <property name="label" translatable="no">gtk-preferences</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>

View File

@ -493,7 +493,7 @@
<widget class="GtkLabel" id="label29"> <widget class="GtkLabel" id="label29">
<property name="visible">True</property> <property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">page 6</property> <property name="label" translatable="no">page 6</property>
</widget> </widget>
<packing> <packing>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
@ -601,7 +601,7 @@
<widget class="GtkLabel" id="active_port_label"> <widget class="GtkLabel" id="active_port_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">0000</property> <property name="label" translatable="no">0000</property>
<property name="width_chars">5</property> <property name="width_chars">5</property>
</widget> </widget>
<packing> <packing>
@ -949,7 +949,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="width_chars">4</property> <property name="width_chars">4</property>
<property name="text" translatable="yes">0x00</property> <property name="text" translatable="no">0x00</property>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1282,7 +1282,7 @@ Disabled</property>
<widget class="GtkLabel" id="label20"> <widget class="GtkLabel" id="label20">
<property name="visible">True</property> <property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">page 7</property> <property name="label" translatable="no">page 7</property>
</widget> </widget>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
@ -1781,7 +1781,7 @@ Disabled</property>
<widget class="GtkLabel" id="label38"> <widget class="GtkLabel" id="label38">
<property name="visible">True</property> <property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">page 8</property> <property name="label" translatable="no">page 8</property>
</widget> </widget>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
@ -2187,7 +2187,7 @@ Disabled</property>
<child> <child>
<widget class="GtkLabel" id="label64"> <widget class="GtkLabel" id="label64">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">page 10</property> <property name="label" translatable="no">page 10</property>
</widget> </widget>
<packing> <packing>
<property name="position">3</property> <property name="position">3</property>
@ -2521,7 +2521,7 @@ Disabled</property>
<child> <child>
<widget class="GtkLabel" id="label65"> <widget class="GtkLabel" id="label65">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">page 11</property> <property name="label" translatable="no">page 11</property>
</widget> </widget>
<packing> <packing>
<property name="position">4</property> <property name="position">4</property>
@ -2748,7 +2748,7 @@ Disabled</property>
<child> <child>
<widget class="GtkLabel" id="label71"> <widget class="GtkLabel" id="label71">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">page 11</property> <property name="label" translatable="no">page 11</property>
</widget> </widget>
<packing> <packing>
<property name="position">5</property> <property name="position">5</property>
@ -3225,7 +3225,7 @@ Disabled</property>
<child> <child>
<widget class="GtkLabel" id="label72"> <widget class="GtkLabel" id="label72">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">page 12</property> <property name="label" translatable="no">page 12</property>
</widget> </widget>
<packing> <packing>
<property name="position">6</property> <property name="position">6</property>

View File

@ -144,7 +144,7 @@
<widget class="GtkImageMenuItem" id="menuitem_quit"> <widget class="GtkImageMenuItem" id="menuitem_quit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">gtk-quit</property> <property name="label" translatable="no">gtk-quit</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_quit_activate"/> <signal name="activate" handler="on_menuitem_quit_activate"/>

View File

@ -78,7 +78,7 @@ class MenuBar(component.Component):
item.set_name(menuitem) item.set_name(menuitem)
item.connect("activate", self.on_menuitem_set_unlimited) item.connect("activate", self.on_menuitem_set_unlimited)
submenu.append(item) submenu.append(item)
item = gtk.MenuItem(_("Other..")) item = gtk.MenuItem(_("Other..."))
item.set_name(menuitem) item.set_name(menuitem)
item.connect("activate", self.on_menuitem_set_other) item.connect("activate", self.on_menuitem_set_other)
submenu.append(item) submenu.append(item)

View File

@ -77,7 +77,7 @@ class Notification:
if not pynotify.init("Deluge"): if not pynotify.init("Deluge"):
return return
title = deluge.common.xml_encode(_("Torrent complete")) title = deluge.common.xml_encode(_("Torrent complete"))
message = deluge.common.xml_encode(status["name"] + "\n" + _("Including %i files" % status["num_files"])) message = deluge.common.xml_encode("%s\n%s %i %s" % (status["name"], _("Including"), status["num_files"], _("files")))
self.note = pynotify.Notification(title, message) self.note = pynotify.Notification(title, message)
self.note.set_icon_from_pixbuf(common.get_logo(48)) self.note.set_icon_from_pixbuf(common.get_logo(48))
if not self.note.show(): if not self.note.show():

View File

@ -198,7 +198,7 @@ class SystemTray(component.Component):
except Exception, e: except Exception, e:
log.debug("Unable to hide system tray menu widgets: %s", e) log.debug("Unable to hide system tray menu widgets: %s", e)
self.tray.set_tooltip(_("Deluge\nNot Connected..")) self.tray.set_tooltip(_("Deluge") + "\n" + _("Not Connected..."))
def shutdown(self): def shutdown(self):
if self.config["enable_system_tray"]: if self.config["enable_system_tray"]:
@ -467,13 +467,13 @@ class SystemTray(component.Component):
vbox = gtk.VBox(spacing=5) vbox = gtk.VBox(spacing=5)
hbox.pack_start(vbox, False) hbox.pack_start(vbox, False)
label = gtk.Label(_("<b><big>Deluge is password protected!</big></b>")) label = gtk.Label("<b><big>%s</big></b>" % _("Deluge is password protected!"))
label.set_use_markup(True) label.set_use_markup(True)
label.set_alignment(0.0, 0.5) label.set_alignment(0.0, 0.5)
label.set_line_wrap(True) label.set_line_wrap(True)
vbox.pack_start(label, False) vbox.pack_start(label, False)
tlabel = gtk.Label(_("<i>Enter your password to continue</i>")) tlabel = gtk.Label("<i>%s</i>" % _("Enter your password to continue"))
tlabel.set_use_markup(True) tlabel.set_use_markup(True)
tlabel.set_alignment(0.0, 0.5) tlabel.set_alignment(0.0, 0.5)
tlabel.set_line_wrap(True) tlabel.set_line_wrap(True)

View File

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
for x in `find . -name '*.glade' |grep -v '.svn\|build'` ; do \ for x in `find . -name '*.glade' |grep -v '.git\|build'` ; do \
for y in gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear \ for y in gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear \
gtk-close gtk-color-picker gtk-convert gtk-copy gtk-cut \ gtk-close gtk-color-picker gtk-connect gtk-convert gtk-copy gtk-cut \
gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question \ gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question \
gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-execute gtk-find \ gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-edit gtk-execute gtk-find \
gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first \ gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first \
gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward \ gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward \
gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to \ gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to \