From 22317356c5c67a0e0b3de16cf2f7dca6a319b895 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 22 Nov 2007 00:02:06 +0000 Subject: [PATCH] plugin name translations --- plugins/BlocklistImport/__init__.py | 2 +- plugins/DesiredRatio/__init__.py | 2 +- plugins/EventLogging/__init__.py | 2 +- plugins/ExtraStats/__init__.py | 2 +- plugins/MoveTorrent/__init__.py | 2 +- plugins/NetworkGraph/__init__.py | 19 +- plugins/NetworkGraph/graph_preferences.glade | 514 ++++++++++--------- plugins/NetworkHealth/__init__.py | 2 +- plugins/Scheduler/__init__.py | 27 + plugins/SpeedLimiter/__init__.py | 2 +- plugins/TorrentCreator/__init__.py | 2 +- plugins/TorrentFiles/__init__.py | 22 +- plugins/TorrentNotification/__init__.py | 2 +- plugins/TorrentPeers/__init__.py | 22 +- plugins/TorrentSearch/__init__.py | 2 +- plugins/WebSeed/__init__.py | 2 +- src/__init__.py | 14 +- 17 files changed, 373 insertions(+), 267 deletions(-) diff --git a/plugins/BlocklistImport/__init__.py b/plugins/BlocklistImport/__init__.py index a9c4d97bc..1e32c87f6 100644 --- a/plugins/BlocklistImport/__init__.py +++ b/plugins/BlocklistImport/__init__.py @@ -3,7 +3,7 @@ # Distributed under the same terms as Deluge ## -plugin_name = _("Blocklist Importer") +plugin_name = "Blocklist Importer" plugin_author = "Steve 'Tarka' Smith" plugin_version = "0.4" plugin_description = _(""" diff --git a/plugins/DesiredRatio/__init__.py b/plugins/DesiredRatio/__init__.py index 9490a38b0..9c168be22 100644 --- a/plugins/DesiredRatio/__init__.py +++ b/plugins/DesiredRatio/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Desired Ratio") +plugin_name = "Desired Ratio" plugin_author = "Andrew Resch" plugin_version = "0.1" plugin_description = _("Set the desired ratio for a torrent.") diff --git a/plugins/EventLogging/__init__.py b/plugins/EventLogging/__init__.py index ea97b7faf..0c63da9f2 100644 --- a/plugins/EventLogging/__init__.py +++ b/plugins/EventLogging/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Event Logging") +plugin_name = "Event Logging" plugin_author = "Micah Bucy" plugin_version = "0.2" plugin_description = _(""" diff --git a/plugins/ExtraStats/__init__.py b/plugins/ExtraStats/__init__.py index 8e3a19488..8aa0478dc 100644 --- a/plugins/ExtraStats/__init__.py +++ b/plugins/ExtraStats/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Extra Stats") +plugin_name = "Extra Stats" plugin_author = "Micah Bucy" plugin_version = "0.1" plugin_description = _(""" diff --git a/plugins/MoveTorrent/__init__.py b/plugins/MoveTorrent/__init__.py index 701a06840..4a48e920d 100644 --- a/plugins/MoveTorrent/__init__.py +++ b/plugins/MoveTorrent/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Move Torrent") +plugin_name = "Move Torrent" plugin_author = "Marcos Pinto" plugin_version = "0.2" plugin_description = _("This plugin allows users to move the torrent to a \ diff --git a/plugins/NetworkGraph/__init__.py b/plugins/NetworkGraph/__init__.py index ff3a16682..24d933327 100644 --- a/plugins/NetworkGraph/__init__.py +++ b/plugins/NetworkGraph/__init__.py @@ -30,9 +30,9 @@ # this exception statement from your version. If you delete this exception # statement from all source files in the program, then also delete it here. -plugin_name = _("Network Activity Graph") -plugin_author = "Alon Zakai, Zach Tibbitts" -plugin_version = "0.2" +plugin_name = "Network Activity Graph" +plugin_author = "Alon Zakai, Zach Tibbitts, Cinar Sahin" +plugin_version = "0.2.1" plugin_description = _("Network Activity Graph plugin\n\nWritten by Kripkenstein") @@ -134,6 +134,11 @@ class NetworkGraph: else: self.glade.get_widget("Line_Scale").get_adjustment().set_value(2); + if (self.config.get("length") > 59) & (self.config.get("length") < 3601): + self.glade.get_widget("History_Scale").get_adjustment().set_value(self.config.get("length")) + else: + self.glade_get_widget("History_Scale").get_adjustment().set_value(60); + if self.config.get("colors_set"): dl_color = self.config.get("down_line_color") df_color = self.config.get("down_fill_color") @@ -177,6 +182,7 @@ class NetworkGraph: self.glade.get_widget("Upload_Fill").set_color(gtk.gdk.Color(21627,21627,65535)) self.glade.get_widget("Upload_Fill").set_alpha(32768) self.glade.get_widget("Line_Scale").get_adjustment().set_value(4); + self.glade.get_widget("History_Scale").get_adjustment().set_value(60); self.glade.get_widget("Mean_Speed_Check").set_active(True) self.glade.get_widget("Max_Speed_Check").set_active(False) self.glade.get_widget("Legend_Check").set_active(True) @@ -244,6 +250,11 @@ class NetworkGraph: else: self.tab_graph.line_size = 4 + if (self.config.get("length") > 59) & (self.config.get("length") < 3601): + self.tab_graph.length = self.config.get("length") + else: + self.tab_graph.length = 60 + if self.config.get("mean_selected"): self.tab_graph.enable_mean() else: @@ -270,6 +281,7 @@ class NetworkGraph: self.tab_graph.enable_mean() self.tab_graph.enable_legend() self.tab_graph.line_size = 4 + self.tab_graph.length = 60 def reset_download(self,src): self.glade.get_widget("Download_Line_Check").set_active(True) @@ -316,6 +328,7 @@ class NetworkGraph: self.config.set("colors_set",True) self.config.set("line_size",self.glade.get_widget("Line_Scale").get_adjustment().get_value()) + self.config.set("length",self.glade.get_widget("History_Scale").get_adjustment().get_value()) self.config.set("mean_selected",self.glade.get_widget("Mean_Speed_Check").get_active()) self.config.set("max_selected",self.glade.get_widget("Max_Speed_Check").get_active()) self.config.set("legend_selected",self.glade.get_widget("Legend_Check").get_active()) diff --git a/plugins/NetworkGraph/graph_preferences.glade b/plugins/NetworkGraph/graph_preferences.glade index 7048ad64c..5032fe8f7 100644 --- a/plugins/NetworkGraph/graph_preferences.glade +++ b/plugins/NetworkGraph/graph_preferences.glade @@ -1,6 +1,6 @@ - + 5 @@ -16,7 +16,7 @@ True - 9 + 10 7 4 @@ -24,58 +24,27 @@ True True Show Legend + 0 True 7 - 8 - 9 + 9 + 10 GTK_FILL GTK_FILL - - 20 - True - - - - 5 - 6 - 3 - 4 - GTK_FILL - GTK_FILL - 10 - - - - - 20 - True - - - - 5 - 6 - 1 - 2 - GTK_FILL - GTK_FILL - 10 - - - - + True True True Reset colors to their defaults - 1 - + 0 + - + True gtk-clear @@ -84,95 +53,18 @@ 6 7 - 1 - 2 - - - - - - - 20 - True - - - - 2 - 3 3 4 - GTK_FILL - GTK_FILL - 10 - - - - - 20 - True - - - - 2 - 3 - 1 - 2 - GTK_FILL - GTK_FILL - 10 - - - - - True - Line Size - - - 2 - 5 - 6 - GTK_FILL - - - - - True - 4 1 5 0 0 0 - 0 - GTK_POS_RIGHT - - - 2 - 7 - 5 - 6 - GTK_FILL - - 30 - True - 0 - 1 - <b>Misc</b> - True - - - 7 - 4 - 5 - GTK_FILL - GTK_FILL - - - - + True True - Show Mean Speed + Show Max Speed + 0 True @@ -184,122 +76,34 @@ - + True - True - True - True - #54545454ffff - 32768 + 0 + 1 + <b>Download</b> + True - 4 - 5 - 3 - 4 - - - - - - - True - True - Fill - True - - - 3 - 4 - 3 - 4 - + 7 + GTK_FILL GTK_FILL - - True - True - True - True - #00000000ffff - 49153 - - - 1 - 2 - 3 - 4 - - - - - - + True True Line + 0 True - 3 - 4 - - GTK_FILL - - - - - True - True - True - True - #8080ffff8080 - - - 4 - 5 - 1 - 2 - - - - - - - True - True - Fill - 1 - True - - - 3 - 4 1 2 GTK_FILL - - - True - True - True - True - #0000c0c00000 - - - 1 - 2 - 1 - 2 - - - - 30 @@ -319,13 +123,35 @@ - + True True - Line + True + 0 + True + #0000c0c00000 + + + 1 + 2 + 1 + 2 + + + + + + + True + True + Fill + 1 + 0 True + 3 + 4 1 2 @@ -333,43 +159,228 @@ - + True - 0 - 1 - <b>Download</b> - True + True + True + 0 + True + #8080ffff8080 - 7 - GTK_FILL + 4 + 5 + 1 + 2 + + + + + + + True + True + Line + 0 + True + + + 3 + 4 + GTK_FILL - + True True - Show Max Speed + True + 0 + True + #00000000ffff + 49153 + + + 1 + 2 + 3 + 4 + + + + + + + True + True + Fill + 0 + True + + + 3 + 4 + 3 + 4 + + GTK_FILL + + + + + True + True + True + 0 + True + #54545454ffff + 32768 + + + 4 + 5 + 3 + 4 + + + + + + + True + True + Show Mean Speed + 0 True 7 - 6 - 7 + 8 + 9 GTK_FILL GTK_FILL - + + 30 + True + 0 + 1 + <b>Misc</b> + True + PANGO_ELLIPSIZE_START + + + 7 + 4 + 5 + GTK_FILL + GTK_FILL + + + + + True + 60 60 3600 60 60 0 + 0 + GTK_POS_RIGHT + + + 2 + 7 + 5 + 6 + GTK_FILL + + + + + + True + History (sec) + + + 2 + 5 + 6 + + GTK_FILL + + + + + True + 4 1 5 0 0 0 + 0 + GTK_POS_RIGHT + + + 2 + 7 + 6 + 7 + GTK_FILL + + + + + + True + Line Size + + + 2 + 6 + 7 + + GTK_FILL + + + + + 20 + True + + + + 2 + 3 + 1 + 2 + GTK_FILL + GTK_FILL + 10 + + + + + 20 + True + + + + 2 + 3 + 3 + 4 + GTK_FILL + GTK_FILL + 10 + + + + True True True Reset colors to their defaults - + 1 + 0 + - + True gtk-clear @@ -378,12 +389,44 @@ 6 7 - 3 - 4 + 1 + 2 + + + 20 + True + + + + 5 + 6 + 1 + 2 + GTK_FILL + GTK_FILL + 10 + + + + + 20 + True + + + + 5 + 6 + 3 + 4 + GTK_FILL + GTK_FILL + 10 + + False @@ -401,6 +444,7 @@ True gtk-cancel True + 0 diff --git a/plugins/NetworkHealth/__init__.py b/plugins/NetworkHealth/__init__.py index 0516922fc..cd5195581 100644 --- a/plugins/NetworkHealth/__init__.py +++ b/plugins/NetworkHealth/__init__.py @@ -30,7 +30,7 @@ # this exception statement from your version. If you delete this exception # statement from all source files in the program, then also delete it here. -plugin_name = _("Network Health Monitor") +plugin_name = "Network Health Monitor" plugin_author = "Alon Zakai, Zach Tibbitts" plugin_version = "0.2" plugin_description = _("Network Health Monitor plugin\n\nWritten by Kripkenstein") diff --git a/plugins/Scheduler/__init__.py b/plugins/Scheduler/__init__.py index 8becaa385..4fcd1f9f9 100644 --- a/plugins/Scheduler/__init__.py +++ b/plugins/Scheduler/__init__.py @@ -1,3 +1,30 @@ +# Copyright (C) Marcos Pinto 2007 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, write to: +# The Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301, USA. +# +# In addition, as a special exception, the copyright holders give +# permission to link the code of portions of this program with the OpenSSL +# library. +# You must obey the GNU General Public License in all respects for all of +# the code used other than OpenSSL. If you modify file(s) with this +# exception, you may extend this exception to your version of the file(s), +# but you are not obligated to do so. If you do not wish to do so, delete +# this exception statement from your version. If you delete this exception +# statement from all source files in the program, then also delete it here. # The name of the plugin plugin_name = "Scheduler" diff --git a/plugins/SpeedLimiter/__init__.py b/plugins/SpeedLimiter/__init__.py index e11553d33..d6e414db4 100644 --- a/plugins/SpeedLimiter/__init__.py +++ b/plugins/SpeedLimiter/__init__.py @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -plugin_name = _("Speed Limiter") +plugin_name = "Speed Limiter" plugin_author = "Marcos Pinto" plugin_version = "0.1" plugin_description = _("Set the desired speed limit per torrent.") diff --git a/plugins/TorrentCreator/__init__.py b/plugins/TorrentCreator/__init__.py index 23ea32946..d0869fbbe 100644 --- a/plugins/TorrentCreator/__init__.py +++ b/plugins/TorrentCreator/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Torrent Creator") +plugin_name = "Torrent Creator" plugin_author = "Andrew Resch" plugin_version = "0.1" plugin_description = _("A torrent creator plugin") diff --git a/plugins/TorrentFiles/__init__.py b/plugins/TorrentFiles/__init__.py index 6176393bf..a9e391726 100644 --- a/plugins/TorrentFiles/__init__.py +++ b/plugins/TorrentFiles/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007 +# Copyright (C) Marcos Pinto 2007 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -9,14 +9,26 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# along with this program. If not, write to: +# The Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301, USA. +# +# In addition, as a special exception, the copyright holders give +# permission to link the code of portions of this program with the OpenSSL +# library. +# You must obey the GNU General Public License in all respects for all of +# the code used other than OpenSSL. If you modify file(s) with this +# exception, you may extend this exception to your version of the file(s), +# but you are not obligated to do so. If you do not wish to do so, delete +# this exception statement from your version. If you delete this exception +# statement from all source files in the program, then also delete it here. ### Initialization ### -plugin_name = _("Torrent Files") +plugin_name = "Torrent Files" plugin_author = "Deluge" plugin_version = "0.2" plugin_description = _(""" diff --git a/plugins/TorrentNotification/__init__.py b/plugins/TorrentNotification/__init__.py index afd5a4eb6..abcf68f57 100644 --- a/plugins/TorrentNotification/__init__.py +++ b/plugins/TorrentNotification/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Torrent Notification") +plugin_name = "Torrent Notification" plugin_author = "Micah Bucy" plugin_version = "0.1" plugin_description = _("Make tray icon blink when torrent finishes downloading \ diff --git a/plugins/TorrentPeers/__init__.py b/plugins/TorrentPeers/__init__.py index 1f3ecb4b3..351ed8de7 100644 --- a/plugins/TorrentPeers/__init__.py +++ b/plugins/TorrentPeers/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007 +# Copyright (C) Marcos Pinto 2007 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -9,14 +9,26 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# along with this program. If not, write to: +# The Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301, USA. +# +# In addition, as a special exception, the copyright holders give +# permission to link the code of portions of this program with the OpenSSL +# library. +# You must obey the GNU General Public License in all respects for all of +# the code used other than OpenSSL. If you modify file(s) with this +# exception, you may extend this exception to your version of the file(s), +# but you are not obligated to do so. If you do not wish to do so, delete +# this exception statement from your version. If you delete this exception +# statement from all source files in the program, then also delete it here. ### Initialization ### -plugin_name = _("Torrent Peers") +plugin_name = "Torrent Peers" plugin_author = "Deluge" plugin_version = "0.2" plugin_description = _(""" diff --git a/plugins/TorrentSearch/__init__.py b/plugins/TorrentSearch/__init__.py index 70d94f217..bd6f949f2 100644 --- a/plugins/TorrentSearch/__init__.py +++ b/plugins/TorrentSearch/__init__.py @@ -30,7 +30,7 @@ # this exception statement from your version. If you delete this exception # statement from all source files in the program, then also delete it here. -plugin_name = _("Torrent Search") +plugin_name = "Torrent Search" plugin_author = "Zach Tibbitts" plugin_version = "0.5" plugin_description = _("A searchbar for torrent search engines") diff --git a/plugins/WebSeed/__init__.py b/plugins/WebSeed/__init__.py index 0427e6238..59b7a1594 100644 --- a/plugins/WebSeed/__init__.py +++ b/plugins/WebSeed/__init__.py @@ -16,7 +16,7 @@ ### Initialization ### -plugin_name = _("Web Seed") +plugin_name = "Web Seed" plugin_author = "Marcos Pinto" plugin_version = "0.1" plugin_description = _("This plugin allows users to add web seeds to their \ diff --git a/src/__init__.py b/src/__init__.py index 56e05e0db..db0dd7bc2 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -31,24 +31,22 @@ # statement from all source files in the program, then also delete it here. import gettext +import gtk.glade import locale import os import common APP = 'deluge' DIR = os.path.join(common.INSTALL_PREFIX, 'share', 'locale') -if not common.windows_check(): +try: + locale.setlocale(locale.LC_ALL, '') +except: try: locale.setlocale(locale.LC_MESSAGES, '') - locale.bindtextdomain(APP, DIR) - locale.textdomain(APP) except: pass -else: - import gtk.glade - locale.setlocale(locale.LC_ALL, '') - gtk.glade.bindtextdomain(APP, DIR) - gtk.glade.textdomain(APP) +gtk.glade.bindtextdomain(APP, DIR) +gtk.glade.textdomain(APP) gettext.bindtextdomain(APP, DIR) gettext.textdomain(APP) gettext.install(APP, DIR, unicode=1)