Unverified Commit b661a09e authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #757 from ikedas/gettext-update by ikedas

Update gettext support bundled in the source distribution
parents a8016d99 883394a2
...@@ -29,6 +29,7 @@ AC_INIT(sympa, 6.2.48, sympa-developpers@listes.renater.fr) ...@@ -29,6 +29,7 @@ AC_INIT(sympa, 6.2.48, sympa-developpers@listes.renater.fr)
AM_INIT_AUTOMAKE([foreign -Wall -Werror 1.9 tar-pax]) AM_INIT_AUTOMAKE([foreign -Wall -Werror 1.9 tar-pax])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_PO_SUBDIRS AM_PO_SUBDIRS
GETTEXT_MACRO_VERSION=0.19
AC_PREFIX_DEFAULT(/home/sympa) AC_PREFIX_DEFAULT(/home/sympa)
......
# Makefile for PO directory in any package using GNU gettext. # Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu> # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# #
# This file can be copied and used freely without restrictions. It can # Copying and distribution of this file, with or without modification,
# be used in projects which are not available under the GNU General Public # are permitted in any medium without royalty provided the copyright
# License but which still want to provide support for the GNU gettext # notice and this notice are preserved. This file is offered as-is,
# functionality. # without any warranty.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
# #
# Origin: gettext-0.17 # Origin: gettext-0.19.8
GETTEXT_MACRO_VERSION = 0.17 GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
VERSION = @VERSION@ VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SED = @SED@
SHELL = /bin/sh SHELL = /bin/sh
@SET_MAKE@ @SET_MAKE@
...@@ -44,6 +43,11 @@ install_sh = $(SHELL) @install_sh@ ...@@ -44,6 +43,11 @@ install_sh = $(SHELL) @install_sh@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
# When building gettext-tools, we prefer to use the built programs
# rather than installed programs. However, we can't do that when we
# are cross compiling.
CROSS_COMPILING = @CROSS_COMPILING@
GMSGFMT_ = @GMSGFMT@ GMSGFMT_ = @GMSGFMT@
GMSGFMT_no = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@
GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT_yes = @GMSGFMT_015@
...@@ -52,22 +56,21 @@ MSGFMT_ = @MSGFMT@ ...@@ -52,22 +56,21 @@ MSGFMT_ = @MSGFMT@
MSGFMT_no = @MSGFMT@ MSGFMT_no = @MSGFMT@
MSGFMT_yes = @MSGFMT_015@ MSGFMT_yes = @MSGFMT_015@
MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
XGETTEXT = ./xgettext.pl XGETTEXT_ = @XGETTEXT@
XGETTEXT_no = @XGETTEXT@
XGETTEXT_yes = @XGETTEXT_015@
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = msgmerge MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGCAT = msgcat
MSGATTRIB = msgattrib
MSGEN = msgen
MSGINIT = msginit MSGINIT = msginit
MSGCONV = msgconv MSGCONV = msgconv
MSGFILTER = msgfilter MSGFILTER = msgfilter
ADD_LANG = ./add-lang.pl
POFILES = @POFILES@ POFILES = @POFILES@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@ UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin add-lang.pl \ DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \ $(POFILES) $(GMOFILES) \
...@@ -77,6 +80,16 @@ POTFILES = \ ...@@ -77,6 +80,16 @@ POTFILES = \
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
POFILESDEPS_yes = $(POFILESDEPS_)
POFILESDEPS_no =
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
DISTFILESDEPS_ = update-po
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
DISTFILESDEPS_no =
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# Makevars gets inserted here. (Don't remove this line!) # Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES: .SUFFIXES:
...@@ -84,19 +97,13 @@ CATALOGS = @CATALOGS@ ...@@ -84,19 +97,13 @@ CATALOGS = @CATALOGS@
.po.mo: .po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \ @echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -o t-$@ $< && mv t-$@ $@ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo: .po.gmo:
@test -x $(ADD_LANG) || chmod u+x $(ADD_LANG)
@lang=`echo $* | sed -e 's,.*/,,'`; \ @lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) --statistics -o $${lang}.gmo $${lang}.po"; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
$(ADD_LANG) --lang=$${lang} $${lang}.po > $${lang}.lpo && \
rm -f $${lang}.gmo && \
$(GMSGFMT) --statistics -o t-$${lang}.gmo $${lang}.lpo && \
rm -f $${lang}.lpo && \
mv t-$${lang}.gmo $${lang}.gmo
.sin.sed: .sin.sed:
sed -e '/^#/d' $< > t-$@ sed -e '/^#/d' $< > t-$@
...@@ -108,6 +115,13 @@ all: all-@USE_NLS@ ...@@ -108,6 +115,13 @@ all: all-@USE_NLS@
all-yes: stamp-po all-yes: stamp-po
all-no: all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync.
CHECK_MACRO_VERSION = \
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
exit 1; \
}
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that # we don't want to bother translators with empty POT files). We assume that
...@@ -123,6 +137,7 @@ all-no: ...@@ -123,6 +137,7 @@ all-no:
# $(POFILES) has been designed to not touch files that don't need to be # $(POFILES) has been designed to not touch files that don't need to be
# changed. # changed.
stamp-po: $(srcdir)/$(DOMAIN).pot stamp-po: $(srcdir)/$(DOMAIN).pot
@$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \ test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
...@@ -137,23 +152,59 @@ stamp-po: $(srcdir)/$(DOMAIN).pot ...@@ -137,23 +152,59 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
test -x $(XGETTEXT) || chmod u+x $(XGETTEXT) ; \ package_gnu="$(PACKAGE_GNU)"; \
cd ../../; \ test -n "$$package_gnu" || { \
po/sympa/$(XGETTEXT) -u \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
-o po/sympa/$(DOMAIN).pot \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
src/bin/*.pl.in src/libexec/*.pl.in src/sbin/*.pl.in \ -size -10000000c -exec grep 'GNU @PACKAGE@' \
src/lib/*.pm src/lib/Sympa/*.pm src/lib/Sympa/*/*.pm \ /dev/null '{}' ';' 2>/dev/null; \
src/lib/Sympa/*/*/*.pm \ else \
cpanfile \ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
src/cgi/*.fcgi.in \ fi; \
default/web_tt2/*.tt2 default/mail_tt2/*.tt2 \ } | grep -v 'libtool:' >/dev/null; then \
default/mhonarc-ressources.tt2 default/topics.conf \ package_gnu=yes; \
default/scenari/* \ else \
default/tasks/* \ package_gnu=no; \
default/create_list_templates/*/*; \ fi; \
cd po/sympa; \ }; \
if test "$$package_gnu" = "yes"; then \
package_prefix='GNU '; \
else \
package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
esac
test ! -f $(DOMAIN).po || { \ test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
rm -f $(DOMAIN).1po; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \ if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
...@@ -176,12 +227,20 @@ $(srcdir)/$(DOMAIN).pot: ...@@ -176,12 +227,20 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed. # This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed. # Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot $(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \ if test -f "$(srcdir)/$${lang}.po"; then \
test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ cd $(srcdir) \
&& { 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_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
esac; \
}; \
else \ else \
$(MAKE) $${lang}.po-create; \ $(MAKE) $${lang}.po-create; \
fi fi
...@@ -204,7 +263,6 @@ install-data: install-data-@USE_NLS@ ...@@ -204,7 +263,6 @@ install-data: install-data-@USE_NLS@
fi fi
install-data-no: all install-data-no: all
install-data-yes: all install-data-yes: all
$(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \ @catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \ for cat in $$catalogs; do \
cat=`basename $$cat`; \ cat=`basename $$cat`; \
...@@ -256,7 +314,6 @@ installdirs-data: installdirs-data-@USE_NLS@ ...@@ -256,7 +314,6 @@ installdirs-data: installdirs-data-@USE_NLS@
fi fi
installdirs-data-no: installdirs-data-no:
installdirs-data-yes: installdirs-data-yes:
$(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \ @catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \ for cat in $$catalogs; do \
cat=`basename $$cat`; \ cat=`basename $$cat`; \
...@@ -325,7 +382,7 @@ mostlyclean: ...@@ -325,7 +382,7 @@ mostlyclean:
clean: mostlyclean clean: mostlyclean
distclean: clean distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.new.po rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean maintainer-clean: distclean
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
...@@ -334,7 +391,7 @@ maintainer-clean: distclean ...@@ -334,7 +391,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: dist distdir:
$(MAKE) update-po test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2 @$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before. # This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES) dist2: stamp-po $(DISTFILES)
...@@ -378,107 +435,46 @@ update-po: Makefile ...@@ -378,107 +435,46 @@ update-po: Makefile
.nop.po-update: .nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../../src:$$PATH; fi; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \ tmpdir=`pwd`; \
echo "$$lang:"; \ echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \ cd $(srcdir); \
if test "$$lang" = "en"; then\ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
$(MSGEN) -o $$tmpdir/$$lang.new.po $(DOMAIN).pot; \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
else \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \ *) \
:; \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --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 \ else \
echo "msgmerge for $$lang.po failed!" 1>&2; \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
cp -p $$lang.po $$tmpdir/$$lang.new.po;\ :; \
fi;\ else \
fi;\ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ exit 1; \
rm -f $$tmpdir/$$lang.new.po; \ fi; \
fi; \
else \ else \
$(MSGCAT) --use-first -o $$tmpdir/$$lang.po $$tmpdir/$$lang.new.po $$lang.po; \ echo "msgmerge for $$lang.po failed!" 1>&2; \
fi; \ rm -f $$tmpdir/$$lang.new.po; \
rm -f $$tmpdir/$$lang.new.po;
## Prepare a tar.gz with a structure adapted to Pootle
## ie made of subdirectories (ll/sympa.po...templates/sympa.pot
export:
echo "Building /tmp/sympa-po.tar.gz..."; \
if [ -d /tmp/sympa-po ]; then \
rm -rf /tmp/sympa-po; \
fi fi
mkdir /tmp/sympa-po; \
mkdir /tmp/sympa-po/sympa; \
mkdir /tmp/sympa-po/web_help; \
mkdir /tmp/sympa-po/terminology; \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
mkdir /tmp/sympa-po/sympa/$$lang; \
cp $$lang.po /tmp/sympa-po/sympa/$$lang/sympa.po; \
mkdir /tmp/sympa-po/web_help/$$lang; \
cp ../web_help/$$lang.po /tmp/sympa-po/web_help/$$lang/web_help.po; \
done
mkdir /tmp/sympa-po/sympa/templates; \
mkdir /tmp/sympa-po/web_help/templates; \
mkdir /tmp/sympa-po/terminology/templates; \
cp sympa.pot /tmp/sympa-po/sympa/templates/sympa.pot; \
cp ../web_help/web_help.pot /tmp/sympa-po/web_help/templates/web_help.pot; \
cp terminology.pot /tmp/sympa-po/terminology/templates/terminology.pot; \
(cd /tmp/sympa-po; tar -zcvf /tmp/sympa-po.tar.gz *)
clean-po:
$(MAKE) $(DOMAIN).pot-update
@languages=`echo $(POFILES) | sed -e 's/\.po//g'`;\
for lang in $$languages; do \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if test "$$lang" = "en"; then\
if $(MSGATTRIB) --no-fuzzy -o $$tmpdir/$$lang.previous.po $$lang.po; then \
if cmp $$lang.po $$tmpdir/$$lang.previous.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
$(MSGEN) -o $$tmpdir/$$lang.new.po $(DOMAIN).pot; \
$(MSGCAT) --use-first -o $$tmpdir/$$lang.new.po $$lang.po $$tmpdir/$$lang.new.po; \
fi; \
else \
echo "Could not gather not fuzzy translated strings in en.po" 1>&2; \
fi;\
else \
if $(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi;\
fi;\
done;\
$(DUMMYPOFILES): $(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES) update-gmo: Makefile $(GMOFILES)
@: @:
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
# because execution permission bits may not work on the current file system.
# Use @SHELL@, which is the shell determined by autoconf for the use by its
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \ cd $(top_builddir) \
&& $(SHELL) ./config.status $(subdir)/$@.in po-directories && @SHELL@ ./config.status $(subdir)/$@.in po-directories
force: force:
......
...@@ -7,8 +7,10 @@ DOMAIN = $(PACKAGE) ...@@ -7,8 +7,10 @@ DOMAIN = $(PACKAGE)
subdir = po/sympa subdir = po/sympa
top_builddir = ../.. top_builddir = ../..
# Sympa uses xgettext by their own.
XGETTEXT = $(top_srcdir)/support/xgettext.pl
# These options get passed to xgettext. # These options get passed to xgettext.
XGETTEXT_OPTIONS = --lang=perl --from-code=utf-8 XGETTEXT_OPTIONS =
# This is the copyright holder that gets inserted into the header of the # This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
...@@ -18,7 +20,14 @@ XGETTEXT_OPTIONS = --lang=perl --from-code=utf-8 ...@@ -18,7 +20,14 @@ XGETTEXT_OPTIONS = --lang=perl --from-code=utf-8
# or entity, or to disclaim their copyright. The empty string stands for # or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim # the public domain; in this case the translators are expected to disclaim
# their copyright. # their copyright.
COPYRIGHT_HOLDER = GIP RENATER COPYRIGHT_HOLDER = The Sympa Community
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = no
# This is the email address or URL to which the translators shall report # This is the email address or URL to which the translators shall report
# bugs in the untranslated strings: # bugs in the untranslated strings:
...@@ -39,3 +48,33 @@ MSGID_BUGS_ADDRESS = ...@@ -39,3 +48,33 @@ MSGID_BUGS_ADDRESS =
# This is the list of locale categories, beyond LC_MESSAGES, for which the # This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty. # message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES = EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS =
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = no
# List of source files which contain translatable strings. # List of source files which contain translatable strings.
#default/mail_tt2/authorization_reject.tt2 src/bin/*.pl.in
default/mail_tt2/bye.tt2 src/libexec/*.pl.in
#default/mail_tt2/certif_warning.tt2 src/sbin/*.pl.in
default/mail_tt2/command_report.tt2 src/lib/*.pm
default/mail_tt2/digestplain.tt2 src/lib/Sympa/*.pm
default/mail_tt2/digest.tt2 src/lib/Sympa/*/*.pm
default/mail_tt2/d_install_shared.tt2 src/lib/Sympa/*/*/*.pm
default/mail_tt2/d_reject_shared.tt2 cpanfile
#default/mail_tt2/expire_deletion.tt2 src/cgi/*.fcgi.in
#default/mail_tt2/expire_warning1.tt2 default/web_tt2/*.tt2
#default/mail_tt2/expire_warning2.tt2 default/mail_tt2/*.tt2
default/mail_tt2/get_archive.tt2
default/mail_tt2/global_remind.tt2
default/mail_tt2/helpfile.tt2
default/mail_tt2/index_archive.tt2
default/mail_tt2/info_report.tt2
default/mail_tt2/invite.tt2
default/mail_tt2/list_created.tt2
default/mail_tt2/listeditor_notification.tt2
default/mail_tt2/listmaster_notification.tt2
default/mail_tt2/listowner_notification.tt2
default/mail_tt2/list_rejected.tt2
default/mail_tt2/lists.tt2
default/mail_tt2/list_unknown.tt2
default/mail_tt2/message_report.tt2
default/mail_tt2/moderate.tt2
default/mail_tt2/modindex.tt2
default/mail_tt2/reject.tt2
default/mail_tt2/remind.tt2
default/mail_tt2/removed.tt2
default/mail_tt2/request_auth.tt2
default/mail_tt2/review.tt2
default/mail_tt2/send_auth.tt2
default/mail_tt2/sendpasswd.tt2
default/mail_tt2/sendssopasswd.tt2
default/mail_tt2/stats_report.tt2
default/mail_tt2/summary.tt2
default/mail_tt2/urlized_part.tt2
default/mail_tt2/user_notification.tt2
default/mail_tt2/welcome.tt2
default/mail_tt2/which.tt2
default/mail_tt2/x509-user-cert-missing.tt2
default/mail_tt2/your_infected_msg.tt2
src/bin/sympa_soap_client.pl.in
#src/lib/Sympa/SOAP.pm
src/cgi/sympa_soap_server.fcgi.in
#src/lib/Sympa/SOAP/Transport.pm
src/libexec/alias_manager.pl.in
src/sbin/bulk.pl.in
#default/create_list_templates/discussion_list/comment.tt2
default/create_list_templates/discussion_list/config.tt2
default/create_list_templates/hotline/comment.tt2