grim/guifications2

[gf2-migrate @ 83]
org.guifications.gf2
2006-09-07, Gary Kramlich
bda8906b6b08
Parents 8c3b0556b8cd
Children 84b06c0b0dd8
[gf2-migrate @ 83]
Moving to intltool.
I believe this is everything, but I'm not a big believer in much :)
--- a/Makefile.am Thu Sep 07 02:44:03 2006 -0400
+++ b/Makefile.am Thu Sep 07 03:16:31 2006 -0400
@@ -7,6 +7,9 @@
guifications-installer.nsi \
INSTALL \
INSTALL.WIN32 \
+ intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in \
Makefile.mingw \
NEWS \
README \
@@ -16,7 +19,7 @@
po/ChangeLog \
po/Makefile.mingw
-SUBDIRS = doc intl nsis pixmaps po src themes
+SUBDIRS = doc nsis pixmaps po src themes
BUILT_SOURCES = gf_config.h
--- a/autogen.sh Thu Sep 07 02:44:03 2006 -0400
+++ b/autogen.sh Thu Sep 07 03:16:31 2006 -0400
@@ -1,11 +1,9 @@
#! /bin/sh
PACKAGE="gaim-guifications"
-SETUP_GETTEXT=./setup-gettext
-
-($SETUP_GETTEXT --gettext-tool) < /dev/null > /dev/null 2>&1 || {
+(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo;
- echo "You must have gettext installed to compile $PACKAGE";
+ echo "You must have intltool installed to compile $PACKAGE";
echo;
exit;
}
@@ -34,19 +32,12 @@
echo "Generating configuration files for $PACKAGE, please wait...."
echo;
-# Backup po/ChangeLog because gettext likes to change it
-cp -p po/ChangeLog po/ChangeLog.save
-
-echo "Running gettextize, please ignore non-fatal messages...."
-$SETUP_GETTEXT
-
-#restore pl/ChangeLog
-mv po/ChangeLog.save po/ChangeLog
-
echo "Running libtoolize, please ignore non-fatal messages...."
echo n | libtoolize --copy --force || exit;
echo;
+libtoolize -c -f --automake
+intltoolize --force --copy
aclocal || exit;
autoheader || exit;
automake --add-missing --copy
--- a/configure.ac Thu Sep 07 02:44:03 2006 -0400
+++ b/configure.ac Thu Sep 07 03:16:31 2006 -0400
@@ -45,9 +45,14 @@
#
# Good o' gettext
#
+AC_PROG_INTLTOOL
+
+GETTEXT_PACKAGE=guifications
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used.])
+
ALL_LINGUAS="bn cs de en_AU en_GB es fr gl he hu it ja mk nl no pt pt_BR ru sk sr sr@Latn sv uk zh_CN zh_TW"
-AM_GNU_GETTEXT_VERSION(0.10.40)
-AM_GNU_GETTEXT
+AM_GLIB_GNU_GETTEXT
#
# Look for the C compiler
@@ -144,7 +149,6 @@
VERSION
gaim-guifications.spec
doc/Makefile
- intl/Makefile
nsis/Makefile
nsis/translations/Makefile
pixmaps/Makefile
--- a/po/stats.pl Thu Sep 07 02:44:03 2006 -0400
+++ b/po/stats.pl Thu Sep 07 03:16:31 2006 -0400
@@ -42,7 +42,7 @@
$now = `date`;
-system("./update.pl --pot > /dev/null");
+system("./intotool-update --pot > /dev/null");
$_ = `msgfmt --statistics $PACKAGE.pot -o /dev/null 2>&1`;
--- a/po/update.pl Thu Sep 07 02:44:03 2006 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-#!/usr/bin/perl -w
-
-# GNOME po update utility.
-# (C) 2000 The Free Software Foundation
-#
-# Author(s): Kenneth Christiansen
-
-
-$VERSION = "1.2.5 beta 2";
-$LANG = $ARGV[0];
-$PACKAGE = "guifications";
-
-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 \)";
-
- `$b`;
- `$b1`;
-
- print "...done\n";
-
- exit;
- }
-
- elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){
-
- $a="find ../ -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...\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){
- open FILE, "<$file";
- while (<FILE>) {
- if ($_=~/_\(\"/o){
- $file = unpack("x3 A*",$file) . "\n";
- push @buff1, $file;
- last;
- }
- }
- }
-
- @bufff1 = sort (@buff1);
-
- @bufff2 = sort (@buf2);
-
- my %in2;
- foreach (@bufff2) {
- $in2{$_} = 1;
- }
-
- foreach (@bufff1){
- if (!exists($in2{$_})){
- push @result, $_ }
- }
-
- if(@result){
- open OUT, ">POTFILES.in.missing";
- print OUT @result;
- print "\nHere are the results:\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{
- 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 \)";
-
- `$c`;
- `$c1`;
-
- print "...done";
-
- print "\nNow merging $LANG.po with $PACKAGE.pot, and creating an updated $LANG.po ...\n";
-
-
- $d="mv $LANG.po $LANG.po.old && msgmerge $LANG.po.old $PACKAGE.pot -o $LANG.po";
-
- $f="msgfmt --statistics $LANG.po";
-
- `$d`;
- `$f`;
-
- unlink "messages";
- unlink "$LANG.po.old";
-
- exit;
-}
-
-else{
- print "update.pl: sorry $LANG.po does not exist!\n";
- print "Try `update.pl --help' for more information.\n";
- exit;
-}
--- a/setup-gettext Thu Sep 07 02:44:03 2006 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-#!/bin/sh
-#
-# setup-gettext - Provides compatibility with versions of gettext
-# from the 0.10.x, 0.11.x, and 0.12.x series.
-#
-# Copyright (C) 2002 Christian Hammond.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with this program; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-VERSION=0.1.7
-
-VERBOSE=0
-
-parse_gettext_version() {
- GETTEXT_VERSION=`$GETTEXT_TOOL --version | sed -n 's/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1.\2.\3/p'`
- GETTEXT_MAJOR_VERSION=`echo $GETTEXT_VERSION | cut -d. -f1`
- GETTEXT_MINOR_VERSION=`echo $GETTEXT_VERSION | cut -d. -f2`
- GETTEXT_MICRO_VERSION=`echo $GETTEXT_VERSION | cut -d. -f3`
-}
-
-find_gettext() {
- GETTEXT_TOOL=autopoint
-
- (autopoint --version) < /dev/null > /dev/null 2>&1 || {
- GETTEXT_TOOL=gettextize
-
- (gettextize --version) < /dev/null > /dev/null 2>&1 || {
- GETTEXT_TOOL=
- }
- }
-}
-
-install() {
- test -f configure.in && {
- cp configure.in .tmp-configure.in
- sed -e 's/^AM_GNU_GETTEXT\(.*\)$/AM_GNU_GETTEXT\1\
-AM_GNU_GETTEXT_VERSION(0.10.40)/' < .tmp-configure.in > configure.in
- rm .tmp-configure.in
- }
-
- test -f configure.ac && {
- cp configure.ac .tmp-configure.ac
- sed -e 's/^AM_GNU_GETTEXT\(.*\)$/AM_GNU_GETTEXT\1\
-AM_GNU_GETTEXT_VERSION(0.10.40)/' < .tmp-configure.ac > configure.ac
- rm .tmp-configure.ac
- }
-
- test -f autogen.sh && {
- cp autogen.sh .tmp-autogen.sh
- sed -e 's/\(gettextize\|autopoint\) --version/.\/setup-gettext --gettext-tool/1' -e 's/^\(echo.*|[\t ]*\)\?\(gettextize\|autopoint\) -.*$/.\/setup-gettext/1' < .tmp-autogen.sh > autogen.sh
- rm .tmp-autogen.sh
- }
-
- echo 'dnl Added by setup-gettext. Do not remove this' >> acinclude.m4
- echo 'dnl unless you know what you are doing.' >> acinclude.m4
- echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' >> acinclude.m4
-}
-
-backup_m4() {
- test -d m4 && mv m4 m4~
-}
-
-restore_m4() {
- test -d m4~ && {
- rm -rf m4
- mv m4~ m4
- }
-}
-
-restore_files() {
- test -f configure.in~ && mv -f configure.in~ configure.in
- test -f configure.ac~ && mv -f configure.ac~ configure.ac
- test -f Makefile.am~ && mv -f Makefile.am~ Makefile.am
-}
-
-abort() {
- restore_files
- restore_m4
-
- exit 1
-}
-
-# Main code
-
-find_gettext
-
-# See if a version of gettext and its tools are installed.
-if test x$GETTEXT_TOOL = x; then
- echo
- echo "You do not have a version of gettext installed."
- echo "Please download one from your local package repository or"
- echo "from ftp://ftp.gnu.org/pub/gnu/gettext/"
- echo
- exit 1
-fi
-
-parse_gettext_version
-
-NUMVAR=$#
-
-if test $NUMVAR -gt 0; then
- if test $NUMVAR -gt 1; then
- echo "Only one option at a time!"
- exit 1
-
- elif test $1 = "--gettext-tool"; then
- echo $GETTEXT_TOOL
- exit 0
-
- elif test $1 = "--help"; then
- echo "setup-gettext v$VERSION"
- echo "Usage:"
- echo " --gettext-tool Returns gettextize or autopoint, depending"
- echo " on the version of gettext installed."
- echo " --gettext-version Returns the version of gettext installed."
- echo " --gettext-major-version Returns the major version of gettext installed."
- echo " --gettext-minor-version Returns the minor version of gettext installed."
- echo " --gettext-micro-version Returns the micro version of gettext installed."
- echo " --help Displays this help screen."
- echo
- exit 0
-
- elif test $1 = "--version"; then
- echo $VERSION
- exit 0
-
- elif test $1 = "--gettext-version"; then
- echo $GETTEXT_VERSION
- exit 0
-
- elif test $1 = "--gettext-major-version"; then
- echo $GETTEXT_MAJOR_VERSION
- exit 0
-
- elif test $1 = "--gettext-minor-version"; then
- echo $GETTEXT_MINOR_VERSION
- exit 0
-
- elif test $1 = "--gettext-micro-version"; then
- echo $GETTEXT_MICRO_VERSION
- exit 0
-
- elif test $1 = "--install"; then
- install
- echo "setup-gettext installed."
- exit 0
-
- elif test $1 = "--happy-url"; then
- echo http://gaim.sf.net/forkgettext.jpg
- exit 0
-
- elif test $1 = "--verbose"; then
- VERBOSE=1
-
- else
- echo "Invalid option '$1'"
- exit 1
- fi
-fi
-
-# Okay, run the main stuff
-if test "$GETTEXT_TOOL" = "autopoint"; then
- backup_m4
- test $VERBOSE -eq 1 && echo " autopoint --force"
- echo n | autopoint --force || abort
- restore_m4
-
- if test $GETTEXT_MINOR_VERSION -ge 12; then
- cp po/Makefile.in.in po/.tmp-Makefile.in.in
- sed -e 's#echo "\$(top_builddir)/\$(MKINSTALLDIRS)" ;; esac#echo "\$(MKINSTALLDIRS)" ;; esac#1' < po/.tmp-Makefile.in.in > po/Makefile.in.in
- rm po/.tmp-Makefile.in.in
- fi
-else
- if test $GETTEXT_MINOR_VERSION -eq 11; then
- backup_m4
-
- # Gettext is pure evil. It DEMANDS that we press Return no matter
- # what. This gets rid of their happy "feature" of doom.
- test $VERBOSE -eq 1 && \
- echo " gettextize --copy --force --intl --no-changelog"
-
- sed 's:read .*< /dev/tty::' `which gettextize` > .temp-gettextize
- chmod +x .temp-gettextize
- echo n | ./.temp-gettextize --copy --force --intl --no-changelog || abort
- rm .temp-gettextize
-
- restore_files
- restore_m4
-
- test -f po/Makevars.template && mv po/Makevars.template po/Makevars
- else
- test $VERBOSE -eq 1 && echo " gettextize --copy --force"
- echo n | gettextize --copy --force || exit;
- fi
-fi
-
--- a/src/gf_action.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_action.c Thu Sep 07 03:16:31 2006 -0400
@@ -31,6 +31,10 @@
#include <plugin.h>
#include <version.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_action.h"
#include "gf_display.h"
#include "gf_event.h"
--- a/src/gf_blist.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_blist.c Thu Sep 07 03:16:31 2006 -0400
@@ -27,6 +27,10 @@
#include <request.h>
#include <version.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_blist.h"
#include "gf_internal.h"
#include "gf_notification.h"
--- a/src/gf_event.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_event.c Thu Sep 07 03:16:31 2006 -0400
@@ -31,6 +31,10 @@
#include <util.h>
#include <version.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_blist.h"
#include "gf_display.h"
#include "gf_event.h"
--- a/src/gf_file.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_file.c Thu Sep 07 03:16:31 2006 -0400
@@ -21,6 +21,10 @@
/* MinGW has unistd.h!!! */
#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_file.h"
#include "gf_internal.h"
--- a/src/gf_internal.h Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_internal.h Thu Sep 07 03:16:31 2006 -0400
@@ -21,6 +21,8 @@
#include <glib.h>
+#include <glib/gi18n-lib.h>
+
#if GLIB_CHECK_VERSION(2,6,0)
# include <glib/gstdio.h>
#endif /* GLIB_CHECK_VERSION(2,6,0) */
@@ -46,20 +48,4 @@
# include "../gf_config.h"
#endif /* HAVE_CONFIG_H */
-#ifdef ENABLE_NLS
-# include <locale.h>
-# include <libintl.h>
-# define _(x) dgettext(GF_PACKAGE, x)
-# ifdef dgettext_noop
-# define N_(String) dgettext_noop (GF_PACKAGE, String)
-# else
-# define N_(String) (String)
-# endif
-#else
-# include <locale.h>
-# define N_(String) (String)
-# define _(x) (x)
-# define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural))
#endif
-
-#endif
--- a/src/gf_item.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_item.c Thu Sep 07 03:16:31 2006 -0400
@@ -21,6 +21,10 @@
#include <debug.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_event_info.h"
#include "gf_internal.h"
#include "gf_item.h"
--- a/src/gf_item_icon.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_item_icon.c Thu Sep 07 03:16:31 2006 -0400
@@ -27,6 +27,10 @@
#include <gtkblist.h>
#include <gtkutils.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_gtk_utils.h"
#include "gf_internal.h"
#include "gf_item.h"
--- a/src/gf_menu.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_menu.c Thu Sep 07 03:16:31 2006 -0400
@@ -18,6 +18,10 @@
*/
#include <gtk/gtk.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_action.h"
#include "gf_display.h"
#include "gf_internal.h"
--- a/src/gf_preferences.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_preferences.c Thu Sep 07 03:16:31 2006 -0400
@@ -33,6 +33,10 @@
#include <gtkutils.h>
#include <gtkprefs.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_action.h"
#include "gf_display.h"
#include "gf_event.h"
--- a/src/gf_stock.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_stock.c Thu Sep 07 03:16:31 2006 -0400
@@ -20,6 +20,10 @@
#include <debug.h>
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_internal.h"
#include "gf_stock.h"
--- a/src/gf_theme.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/gf_theme.c Thu Sep 07 03:16:31 2006 -0400
@@ -27,6 +27,10 @@
#include "util.h"
#include "xmlnode.h"
+#ifdef HAVE_CONFIG_H
+# include "../gf_config.h"
+#endif
+
#include "gf_internal.h"
#include "gf_item.h"
#include "gf_preferences.h"
--- a/src/guifications.c Thu Sep 07 02:44:03 2006 -0400
+++ b/src/guifications.c Thu Sep 07 03:16:31 2006 -0400
@@ -124,8 +124,8 @@
init_plugin(GaimPlugin *plugin) {
#ifdef ENABLE_NLS
- bindtextdomain(GF_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(GF_PACKAGE, "UTF-8");
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
gf_info.name = _("Guifications");