Glade textdomain oddness
- From: Jason Heeris <jason heeris gmail com>
- To: nautilus-list gnome org
- Subject: Glade textdomain oddness
- Date: Sun, 14 Mar 2010 11:46:39 +0800
Hi,
(I apologise if you get this twice, but I sent a copy as a non-member
and gave up waiting for moderator approval.)
I think there's something wrong with my understanding of Glade
mechanics, so maybe someone here can help me out. I have the property
page test code below, (using Python bindings for Nautilus). When I run
it, under say Debian Squeeze or Ubuntu Karmic, with a non-English
language in use, some of Nautilus' special folders (Desktop, Network,
File System) suddenly get labelled in English.
If I comment out the line "gtk.glade.textdomain(APP_NAME)" in
"__init__", it doesn't happen. But why? All the PyGTK docs say is
"This gtk.glade.textdomain() function allows you to use
internationalisation with glade."
— Jason
----
import nautilus
import gtk
import gtk.glade
APP_NAME = "TestPage"
LOCALE_DIR = "/usr/share/locale"
class TestPage1(nautilus.PropertyPageProvider):
def __init__(self):
gtk.glade.bindtextdomain(APP_NAME, LOCALE_DIR)
gtk.glade.textdomain(APP_NAME)
def get_property_pages(self, items):
label = gtk.Label("Test Page")
label.show()
page = gtk.Label("Rest of page...")
page.show()
ppage = nautilus.PropertyPage('SimpleTestPage',
label,
page)
return [ppage]
----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]