intltool and glib-gettextize
- From: jacob berkman <jacob ximian com>
- To: gnome-i18n gnome org
- Cc: Maciej Stachowiak <mjs noisehavoc org>,Darin Adler <darin bentspoon com>
- Subject: intltool and glib-gettextize
- Date: 28 Oct 2001 11:59:34 -0500
this patch adds support for po/Makefile.in.in installed by
glib-gettextize.
any problems with it?
jacob
--
"Beat mixing is 10000 times more fun than even video games."
-- bt
? intltool-glib-gettextize.patch
? intltool-po-Makefile.in.in-patch-3
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/intltool/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- Makefile.am 2001/10/26 19:34:58 1.17
+++ Makefile.am 2001/10/28 16:50:45
@@ -27,6 +27,7 @@
intltool-update.in \
intltool-po-Makefile.in.in-patch-1 \
intltool-po-Makefile.in.in-patch-2 \
+ intltool-po-Makefile.in.in-patch-3 \
xml-i18n-po-Makefile.in.in-patch-1 \
xml-i18n-po-Makefile.in.in-patch-2 \
$(NULL)
Index: intltool-update.in.in
===================================================================
RCS file: /cvs/gnome/intltool/intltool-update.in.in,v
retrieving revision 1.49
diff -u -r1.49 intltool-update.in.in
--- intltool-update.in.in 2001/10/04 19:58:43 1.49
+++ intltool-update.in.in 2001/10/28 16:50:46
@@ -47,6 +47,7 @@
my $MAINTAIN_ARG = "0";
my $REPORT_ARG = "0";
my $VERBOSE = "0";
+my $GETTEXT_PACKAGE = "";
my @languages;
my %po_files_by_lang = ();
@@ -66,8 +67,6 @@
"sheet(\.in)+|".
"pong(\.in)+";
-my $PACKAGE = &find_package_name;
-
## Always print as the first thing
$| = 1;
@@ -80,16 +79,18 @@
## Handle options
GetOptions (
- "help|h" => \$HELP_ARG,
- "version|v" => \$VERSION_ARG,
- "dist|d" => \$DIST_ARG,
- "pot|p" => \$POT_ARG,
- "headers|s" => \$HEADERS_ARG,
- "maintain|m" => \$MAINTAIN_ARG,
- "report|r" => \$REPORT_ARG,
- "verbose|x" => \$VERBOSE
+ "help|h" => \$HELP_ARG,
+ "version|v" => \$VERSION_ARG,
+ "dist|d" => \$DIST_ARG,
+ "pot|p" => \$POT_ARG,
+ "headers|s" => \$HEADERS_ARG,
+ "maintain|m" => \$MAINTAIN_ARG,
+ "report|r" => \$REPORT_ARG,
+ "verbose|x" => \$VERBOSE,
+ "gettext-package|g=s" => \$GETTEXT_PACKAGE,
) or &invalid_option;
+my $PACKAGE = $GETTEXT_PACKAGE || &find_package_name;
## Use the supplied arguments
## Check for options.
Index: intltoolize.in
===================================================================
RCS file: /cvs/gnome/intltool/intltoolize.in,v
retrieving revision 1.6
diff -u -r1.6 intltoolize.in
--- intltoolize.in 2001/10/04 19:58:43 1.6
+++ intltoolize.in 2001/10/28 16:50:46
@@ -236,6 +236,8 @@
if grep GENPOT po/Makefile.in.in >/dev/null; then
echo "no need for patching file 'Makefile.in.in'";
+elif grep GETTEXT_PACKAGE po/Makefile.in.in >/dev/null; then
+ patch po/Makefile.in.in < $pkgdatadir/intltool-po-Makefile.in.in-patch-3
elif grep builddir po/Makefile.in.in >/dev/null; then
patch po/Makefile.in.in < $pkgdatadir/intltool-po-Makefile.in.in-patch-2
else
--- Makefile.in.in.clean Wed Oct 17 16:15:24 2001
+++ Makefile.in.in Wed Oct 17 16:15:30 2001
@@ -19,6 +19,7 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
+top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
@@ -38,7 +39,10 @@
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
-MSGMERGE = PATH=../src:$$PATH msgmerge
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
DEFS = @DEFS@
CFLAGS = @CFLAGS@
@@ -88,12 +92,7 @@
all-no:
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
- $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
- --add-comments --keyword=_ --keyword=N_ \
- --files-from=$(srcdir)/POTFILES.in \
- && test ! -f $(GETTEXT_PACKAGE).po \
- || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
- && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
+ $(GENPOT)
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(GETTEXT_PACKAGE).pot
@@ -219,9 +218,9 @@
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- mv $$lang.po $$lang.old.po; \
+ cp $$lang.po $$lang.old.po; \
echo "$$lang:"; \
- if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
+ if $(MSGMERGE) $$lang; then \
rm -f $$lang.old.po; \
else \
echo "msgmerge for $$cat failed!"; \
@@ -230,6 +229,19 @@
fi; \
done
+.po: Makefile
+ $(MAKE) $(PACKAGE).pot;
+ PATH=`pwd`/../src:$$PATH; \
+ echo; printf "$*: "; \
+ if $(MSGMERGE) $*; then \
+ rm -f $*.old.po; \
+ else \
+ echo "msgmerge for * failed!"; \
+ mv $*.old.po $*.po; \
+ fi; \
+ msgfmt --statistics $*.po; echo;
+
+
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]