diff options
author | Takao Fujiwara <takao.fujiwara@sun.com> | 2008-09-07 15:54:20 +1000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-12-12 21:46:48 +0100 |
commit | 4e0e2fd598d2d155a55e58b024de5b58592bec0e (patch) | |
tree | cce80396caa9d878b961be72ac243db0db945ecc /avahi-python | |
parent | f46bf65ce34ebd9c6bbcbe3628bd243bfa4bb129 (diff) |
Add localization support to avahi-ui and avahi-discover
Closes #122
Signed-off-by: Ted Percival <ted@midg3t.net>
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Diffstat (limited to 'avahi-python')
-rw-r--r-- | avahi-python/avahi-discover/Makefile.am | 8 | ||||
-rw-r--r-- | avahi-python/avahi-discover/avahi-discover.desktop.in.in (renamed from avahi-python/avahi-discover/avahi-discover.desktop.in) | 4 | ||||
-rwxr-xr-x | avahi-python/avahi-discover/avahi-discover.in | 5 |
3 files changed, 12 insertions, 5 deletions
diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am index c1d6cab..e9c5583 100644 --- a/avahi-python/avahi-discover/Makefile.am +++ b/avahi-python/avahi-discover/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ __init__.py \ SimpleGladeApp.py \ avahi-discover.in \ - avahi-discover.desktop.in + avahi-discover.desktop.in.in if HAVE_PYTHON if HAVE_PYTHON_DBUS @@ -41,6 +41,7 @@ if HAVE_GDBM pythonscripts += \ avahi-discover desktop_DATA += avahi-discover.desktop +@INTLTOOL_DESKTOP_RULE@ avahi_discover_PYTHON += __init__.py SimpleGladeApp.py endif @@ -48,14 +49,17 @@ if HAVE_DBM pythonscripts += \ avahi-discover desktop_DATA += avahi-discover.desktop +@INTLTOOL_DESKTOP_RULE@ avahi_discover_PYTHON += __init__.py SimpleGladeApp.py endif -avahi-discover.desktop: avahi-discover.desktop.in +avahi-discover.desktop.in: avahi-discover.desktop.in.in sed -e 's,@bindir\@,$(bindir),g' $< > $@ avahi-discover: avahi-discover.in sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@GETTEXT_PACKAGE\@,"$(GETTEXT_PACKAGE)",g' \ + -e 's,@LOCALEDIR\@,"$(datadir)/locale",g' \ -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@ chmod +x $@ diff --git a/avahi-python/avahi-discover/avahi-discover.desktop.in b/avahi-python/avahi-discover/avahi-discover.desktop.in.in index e896192..031024c 100644 --- a/avahi-python/avahi-discover/avahi-discover.desktop.in +++ b/avahi-python/avahi-discover/avahi-discover.desktop.in.in @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 Encoding=UTF-8 -Name=Avahi Zeroconf Browser -Comment=Browse for Zeroconf services available on your network +_Name=Avahi Zeroconf Browser +_Comment=Browse for Zeroconf services available on your network Exec=@bindir@/avahi-discover Terminal=false Type=Application diff --git a/avahi-python/avahi-discover/avahi-discover.in b/avahi-python/avahi-discover/avahi-discover.in index be8c08b..0558424 100755 --- a/avahi-python/avahi-discover/avahi-discover.in +++ b/avahi-python/avahi-discover/avahi-discover.in @@ -22,8 +22,11 @@ import os, sys try: - import avahi, gtk, gobject, dbus, avahi.ServiceTypeDatabase + import avahi, gettext, gtk, gobject, dbus, avahi.ServiceTypeDatabase from avahi_discover.SimpleGladeApp import SimpleGladeApp + gtk.glade.bindtextdomain(@GETTEXT_PACKAGE@, @LOCALEDIR@) + gtk.glade.textdomain(@GETTEXT_PACKAGE@) + _ = gettext.gettext except ImportError, e: print "Sorry, to use this tool you need to install Avahi, pygtk and python-dbus.\n Error: %s" % e sys.exit(1) |