Make preferences tabs translatable
This commit is contained in:
parent
1b8efd5d10
commit
69e2154004
|
@ -52,7 +52,7 @@ class GtkUI(ui.UI):
|
|||
log.debug("Blocklist GtkUI disable..")
|
||||
|
||||
# Remove the preferences page
|
||||
self.plugin.remove_preferences_page("Blocklist")
|
||||
self.plugin.remove_preferences_page(_("Blocklist"))
|
||||
|
||||
# Remove status item
|
||||
component.get("StatusBar").remove_item(self.status_item)
|
||||
|
@ -189,5 +189,5 @@ class GtkUI(ui.UI):
|
|||
|
||||
# Add the page to the preferences dialog
|
||||
self.plugin.add_preferences_page(
|
||||
"Blocklist",
|
||||
_("Blocklist"),
|
||||
self.glade.get_widget("blocklist_prefs_box"))
|
||||
|
|
|
@ -73,11 +73,6 @@ class GtkUI(ui.UI):
|
|||
except Exception, e:
|
||||
log.debug(e)
|
||||
|
||||
|
||||
def get_pixmap(self, fname):
|
||||
"""Returns a pixmap file included with plugin"""
|
||||
return pkg_resources.resource_filename("blocklist", os.path.join("data", fname))
|
||||
|
||||
def load_interface(self):
|
||||
#sidebar
|
||||
#disabled
|
||||
|
@ -106,5 +101,3 @@ class GtkUI(ui.UI):
|
|||
log.debug("add columns")
|
||||
|
||||
component.get("TorrentView").add_text_column(_("Label"), status_field=["label"])
|
||||
|
||||
|
||||
|
|
|
@ -45,14 +45,14 @@ class LabelConfig(object):
|
|||
self.glade = gtk.glade.XML(self.get_resource("label_pref.glade"))
|
||||
|
||||
|
||||
self.plugin.add_preferences_page("Label", self.glade.get_widget("label_prefs_box"))
|
||||
self.plugin.add_preferences_page(_("Label"), self.glade.get_widget("label_prefs_box"))
|
||||
self.plugin.register_hook("on_show_prefs", self.load_settings)
|
||||
self.plugin.register_hook("on_apply_prefs", self.on_apply_prefs)
|
||||
|
||||
self.load_settings()
|
||||
|
||||
def unload(self):
|
||||
self.plugin.remove_preferences_page("Label")
|
||||
self.plugin.remove_preferences_page(_("Label"))
|
||||
self.plugin.deregister_hook("on_apply_prefs", self.on_apply_prefs)
|
||||
self.plugin.deregister_hook("on_show_prefs", self.load_settings)
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ class Preferences(component.Component):
|
|||
self.treeview.append_column(column)
|
||||
# Add the default categories
|
||||
i = 0
|
||||
for category in ["Downloads", "Network", "Bandwidth", "Interface",
|
||||
"Other", "Daemon", "Queue", "Proxy", "Notification", "Plugins"]:
|
||||
for category in [_("Downloads"), _("Network"), _("Bandwidth"), _("Interface"),
|
||||
_("Other"), _("Daemon"), _("Queue"), _("Proxy"), _("Notification"), _("Plugins")]:
|
||||
self.liststore.append([i, category])
|
||||
i += 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue