From: Bruno Haible Date: Mon, 22 Oct 2001 08:47:57 +0000 (+0000) Subject: Use the msgmerge --update option. X-Git-Tag: v0.11~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebe49149280ce2c9f44c6cda0b3056c776809a09;p=thirdparty%2Fgettext.git Use the msgmerge --update option. Don't use or mention the .pox suffix any more. --- diff --git a/doc/ChangeLog b/doc/ChangeLog index 3895438a6..1959a2f50 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2001-09-18 Bruno Haible + + * gettext.texi: Use file suffix .po instead of .pox. + 2001-08-13 Bruno Haible * gettext.texi (YCP): New node. diff --git a/doc/gettext.texi b/doc/gettext.texi index f59f0d30d..8967a911c 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -597,8 +597,7 @@ empty translations. Program @code{msgmerge} takes care of adjusting PO files between releases of the corresponding sources, commenting obsolete entries, initializing new ones, and updating all source line references. Files ending with @file{.pot} are kind of base -translation files found in distributions, in PO file format, and -@file{.pox} files are often temporary PO files. +translation files found in distributions, in PO file format. MO files are meant to be read by programs, and are binary in nature. A few systems already offer tools for creating and handling MO files @@ -632,11 +631,11 @@ Original C Sources ---> PO mode ---> Marked C Sources ---. | | | ^ | | `---. | | `---. +---> PO mode ---. -| +----> msgmerge ------> LANG.pox --->--------' | +| +----> msgmerge ------> LANG.po ---->--------' | | .---' | | | | | `-------------<---------------. | -| +--- LANG.po <--- New LANG.pox <----' +| +--- New LANG.po <------------------' | .--- LANG.gmo <--- msgfmt <---' | | | `---> install ---> /.../LANG/PACKAGE.mo ---. @@ -715,8 +714,8 @@ should now generate the proper things automatically for you! The first time through, there is no @file{@var{lang}.po} yet, so the @code{msgmerge} step may be skipped and replaced by a mere copy of -@file{@var{package}.pot} to @file{@var{lang}.pox}, where @var{lang} -represents the target language. +@file{@var{package}.pot} to @file{@var{lang}.po}, where @var{lang} +represents the target language. See @ref{Creating} for details. Then comes the initial translation of messages. Translation in itself is a whole matter, still exclusively meant for humans, @@ -727,7 +726,7 @@ about how to contact translating teams, or becoming part of them, for sharing your translating concerns with others who target the same native language. -While adding the translated messages into the @file{@var{lang}.pox} +While adding the translated messages into the @file{@var{lang}.po} PO file, if you do not have Emacs handy, you are on your own for ensuring that your efforts fully respect the PO file format, and quoting conventions (@pxref{PO Files}). This is surely not an impossible task, @@ -778,7 +777,7 @@ existing @file{@var{lang}.po} file, by comparing it with a newer out of recent C sources. The refreshing operation adjusts all references to C source locations for strings, since these strings move as programs are modified. Also, @code{msgmerge} comments out as -obsolete, in @file{@var{lang}.pox}, those already translated entries +obsolete, in @file{@var{lang}.po}, those already translated entries which are no longer used in the program sources (@pxref{Obsolete Entries}). It finally discovers new strings and inserts them in the resulting PO file as untranslated entries (@pxref{Untranslated @@ -786,9 +785,7 @@ Entries}). @xref{msgmerge Invocation}, for more information about what @code{msgmerge} really does. Whatever route or means taken, the goal is to obtain an updated -@file{@var{lang}.pox} file offering translations for all strings. -When this is properly achieved, this file @file{@var{lang}.pox} may -take the place of the previous official @file{@var{lang}.po} file. +@file{@var{lang}.po} file offering translations for all strings. The temporal mobility, or fluidity of PO files, is an integral part of the translation game, and should be well understood, and accepted. @@ -861,7 +858,7 @@ like: (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t) @end example -Later, whenever you edit some @file{.po}, @file{.pot} or @file{.pox} +Later, whenever you edit some @file{.po} file, or any file having the string @samp{.po.} within its name, Emacs loads @file{po-mode.elc} (or @file{po-mode.el}) as needed, and automatically activates PO mode commands for the associated buffer. diff --git a/m4/ChangeLog b/m4/ChangeLog index 24f9f126c..5dcdead86 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2001-09-18 Bruno Haible + + * gettext.m4 (AM_WITH_NLS): Test for msgmerge which understands the + --update option. + 2001-10-20 Bruno Haible Assume strchr() exists. diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 4362d8cba..0513cdc41 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -202,6 +202,10 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "" AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then diff --git a/po/ChangeLog b/po/ChangeLog index 6b684214a..359760acb 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,12 @@ +2001-09-18 Bruno Haible + + * Makefile.in.in (MSGMERGE_UPDATE): New variable. + (.SUFFIXES): Remove .pox. + (.po.pox): Remove rule. + ($(POFILES)): New rule. + (mostlyclean): Don't remove *.pox. + (force): New target. + 2001-10-20 Bruno Haible * es.po: Update from Max de Mendizábal . diff --git a/po/Makefile.in.in b/po/Makefile.in.in index a1943c523..6a655f3bc 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -37,6 +37,7 @@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update POFILES = @POFILES@ GMOFILES = @GMOFILES@ @@ -48,11 +49,7 @@ POTFILES = \ CATALOGS = @CATALOGS@ .SUFFIXES: -.SUFFIXES: .po .pox .gmo .mo - -.po.pox: - $(MAKE) $(PACKAGE).pot - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox +.SUFFIXES: .po .gmo .mo .po.mo: $(MSGFMT) -c -o $@ $< @@ -79,6 +76,9 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) +$(POFILES): force + $(MSGMERGE_UPDATE) $@ $(srcdir)/$(PACKAGE).pot + install: install-exec install-data install-exec: @@ -134,7 +134,7 @@ check: all dvi info tags TAGS ID: mostlyclean: - rm -f core core.* *.pox $(PACKAGE).po *.new.po + rm -f core core.* $(PACKAGE).po *.new.po rm -fr *.o clean: mostlyclean @@ -185,6 +185,8 @@ Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status +force: + # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: