Merge branch 'translate_updates'

This commit is contained in:
Calum Lind 2011-06-05 17:03:21 +01:00
commit bc56b749ee
13 changed files with 40 additions and 36 deletions

View File

@ -1,18 +1,25 @@
#!/usr/bin/env python
import os
import re
# Paths to exclude
EXCLUSIONS = [
"deluge/scripts"
"deluge/scripts",
"deluge/i18n",
]
POTFILE_IN = "deluge/i18n/POTFILES.in"
print "Creating " + POTFILE_IN + " .."
pattern = "deluge\/plugins\/.*\/build"
compiled = re.compile(pattern)
print "Creating " + POTFILE_IN + " ..."
to_translate = []
for (dirpath, dirnames, filenames) in os.walk("deluge"):
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))
f = open(POTFILE_IN, "wb")

View File

@ -1096,7 +1096,7 @@ also delete the .torrent file used to add it.</property>
<property name="homogeneous">True</property>
<child>
<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="can_focus">True</property>
<property name="receives_default">False</property>
@ -1112,7 +1112,7 @@ also delete the .torrent file used to add it.</property>
</child>
<child>
<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="can_focus">True</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>
<child>
<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="can_focus">True</property>
<property name="receives_default">False</property>
@ -1189,7 +1189,7 @@ also delete the .torrent file used to add it.</property>
</child>
<child>
<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="can_focus">True</property>
<property name="receives_default">False</property>

View File

@ -84,7 +84,7 @@
</child>
<child>
<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="sensitive">False</property>
<property name="can_focus">True</property>

View File

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

View File

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

View File

@ -371,7 +371,7 @@ class CreateTorrentDialog:
def _on_create_torrent_progress(self, value, num_pieces):
percent = float(value)/float(num_pieces)
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:
pbar.set_fraction(percent)

View File

@ -34,7 +34,7 @@
<widget class="GtkLabel" id="label_header">
<property name="visible">True</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>
</widget>
<packing>

View File

@ -619,7 +619,7 @@ used sparingly.</property>
<property name="visible">True</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="label" translatable="yes">page 6</property>
<property name="label" translatable="no">page 6</property>
</widget>
<packing>
<property name="tab_fill">False</property>
@ -741,7 +741,7 @@ used sparingly.</property>
<property name="visible">True</property>
<property name="can_focus">False</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>
</widget>
<packing>
@ -1146,7 +1146,7 @@ used sparingly.</property>
<property name="visible">True</property>
<property name="can_focus">True</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="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
@ -1524,7 +1524,7 @@ Disabled</property>
<property name="visible">True</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="label" translatable="yes">page 7</property>
<property name="label" translatable="no">page 7</property>
</widget>
<packing>
<property name="position">1</property>
@ -2098,7 +2098,7 @@ Disabled</property>
<property name="visible">True</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="label" translatable="yes">page 8</property>
<property name="label" translatable="no">page 8</property>
</widget>
<packing>
<property name="position">2</property>
@ -2831,7 +2831,7 @@ status tab (&lt;b&gt;EXPERIMENTAL!!!&lt;/b&gt;)</property>
<widget class="GtkLabel" id="label64">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">page 10</property>
<property name="label" translatable="no">page 10</property>
</widget>
<packing>
<property name="position">3</property>
@ -3205,7 +3205,7 @@ status tab (&lt;b&gt;EXPERIMENTAL!!!&lt;/b&gt;)</property>
<widget class="GtkLabel" id="label65">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">page 11</property>
<property name="label" translatable="no">page 11</property>
</widget>
<packing>
<property name="position">4</property>
@ -3573,7 +3573,7 @@ status tab (&lt;b&gt;EXPERIMENTAL!!!&lt;/b&gt;)</property>
<widget class="GtkLabel" id="label71">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">page 11</property>
<property name="label" translatable="no">page 11</property>
</widget>
<packing>
<property name="position">5</property>
@ -4119,7 +4119,7 @@ status tab (&lt;b&gt;EXPERIMENTAL!!!&lt;/b&gt;)</property>
<widget class="GtkLabel" id="label72">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">page 12</property>
<property name="label" translatable="no">page 12</property>
</widget>
<packing>
<property name="position">6</property>

View File

@ -144,7 +144,7 @@
<widget class="GtkImageMenuItem" id="menuitem_quit">
<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="label" translatable="yes">gtk-quit</property>
<property name="label" translatable="no">gtk-quit</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_quit_activate"/>

View File

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

View File

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

View File

@ -200,7 +200,7 @@ class SystemTray(component.Component):
except Exception, 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):
if self.config["enable_system_tray"]:
@ -469,13 +469,13 @@ class SystemTray(component.Component):
vbox = gtk.VBox(spacing=5)
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_alignment(0.0, 0.5)
label.set_line_wrap(True)
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_alignment(0.0, 0.5)
tlabel.set_line_wrap(True)

View File

@ -1,9 +1,9 @@
#!/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 \
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-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-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 \