--- dogtail-0.6.1/Makefile.orig	2007-05-14 10:24:44.800903000 +0900
+++ dogtail-0.6.1/Makefile	2007-05-14 10:30:12.640990000 +0900
@@ -1,9 +1,17 @@
 # dogtail *development* Makefile
 
+SUBDIRS = po recorder sniff
+
 all:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  (cd $$subdir && $(MAKE) all) \
+	done; \
 	python setup.py build_ext --inplace
 
 install:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR) install) \
+	done; \
 	python setup.py install
 
 clean:
--- dogtail-0.6.1/configure.in.orig	1970-01-01 09:00:00.000000000 +0900
+++ dogtail-0.6.1/configure.in	2007-05-14 10:14:27.292660000 +0900
@@ -0,0 +1,21 @@
+AC_INIT([dogtail], [0.6.1],
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=dogtail])
+AM_INIT_AUTOMAKE
+
+IT_PROG_INTLTOOL([0.35.0])
+AC_PROG_LIBTOOL
+
+dnl Language Support 
+
+GETTEXT_PACKAGE=dogtail
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used])
+AC_SUBST(GETTEXT_PACKAGE)
+
+AM_GLIB_GNU_GETTEXT
+
+AC_OUTPUT([
+po/Makefile.in
+recorder/Makefile
+sniff/Makefile
+])
+
--- dogtail-0.6.1/dogtail/config.py.orig	2007-05-14 10:41:19.034485000 +0900
+++ dogtail-0.6.1/dogtail/config.py	2007-05-14 10:41:55.303737000 +0900
@@ -7,6 +7,8 @@ import os
 import sys
 import locale
 
+GNOMELOCALEDIR="/usr/share/locale"
+
 def _scriptName():
     return os.path.basename(sys.argv[0]).replace('.py','')
 
--- dogtail-0.6.1/dogtail/utils.py.orig	2007-05-14 10:43:07.163863000 +0900
+++ dogtail-0.6.1/dogtail/utils.py	2007-05-14 10:46:26.183301000 +0900
@@ -12,11 +12,15 @@ David Malcolm <dmalcolm@redhat.com>
 
 import os
 import re
+import gettext
 from config import config
 from time import sleep
 from logging import debugLogger as logger
 from logging import TimeStamp
 from errors import DependencyNotFoundError
+gettext.bindtextdomain('dogtail')
+gettext.textdomain('dogtail')
+_ = gettext.gettext
 
 def screenshot(file = 'screenshot.png', timeStamp = True):
     """
@@ -186,15 +190,15 @@ def checkForA11yInteractively():
     """
     if isA11yEnabled(): return
     import gtk
-    dialog = gtk.Dialog('Enable Assistive Technology Support?',
+    dialog = gtk.Dialog(_("Enable Assistive Technology Support?"),
                      None,
                      gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
                      (gtk.STOCK_QUIT, gtk.RESPONSE_CLOSE, 
-                         "_Enable", gtk.RESPONSE_ACCEPT))
-    question = """Dogtail requires that Assistive Technology Support be enabled for it to function. Would you like to enable Assistive Technology support now?
+                         _("_Enable"), gtk.RESPONSE_ACCEPT))
+    question = _("""Dogtail requires that Assistive Technology Support be enabled for it to function. Would you like to enable Assistive Technology support now?
 
 Note that you will have to log out for the change to fully take effect.
-    """.strip()
+    """).strip()
     dialog.set_default_response(gtk.RESPONSE_ACCEPT)
     questionLabel = gtk.Label(question)
     questionLabel.set_line_wrap(True)
--- dogtail-0.6.1/po/LINGUAS.orig	2007-05-14 10:46:56.214296000 +0900
+++ dogtail-0.6.1/po/LINGUAS	2007-05-14 10:47:07.376153000 +0900
@@ -0,0 +1 @@
+#
--- dogtail-0.6.1/po/POTFILES.in.orig	2007-05-14 10:47:46.177760000 +0900
+++ dogtail-0.6.1/po/POTFILES.in	2007-05-14 10:48:53.419975000 +0900
@@ -0,0 +1,11 @@
+# List of source files containing translatable strings.
+# Please keep this file sorted alphabetically.
+[encoding: UTF-8]
+build/lib/dogtail/utils.py
+dogtail/utils.py
+recorder/dogtail-recorder
+recorder/dogtail-recorder.desktop.in
+recorder/recorder.glade
+sniff/sniff
+sniff/sniff.desktop.in
+sniff/sniff.glade
--- dogtail-0.6.1/recorder/Makefile.am.orig	2007-05-14 10:49:41.013044000 +0900
+++ dogtail-0.6.1/recorder/Makefile.am	2007-05-14 10:50:30.134465000 +0900
@@ -0,0 +1,13 @@
+@INTLTOOL_DESKTOP_RULE@
+
+desktopdir       = $(datadir)/applications
+desktop_DATA     = $(desktop_in_files:.desktop.in=.desktop)
+desktop_in_files = \
+	dogtail-recorder.desktop.in
+
+EXTRA_DIST = \
+	$(desktop_in_files) \
+	$(desktop_DATA)
+
+CLEANFILES = $(desktop_DATA)
+
--- dogtail-0.6.1/recorder/dogtail-recorder.desktop.in.orig	2007-05-14 10:59:13.504527000 +0900
+++ dogtail-0.6.1/recorder/dogtail-recorder.desktop.in	2007-05-14 10:00:42.783068000 +0900
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Dogtail Script Recorder
+_Comment=Automate your desktop using Dogtail
+Exec=dogtail-recorder
+Terminal=false
+Type=Application
+Icon=dogtail-head.svg
+StartupNotify=true
+Categories=Application;Development;
--- dogtail-0.6.1/recorder/dogtail-recorder.orig	2007-05-14 10:51:16.230767000 +0900
+++ dogtail-0.6.1/recorder/dogtail-recorder	2007-05-14 10:57:27.606853000 +0900
@@ -4,9 +4,11 @@ appName = 'Script Recorder'
 import os
 os.environ['GTK_MODULES']=''
 
+from dogtail import config
 from dogtail.utils import checkForA11yInteractively
 checkForA11yInteractively()
 
+import gettext
 import atspi
 import dogtail.tree
 import gtk.gdk
@@ -26,6 +28,11 @@ class PlaybackThread(threading.Thread):
 import gobject
 import gnome
 import gtk.glade
+gtk.glade.bindtextdomain('dogtail', config.GNOMELOCALEDIR)
+gtk.glade.textdomain('dogtail')
+gettext.bindtextdomain('dogtail', config.GNOMELOCALEDIR)
+gettext.textdomain('dogtail')
+_ = gettext.gettext
 
 try:
     import gtksourceview
@@ -104,9 +111,9 @@ class RecorderGUI(gnome.Program):
 
     def setWriterClass (self, comboBox):
         selected = comboBox.get_active_text()
-        if selected == "Procedural":
+        if selected == _("Procedural"):
             recorder.writerClass = ProceduralScriptWriter
-        elif selected == "Object-Oriented":
+        elif selected == _("Object-Oriented"):
             recorder.writerClass = OOScriptWriter
         else:
             print selected, "isn't a ScriptWriter, but it is selected. How?"
@@ -165,7 +172,7 @@ class RecorderGUI(gnome.Program):
         """
         Brings up a file chooser dialog asking where to save the script.
         """
-        self.saveFileChooser = gtk.FileChooserDialog("Save Script...", None, \
+        self.saveFileChooser = gtk.FileChooserDialog(_("Save Script..."), None, \
             gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, \
             gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK))
         self.saveFileChooser.set_default_response(gtk.RESPONSE_OK)
--- dogtail-0.6.1/sniff/Makefile.am.orig	2007-05-14 10:01:04.525610000 +0900
+++ dogtail-0.6.1/sniff/Makefile.am	2007-05-14 10:01:46.775936000 +0900
@@ -0,0 +1,13 @@
+@INTLTOOL_DESKTOP_RULE@
+
+desktopdir       = $(datadir)/applications
+desktop_DATA     = $(desktop_in_files:.desktop.in=.desktop)
+desktop_in_files = \
+	sniff.desktop.in
+
+EXTRA_DIST = \
+	$(desktop_in_files) \
+	$(desktop_DATA)
+
+CLEANFILES = $(desktop_DATA)
+
--- dogtail-0.6.1/sniff/sniff.desktop.in.orig	2007-05-14 10:06:24.637513000 +0900
+++ dogtail-0.6.1/sniff/sniff.desktop.in	2007-05-14 10:06:46.772930000 +0900
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=AT-SPI Browser
+_Comment=Browse your Assistive Technology-enabled desktop
+Exec=sniff
+Terminal=false
+Type=Application
+Icon=dogtail-head.svg
+StartupNotify=true
+Categories=Application;Development;
--- dogtail-0.6.1/sniff/sniff.orig	2007-05-14 10:02:13.269322000 +0900
+++ dogtail-0.6.1/sniff/sniff	2007-05-14 10:27:31.782823000 +0900
@@ -9,11 +9,19 @@ checkForA11yInteractively()
 
 from dogtail import tree
 from dogtail import utils
+from dogtail import config
+import gettext
 import gobject
 import gnome
 import atspi
-program = gnome.program_init(appName, '0.1')
 import gtk.glade
+import gnome.ui
+gtk.glade.bindtextdomain('dogtail', config.GNOMELOCALEDIR)
+gtk.glade.textdomain('dogtail')
+gettext.bindtextdomain('dogtail', config.GNOMELOCALEDIR)
+gettext.textdomain('dogtail')
+program = gnome.program_init(appName, '0.1')
+_ = gettext.gettext
 
 import os
 if os.path.exists('sniff.glade'):
@@ -60,7 +68,7 @@ def showAbout(*args):
     about = gtk.AboutDialog()
     about.set_name(appName)
     about.set_authors(appAuthors)
-    about.set_comments('Explore your desktop with Dogtail')
+    about.set_comments(_("Explore your desktop with Dogtail"))
     about.set_website('http://people.redhat.com/zcerza/dogtail/')
     about.show_all()
 
@@ -381,7 +389,7 @@ def main():
     col.pack_end(cellRenderer, expand = False)
     col.set_cell_data_func(cellRenderer, getNodeAttr, 'name')
 
-    col.set_title('Name')
+    col.set_title(_("Name"))
 
     view.insert_column(col, -1)
     #view.insert_column_with_data_func(-1, "Role Name", \
--- dogtail-0.6.1/dogtail.spec.orig	2007-05-14 10:49:04.596143000 +0900
+++ dogtail-0.6.2/dogtail.spec	2007-07-28 08:23:18.573484000 +0900
@@ -1,15 +1,19 @@
 Summary: GUI test tool and automation framework
 Name: dogtail
 Version: 0.6.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPL
 Group: User Interface/X
 URL: http://people.redhat.com/zcerza/dogtail/
 Source0: http://people.redhat.com/zcerza/dogtail/releases/dogtail-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
-BuildRequires: python
+BuildRequires: autoconf
+BuildRequires: automake
 BuildRequires: desktop-file-utils
+BuildRequires: intltool
+BuildRequires: libtool
+BuildRequires: python
 Requires: pyspi >= 0.6.0
 Requires: pygtk2
 Requires: gnome-python2-gconf
@@ -26,10 +30,18 @@ communicate with desktop applications.
 %setup -q
 
 %build
+libtoolize -f
+intltoolize -c -f --automake
+aclocal
+autoconf
+automake -a -c -f
+./configure --prefix=/usr
+make
 python ./setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
 python ./setup.py install -O2 --root=$RPM_BUILD_ROOT --record=%{name}.files
 rm -rf $RPM_BUILD_ROOT/%{_docdir}/dogtail
 find examples -type f -exec chmod 0644 \{\} \;
@@ -62,6 +74,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc examples/
 
 %changelog
+* Mon May 13 2007 Takao Fujiwara <takao.fujiwara@sun.com> - 0.6.2-2
+- Add intltoolize.
+
 * Mon Oct 23 2006 Zack Cerza <zcerza@redhat.com> - 0.6.2-1
 - Post-release version bump.
 
