mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
Merge branch 'translate_updates'
This commit is contained in:
commit
bc56b749ee
13 changed files with 40 additions and 36 deletions
|
@ -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")
|
||||||
|
|
|
@ -1096,7 +1096,7 @@ also delete the .torrent file used to add it.</property>
|
||||||
<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>
|
||||||
|
@ -1112,7 +1112,7 @@ also delete the .torrent file used to add it.</property>
|
||||||
</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>
|
||||||
|
@ -1173,7 +1173,7 @@ also delete the .torrent file used to add it.</property>
|
||||||
<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>
|
||||||
|
@ -1189,7 +1189,7 @@ also delete the .torrent file used to add it.</property>
|
||||||
</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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -649,13 +649,13 @@ class AddTorrentDialog(component.Component):
|
||||||
else:
|
else:
|
||||||
dialogs.ErrorDialog(
|
dialogs.ErrorDialog(
|
||||||
_("Invalid URL"),
|
_("Invalid URL"),
|
||||||
_("%s is not a valid URL." % url),
|
"%s %s" % (url, _("is not a valid URL.")),
|
||||||
self.dialog
|
self.dialog
|
||||||
).run()
|
).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)
|
||||||
|
@ -698,7 +698,7 @@ class AddTorrentDialog(component.Component):
|
||||||
log.debug("Download failed: %s", result)
|
log.debug("Download failed: %s", result)
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
dialogs.ErrorDialog(
|
dialogs.ErrorDialog(
|
||||||
_("Download Failed"), _("Failed to download : %s" % url),
|
_("Download Failed"), "%s %s" % (_("Failed to download:"), url),
|
||||||
details=result.getErrorMessage(), parent=self.dialog
|
details=result.getErrorMessage(), parent=self.dialog
|
||||||
).run()
|
).run()
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -371,7 +371,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)
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -619,7 +619,7 @@ used sparingly.</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -741,7 +741,7 @@ used sparingly.</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -1146,7 +1146,7 @@ used sparingly.</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="width_chars">4</property>
|
<property name="width_chars">4</property>
|
||||||
<property name="text" translatable="yes">0x00</property>
|
<property name="text">0x00</property>
|
||||||
<property name="primary_icon_activatable">False</property>
|
<property name="primary_icon_activatable">False</property>
|
||||||
<property name="secondary_icon_activatable">False</property>
|
<property name="secondary_icon_activatable">False</property>
|
||||||
<property name="primary_icon_sensitive">True</property>
|
<property name="primary_icon_sensitive">True</property>
|
||||||
|
@ -1524,7 +1524,7 @@ Disabled</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -2098,7 +2098,7 @@ Disabled</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -2831,7 +2831,7 @@ status tab (<b>EXPERIMENTAL!!!</b>)</property>
|
||||||
<widget class="GtkLabel" id="label64">
|
<widget class="GtkLabel" id="label64">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -3205,7 +3205,7 @@ status tab (<b>EXPERIMENTAL!!!</b>)</property>
|
||||||
<widget class="GtkLabel" id="label65">
|
<widget class="GtkLabel" id="label65">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -3573,7 +3573,7 @@ status tab (<b>EXPERIMENTAL!!!</b>)</property>
|
||||||
<widget class="GtkLabel" id="label71">
|
<widget class="GtkLabel" id="label71">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
@ -4119,7 +4119,7 @@ status tab (<b>EXPERIMENTAL!!!</b>)</property>
|
||||||
<widget class="GtkLabel" id="label72">
|
<widget class="GtkLabel" id="label72">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</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>
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -81,7 +81,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)
|
||||||
|
|
|
@ -82,8 +82,8 @@ class Notification:
|
||||||
return
|
return
|
||||||
title = deluge.common.xml_encode(_("Torrent complete"))
|
title = deluge.common.xml_encode(_("Torrent complete"))
|
||||||
message = deluge.common.xml_encode(
|
message = deluge.common.xml_encode(
|
||||||
status["name"] + "\n" +
|
"%s\n%s %i %s" % (status["name"],
|
||||||
_("Including %i files" % status["num_files"])
|
_("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))
|
||||||
|
|
|
@ -200,7 +200,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"]:
|
||||||
|
@ -469,13 +469,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)
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue