changeset 13179:5adc0c9da9f3

[gaim-migrate @ 15542] SF Patch #1265514 This patch adds intltool integration. It works here; let me know if it breaks anything for you. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 08 Feb 2006 07:44:23 +0000
parents 35190e33a785
children bce53c3536da
files .cvsignore Makefile.am autogen.sh configure.ac gaim.desktop gaim.desktop.in gaim.spec.in intl/.cvsignore po/.cvsignore po/POTFILES.in po/update.pl
diffstat 11 files changed, 44 insertions(+), 363 deletions(-) [+]
line wrap: on
line diff
--- a/.cvsignore	Wed Feb 08 07:09:41 2006 +0000
+++ b/.cvsignore	Wed Feb 08 07:44:23 2006 +0000
@@ -31,3 +31,9 @@
 .temp-gettextize
 gaim.pc
 *.apspec
+intltool-extract
+intltool-extract.in
+intltool-merge
+intltool-merge.in
+intltool-update
+intltool-update.in
--- a/Makefile.am	Wed Feb 08 07:09:41 2006 +0000
+++ b/Makefile.am	Wed Feb 08 07:44:23 2006 +0000
@@ -4,9 +4,12 @@
 		gaim.pc.in \
 		gaim.spec.in \
 		gaim.apspec.in \
-		gaim.desktop \
+		gaim.desktop.in \
 		gaim-installer.nsi \
 		HACKING \
+		intltool-extract.in \
+		intltool-merge.in \
+		intltool-update.in \
 		PROGRAMMING_NOTES \
 		setup-gettext \
 		ChangeLog.win32 \
@@ -36,9 +39,11 @@
 #	cp plugins/perl/common/Gaim.pm $(distdir)/plugins/perl/common
 
 appsdir = $(datadir)/applications
-apps_DATA = gaim.desktop
+apps_in_files = gaim.desktop.in
+apps_DATA = $(apps_in_files:.desktop.in=.desktop)
+@INTLTOOL_DESKTOP_RULE@
 
-SUBDIRS = doc intl m4macros pixmaps plugins po sounds src
+SUBDIRS = doc m4macros pixmaps plugins po sounds src
 
 docs: Doxyfile
 if HAVE_DOXYGEN
--- a/autogen.sh	Wed Feb 08 07:09:41 2006 +0000
+++ b/autogen.sh	Wed Feb 08 07:44:23 2006 +0000
@@ -58,6 +58,8 @@
 	fi
 done
 
+libtoolize -c -f --automake
+intltoolize --force --copy
 aclocal $ACLOCAL_FLAGS -I ./m4 || exit;
 autoheader || exit;
 automake --add-missing --copy;
--- a/configure.ac	Wed Feb 08 07:09:41 2006 +0000
+++ b/configure.ac	Wed Feb 08 07:44:23 2006 +0000
@@ -17,6 +17,9 @@
 AM_PROG_LIBTOOL
 LIBTOOL="$LIBTOOL --silent"
 AC_PROG_INSTALL
+AC_PROG_INTLTOOL
+GETTEXT_PACKAGE=gaim
+AC_SUBST(GETTEXT_PACKAGE)
 
 # before gettexting, in case iconv matters
 case "$host_os" in
@@ -36,8 +39,7 @@
 esac
 
 ALL_LINGUAS="am az bg bn bs ca cs da de el en_AU en_CA en_GB es et fi fr gl gu he hi hu it ja ka ko ku lt mk my_MM nb nl nn pa pl pt_BR pt ro ru sk sl sq sr sr@Latn sv ta te tr uk vi xh zh_CN zh_TW"
-AM_GNU_GETTEXT_VERSION(0.10.40)
-AM_GNU_GETTEXT
+AM_GLIB_GNU_GETTEXT
 
 dnl we don't use autobreak on cygwin!!
 dnl AC_CYGWIN
@@ -1689,7 +1691,6 @@
 		   gaim.apspec
 		   doc/Makefile
 		   doc/gaim.1
-		   intl/Makefile
 		   m4macros/Makefile
 		   pixmaps/Makefile
 		   pixmaps/smileys/Makefile
--- a/gaim.desktop	Wed Feb 08 07:09:41 2006 +0000
+++ b/gaim.desktop	Wed Feb 08 07:44:23 2006 +0000
@@ -1,80 +1,11 @@
 [Desktop Entry]
 Encoding=UTF-8
-Categories=Application;Network;
+Name=Gaim Internet Messenger
+GenericName=Internet Messenger
+Comment=Send instant messages over multiple protocols
 Exec=gaim
 Icon=gaim.png
 StartupNotify=true
 Terminal=false
 Type=Application
-
-Name=Gaim Internet Messenger
-Name[ca]=Missatger d'Internet Gaim
-Name[cs]=Gaim Internet Messenger
-Name[da]=Gaim - internet beskeder
-Name[de]=Gaim Internet Messenger
-Name[es]=Gaim - cliente de mensajería de Internet
-Name[fr]=Gaim Messagerie Internet
-Name[hu]=Gaim azonnali üzenetküldő
-Name[it]=Gaim Internet Messenger
-Name[ja]=Gaim インターネット・メッセンジャー
-Name[ko]=게임 메신저
-Name[nb]=Gaim lynmeldingsklient
-Name[nl]=Gaim - Expresberichten
-Name[pl]=Komunikator Internetowy Gaim
-Name[pt_BR]=Mensageiro via Internet Gaim
-Name[pt]=Mensageiro Internet Gaim
-Name[ro]=Mesagerul Gaim
-Name[ru]=Gaim - клиент обмена мгновенными сообщениями
-Name[sl]=Gaim - spletni sel
-Name[sq]=Lajmësjellësi Internet Gaim
-Name[sv]=Gaim Internet Messenger
-Name[zh_CN]=Gaim 互联网通讯程序
-Name[zh_TW]=Gaim 網路即時通
-
-GenericName=Internet Messenger
-GenericName[ca]=Missatger d'Internet
-GenericName[cs]=Internet Messenger
-GenericName[da]=Internet beskeder
-GenericName[de]=Internet Messenger
-GenericName[es]=Cliente de mensajería de Internet
-GenericName[fr]=Messagerie internet
-GenericName[hu]=Azonnali üzenetküldő
-GenericName[it]=Internet Messenger
-GenericName[ja]=インターネット・メッセンジャー
-GenericName[ko]=메신저
-GenericName[nb]=Lynmeldingsklient
-GenericName[nl]=Expresberichten
-GenericName[pl]=Komunikator Internetowy
-GenericName[pt_BR]=Mensageiro via Internet
-GenericName[pt]=Mensageiro Internet
-GenericName[ro]=Client de mesagerie
-GenericName[ru]=Клиент обмена мгновенными сообщениями
-GenericName[sl]=Spletni sel
-GenericName[sq]=Lajmësjellës Internet
-GenericName[sv]=Meddelandeklient
-GenericName[zh_CN]=互联网通讯程序
-GenericName[zh_TW]=網路即時通
-
-Comment=Send instant messages over multiple protocols
-Comment[ca]=Envieu missatges instantanis en múltiples protocols
-Comment[cs]=Posílat instant message různými protokoly
-Comment[da]=Send beskeder over flere protokoller
-Comment[de]=Multi-Protokoll Instant Messenger Client
-Comment[es]=Cliente de mensajería instantánea multiprotocolo
-Comment[fr]=Envoie des messages instantanés en utilisant divers protocoles
-Comment[hu]=Azonnali üzenetküldés többféle protokoll használatával
-Comment[it]=Client multiprotocollo per messaggi immediati
-Comment[ja]=複数のプロトコルを介してインスタント・メッセージを送信します
-Comment[ko]=다중 프로토콜 메신저
-Comment[nb]=Send lynmeldinger over flere protokoller
-Comment[nl]=Multi-protocol programma voor expresberichten
-Comment[pl]=Komunikator internetowy obsługujący kilka protokołów
-Comment[pt_BR]=Mande mensagens instantâneas por múltiplos protocolos
-Comment[pt]=Envie mensagens instantâneas sobre vários protocolos
-Comment[ro]=Trimiteţi mesaje instant în orice reţea
-Comment[ru]=Обмен мгновенными сообщениями с использованием множества протоколов
-Comment[sl]=Pošiljajte neposredna sporočila prek različnih protokolovs
-Comment[sq]=Dërgoni mesazhe të atypëratyshëm protokollesh të ndryshëm
-Comment[sv]=Sänder snabbmeddelande över många protokoll
-Comment[zh_CN]=通过多种协议发送即时消息
-Comment[zh_TW]=透過多種通訊協定發送即時訊息
+Categories=Application;Network;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gaim.desktop.in	Wed Feb 08 07:44:23 2006 +0000
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Gaim Internet Messenger
+_GenericName=Internet Messenger
+_Comment=Send instant messages over multiple protocols
+Exec=gaim
+Icon=gaim.png
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Application;Network;
--- a/gaim.spec.in	Wed Feb 08 07:09:41 2006 +0000
+++ b/gaim.spec.in	Wed Feb 08 07:44:23 2006 +0000
@@ -145,6 +145,11 @@
 %setup -q -n %{name}-@VERSION@
 
 %build
+libtoolize -c -f --automake
+intltoolize --force --copy
+aclocal $ACLOCAL_FLAGS
+automake -a -c -f
+autoconf
 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
                                     --bindir=%{_bindir} \
                                     --datadir=%{_datadir} \
--- a/intl/.cvsignore	Wed Feb 08 07:09:41 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-Makefile
-po2tbl.sed
-ChangeLog
-Makefile.in
-VERSION
-bindtextdom.c
-config.charset
-dcgettext.c
-dcigettext.c
-dcngettext.c
-dgettext.c
-dngettext.c
-eval-plural.h
-explodename.c
-finddomain.c
-gettext.c
-gettext.h
-gettextP.h
-gmo.h
-hash-string.h
-intl-compat.c
-l10nflist.c
-libgettext.h
-libgnuintl.h
-loadinfo.h
-loadmsgcat.c
-localcharset.c
-locale.alias
-localealias.c
-localename.c
-ngettext.c
-os2compat.c
-os2compat.h
-osdep.c
-plural.y
-plural-exp.c
-plural-exp.h
-ref-add.sin
-ref-del.sin
-textdomain.c
-cat-compat.c
-linux-msg.sed
-po2tbl.sed.in
-xopen-msg.sed
-plural.c
-charset.alias
-libintl.h
-ref-add.sed
-ref-del.sed
--- a/po/.cvsignore	Wed Feb 08 07:09:41 2006 +0000
+++ b/po/.cvsignore	Wed Feb 08 07:44:23 2006 +0000
@@ -3,9 +3,6 @@
 Makefile.in.in
 ChangeLog
 POTFILES
-POTFILES.in.missing
-POTFILES.in.noi18n
-POTFILES.ignore
 Rules-quot
 cat-id-tbl.c
 stamp-cat-id
@@ -17,3 +14,5 @@
 *.header
 *.sin
 ChangeLog.save
+.intltool-merge-cache
+missing
--- a/po/POTFILES.in	Wed Feb 08 07:09:41 2006 +0000
+++ b/po/POTFILES.in	Wed Feb 08 07:44:23 2006 +0000
@@ -1,3 +1,4 @@
+gaim.desktop.in
 plugins/ciphertest.c
 plugins/contact_priority.c
 plugins/crazychat/cc_gaim_plugin.c
@@ -57,6 +58,7 @@
 src/gtkconv.c
 src/gtkdebug.c
 src/gtkdialogs.c
+src/gtkexpander.c
 src/gtkft.c
 src/gtkimhtml.c
 src/gtkimhtmltoolbar.c
@@ -79,7 +81,6 @@
 src/log.c
 src/plugin.c
 src/protocols/bonjour/bonjour.c
-src/protocols/bonjour/bonjour.h
 src/protocols/gg/gg.c
 src/protocols/irc/cmds.c
 src/protocols/irc/dcc_send.c
@@ -129,7 +130,6 @@
 src/protocols/yahoo/ycht.c
 src/protocols/zephyr/zephyr.c
 src/proxy.c
-src/request.h
 src/savedstatuses.c
 src/server.c
 src/status.c
--- a/po/update.pl	Wed Feb 08 07:09:41 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-#!/usr/bin/perl -w
-
-#  GNOME po update utility.
-#  (C) 2000 The Free Software Foundation
-#
-#  Author(s): Kenneth Christiansen
-#  Patches:   Björn Voigt <bjoern@cs.tu-berlin.de>
-
-
-$VERSION = "1.2.5 beta 2";
-$LANG    = $ARGV[0];
-$PACKAGE  = "gaim";
-
-if (! $LANG){
-    print "update.pl:  missing file arguments\n";
-    print "Try `update.pl --help' for more information.\n";
-    exit;
-}
-
-if ($LANG=~/^-(.)*/){
-
-    if ("$LANG" eq "--version" || "$LANG" eq "-V"){
-        print "GNOME PO Updater $VERSION\n";
-        print "Written by Kenneth Christiansen <kenneth\@gnome.org>, 2000.\n\n";
-        print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
-        print "This is free software; see the source for copying conditions.  There is NO\n";
-        print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
-	exit;
-    }
-
-
-    elsif ($LANG eq "--help" || "$LANG" eq "-H"){
-        print "Usage: ./update.pl [OPTIONS] ...LANGCODE\n";
-        print "Updates pot files and merge them with the translations.\n\n";
-        print "  -V, --version                shows the version\n";
-        print "  -H, --help                   shows this help page\n";
-        print "  -P, --pot                    only generates the potfile\n";
-        print "  -M, --maintain               search for missing files in POTFILES.in\n";
-	print "\nExamples of use:\n";
-        print "update.sh --pot    just creates a new pot file from the source\n";
-	print "update.sh da       created new pot file and updated the da.po file\n\n";
-        print "Report bugs to <kenneth\@gnome.org>.\n";
-	exit;
-    }
-
-    elsif($LANG eq "--pot" || "$LANG" eq "-P"){
-
-        print "Building the $PACKAGE.pot ...";
-
-        $b="xgettext --default-domain\=$PACKAGE --directory\=\.\."
-          ." --add-comments --keyword\=\_ --keyword\=N\_"
-          ." --files-from\=\.\/POTFILES\.in ";
-        $b1="test \! -f $PACKAGE\.po \|\| \( rm -f \.\/$PACKAGE\.pot "
-           ."&& mv $PACKAGE\.po \.\/$PACKAGE\.pot \)";
-	if(($ret=system($b . " && " . $b1))==0) {
-	    print "...done\n";
-	}
-	else {
-	    print "...failed\n";
-	}
-
-        exit $ret;
-    }
-
-    elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){
-
-        $a="find ../ -path ../intl -prune -o -print | egrep '.*\\.(c|y|cc|c++|h|gob)\$' ";
-
-        open(BUF2, "POTFILES.in") || die "update.pl:  there's not POTFILES.in!!!\n";
-        print "Searching for missing _(\" \") entries and for deleted files...\n";
-        open(BUF1, "$a|");
-
-
-        @buf2 = <BUF2>;
-        @buf1 = <BUF1>;
-
-        if (-s "POTFILES.ignore") {
-            open FILE, "POTFILES.ignore";
-            while (<FILE>) {
-                if ($_=~/^[^#]/o) {
-                    push @bup, $_;
-                }
-            }
-            print "POTFILES.ignore found! Ignoring files...\n";
-	    @buf2 = (@bup, @buf2);
-	    }
-
-        foreach my $file (@buf1) {
-	    $cmd="xgettext -o - --omit-header --keyword=_ " .
-		"--keyword=N_ " . $file . " |";
-	    open XGET, $cmd;
-	    if(<XGET>) {
-		$file = unpack("x3 A*",$file) . "\n";
-		push @buff1, $file;
-	    }
-	    close XGET;
-#	    open FILE, "<$file";
-#            while (<FILE>) {
-#                if ($_=~/_\(\"/o || $_=~/ngettext\(\"/o){
-#                    $file = unpack("x3 A*",$file) . "\n";
-#                    push @buff1, $file;
-#                    last;
-#                }
-#            }
-	}
-
-        @bufff1 = sort (@buff1);
-
-        @bufff2 = sort (@buf2);
-
-        my %in2;
-        foreach (@bufff2) {
-	    chomp;
-            $in2{$_} = 1;
-        }
-
-        my %in1;
-        foreach (@bufff1) {
-	    chomp;
-            $in1{$_} = 1;
-        }
-
-        foreach (@bufff1) {
-	    chomp;
-            if (!exists($in2{$_})) {
-                push @result, $_ . "\n";
-	    }
-	}
-
-        foreach (@bufff2) {
-	    chomp;
-            if (! -f "../" . $_) {
-                push @deletedfiles, $_ . "\n"; 
-	    }
-	}
-	
-	foreach (@bufff2) {
-	    if (!exists($in1{$_})) {
-		push @noi18nfiles, $_ . "\n";
-	    }
-	}
-
-        if(@result){
-            open OUT, ">POTFILES.in.missing";
-            print OUT @result;
-            print "\nHere are the missing files:\n\n", @result, "\n";
-            print "File POTFILES.in.missing is being placed in directory...\n";
-            print "Please add the files that should be ignored in POTFILES.ignore\n";
-        }
-        else{
-	    unlink("POTFILES.in.missing");
-        }
-	    
-        if(@deletedfiles){
-            open OUT, ">POTFILES.in.deleted";
-            print OUT @deletedfiles;
-            print "\nHere are the deleted files:\n\n", @deletedfiles, "\n";
-            print "File POTFILES.in.deleted is being placed in directory...\n";
-            print "Please delete the files from POTFILES.in or POTFILES.ignore\n";
-        }
-        else{
-	    unlink("POTFILES.in.deleted");
-        }
-
-        if(@noi18nfiles){
-            open OUT, ">POTFILES.in.noi18n";
-            print OUT @noi18nfiles;
-            print "\nHere are the files which currently have no i18n strings:\n\n", 
-	    @noi18nfiles, "\n";
-            print "File POTFILES.in.noi18n is being placed in directory...\n";
-            print "Please delete the files from POTFILES.in or POTFILES.ignore\n";
-	    print "or ignore the files.\n";
-        }
-        else{
-	    unlink("POTFILES.in.noi18n");
-        }
-
-        if( ! @result && ! @deletedfiles ) {
-            print "\nWell, it's all perfect! Congratulation!\n";
-        }
-    }
-
-
-    else{
-        print "update.pl: invalid option -- $LANG\n";
-        print "Try `update.pl --help' for more information.\n";
-    }
-    exit;
-    }
-
-elsif(-s "$LANG.po"){
-
-    print "Building the $PACKAGE.pot ...";
-
-    $c="xgettext --default-domain\=$PACKAGE --directory\=\.\."
-      ." --add-comments --keyword\=\_ --keyword\=N\_"
-      ." --files-from\=\.\/POTFILES\.in ";  
-    $c1="test \! -f $PACKAGE\.po \|\| \( rm -f \.\/$PACKAGE\.pot "
-       ."&& mv $PACKAGE\.po \.\/$PACKAGE\.pot \)";
-
-    if(($ret=system($c . " && " . $c1))==0) {
-	print "...done\n";
-    }
-    else {
-	print "...failed\n";
-    }
-
-    if($ret==0) {
-	print "\nNow merging $LANG.po with $PACKAGE.pot, and creating an updated $LANG.po ...\n";
-
-    
-	$d="if msgmerge $LANG.po $PACKAGE.pot -o $LANG.new.po; then " .
-	    "  mv -f $LANG.new.po $LANG.po; " .
-	    "  msgfmt --statistics  -c -v -o /dev/null $LANG.po; " .
-	    "else " .
-	    "  echo \"msgmerge failed!\"; " .
-	    "  rm -f $LANG.new.po; ".
-	    "fi";
-
-	$ret=system($d);
-
-	exit $ret;
-    }
-}
-
-else{
-    print "update.pl:  sorry $LANG.po does not exist!\n";
-    print "Try `update.pl --help' for more information.\n";    
-    exit;
-}