[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#51381: dpkg: dselect help messages should be translated



On Sun, 5 Dec 1999, Wichert Akkerman wrote:

> Previously Piotr Roszatycki wrote:
> > My proposition:
> 
> I'm not very familiar with gettext, but I think this won't work: gettext
> includes the filename of the file containing the string in the .pot
> file, and since your patch builds helpmsgs.cc in the po/ subdirectory
> instead of dselect/ it might fail..

Ok, I've tested my patch against the last CVS snapshot.
gettext required hardcoded pathnames in POTFILES.in (without Makefile
variables, i.e. $(srcdir)).

I see two ways. The first, pathname with build/ prefix, but if this
path changes, build process will fail.

The best IMHO solution is to generate helpmsgs.cc in source directory.
This is small file so it shouldn't be too much troubles with it.

Please note, the order of processed directories is important, then
po/ directory have to be compiled after dselect/ directory.

My new correct patch:

diff -Nru8 dpkg/dselect/Makefile.in dpkg-helpmsgs-i18n/dselect/Makefile.in
--- dpkg/dselect/Makefile.in	Thu Nov 25 03:14:54 1999
+++ dpkg-helpmsgs-i18n/dselect/Makefile.in	Tue Dec  7 00:03:32 1999
@@ -45,17 +45,17 @@
 	done
 
 dselect: $(OBJECTS) ../lib/libdpkg.a
 	$(CC) $(LDFLAGS) -L../lib -o $@ $(OBJECTS) $(LIBS) $(NLS_LIBS) -ldpkg -lncurses
 
 basecmds.o: helpmsgs.h
 curkeys.o: curkeys.h
 
-helpmsgs.h helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl
-	perl $(srcdir)/mkhelpmsgs.pl $<
+$(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl
+	( cd $(srcdir); perl $(srcdir)/mkhelpmsgs.pl $< )
 
 curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl
 	cursesfile=`echo '#include <curses.h>' | \
 		 $(CC) -E - | grep 'curses.h' | head -1 | \
 		 $(SED) -e 's/^[^"]*"//; s/".*$$//'`; \
 	if [ "$$cursesfile" == "" ]; then echo "can't find curses file"; exit 1; fi; \
 	perl $(srcdir)/mkcurkeys.pl $< $$cursesfile > $@
diff -Nru8 dpkg/po/POTFILES.in dpkg-helpmsgs-i18n/po/POTFILES.in
--- dpkg/po/POTFILES.in	Sat Nov 27 14:10:41 1999
+++ dpkg-helpmsgs-i18n/po/POTFILES.in	Mon Dec  6 22:49:57 1999
@@ -52,8 +52,9 @@
 dselect/pkgcmds.cc
 dselect/pkgdepcon.cc
 dselect/pkgdisplay.cc
 dselect/pkginfo.cc
 dselect/pkglist.cc
 dselect/pkgsublist.cc
 dselect/pkgtop.cc
 
+dselect/helpmsgs.cc
diff -Nru8 dpkg/po/update.sh dpkg-helpmsgs-i18n/po/update.sh
--- dpkg/po/update.sh	Sun Oct 31 23:43:00 1999
+++ dpkg-helpmsgs-i18n/po/update.sh	Tue Dec  7 00:01:36 1999
@@ -1,10 +1,12 @@
 #!/bin/sh
 
+( cd ../dselect; perl mkhelpmsgs.pl helpmsgs.src )
+
 xgettext --default-domain=dpkg --directory=.. \
 	 --add-comments --keyword=_ --keyword=N_ \
 	 --files-from=POTFILES.in && test ! -f dpkg.po \
 	 || ( rm -f dpkg.pot && mv dpkg.po dpkg.pot )
 
 catalogs=`ls *.po`
 for cat in $catalogs; do
   if [ "$cat" = "dpkg.po" ] ; then continue ; fi



-- 
Piotr "Dexter" Roszatycki   GCM d- s-:- a-- C++ UL++++$ P+++ L+++>$ E---- W-
mailto:dexter@fnet.pl       N++ o? K? w-- O-- M- V- PS+ PE+ Y+ PGP++ t-- 5--
mailto:dexter@debian.org    X+ R tv-(--) b+ DI-- D++ G e h! r-- !y+


Reply to: