From 21bb91f1b96c6e276ffeefb7425b409b22e7615a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Aug 2008 20:20:09 +0200 Subject: add i18n --- .gitignore | 10 ++++++++++ Makefile.am | 18 ++++++++++++++++-- bootstrap.sh | 9 ++++++++- configure.ac | 16 +++++++++++++++- po/.gitignore | 12 ++++++++++++ po/POTFILES.in | 4 ++++ src/Makefile.am | 16 ++++++++++++---- src/pavucontrol.desktop | 12 ------------ src/pavucontrol.desktop.in | 11 +++++++++++ 9 files changed, 88 insertions(+), 20 deletions(-) create mode 100644 po/.gitignore create mode 100644 po/POTFILES.in delete mode 100644 src/pavucontrol.desktop create mode 100644 src/pavucontrol.desktop.in diff --git a/.gitignore b/.gitignore index 43ed615..531190f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ +ABOUT-NLS +ChangeLog +*~ +config.guess +config.rpath +config.sub +intltool-extract.in +intltool-merge.in +intltool-update.in +m4/ aclocal.m4 *.cache config.h diff --git a/Makefile.am b/Makefile.am index 2b84337..2aeb1ce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,8 +15,15 @@ # You should have received a copy of the GNU General Public License # along with pavucontrol. If not, see . -EXTRA_DIST = bootstrap.sh README LICENSE -SUBDIRS=src doc +EXTRA_DIST = \ + m4/ChangeLog \ + bootstrap.sh \ + README LICENSE \ + intltool-merge.in \ + intltool-update.in \ + intltool-extract.in + +SUBDIRS=src doc po MAINTAINERCLEANFILES=README noinst_DATA = README @@ -33,11 +40,18 @@ homepage: all dist cp doc/README.html doc/screenshot.png doc/style.css $$HOME/homepage/private/projects/pavucontrol ln -sf README.html $$HOME/homepage/private/projects/pavucontrol/index.html +DISTCLEANFILES = \ + intltool-extract \ + intltool-merge \ + intltool-update + fedora-snapshot: dist cp $(distdir).tar.gz $$HOME/cvs.fedora/pavucontrol/devel/$(distdir).git`date +%Y%m%d`.tar.gz .PHONY: homepage +ACLOCAL_AMFLAGS = -I m4 + dist-hook: if test -d .git ; then \ git pull ; \ diff --git a/bootstrap.sh b/bootstrap.sh index f03ceff..7de732d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -48,7 +48,14 @@ else rm -rf autom4te.cache rm -f config.cache - run_versioned aclocal "$VERSION" + rm -f Makefile.am~ configure.ac~ + # Evil, evil, evil, evil hack + sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force + test -f Makefile.am~ && mv Makefile.am~ Makefile.am + test -f configure.ac~ && mv configure.ac~ configure.ac + + intltoolize --copy --force --automake + run_versioned aclocal "$VERSION" -I m4 run_versioned autoconf 2.59 -Wall run_versioned autoheader 2.59 run_versioned automake "$VERSION" -a -c --foreign diff --git a/configure.ac b/configure.ac index f1c13d8..e4663e7 100644 --- a/configure.ac +++ b/configure.ac @@ -78,5 +78,19 @@ fi AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) -AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile doc/README.html]) +AM_GNU_GETTEXT([external]) + +IT_PROG_INTLTOOL([0.35.0]) +GETTEXT_PACKAGE=pavucontrol +AC_SUBST([GETTEXT_PACKAGE]) +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) +AM_GLIB_GNU_GETTEXT + +AC_CONFIG_FILES([ +po/Makefile.in +Makefile +src/Makefile +doc/Makefile +doc/README.html]) + AC_OUTPUT diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000..06abd4d --- /dev/null +++ b/po/.gitignore @@ -0,0 +1,12 @@ +.intltool-merge-cache +Makefile.in.in +Makevars.template +POTFILES +Rules-quot +boldquot.sed +en@boldquot.header +en@quot.header +insert-header.sin +pavucontrol.pot +quot.sed +remove-potcdate.sin diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..0166fc3 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,4 @@ +[encoding: UTF-8] +src/pavucontrol.desktop.in +src/pavucontrol.glade +src/pavucontrol.cc diff --git a/src/Makefile.am b/src/Makefile.am index 4c465cc..c79c17f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,15 +16,23 @@ # along with pavucontrol. If not, see . desktopdir = $(datadir)/applications +gladedir = $(pkgdatadir) +localedir = $(datadir)/locale bin_PROGRAMS=pavucontrol - -dist_pkgdata_DATA=pavucontrol.glade -dist_desktop_DATA=pavucontrol.desktop +glade_DATA=pavucontrol.glade +desktop_in_files=pavucontrol.desktop.in +desktop_DATA=$(desktop_in_files:.desktop.in=.desktop) pavucontrol_SOURCES=pavucontrol.cc pavucontrol_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(PULSE_LIBS) pavucontrol_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(PULSE_CFLAGS) -pavucontrol_CXXFLAGS+=-DGLADE_FILE=\"$(pkgdatadir)/pavucontrol.glade\" +pavucontrol_CXXFLAGS+=-DGLADE_FILE=\"$(gladedir)/pavucontrol.glade\" #pavucontrol_CXXFLAGS+=-DGLADE_FILE=\"pavucontrol.glade\" + +EXTRA_DIST = $(glade_DATA) $(desktop_in_files) + +CLEANFILES = $(desktop_DATA) + +@INTLTOOL_DESKTOP_RULE@ diff --git a/src/pavucontrol.desktop b/src/pavucontrol.desktop deleted file mode 100644 index fecc007..0000000 --- a/src/pavucontrol.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=PulseAudio Volume Control -GenericName=Volume Control -Comment=Adjust the volume level -Exec=pavucontrol -Icon=multimedia-volume-control -StartupNotify=true -Type=Application -Categories=Application;AudioVideo;Audio; -GenericName[en_GB]=Volume Control diff --git a/src/pavucontrol.desktop.in b/src/pavucontrol.desktop.in new file mode 100644 index 0000000..5c50478 --- /dev/null +++ b/src/pavucontrol.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +_Name=PulseAudio Volume Control +_GenericName=Volume Control +_Comment=Adjust the volume level +Exec=pavucontrol +Icon=multimedia-volume-control +StartupNotify=true +Type=Application +Categories=Application;AudioVideo;Audio; -- cgit