[nanny] Fix gettext bug in NannySystray



commit 2bf4fdd10839e0d1a73a1f48bf945c67cd6fc175
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Sat Feb 13 22:04:33 2010 +0100

    Fix gettext bug in NannySystray

 client/gnome/__init__.py.in           |   36 +++++++++++++++++++++++++++++++++
 client/gnome/admin/src/__init__.py.in |   10 ---------
 configure.ac                          |    1 +
 3 files changed, 37 insertions(+), 10 deletions(-)
---
diff --git a/client/gnome/__init__.py.in b/client/gnome/__init__.py.in
new file mode 100644
index 0000000..5828bd7
--- /dev/null
+++ b/client/gnome/__init__.py.in
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2009,2010 Junta de Andalucia
+# 
+# Authors:
+#   Roberto Majadas <roberto.majadas at openshine.com>
+#   Cesar Garcia Tapia <cesar.garcia.tapia at openshine.com>
+#   Luis de Bethencourt <luibg at openshine.com>
+#   Pablo Vieytes <pvieytes at openshine.com>
+#
+# 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
+
+import os
+import gettext
+import __builtin__
+
+__builtin__._ = gettext.gettext
+
+GETTEXT_DOMAIN = 'nanny'
+locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
+
+gettext.bindtextdomain(GETTEXT_DOMAIN, locale_dir)
+gettext.textdomain(GETTEXT_DOMAIN)
diff --git a/client/gnome/admin/src/__init__.py.in b/client/gnome/admin/src/__init__.py.in
index 25acb5b..1290c37 100644
--- a/client/gnome/admin/src/__init__.py.in
+++ b/client/gnome/admin/src/__init__.py.in
@@ -26,21 +26,11 @@
 
 import os
 import gtk
-import gettext
-import __builtin__
 
 share_files_dir= os.path.join("@prefix@","share/","nanny/client/gnome/admin/")
 ui_files_dir= os.path.join(share_files_dir,"ui/")
 icons_files_dir= os.path.join(share_files_dir,"icons/")
 
-__builtin__._ = gettext.gettext
-
-GETTEXT_DOMAIN = 'nanny'
-locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
-
-gettext.bindtextdomain(GETTEXT_DOMAIN, locale_dir)
-gettext.textdomain(GETTEXT_DOMAIN)
-
 from AdminConsole import AdminConsole
 from ConfigureProxyDialog import ConfigureProxyDialog
 from ScheduleCalendar import ScheduleCalendar
diff --git a/configure.ac b/configure.ac
index 0588660..14822c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,6 +199,7 @@ client/common/icons/48x48/Makefile
 client/common/icons/256x256/Makefile
 client/common/icons/scalable/Makefile
 client/gnome/Makefile
+client/gnome/__init__.py
 client/gnome/systray/Makefile
 client/gnome/systray/src/Makefile
 client/gnome/systray/src/__init__.py



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]