[alacarte] Set the translation domain to GtkBuilder
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [alacarte] Set the translation domain to GtkBuilder
- Date: Tue, 8 Sep 2009 14:34:07 +0000 (UTC)
commit 3554a17989e83873476c9941851c75de8c437195
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Sep 8 16:33:35 2009 +0200
Set the translation domain to GtkBuilder
Alacarte/MainWindow.py | 7 ++++---
Alacarte/Makefile.am | 1 +
Alacarte/config.py.in | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 72b015b..7b7cd35 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -23,8 +23,8 @@ import subprocess
import urllib
try:
from Alacarte import config
- gettext.bindtextdomain('alacarte',config.localedir)
- gettext.textdomain('alacarte')
+ gettext.bindtextdomain(GETTEXT_PACKAGE,config.localedir)
+ gettext.textdomain(GETTEXT_PACKAGE)
except:
pass
_ = gettext.gettext
@@ -48,7 +48,8 @@ class MainWindow:
self.editor = MenuEditor()
gtk.window_set_default_icon_name('alacarte')
self.tree = gtk.Builder()
- self.tree.add_from_file(os.path.join(self.file_path, 'alacarte.ui'))
+ self.tree.set_translation_domain(config.GETTEXT_PACKAGE)
+ self.tree.add_from_file(os.path.join(self.file_path, 'alacarte.ui'))
self.tree.connect_signals(self)
self.setupMenuTree()
self.setupItemTree()
diff --git a/Alacarte/Makefile.am b/Alacarte/Makefile.am
index af6ddd6..6359d93 100644
--- a/Alacarte/Makefile.am
+++ b/Alacarte/Makefile.am
@@ -13,6 +13,7 @@ config.py: config.py.in
-e s!\ libdir\@!$(libdir)! \
-e s!\ PACKAGE\@!$(PACKAGE)! \
-e s!\ VERSION\@!$(VERSION)! \
+ -e s!\ GETTEXT_PACKAGE\@!$(GETTEXT_PACKAGE)! \
< $< > $@
config.py: Makefile
diff --git a/Alacarte/config.py.in b/Alacarte/config.py.in
index 408781e..1b90871 100644
--- a/Alacarte/config.py.in
+++ b/Alacarte/config.py.in
@@ -6,3 +6,4 @@ libdir="@libdir@"
libexecdir="@libexecdir@"
PACKAGE="@PACKAGE@"
VERSION="@VERSION@"
+GETTEXT_PACKAGE="@GETTEXT_PACKAGE@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]