From: Bruno Haible Date: Wed, 26 Dec 2007 16:01:59 +0000 (+0000) Subject: Introduce a new header entry field 'Language'. X-Git-Tag: v0.18~482 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae1594f7651733bedc7020bce9870a5b5baef48;p=thirdparty%2Fgettext.git Introduce a new header entry field 'Language'. --- diff --git a/NEWS b/NEWS index a37bfa541..e4d4bc219 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,15 @@ +Version 0.18 - January 2008 + +* PO file format: + There is a new field 'Language' in the header entry. It denotes the language + code (plus optional country code) for the PO file. This field can be used + by automated tools, such as spell checkers. It is expected to be more + reliable than looking at the file name or at the 'Language-Team' field in + the header entry. + msgmerge, msgcat, msgen have a new option --lang that allows to specify + this field. Additionally, msgmerge fills in this new field by looking at + the 'Language-Team' field (if the --lang option is not given). + Version 0.17 - November 2007 * License: diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog index 0f5905590..e28ffadae 100644 --- a/gettext-runtime/po/ChangeLog +++ b/gettext-runtime/po/ChangeLog @@ -1,3 +1,8 @@ +2007-12-24 Bruno Haible + + * Makefile.in.in ($(POFILES), .nop.po-update): When using msgmerge + 0.18 or newer, pass a --lang option. + 2007-12-24 Bruno Haible * Makefile.in.in (.nop.po-update): Put all non-option arguments after diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 675d8bffd..b1a7baf9b 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -193,8 +193,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -395,9 +402,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index e4cb4f628..3f2421f11 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-12-24 Bruno Haible + + * gettext.texi (Header Entry): Document the 'Language' field. + * msgcat.texi: Document the --lang option. + * msgen.texi: Likewise. + * msgmerge.texi: Likewise. + 2007-12-02 Bruno Haible * gettext.texi (Plural Forms): Put Turkish under nplurals=2. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 3905ff681..0c3a2dd08 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -2913,6 +2913,58 @@ list. The up-to-date list of teams can be found at the Free Translation Project's homepage, @uref{http://translationproject.org/}, in the "Teams" area. +@item Language +@c The purpose of this field is to make it possible to automatically +@c - convert PO files to translation memory, +@c - initialize a spell checker based on the PO file, +@c - perform language specific checks. +Fill in the language code of the language. This can be in one of three +forms: + +@itemize - +@item +@samp{@var{ll}}, an @w{ISO 639} two-letter language code (lowercase). +See @ref{Language Codes} for the list of codes. + +@item +@samp{@var{ll}_@var{CC}}, where @samp{@var{ll}} is an @w{ISO 639} two-letter +language code (lowercase) and @samp{@var{CC}} is an @w{ISO 3166} two-letter +country code (uppercase). The country code specification is not redundant: +Some languages have dialects in different countries. For example, +@samp{de_AT} is used for Austria, and @samp{pt_BR} for Brazil. The country +code serves to distinguish the dialects. See @ref{Language Codes} and +@ref{Country Codes} for the lists of codes. + +@item +@samp{@var{ll}_@var{CC}@@@var{variant}}, where @samp{@var{ll}} is an +@w{ISO 639} two-letter language code (lowercase), @samp{@var{CC}} is an +@w{ISO 3166} two-letter country code (uppercase), and @samp{@var{variant}} is +a variant designator. The variant designator (lowercase) can be a script +designator, such as @samp{latin} or @samp{cyrillic}. +@end itemize + +The naming convention @samp{@var{ll}_@var{CC}} is also the way locales are +named on systems based on GNU libc. But there are three important differences: + +@itemize @bullet +@item +In this PO file field, but not in locale names, @samp{@var{ll}_@var{CC}} +combinations denoting a language's main dialect are abbreviated as +@samp{@var{ll}}. For example, @samp{de} is equivalent to @samp{de_DE} +(German as spoken in Germany), and @samp{pt} to @samp{pt_PT} (Portuguese as +spoken in Portugal) in this context. + +@item +In this PO file field, suffixes like @samp{.@var{encoding}} are not used. + +@item +In this PO file field, variant designators that are not relevant to message +translation, such as @samp{@@euro}, are not used. +@end itemize + +So, if your locale name is @samp{de_DE.UTF-8}, the language specification in +PO files is just @samp{de}. + @item Content-Type @cindex encoding of PO files @cindex charset of PO files diff --git a/gettext-tools/doc/msgcat.texi b/gettext-tools/doc/msgcat.texi index 20e6b5363..07e07ad16 100644 --- a/gettext-tools/doc/msgcat.texi +++ b/gettext-tools/doc/msgcat.texi @@ -115,6 +115,12 @@ Specify encoding for output. Use first available translation for each message. Don't merge several translations into one. +@item --lang=@var{catalogname} +@opindex --lang@r{, @code{msgcat} option} +Specify the @samp{Language} field to be used in the header entry. See +@ref{Header Entry} for the meaning of this field. Note: The +@samp{Language-Team} and @samp{Plural-Forms} fields are left unchanged. + @item --color @itemx --color=@var{when} @opindex --color@r{, @code{msgcat} option} diff --git a/gettext-tools/doc/msgen.texi b/gettext-tools/doc/msgen.texi index 7923cd7ba..6686c8393 100644 --- a/gettext-tools/doc/msgen.texi +++ b/gettext-tools/doc/msgen.texi @@ -68,6 +68,13 @@ Assume the input file is a NeXTstep/GNUstep localized resource file in @c --no-escape and --escape omitted on purpose. They are not useful. @table @samp +@item --lang=@var{catalogname} +@opindex --lang@r{, @code{msgcat} option} +Specify the @samp{Language} field to be used in the header entry. See +@ref{Header Entry} for the meaning of this field. Note: The +@samp{Language-Team} and @samp{Plural-Forms} fields are not set by this +option. + @item --force-po @opindex --force-po@r{, @code{msgen} option} Always write an output file even if it contains no message. diff --git a/gettext-tools/doc/msgmerge.texi b/gettext-tools/doc/msgmerge.texi index 874ecae49..e924d4f99 100644 --- a/gettext-tools/doc/msgmerge.texi +++ b/gettext-tools/doc/msgmerge.texi @@ -155,6 +155,14 @@ Assume the input files are NeXTstep/GNUstep localized resource files in @c --no-escape and --escape omitted on purpose. They are not useful. @table @samp +@item --lang=@var{catalogname} +@opindex --lang@r{, @code{msgcat} option} +Specify the @samp{Language} field to be used in the header entry. See +@ref{Header Entry} for the meaning of this field. Note: The +@samp{Language-Team} and @samp{Plural-Forms} fields are left unchanged. +If this option is not specified, the @samp{Language} field is inferred, as +best as possible, from the @samp{Language-Team} field. + @item --force-po @opindex --force-po@r{, @code{msgmerge} option} Always write an output file even if it contains no message. diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index 4a488fbe2..ac5ab0d41 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,10 @@ +2007-12-24 Bruno Haible + + * hello-*/po/Makefile.am ($(POFILES), .nop.po-update): When using + msgmerge 0.18 or newer, pass a --lang option. + * hello-objc-gnustep/po/GNUmakefile ($(POFILES), .nop.po-update): + Likewise. + 2007-12-24 Bruno Haible * hello-*/po/Makefile.am (.nop.po-update): Put all non-option arguments diff --git a/gettext-tools/examples/hello-c++-qt/po/Makefile.am b/gettext-tools/examples/hello-c++-qt/po/Makefile.am index e304c4032..aebcafb0f 100644 --- a/gettext-tools/examples/hello-c++-qt/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-qt/po/Makefile.am @@ -171,8 +171,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -246,9 +253,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am index a439db1f8..b48eb888f 100644 --- a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am @@ -178,8 +178,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -319,9 +326,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-clisp/po/Makefile.am b/gettext-tools/examples/hello-clisp/po/Makefile.am index 854f39fce..09e000046 100644 --- a/gettext-tools/examples/hello-clisp/po/Makefile.am +++ b/gettext-tools/examples/hello-clisp/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am index 8ed03858e..d2b16db11 100644 --- a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am @@ -160,8 +160,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -237,9 +244,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-csharp/po/Makefile.am b/gettext-tools/examples/hello-csharp/po/Makefile.am index 8ed03858e..d2b16db11 100644 --- a/gettext-tools/examples/hello-csharp/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp/po/Makefile.am @@ -160,8 +160,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -237,9 +244,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-gawk/po/Makefile.am b/gettext-tools/examples/hello-gawk/po/Makefile.am index 864630698..24c836fbc 100644 --- a/gettext-tools/examples/hello-gawk/po/Makefile.am +++ b/gettext-tools/examples/hello-gawk/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-guile/po/Makefile.am b/gettext-tools/examples/hello-guile/po/Makefile.am index 66fc276f9..94c13e423 100644 --- a/gettext-tools/examples/hello-guile/po/Makefile.am +++ b/gettext-tools/examples/hello-guile/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-java-awt/po/Makefile.am b/gettext-tools/examples/hello-java-awt/po/Makefile.am index a186826aa..33c89c509 100644 --- a/gettext-tools/examples/hello-java-awt/po/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -206,9 +213,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am index a186826aa..33c89c509 100644 --- a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -206,9 +213,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-java-swing/po/Makefile.am b/gettext-tools/examples/hello-java-swing/po/Makefile.am index a186826aa..33c89c509 100644 --- a/gettext-tools/examples/hello-java-swing/po/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -206,9 +213,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-java/po/Makefile.am b/gettext-tools/examples/hello-java/po/Makefile.am index 2fd45108c..55224b74d 100644 --- a/gettext-tools/examples/hello-java/po/Makefile.am +++ b/gettext-tools/examples/hello-java/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -206,9 +213,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-librep/po/Makefile.am b/gettext-tools/examples/hello-librep/po/Makefile.am index 2eff60484..5148d3ea0 100644 --- a/gettext-tools/examples/hello-librep/po/Makefile.am +++ b/gettext-tools/examples/hello-librep/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-pascal/po/Makefile.am b/gettext-tools/examples/hello-pascal/po/Makefile.am index 21fe76ad5..7145d6e53 100644 --- a/gettext-tools/examples/hello-pascal/po/Makefile.am +++ b/gettext-tools/examples/hello-pascal/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-perl/po/Makefile.am b/gettext-tools/examples/hello-perl/po/Makefile.am index c1f49650e..d5b0ccf84 100644 --- a/gettext-tools/examples/hello-perl/po/Makefile.am +++ b/gettext-tools/examples/hello-perl/po/Makefile.am @@ -182,8 +182,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -323,9 +330,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-php/po/Makefile.am b/gettext-tools/examples/hello-php/po/Makefile.am index 9408ff910..2c0bb7633 100644 --- a/gettext-tools/examples/hello-php/po/Makefile.am +++ b/gettext-tools/examples/hello-php/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-python/po/Makefile.am b/gettext-tools/examples/hello-python/po/Makefile.am index 26b89a8bb..af5b9dd48 100644 --- a/gettext-tools/examples/hello-python/po/Makefile.am +++ b/gettext-tools/examples/hello-python/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-sh/po/Makefile.am b/gettext-tools/examples/hello-sh/po/Makefile.am index 28ea0bbc6..a868c46b6 100644 --- a/gettext-tools/examples/hello-sh/po/Makefile.am +++ b/gettext-tools/examples/hello-sh/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-smalltalk/po/Makefile.am b/gettext-tools/examples/hello-smalltalk/po/Makefile.am index a74a68ba2..8edcc15ef 100644 --- a/gettext-tools/examples/hello-smalltalk/po/Makefile.am +++ b/gettext-tools/examples/hello-smalltalk/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am index 9aa439cce..c51b2e442 100644 --- a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -233,9 +240,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-tcl/po/Makefile.am b/gettext-tools/examples/hello-tcl/po/Makefile.am index 9aa439cce..c51b2e442 100644 --- a/gettext-tools/examples/hello-tcl/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl/po/Makefile.am @@ -158,8 +158,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -233,9 +240,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/examples/hello-ycp/po/Makefile.am b/gettext-tools/examples/hello-ycp/po/Makefile.am index 87fcb3683..6e68512e7 100644 --- a/gettext-tools/examples/hello-ycp/po/Makefile.am +++ b/gettext-tools/examples/hello-ycp/po/Makefile.am @@ -172,8 +172,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -313,9 +320,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/po/ChangeLog b/gettext-tools/po/ChangeLog index 3d18c8e06..8e069eb1c 100644 --- a/gettext-tools/po/ChangeLog +++ b/gettext-tools/po/ChangeLog @@ -1,3 +1,8 @@ +2007-12-24 Bruno Haible + + * Makefile.in.in ($(POFILES), .nop.po-update): When using msgmerge + 0.18 or newer, pass a --lang option. + 2007-12-24 Bruno Haible * Makefile.in.in (.nop.po-update): Put all non-option arguments after diff --git a/gettext-tools/po/Makefile.in.in b/gettext-tools/po/Makefile.in.in index 675d8bffd..b1a7baf9b 100644 --- a/gettext-tools/po/Makefile.in.in +++ b/gettext-tools/po/Makefile.in.in @@ -193,8 +193,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -395,9 +402,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index a7aac4093..36036fd98 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,34 @@ +2007-12-24 Bruno Haible + + Introduce 'Language' header field. + * xgettext.c (construct_header): Add an empty 'Language' field. + * msginit.c (language_value): New function. + (fields): Add 'Language'. + * msgmerge.c: Include lang-table.h. + (catalogname): New variable. + (long_options): Add --lang option. + (main): Handle --lang option. + (usage): Document --lang option. + (message_merge): Set the 'Language' field if --lang was specified or + if it is missing and can be inferred from the 'Language-Team' field. + * msgl-header.h: New file. + * msgl-header.c: New file. + * msgcat.c: Include msgl-header.h. + (long_options): Add --lang option. + (main): Handle --lang option. + (usage): Document --lang option. + * msgen.c: Include msgl-header.h. + (long_options): Add --lang option. + (main): Handle --lang option. + (usage): Document --lang option. + * msgl-check.c (plural_help): Look at the 'Language' field before + looking at the 'Language-Team' field. + (check_header_entry): Fix comparison with default value. When the + 'Language' field is missing, signal a warning. + * Makefile.am (libgettextsrc_la_SOURCES): Add msgl-header.c. + (msgmerge_SOURCES): Add lang-table.c. + * FILES: Update. + 2007-12-22 Bruno Haible * write-po.c (wrap): Avoid breaking line in the middle of a format diff --git a/gettext-tools/src/FILES b/gettext-tools/src/FILES index 53290b31c..3ade81540 100644 --- a/gettext-tools/src/FILES +++ b/gettext-tools/src/FILES @@ -132,6 +132,10 @@ msgcmp.c Main source for the 'msgcmp' program. | +-------------- The 'msgmerge' program +msgl-header.h +msgl-header.c + Message list header manipulation. + msgcomm.c Main source for the 'msgcomm' program. msgattrib.c Main source for the 'msgattrib' program. msgcat.c Main source for the 'msgcat' program. diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 6c238dcd0..ae5229a5c 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -119,8 +119,9 @@ format-php.c format-gcc-internal.c format-qt.c format-kde.c format-boost.c libgettextsrc_la_SOURCES = \ $(COMMON_SOURCE) read-catalog.c \ color.c write-catalog.c write-properties.c write-stringtable.c write-po.c \ -msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-english.c msgl-check.c \ -file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c plural-table.c \ +msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \ +msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \ +plural-table.c \ $(FORMAT_SOURCE) # msggrep needs pattern matching. @@ -137,7 +138,7 @@ msgmerge_SOURCES = msgmerge.c else msgmerge_SOURCES = ../woe32dll/c++msgmerge.cc endif -msgmerge_SOURCES += msgl-fsearch.c plural-count.c +msgmerge_SOURCES += msgl-fsearch.c lang-table.c plural-count.c msgunfmt_SOURCES = msgunfmt.c msgunfmt_SOURCES += \ read-mo.c read-java.c read-csharp.c read-resources.c read-tcl.c diff --git a/gettext-tools/src/msgcat.c b/gettext-tools/src/msgcat.c index 56225076f..910f80eff 100644 --- a/gettext-tools/src/msgcat.c +++ b/gettext-tools/src/msgcat.c @@ -46,6 +46,7 @@ #include "write-stringtable.h" #include "color.h" #include "msgl-cat.h" +#include "msgl-header.h" #include "propername.h" #include "gettext.h" @@ -69,6 +70,7 @@ static const struct option long_options[] = { "force-po", no_argument, &force_po, 1 }, { "help", no_argument, NULL, 'h' }, { "indent", no_argument, NULL, 'i' }, + { "lang", required_argument, NULL, CHAR_MAX + 7 }, { "no-escape", no_argument, NULL, 'e' }, { "no-location", no_argument, &line_comment, 0 }, { "no-wrap", no_argument, NULL, CHAR_MAX + 2 }, @@ -115,6 +117,8 @@ main (int argc, char **argv) catalog_output_format_ty output_syntax = &output_format_po; bool sort_by_msgid = false; bool sort_by_filepos = false; + /* Language (ISO-639 code) and optional territory (ISO-3166 code). */ + const char *catalogname = NULL; /* Set program name for messages. */ set_program_name (argv[0]); @@ -268,6 +272,10 @@ main (int argc, char **argv) handle_style_option (optarg); break; + case CHAR_MAX + 7: /* --lang */ + catalogname = optarg; + break; + default: usage (EXIT_FAILURE); /* NOTREACHED */ @@ -335,6 +343,10 @@ There is NO WARRANTY, to the extent permitted by law.\n\ else if (sort_by_msgid) msgdomain_list_sort_by_msgid (result); + /* Set the Language field in the header. */ + if (catalogname != NULL) + msgdomain_list_set_header_field (result, "Language:", catalogname); + /* Write the PO file. */ msgdomain_list_print (result, output_file, output_syntax, force_po, false); @@ -418,6 +430,8 @@ Output details:\n")); --use-first use first available translation for each\n\ message, don't merge several translations\n")); printf (_("\ + --lang=CATALOGNAME set 'Language' field in the header entry\n")); + printf (_("\ --color use colors and other text attributes always\n\ --color=WHEN use colors and other text attributes if WHEN.\n\ WHEN may be 'always', 'never', 'auto', or 'html'.\n")); diff --git a/gettext-tools/src/msgen.c b/gettext-tools/src/msgen.c index 390767d9e..84cbf8a04 100644 --- a/gettext-tools/src/msgen.c +++ b/gettext-tools/src/msgen.c @@ -39,6 +39,7 @@ #include "read-properties.h" #include "read-stringtable.h" #include "msgl-english.h" +#include "msgl-header.h" #include "write-catalog.h" #include "write-po.h" #include "write-properties.h" @@ -61,6 +62,7 @@ static const struct option long_options[] = { "force-po", no_argument, &force_po, 1 }, { "help", no_argument, NULL, 'h' }, { "indent", no_argument, NULL, 'i' }, + { "lang", required_argument, NULL, CHAR_MAX + 4 }, { "no-escape", no_argument, NULL, 'e' }, { "no-location", no_argument, &line_comment, 0 }, { "no-wrap", no_argument, NULL, CHAR_MAX + 1 }, @@ -98,6 +100,8 @@ main (int argc, char **argv) catalog_output_format_ty output_syntax = &output_format_po; bool sort_by_filepos = false; bool sort_by_msgid = false; + /* Language (ISO-639 code) and optional territory (ISO-3166 code). */ + const char *catalogname = NULL; /* Set program name for messages. */ set_program_name (argv[0]); @@ -198,6 +202,10 @@ main (int argc, char **argv) output_syntax = &output_format_stringtable; break; + case CHAR_MAX + 4: /* --lang */ + catalogname = optarg; + break; + default: usage (EXIT_FAILURE); break; @@ -255,6 +263,10 @@ There is NO WARRANTY, to the extent permitted by law.\n\ else if (sort_by_msgid) msgdomain_list_sort_by_msgid (result); + /* Set the Language field in the header. */ + if (catalogname != NULL) + msgdomain_list_set_header_field (result, "Language:", catalogname); + /* Write the merged message list out. */ msgdomain_list_print (result, output_file, output_syntax, force_po, false); @@ -313,6 +325,8 @@ Input file syntax:\n")); printf (_("\ Output details:\n")); printf (_("\ + --lang=CATALOGNAME set 'Language' field in the header entry\n")); + printf (_("\ -e, --no-escape do not use C escapes in output (default)\n")); printf (_("\ -E, --escape use C escapes in output, no extended chars\n")); diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 731b3b902..27db9f18b 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -1218,6 +1218,14 @@ language_team () } +/* Construct the value for the Language field. */ +static const char * +language_value () +{ + return catalogname; +} + + /* Construct the value for the MIME-Version field. */ static const char * mime_version () @@ -1294,6 +1302,7 @@ fields[] = { "PO-Revision-Date", NULL, po_revision_date }, { "Last-Translator", last_translator, NULL }, { "Language-Team", language_team, NULL }, + { "Language", language_value, NULL }, { "MIME-Version", mime_version, NULL }, { "Content-Type", NULL, content_type }, { "Content-Transfer-Encoding", content_transfer_encoding, NULL }, diff --git a/gettext-tools/src/msgl-check.c b/gettext-tools/src/msgl-check.c index 570e1979f..0b49530bd 100644 --- a/gettext-tools/src/msgl-check.c +++ b/gettext-tools/src/msgl-check.c @@ -173,27 +173,64 @@ check_plural_eval (const struct expression *plural_expr, static char * plural_help (const char *nullentry) { - const char *language; - size_t j; + struct plural_table_entry *ptentry = NULL; - language = c_strstr (nullentry, "Language-Team: "); - if (language != NULL) - { - language += 15; - for (j = 0; j < plural_table_size; j++) - if (strncmp (language, - plural_table[j].language, - strlen (plural_table[j].language)) == 0) + { + const char *language; + + language = c_strstr (nullentry, "Language: "); + if (language != NULL) + { + size_t len; + + language += 10; + len = strcspn (language, " \t\n"); + if (len > 0) { - char *helpline1 = - xasprintf (_("Try using the following, valid for %s:"), - plural_table[j].language); - char *help = - xasprintf ("%s\n\"Plural-Forms: %s\\n\"\n", - helpline1, plural_table[j].value); - free (helpline1); - return help; + size_t j; + + for (j = 0; j < plural_table_size; j++) + if (len == strlen (plural_table[j].lang) + && strncmp (language, plural_table[j].lang, len) == 0) + { + ptentry = &plural_table[j]; + break; + } } + } + } + + if (ptentry == NULL) + { + const char *language; + + language = c_strstr (nullentry, "Language-Team: "); + if (language != NULL) + { + size_t j; + + language += 15; + for (j = 0; j < plural_table_size; j++) + if (strncmp (language, + plural_table[j].language, + strlen (plural_table[j].language)) == 0) + { + ptentry = &plural_table[j]; + break; + } + } + } + + if (ptentry != NULL) + { + char *helpline1 = + xasprintf (_("Try using the following, valid for %s:"), + ptentry->language); + char *help = + xasprintf ("%s\n\"Plural-Forms: %s\\n\"\n", + helpline1, ptentry->value); + free (helpline1); + return help; } return NULL; } @@ -674,27 +711,33 @@ check_header_entry (const message_ty *mp, const char *msgstr_string) { "Project-Id-Version", "PO-Revision-Date", "Last-Translator", "Language-Team", "MIME-Version", "Content-Type", - "Content-Transfer-Encoding" + "Content-Transfer-Encoding", + /* These are recommended but not yet required. */ + "Language" }; static const char *default_values[] = { "PACKAGE VERSION", "YEAR-MO-DA", "FULL NAME", "LANGUAGE", NULL, - "text/plain; charset=CHARSET", "ENCODING" + "text/plain; charset=CHARSET", "ENCODING", + "" }; const size_t nfields = SIZEOF (required_fields); + const size_t nrequiredfields = nfields - 1; int initial = -1; int cnt; for (cnt = 0; cnt < nfields; ++cnt) { - char *endp = c_strstr (msgstr_string, required_fields[cnt]); + int severity = + (cnt < nrequiredfields ? PO_SEVERITY_ERROR : PO_SEVERITY_WARNING); + const char *endp = c_strstr (msgstr_string, required_fields[cnt]); if (endp == NULL) { char *msg = - xasprintf (_("headerfield `%s' missing in header\n"), + xasprintf (_("header field `%s' missing in header\n"), required_fields[cnt]); - po_xerror (PO_SEVERITY_ERROR, mp, NULL, 0, 0, true, msg); + po_xerror (severity, mp, NULL, 0, 0, true, msg); free (msg); } else if (endp != msgstr_string && endp[-1] != '\n') @@ -703,33 +746,48 @@ check_header_entry (const message_ty *mp, const char *msgstr_string) xasprintf (_("\ header field `%s' should start at beginning of line\n"), required_fields[cnt]); - po_xerror (PO_SEVERITY_ERROR, mp, NULL, 0, 0, true, msg); + po_xerror (severity, mp, NULL, 0, 0, true, msg); free (msg); } - else if (default_values[cnt] != NULL - && strncmp (default_values[cnt], - endp + strlen (required_fields[cnt]) + 2, - strlen (default_values[cnt])) == 0) + else { - if (initial != -1) + const char *p = endp + strlen (required_fields[cnt]); + /* Test whether the field's value, starting at p, is the default + value. */ + if (*p == ':') + p++; + if (*p == ' ') + p++; + if (default_values[cnt] != NULL + && strncmp (p, default_values[cnt], + strlen (default_values[cnt])) == 0) { - po_xerror (PO_SEVERITY_ERROR, - mp, NULL, 0, 0, true, _("\ + p += strlen (default_values[cnt]); + if (*p == '\0' || *p == '\n') + { + if (initial != -1) + { + po_xerror (severity, + mp, NULL, 0, 0, true, _("\ some header fields still have the initial default value\n")); - initial = -1; - break; + initial = -1; + break; + } + else + initial = cnt; + } } - else - initial = cnt; } } if (initial != -1) { + int severity = + (initial < nrequiredfields ? PO_SEVERITY_ERROR : PO_SEVERITY_WARNING); char *msg = - xasprintf (_("field `%s' still has initial default value\n"), + xasprintf (_("header field `%s' still has the initial default value\n"), required_fields[initial]); - po_xerror (PO_SEVERITY_ERROR, mp, NULL, 0, 0, true, msg); + po_xerror (severity, mp, NULL, 0, 0, true, msg); free (msg); } } diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 6fa92757d..d65c37de1 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -55,6 +55,7 @@ #include "msgl-equal.h" #include "msgl-fsearch.h" #include "lock.h" +#include "lang-table.h" #include "plural-exp.h" #include "plural-count.h" #include "msgl-check.h" @@ -88,6 +89,9 @@ static bool use_fuzzy_matching = true; /* Determines whether to keep old msgids as previous msgids. */ static bool keep_previous = false; +/* Language (ISO-639 code) and optional territory (ISO-3166 code). */ +static const char *catalogname = NULL; + /* List of user-specified compendiums. */ static message_list_list_ty *compendiums; @@ -110,6 +114,7 @@ static const struct option long_options[] = { "force-po", no_argument, &force_po, 1 }, { "help", no_argument, NULL, 'h' }, { "indent", no_argument, NULL, 'i' }, + { "lang", required_argument, NULL, CHAR_MAX + 8 }, { "multi-domain", no_argument, NULL, 'm' }, { "no-escape", no_argument, NULL, 'e' }, { "no-fuzzy-matching", no_argument, NULL, 'N' }, @@ -309,6 +314,10 @@ main (int argc, char **argv) keep_previous = true; break; + case CHAR_MAX + 8: /* --lang */ + catalogname = optarg; + break; + default: usage (EXIT_FAILURE); break; @@ -536,6 +545,8 @@ Input file syntax:\n")); printf (_("\ Output details:\n")); printf (_("\ + --lang=CATALOGNAME set 'Language' field in the header entry\n")); + printf (_("\ -e, --no-escape do not use C escapes in output (default)\n")); printf (_("\ -E, --escape use C escapes in output, no extended chars\n")); @@ -795,15 +806,17 @@ message_merge (message_ty *def, message_ty *ref, bool force_fuzzy, #define LAST_TRANSLATOR 4 { "Language-Team:", sizeof ("Language-Team:") - 1 }, #define LANGUAGE_TEAM 5 + { "Language:", sizeof ("Language:") - 1 }, +#define LANGUAGE 6 { "MIME-Version:", sizeof ("MIME-Version:") - 1 }, -#define MIME_VERSION 6 +#define MIME_VERSION 7 { "Content-Type:", sizeof ("Content-Type:") - 1 }, -#define CONTENT_TYPE 7 +#define CONTENT_TYPE 8 { "Content-Transfer-Encoding:", sizeof ("Content-Transfer-Encoding:") - 1 } -#define CONTENT_TRANSFER 8 +#define CONTENT_TRANSFER 9 }; -#define UNKNOWN 9 +#define UNKNOWN 10 struct { const char *string; @@ -875,6 +888,112 @@ message_merge (message_ty *def, message_ty *ref, bool force_fuzzy, cp = endp; } + /* Set the Language field if specified on the command line. */ + if (catalogname != NULL) + { + /* Prepend a space and append a newline. */ + size_t len = strlen (catalogname); + char *copy = (char *) obstack_alloc (&pool, 1 + len + 1 + 1); + stpcpy (stpcpy (stpcpy (copy, " "), catalogname), "\n"); + header_fields[LANGUAGE].string = copy; + header_fields[LANGUAGE].len = strlen (header_fields[LANGUAGE].string); + } + /* Add a Language field to PO files that don't have one. The Language + field was introduced in gettext-0.18. */ + else if (header_fields[LANGUAGE].string == NULL) + { + const char *language_team_ptr = header_fields[LANGUAGE_TEAM].string; + + if (language_team_ptr != NULL) + { + size_t language_team_len = header_fields[LANGUAGE_TEAM].len; + + /* Trim leading blanks. */ + while (language_team_len > 0 + && (*language_team_ptr == ' ' + || *language_team_ptr == '\t')) + { + language_team_ptr++; + language_team_len--; + } + + /* Trim trailing blanks. */ + while (language_team_len > 0 + && (language_team_ptr[language_team_len - 1] == ' ' + || language_team_ptr[language_team_len - 1] == '\t')) + language_team_len--; + + /* Trim last word, if it looks like an URL or email address. */ + { + size_t i; + + for (i = language_team_len; i > 0; i--) + if (language_team_ptr[i - 1] == ' ' + || language_team_ptr[i - 1] == '\t') + break; + /* The last word: language_team_ptr[i..language_team_len-1]. */ + if (i < language_team_len + && (language_team_ptr[i] == '<' + || language_team_ptr[language_team_len - 1] == '>' + || memchr (language_team_ptr, '@', language_team_len) + != NULL + || memchr (language_team_ptr, '/', language_team_len) + != NULL)) + { + /* Trim last word and blanks before it. */ + while (i > 0 + && (language_team_ptr[i - 1] == ' ' + || language_team_ptr[i - 1] == '\t')) + i--; + language_team_len = i; + } + } + + /* The rest of the Language-Team field should be the english name + of the languge. Convert to ISO 639 and ISO 3166 syntax. */ + { + size_t i; + + for (i = 0; i < language_variant_table_size; i++) + if (strlen (language_variant_table[i].english) + == language_team_len + && memcmp (language_variant_table[i].english, + language_team_ptr, language_team_len) == 0) + { + header_fields[LANGUAGE].string = + language_variant_table[i].code; + break; + } + } + if (header_fields[LANGUAGE].string == NULL) + { + size_t i; + + for (i = 0; i < language_table_size; i++) + if (strlen (language_table[i].english) == language_team_len + && memcmp (language_table[i].english, + language_team_ptr, language_team_len) == 0) + { + header_fields[LANGUAGE].string = language_table[i].code; + break; + } + } + if (header_fields[LANGUAGE].string != NULL) + { + /* Prepend a space and append a newline. */ + const char *str = header_fields[LANGUAGE].string; + size_t len = strlen (str); + char *copy = (char *) obstack_alloc (&pool, 1 + len + 1 + 1); + stpcpy (stpcpy (stpcpy (copy, " "), str), "\n"); + header_fields[LANGUAGE].string = copy; + } + else + header_fields[LANGUAGE].string = " \n"; + header_fields[LANGUAGE].len = + strlen (header_fields[LANGUAGE].string); + } + } + { const char *msgid_bugs_ptr; @@ -956,6 +1075,7 @@ message_merge (message_ty *def, message_ty *ref, bool force_fuzzy, IF_FILLED (PO_REVISION_DATE); IF_FILLED (LAST_TRANSLATOR); IF_FILLED (LANGUAGE_TEAM); + IF_FILLED (LANGUAGE); IF_FILLED (MIME_VERSION); IF_FILLED (CONTENT_TYPE); IF_FILLED (CONTENT_TRANSFER); diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 49155738f..feef4200a 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -2842,6 +2842,7 @@ POT-Creation-Date: %s\n\ PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n\ Last-Translator: FULL NAME \n\ Language-Team: LANGUAGE \n\ +Language: \n\ MIME-Version: 1.0\n\ Content-Type: text/plain; charset=CHARSET\n\ Content-Transfer-Encoding: 8bit\n", diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 7386cfabc..48b1cf8ef 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,39 @@ +2007-12-24 Bruno Haible + + * msginit-1: Add 'Language' field in header to input. Check that it is + filled. + * msginit-2: Likewise. + * msgmerge-5: Add 'Language' field in header to expected result. + * msgmerge-6: Likewise. + * msgmerge-10: Likewise. + * msgmerge-11: Likewise. + * msgmerge-12: Likewise. + * msgmerge-13: Likewise. + * msgmerge-14: Likewise. + * msgmerge-16: Likewise. + * msgmerge-21: Likewise. + * msgmerge-22: Likewise. + * mm-viet.out: Likewise. + * msgmerge-update-1: Add 'Language' field in header to input. + * msgmerge-update-2: Likewise. + * msgmerge-update-3: Likewise. + * xgettext-3: Add 'Language' field in header to expected result. + * xgettext-4: Likewise. + * xgettext-5: Likewise. + * xgettext-8: Likewise. + * xgettext-csharp-2: Likewise. + * xgettext-csharp-3: Likewise. + * xgettext-glade-1: Likewise. + * xgettext-glade-2: Likewise. + * xgettext-glade-3: Likewise. + * xgettext-java-2: Likewise. + * xgettext-perl-2: Likewise. + * xgettext-perl-3: Likewise. + * xgettext-python-1: Likewise. + * xgettext-python-3: Likewise. + * xgettext-stringtable-1: Likewise. + * xgettext-tcl-1: Likewise. + 2007-12-22 Bruno Haible * msgcat-17: New file. diff --git a/gettext-tools/tests/mm-viet.out b/gettext-tools/tests/mm-viet.out index c03d5ede6..f57688b1f 100644 --- a/gettext-tools/tests/mm-viet.out +++ b/gettext-tools/tests/mm-viet.out @@ -10,6 +10,7 @@ msgstr "" "PO-Revision-Date: #LOCALTIME %F %R%z#\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msginit-1 b/gettext-tools/tests/msginit-1 index 1f8de5307..d0cce87e6 100755 --- a/gettext-tools/tests/msginit-1 +++ b/gettext-tools/tests/msginit-1 @@ -20,6 +20,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -43,11 +44,17 @@ tmpfiles="$tmpfiles mi-test1.tmp mi-test1.out mi-test1.err" : ${MSGINIT=msginit} ${MSGINIT} -i mi-test1.pot -l ga_IE --no-translator -o mi-test1.tmp 2>mi-test1.err test $? = 0 || { cat mi-test1.err 1>&2; rm -fr $tmpfiles; exit 1; } -sed -e '1,15d' < mi-test1.tmp | tr -d '\r' > mi-test1.out +sed -e '1,10d' < mi-test1.tmp | tr -d '\r' > mi-test1.out test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mi-test1.ok" cat <<\EOF > mi-test1.ok +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ga\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n" #, c-format diff --git a/gettext-tools/tests/msginit-2 b/gettext-tools/tests/msginit-2 index 52eaf8e98..73303da84 100755 --- a/gettext-tools/tests/msginit-2 +++ b/gettext-tools/tests/msginit-2 @@ -20,6 +20,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -67,11 +68,17 @@ tmpfiles="$tmpfiles mi-test2.tmp mi-test2.out mi-test2.err" : ${MSGINIT=msginit} ${MSGINIT} -i mi-test2.pot -l ga_IE --no-translator -o mi-test2.tmp 2>mi-test2.err test $? = 0 || { cat mi-test2.err 1>&2; rm -fr $tmpfiles; exit 1; } -sed -e '1,15d' < mi-test2.tmp | tr -d '\r' > mi-test2.out +sed -e '1,10d' < mi-test2.tmp | tr -d '\r' > mi-test2.out test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mi-test2.ok" cat <<\EOF > mi-test2.ok +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ga\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n" #. A menu item diff --git a/gettext-tools/tests/msgmerge-10 b/gettext-tools/tests/msgmerge-10 index 9827a98c7..e1f1ebfd0 100755 --- a/gettext-tools/tests/msgmerge-10 +++ b/gettext-tools/tests/msgmerge-10 @@ -74,6 +74,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-11 b/gettext-tools/tests/msgmerge-11 index 4373474bf..4cc034a7d 100755 --- a/gettext-tools/tests/msgmerge-11 +++ b/gettext-tools/tests/msgmerge-11 @@ -76,6 +76,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-12 b/gettext-tools/tests/msgmerge-12 index 91bc9b0d5..39995c4fe 100755 --- a/gettext-tools/tests/msgmerge-12 +++ b/gettext-tools/tests/msgmerge-12 @@ -74,6 +74,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-13 b/gettext-tools/tests/msgmerge-13 index 826d908f5..292a1f097 100755 --- a/gettext-tools/tests/msgmerge-13 +++ b/gettext-tools/tests/msgmerge-13 @@ -107,6 +107,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-14 b/gettext-tools/tests/msgmerge-14 index 38c841116..ee95c6a0f 100755 --- a/gettext-tools/tests/msgmerge-14 +++ b/gettext-tools/tests/msgmerge-14 @@ -79,6 +79,7 @@ msgstr "" "PO-Revision-Date: 2002-11-01 01:23+0100\n" "Last-Translator: Arseny Slobodjuck \n" "Language-Team: Russian \n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-16 b/gettext-tools/tests/msgmerge-16 index 2174cd235..4bcb6d27a 100755 --- a/gettext-tools/tests/msgmerge-16 +++ b/gettext-tools/tests/msgmerge-16 @@ -77,6 +77,7 @@ msgstr "" "PO-Revision-Date: 2003-10-20 10:13+0200\n" "Last-Translator: Bruno Haible \n" "Language-Team: Polish \n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-21 b/gettext-tools/tests/msgmerge-21 index 4cac80811..ba53911b6 100755 --- a/gettext-tools/tests/msgmerge-21 +++ b/gettext-tools/tests/msgmerge-21 @@ -66,6 +66,7 @@ msgstr "" "PO-Revision-Date: 2007-06-28 16:37+0200\n" "Last-Translator: Karl Eichwalder \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-22 b/gettext-tools/tests/msgmerge-22 index 75fed04cf..d37afc5be 100644 --- a/gettext-tools/tests/msgmerge-22 +++ b/gettext-tools/tests/msgmerge-22 @@ -64,6 +64,7 @@ msgstr "" "PO-Revision-Date: 2007-06-28 16:37+0200\n" "Last-Translator: Karl Eichwalder \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-5 b/gettext-tools/tests/msgmerge-5 index 997fe1747..12c3736ae 100755 --- a/gettext-tools/tests/msgmerge-5 +++ b/gettext-tools/tests/msgmerge-5 @@ -62,6 +62,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" diff --git a/gettext-tools/tests/msgmerge-6 b/gettext-tools/tests/msgmerge-6 index eb4ab663f..c6f9e3ef4 100755 --- a/gettext-tools/tests/msgmerge-6 +++ b/gettext-tools/tests/msgmerge-6 @@ -77,6 +77,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix Natter \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-update-1 b/gettext-tools/tests/msgmerge-update-1 index 54e17efa1..8b167218f 100755 --- a/gettext-tools/tests/msgmerge-update-1 +++ b/gettext-tools/tests/msgmerge-update-1 @@ -18,6 +18,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-update-2 b/gettext-tools/tests/msgmerge-update-2 index dbc5aa0d4..0174032fc 100755 --- a/gettext-tools/tests/msgmerge-update-2 +++ b/gettext-tools/tests/msgmerge-update-2 @@ -19,6 +19,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" @@ -72,6 +73,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/msgmerge-update-3 b/gettext-tools/tests/msgmerge-update-3 index 4ee2bd84c..375f19baf 100755 --- a/gettext-tools/tests/msgmerge-update-3 +++ b/gettext-tools/tests/msgmerge-update-3 @@ -20,6 +20,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" @@ -69,6 +70,7 @@ msgstr "" "PO-Revision-Date: 2001-04-29 21:19+02:00\n" "Last-Translator: Felix N. \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-3 b/gettext-tools/tests/xgettext-3 index c6c59f7be..81ecdcb21 100755 --- a/gettext-tools/tests/xgettext-3 +++ b/gettext-tools/tests/xgettext-3 @@ -45,6 +45,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-4 b/gettext-tools/tests/xgettext-4 index ab85af893..21b14ba95 100755 --- a/gettext-tools/tests/xgettext-4 +++ b/gettext-tools/tests/xgettext-4 @@ -30,6 +30,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-5 b/gettext-tools/tests/xgettext-5 index d7fce82b2..ef031805a 100755 --- a/gettext-tools/tests/xgettext-5 +++ b/gettext-tools/tests/xgettext-5 @@ -41,6 +41,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-8 b/gettext-tools/tests/xgettext-8 index e3005bccc..adc292533 100755 --- a/gettext-tools/tests/xgettext-8 +++ b/gettext-tools/tests/xgettext-8 @@ -57,6 +57,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-csharp-2 b/gettext-tools/tests/xgettext-csharp-2 index 260cf8ba6..d608c73ac 100755 --- a/gettext-tools/tests/xgettext-csharp-2 +++ b/gettext-tools/tests/xgettext-csharp-2 @@ -47,6 +47,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-csharp-3 b/gettext-tools/tests/xgettext-csharp-3 index 74050d6c0..c231b1c88 100755 --- a/gettext-tools/tests/xgettext-csharp-3 +++ b/gettext-tools/tests/xgettext-csharp-3 @@ -73,6 +73,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-glade-1 b/gettext-tools/tests/xgettext-glade-1 index d4323a0cb..e8beec727 100755 --- a/gettext-tools/tests/xgettext-glade-1 +++ b/gettext-tools/tests/xgettext-glade-1 @@ -1354,6 +1354,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-glade-2 b/gettext-tools/tests/xgettext-glade-2 index 56b40482c..1b00b0f6c 100755 --- a/gettext-tools/tests/xgettext-glade-2 +++ b/gettext-tools/tests/xgettext-glade-2 @@ -80,6 +80,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-glade-3 b/gettext-tools/tests/xgettext-glade-3 index 0625e9603..9d6622b39 100755 --- a/gettext-tools/tests/xgettext-glade-3 +++ b/gettext-tools/tests/xgettext-glade-3 @@ -187,6 +187,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-java-2 b/gettext-tools/tests/xgettext-java-2 index 689e728b3..10b82083f 100755 --- a/gettext-tools/tests/xgettext-java-2 +++ b/gettext-tools/tests/xgettext-java-2 @@ -79,6 +79,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-perl-2 b/gettext-tools/tests/xgettext-perl-2 index ce1e28f91..338c8d865 100755 --- a/gettext-tools/tests/xgettext-perl-2 +++ b/gettext-tools/tests/xgettext-perl-2 @@ -36,6 +36,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-perl-3 b/gettext-tools/tests/xgettext-perl-3 index 82797511b..131f777de 100755 --- a/gettext-tools/tests/xgettext-perl-3 +++ b/gettext-tools/tests/xgettext-perl-3 @@ -36,6 +36,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-python-1 b/gettext-tools/tests/xgettext-python-1 index aace2a191..6e9a07eb5 100755 --- a/gettext-tools/tests/xgettext-python-1 +++ b/gettext-tools/tests/xgettext-python-1 @@ -45,6 +45,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-python-3 b/gettext-tools/tests/xgettext-python-3 index a81a7b31a..46ae77ba4 100755 --- a/gettext-tools/tests/xgettext-python-3 +++ b/gettext-tools/tests/xgettext-python-3 @@ -35,6 +35,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -115,6 +116,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-stringtable-1 b/gettext-tools/tests/xgettext-stringtable-1 index 35a455c0d..8d4c94c57 100755 --- a/gettext-tools/tests/xgettext-stringtable-1 +++ b/gettext-tools/tests/xgettext-stringtable-1 @@ -44,6 +44,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/gettext-tools/tests/xgettext-tcl-1 b/gettext-tools/tests/xgettext-tcl-1 index 6d3f924c9..85d38d8a7 100755 --- a/gettext-tools/tests/xgettext-tcl-1 +++ b/gettext-tools/tests/xgettext-tcl-1 @@ -45,6 +45,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n"