Commit 51843fcf authored by Gaute Hope's avatar Gaute Hope

Applied patch from Tommi Vainikainen

parent dfaae95b
2005-08-09 Gaute Hope <eg@gaute.vetsj.com>
* src/*: applied the gettext patch from Tommi Vainikainen, http://bugzilla.gnome.org/attachment.cgi?id=50457&action=view
2005-08-04 Tommi Vainikainen <thv@iki.fi>
* configure.ac (ALL_LINGUAS): Added 'fi' (Finnish).
......
......@@ -20,15 +20,6 @@
#pygtk modules
import gtk
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
# TODO: remove this class and let mainWindow generate this dialogbox
class AddWindow:
......
......@@ -29,16 +29,6 @@ import time
import config
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class At:
def __init__(self,root,user,uid,gid):
......
......@@ -31,15 +31,6 @@ import calendar
import config
import preset
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class AtEditor:
def __init__(self, parent, backend, scheduler,defaultIcon):
......
......@@ -2,6 +2,7 @@ version = "@VERSION@"
image_dir = "@prefix@/share/pixmaps"
glade_dir = "@prefix@/share/gnome-schedule"
doc_dir = "@prefix@/share/doc/gnome-schedule-@VERSION@"
locale_dir = "@prefix@/share/locale"
gnomehelpbin = "@GNOMEHELP_CONFIG@"
crontabbin = "@CRONTAB_CONFIG@"
atbin = "@AT_CONFIG@"
......@@ -42,3 +43,9 @@ def getGladedir ():
def getDocdir ():
return doc_dir
def GETTEXT_PACKAGE():
return "@GETTEXT_PACKAGE@"
def GNOMELOCALEDIR():
return locale_dir
......@@ -26,15 +26,6 @@ import tempfile
import lang
import config
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class Crontab:
def __init__(self,root,user,uid,gid):
......
......@@ -31,15 +31,6 @@ import config
import preset
import crontabEditorHelper
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class CrontabEditor:
def __init__(self, parent, backend, scheduler, defaultIcon):
......
......@@ -23,16 +23,6 @@ import gtk
import re
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class CrontabEditorHelper:
def __init__(self, parent):
self.ParentClass = parent
......
......@@ -18,15 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class Editor:
def __init__(self, parent, schedule):
......
......@@ -31,11 +31,7 @@ import mainWindow
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
gettext.install(config.GETTEXT_PACKAGE(), config.GNOMELOCALEDIR(), unicode=1)
if __name__ == "__main__":
signal.signal (signal.SIGINT, signal.SIG_DFL)
......@@ -61,9 +57,9 @@ try:
import gnome.ui
except:
print ("You need to install pyGTK or GTKv2, ")
print ("or set your PYTHONPATH correctly.")
print ("try: export PYTHONPATH= ")
print _("You need to install pyGTK or GTKv2, ")
print _("or set your PYTHONPATH correctly.")
print _("try: export PYTHONPATH= ")
sys.exit(1)
# TODO: Gnome specific
......
......@@ -46,13 +46,17 @@ warnings.filterwarnings("once", "Locale not supported by Python. Using the fallb
# files, it means that you don't have to touch these files at all. In
# that case the advice is simple: don't touch it. hehe :)
import config
##
## I18N
##
import locale
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
domain = config.GETTEXT_PACKAGE()
gettext.bindtextdomain(domain, config.GNOMELOCALEDIR())
gettext.textdomain(domain)
_ = gettext.gettext
......
......@@ -39,15 +39,7 @@ import setuserWindow
import addWindow
import preset
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
gtk.glade.bindtextdomain(domain)
gtk.glade.bindtextdomain(config.GETTEXT_PACKAGE(), config.GNOMELOCALEDIR())
##
## The MainWindow class
......
......@@ -18,16 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
\ No newline at end of file
......@@ -25,16 +25,6 @@ import gobject
import pwd
##
## I18N
##
import gettext
domain = 'gnome-schedule'
gettext.bindtextdomain(domain)
gettext.textdomain(domain)
_ = gettext.gettext
class SetuserWindow:
def __init__(self, parent):
self.ParentClass = parent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment