Added po translations to autoconf/automake process
This commit is contained in:
parent
a81f58f3f1
commit
dc8368815e
@ -15,7 +15,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
SUBDIRS = src
|
SUBDIRS = po intl src
|
||||||
|
|
||||||
EXTRA_DIST = weechat.1
|
EXTRA_DIST = weechat.1
|
||||||
|
|
||||||
|
51
autogen.sh
51
autogen.sh
@ -1,6 +1,55 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -f config.cache
|
rm -f config.cache
|
||||||
aclocal
|
|
||||||
|
### GETTEXT ###
|
||||||
|
|
||||||
|
echo searching for GNU gettext intl directory...
|
||||||
|
|
||||||
|
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share"
|
||||||
|
found=0
|
||||||
|
for try in $dirs; do
|
||||||
|
echo -n " -> $try/gettext/intl... "
|
||||||
|
if test -d $try/gettext/intl; then
|
||||||
|
echo found it
|
||||||
|
found=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo no
|
||||||
|
done
|
||||||
|
if test "$found" != 1; then
|
||||||
|
echo ERROR: Cannot find gettext/intl directory.
|
||||||
|
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
|
||||||
|
exit 7
|
||||||
|
fi;
|
||||||
|
|
||||||
|
echo copying gettext intl files...
|
||||||
|
intldir="$try/gettext/intl"
|
||||||
|
if test ! -d intl; then
|
||||||
|
mkdir intl
|
||||||
|
fi
|
||||||
|
olddir=`pwd`
|
||||||
|
cd $intldir
|
||||||
|
for file in *; do
|
||||||
|
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
|
||||||
|
rm -f $olddir/intl/$file
|
||||||
|
cp $intldir/$file $olddir/intl/
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
|
||||||
|
cd $olddir
|
||||||
|
if test -f intl/plural.c; then
|
||||||
|
sleep 2
|
||||||
|
touch intl/plural.c
|
||||||
|
fi
|
||||||
|
|
||||||
|
### END GETTEXT ###
|
||||||
|
|
||||||
|
echo "running aclocal..."
|
||||||
|
aclocal -I /usr/share/aclocal
|
||||||
|
echo "running autoconf..."
|
||||||
autoconf
|
autoconf
|
||||||
|
echo "running autoheader..."
|
||||||
autoheader
|
autoheader
|
||||||
|
echo "running automake..."
|
||||||
automake -a
|
automake -a
|
||||||
|
echo "autogen.sh ok, now run ./configure script"
|
||||||
|
16
configure.in
16
configure.in
@ -29,8 +29,12 @@ AC_PROG_CC
|
|||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
# Gettext
|
||||||
|
ALL_LINGUAS="fr"
|
||||||
|
AM_GNU_GETTEXT
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
# AC_CHECK_LIB([curses], [initscr])
|
AC_CHECK_LIB([curses], [initscr], LIBCURSES_FOUND=1, LIBCURSES_FOUND=0)
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
@ -66,11 +70,17 @@ AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
|||||||
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
||||||
|
|
||||||
if test "x$enable_curses" = "xyes" ; then
|
if test "x$enable_curses" = "xyes" ; then
|
||||||
|
if test "$LIBCURSES_FOUND" = "0" ; then
|
||||||
|
AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.])
|
||||||
|
fi
|
||||||
CURSES_LIBS=-lcurses
|
CURSES_LIBS=-lcurses
|
||||||
AC_SUBST(CURSES_LIBS)
|
AC_SUBST(CURSES_LIBS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_gtk" = "xyes" ; then
|
if test "x$enable_gtk" = "xyes" ; then
|
||||||
|
#if test "$LIBGTK_FOUND" = "0" ; then
|
||||||
|
# AC_MSG_ERROR([Gtk+ library not found! Install Gtk+ (2.0 or higher) library or run ./configure without --enable-gtk parameter.])
|
||||||
|
#fi
|
||||||
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
||||||
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
@ -86,7 +96,9 @@ AC_OUTPUT([Makefile
|
|||||||
src/gui/Makefile
|
src/gui/Makefile
|
||||||
src/gui/curses/Makefile
|
src/gui/curses/Makefile
|
||||||
src/gui/gtk/Makefile
|
src/gui/gtk/Makefile
|
||||||
src/gui/qt/Makefile])
|
src/gui/qt/Makefile
|
||||||
|
intl/Makefile
|
||||||
|
po/Makefile.in])
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo $PACKAGE $VERSION
|
echo $PACKAGE $VERSION
|
||||||
|
48
po/Makefile
48
po/Makefile
@ -1,48 +0,0 @@
|
|||||||
# Copyright (c) 2003 FlashCode <flashcode@flashtux.org>
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
|
|
||||||
all:
|
|
||||||
@echo "Usage: make init => create new template (weechat.pot)"
|
|
||||||
@echo " make update => update translations with new messages from sources"
|
|
||||||
@echo " make install => compile and install all translations"
|
|
||||||
@echo " make clean => delete all binary and backup files"
|
|
||||||
|
|
||||||
init:
|
|
||||||
@cd ../src; \
|
|
||||||
xgettext -o ../po/weechat.pot --keyword=_ --keyword=N_ --msgid-bugs-address=flashcode@flashtux.org --msgstr-prefix `find -name "*.h"` `find -name "*.c"`
|
|
||||||
|
|
||||||
update:
|
|
||||||
cd ../src; \
|
|
||||||
xgettext -o /tmp/temp1.po --keyword=_ --keyword=N_ --msgid-bugs-address=flashcode@flashtux.org `find -name "*.h"` `find -name "*.c"`; \
|
|
||||||
sed s/charset=CHARSET/charset=iso-8859-1/ /tmp/temp1.po >/tmp/temp2.po; \
|
|
||||||
cd ../po; \
|
|
||||||
for fichier in *.po; do \
|
|
||||||
msgmerge -U $$fichier /tmp/temp2.po; \
|
|
||||||
done
|
|
||||||
|
|
||||||
install:
|
|
||||||
@for fichier in *.po; do \
|
|
||||||
echo "Creating binary: $$fichier => weechat.mo..."; \
|
|
||||||
msgfmt -o weechat.mo $$fichier; \
|
|
||||||
REP=$${fichier%%.po}; \
|
|
||||||
echo "Copying weechat.mo (from $$fichier) to /usr/share/locale/$$REP/LC_MESSAGES"; \
|
|
||||||
cp -f weechat.mo /usr/share/locale/$$REP/LC_MESSAGES/ ; \
|
|
||||||
done
|
|
||||||
rm -f ./weechat.mo
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f ./*.mo ./*.po~
|
|
1
po/fr.po
1
po/fr.po
@ -3,7 +3,6 @@
|
|||||||
# This file is distributed under the same license as the WeeChat package.
|
# This file is distributed under the same license as the WeeChat package.
|
||||||
# FlashCode <flashcode@flashtux.org>, 2003.
|
# FlashCode <flashcode@flashtux.org>, 2003.
|
||||||
#
|
#
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.0.2\n"
|
"Project-Id-Version: 0.0.2\n"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
SUBDIRS = src
|
SUBDIRS = po intl src
|
||||||
|
|
||||||
EXTRA_DIST = weechat.1
|
EXTRA_DIST = weechat.1
|
||||||
|
|
||||||
|
@ -1,6 +1,55 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -f config.cache
|
rm -f config.cache
|
||||||
aclocal
|
|
||||||
|
### GETTEXT ###
|
||||||
|
|
||||||
|
echo searching for GNU gettext intl directory...
|
||||||
|
|
||||||
|
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share"
|
||||||
|
found=0
|
||||||
|
for try in $dirs; do
|
||||||
|
echo -n " -> $try/gettext/intl... "
|
||||||
|
if test -d $try/gettext/intl; then
|
||||||
|
echo found it
|
||||||
|
found=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo no
|
||||||
|
done
|
||||||
|
if test "$found" != 1; then
|
||||||
|
echo ERROR: Cannot find gettext/intl directory.
|
||||||
|
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
|
||||||
|
exit 7
|
||||||
|
fi;
|
||||||
|
|
||||||
|
echo copying gettext intl files...
|
||||||
|
intldir="$try/gettext/intl"
|
||||||
|
if test ! -d intl; then
|
||||||
|
mkdir intl
|
||||||
|
fi
|
||||||
|
olddir=`pwd`
|
||||||
|
cd $intldir
|
||||||
|
for file in *; do
|
||||||
|
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
|
||||||
|
rm -f $olddir/intl/$file
|
||||||
|
cp $intldir/$file $olddir/intl/
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
|
||||||
|
cd $olddir
|
||||||
|
if test -f intl/plural.c; then
|
||||||
|
sleep 2
|
||||||
|
touch intl/plural.c
|
||||||
|
fi
|
||||||
|
|
||||||
|
### END GETTEXT ###
|
||||||
|
|
||||||
|
echo "running aclocal..."
|
||||||
|
aclocal -I /usr/share/aclocal
|
||||||
|
echo "running autoconf..."
|
||||||
autoconf
|
autoconf
|
||||||
|
echo "running autoheader..."
|
||||||
autoheader
|
autoheader
|
||||||
|
echo "running automake..."
|
||||||
automake -a
|
automake -a
|
||||||
|
echo "autogen.sh ok, now run ./configure script"
|
||||||
|
@ -29,8 +29,12 @@ AC_PROG_CC
|
|||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
# Gettext
|
||||||
|
ALL_LINGUAS="fr"
|
||||||
|
AM_GNU_GETTEXT
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
# AC_CHECK_LIB([curses], [initscr])
|
AC_CHECK_LIB([curses], [initscr], LIBCURSES_FOUND=1, LIBCURSES_FOUND=0)
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
@ -66,11 +70,17 @@ AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
|||||||
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
||||||
|
|
||||||
if test "x$enable_curses" = "xyes" ; then
|
if test "x$enable_curses" = "xyes" ; then
|
||||||
|
if test "$LIBCURSES_FOUND" = "0" ; then
|
||||||
|
AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.])
|
||||||
|
fi
|
||||||
CURSES_LIBS=-lcurses
|
CURSES_LIBS=-lcurses
|
||||||
AC_SUBST(CURSES_LIBS)
|
AC_SUBST(CURSES_LIBS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_gtk" = "xyes" ; then
|
if test "x$enable_gtk" = "xyes" ; then
|
||||||
|
#if test "$LIBGTK_FOUND" = "0" ; then
|
||||||
|
# AC_MSG_ERROR([Gtk+ library not found! Install Gtk+ (2.0 or higher) library or run ./configure without --enable-gtk parameter.])
|
||||||
|
#fi
|
||||||
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
||||||
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
@ -86,7 +96,9 @@ AC_OUTPUT([Makefile
|
|||||||
src/gui/Makefile
|
src/gui/Makefile
|
||||||
src/gui/curses/Makefile
|
src/gui/curses/Makefile
|
||||||
src/gui/gtk/Makefile
|
src/gui/gtk/Makefile
|
||||||
src/gui/qt/Makefile])
|
src/gui/qt/Makefile
|
||||||
|
intl/Makefile
|
||||||
|
po/Makefile.in])
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo $PACKAGE $VERSION
|
echo $PACKAGE $VERSION
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# Copyright (c) 2003 FlashCode <flashcode@flashtux.org>
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
|
|
||||||
all:
|
|
||||||
@echo "Usage: make init => create new template (weechat.pot)"
|
|
||||||
@echo " make update => update translations with new messages from sources"
|
|
||||||
@echo " make install => compile and install all translations"
|
|
||||||
@echo " make clean => delete all binary and backup files"
|
|
||||||
|
|
||||||
init:
|
|
||||||
@cd ../src; \
|
|
||||||
xgettext -o ../po/weechat.pot --keyword=_ --keyword=N_ --msgid-bugs-address=flashcode@flashtux.org --msgstr-prefix `find -name "*.h"` `find -name "*.c"`
|
|
||||||
|
|
||||||
update:
|
|
||||||
cd ../src; \
|
|
||||||
xgettext -o /tmp/temp1.po --keyword=_ --keyword=N_ --msgid-bugs-address=flashcode@flashtux.org `find -name "*.h"` `find -name "*.c"`; \
|
|
||||||
sed s/charset=CHARSET/charset=iso-8859-1/ /tmp/temp1.po >/tmp/temp2.po; \
|
|
||||||
cd ../po; \
|
|
||||||
for fichier in *.po; do \
|
|
||||||
msgmerge -U $$fichier /tmp/temp2.po; \
|
|
||||||
done
|
|
||||||
|
|
||||||
install:
|
|
||||||
@for fichier in *.po; do \
|
|
||||||
echo "Creating binary: $$fichier => weechat.mo..."; \
|
|
||||||
msgfmt -o weechat.mo $$fichier; \
|
|
||||||
REP=$${fichier%%.po}; \
|
|
||||||
echo "Copying weechat.mo (from $$fichier) to /usr/share/locale/$$REP/LC_MESSAGES"; \
|
|
||||||
cp -f weechat.mo /usr/share/locale/$$REP/LC_MESSAGES/ ; \
|
|
||||||
done
|
|
||||||
rm -f ./weechat.mo
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f ./*.mo ./*.po~
|
|
@ -3,7 +3,6 @@
|
|||||||
# This file is distributed under the same license as the WeeChat package.
|
# This file is distributed under the same license as the WeeChat package.
|
||||||
# FlashCode <flashcode@flashtux.org>, 2003.
|
# FlashCode <flashcode@flashtux.org>, 2003.
|
||||||
#
|
#
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.0.2\n"
|
"Project-Id-Version: 0.0.2\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user