]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
7 years agoexamples: Fix 'make dist'.
Bruno Haible [Wed, 17 Oct 2018 20:00:04 +0000 (22:00 +0200)] 
examples: Fix 'make dist'.

* gettext-tools/examples/hello-c/m4/Makefile.am (EXTRA_DIST): Add all files
that are brought in by 'autopoint'.
* gettext-tools/examples/hello-c-gnome/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-c-gnome3/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-c++/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-c++-kde/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-c++-gnome/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-objc/m4/Makefile.am (EXTRA_DIST): Likewise.
* gettext-tools/examples/hello-objc-gnome/m4/Makefile.am (EXTRA_DIST): Likewise.

7 years agoexamples: Fix 'make' failures in VPATH builds.
Bruno Haible [Wed, 17 Oct 2018 12:55:58 +0000 (14:55 +0200)] 
examples: Fix 'make' failures in VPATH builds.

* gettext-tools/examples/hello-java*/Makefile.am (hello_RESOURCES,
MAINTAINERCLEANFILES): Remove variables.
(hello.jar): Use two jar commands, to combine .class files from the build dir
with .properties files from the source dir.
* gettext-tools/examples/hello-java*/po/Makefile.am (update-properties,
update-classes): Reference the .pot file in the source dir, not in the build
dir.
(echo-catalogs): Include the fallback catalog.
* gettext-tools/examples/hello-pascal/Makefile.am (hello_SOURCES): Add $(srcdir)
prefix.
(hello$(EXEEXT)): Use -o option to specify where the object file and the
executable file shall be created.

7 years agoexamples: hello-csharp-forms: Fix 'make clean'.
Bruno Haible [Wed, 17 Oct 2018 07:31:28 +0000 (09:31 +0200)] 
examples: hello-csharp-forms: Fix 'make clean'.

* gettext-tools/examples/hello-csharp-forms/Makefile.am (CLEANFILES): Add
hello.net.exe.mdb.

7 years agoexamples: hello-csharp: Fix 'make clean'.
Bruno Haible [Wed, 17 Oct 2018 07:30:49 +0000 (09:30 +0200)] 
examples: hello-csharp: Fix 'make clean'.

* gettext-tools/examples/hello-csharp/Makefile.am (CLEANFILES): Add
hello.net.exe.mdb.

7 years agoexamples: hello-objc-gnustep: Fix 'make distclean'.
Bruno Haible [Wed, 17 Oct 2018 07:28:11 +0000 (09:28 +0200)] 
examples: hello-objc-gnustep: Fix 'make distclean'.

* gettext-tools/examples/hello-objc-gnustep/GNUmakefile (internal-distclean):
Remove the *.lproj directories.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (internal-clean):
Remove remove-potcdate.sed.

7 years agoexamples: hello-pascal: Fix 'make maintainer-clean'.
Bruno Haible [Wed, 17 Oct 2018 00:09:06 +0000 (02:09 +0200)] 
examples: hello-pascal: Fix 'make maintainer-clean'.

* gettext-tools/examples/hello-pascal/Makefile.am (MAINTAINERCLEANFILES): New
variable.

7 years agoexamples: hello-java: Fix 'make' failure.
Bruno Haible [Tue, 16 Oct 2018 11:03:35 +0000 (13:03 +0200)] 
examples: hello-java: Fix 'make' failure.

* gettext-tools/examples/hello-java/po/Makefile.am (stamp-po): Fix syntax error.

7 years agoexamples: hello-pascal: Update.
Bruno Haible [Tue, 16 Oct 2018 01:14:41 +0000 (03:14 +0200)] 
examples: hello-pascal: Update.

* gettext-tools/examples/hello-pascal/configure.ac (PPC): Test for ppcx64 if
ppc386 is not found.
* gettext-tools/examples/hello-pascal/hello.rst: Remove file.
* gettext-tools/examples/hello-pascal/Makefile.am: hello.rsj replaces hello.rst.
(SUBDIRS): Proceed in current directory before recursing into po/.
* gettext-tools/examples/hello-pascal/po/Makefile.am (POTFILES): hello.rsj
replaces hello.rst.
* gettext-tools/examples/hello-pascal/autoclean.sh: Remove hello.rsj.

7 years agoexamples: Correctly clean up left-over files.
Bruno Haible [Wed, 17 Oct 2018 17:01:20 +0000 (19:01 +0200)] 
examples: Correctly clean up left-over files.

* gettext-tools/examples/hello-csharp/autoclean.sh: Handle shell wildcard
correctly.
* gettext-tools/examples/hello-csharp-forms/autoclean.sh: Likewise.

7 years agoexamples: Remove left-over files.
Bruno Haible [Mon, 15 Oct 2018 21:54:16 +0000 (23:54 +0200)] 
examples: Remove left-over files.

* gettext-tools/examples/hello-*/autoclean.sh: Remove left-over files.

7 years agoexamples: Clean up autoconf left-over.
Bruno Haible [Mon, 15 Oct 2018 20:50:21 +0000 (22:50 +0200)] 
examples: Clean up autoconf left-over.

* gettext-tools/examples/hello-*/autoclean.sh: Remove the 'autom4te.cache'
directory.

7 years agoexamples: hello-c++-widgets: Update build infrastructure.
Bruno Haible [Mon, 15 Oct 2018 21:03:00 +0000 (23:03 +0200)] 
examples: hello-c++-widgets: Update build infrastructure.

* gettext-tools/examples/hello-c++-widgets/autogen.sh: Pull in some more .m4
files.
* gettext-tools/examples/hello-c++-widgets/autoclean.sh: Remove them.

7 years agoUpdate test after gnulib module 'localcharset' changed.
Bruno Haible [Mon, 15 Oct 2018 08:05:13 +0000 (10:05 +0200)] 
Update test after gnulib module 'localcharset' changed.

* gettext-tools/tests/gettext-4-prg.c: Treat Haiku like BeOS.

7 years agoexamples: Fix "make dist" error.
Bruno Haible [Sun, 14 Oct 2018 21:36:24 +0000 (23:36 +0200)] 
examples: Fix "make dist" error.

* gettext-tools/examples/po/xsmallpot.sh (hello-c++-kde): Invoke 'autopoint'
before, not after, 'aclocal'.

7 years agoexamples: Update developer documentation.
Bruno Haible [Sun, 14 Oct 2018 21:34:22 +0000 (23:34 +0200)] 
examples: Update developer documentation.

* gettext-tools/examples/hello-csharp*/po/Makefile.am: Add comment.
* gettext-tools/examples/hello-tcl*/po/Makefile.am: Likewise.

7 years agoexamples: Improve developer documentation.
Bruno Haible [Sun, 14 Oct 2018 21:33:35 +0000 (23:33 +0200)] 
examples: Improve developer documentation.

* gettext-tools/examples/README: Add note about po/ directories.

7 years agoexamples: Improve developer documentation.
Bruno Haible [Sun, 14 Oct 2018 21:31:07 +0000 (23:31 +0200)] 
examples: Improve developer documentation.

* HACKING: Mention dependency needed for examples.
* gettext-tools/examples/hello-objc-gnustep/INSTALL: Small clarifications.

7 years agoFix list of dependencies.
Bruno Haible [Sun, 14 Oct 2018 21:25:18 +0000 (23:25 +0200)] 
Fix list of dependencies.

* DEPENDENCIES: Add libacl.

7 years agoC# doc: Fix typo in Makefile.
Bruno Haible [Sun, 14 Oct 2018 21:24:19 +0000 (23:24 +0200)] 
C# doc: Fix typo in Makefile.

* gettext-runtime/intl-csharp/Makefile.am (doc): Fix typo.

7 years agogettextize: Don't redirect stderr.
Bruno Haible [Sat, 13 Oct 2018 10:15:09 +0000 (12:15 +0200)] 
gettextize: Don't redirect stderr.

Reported by ShellCheck via Pavel Raiskup <praiskup@redhat.com>.

* gettext-tools/misc/gettextize.in: Don't redirect stderr.

7 years agoautopoint: Don't redirect stderr.
Bruno Haible [Sat, 13 Oct 2018 09:56:36 +0000 (11:56 +0200)] 
autopoint: Don't redirect stderr.

Reported by ShellCheck via Pavel Raiskup <praiskup@redhat.com>.

* gettext-tools/misc/autopoint.in (func_version_prereq): Don't redirect stderr.

7 years agoFix "make dist" error (regression from 2018-10-09).
Bruno Haible [Sun, 14 Oct 2018 22:51:02 +0000 (00:51 +0200)] 
Fix "make dist" error (regression from 2018-10-09).

* gettext-tools/examples/Makefile.am (EXAMPLESFILES): Remove
hello-csharp-forms/BUGS.

7 years agoC# support: Remove pnet choice.
Bruno Haible [Tue, 9 Oct 2018 00:44:00 +0000 (02:44 +0200)] 
C# support: Remove pnet choice.

* DEPENDENCIES: Don't mention pnet.
* PACKAGING: Likewise.
* gettext-tools/src/format-csharp.c: Simplify comment.
* gettext-tools/src/msgfmt.cs: Remove workarounds for cscc.
* gettext-tools/src/write-csharp.c (write_csharp_code): Update comment.
* gettext-tools/doc/gettext.texi (C#): Don't mention resgen.
* gettext-tools/tests/lang-csharp: Rely on mono, not pnet.
* gettext-tools/examples/hello-csharp/INSTALL: Likewise.
* gettext-tools/examples/hello-csharp-forms/INSTALL: Likewise.
* gettext-tools/examples/hello-csharp-forms/BUGS: Remove file.

7 years agoUpdate to newest gnulib.
Bruno Haible [Tue, 9 Oct 2018 00:43:13 +0000 (02:43 +0200)] 
Update to newest gnulib.

7 years agoFix a build failure on mingw with -O0.
Bruno Haible [Sat, 6 Oct 2018 08:18:06 +0000 (10:18 +0200)] 
Fix a build failure on mingw with -O0.

Reported at <https://savannah.gnu.org/bugs/?36443>.
Fix suggested by Evgeny Grin <k2k@narod.ru>
in <https://savannah.gnu.org/bugs/?36443#comment4>.

* gnulib-local/build-aux/moopp (func_emit_source_h): Wrap the function
declarations in extern "C" {}.

7 years agomsgfmt: Remove outdated warning.
Bruno Haible [Wed, 3 Oct 2018 22:58:24 +0000 (00:58 +0200)] 
msgfmt: Remove outdated warning.

* gettext-tools/src/msgfmt.c (msgfmt_parse_debrief): Remove outdated warning.
(struct msgfmt_catalog_reader_ty): Remove field 'has_nonfuzzy_header_entry'.
(msgfmt_constructor, msgfmt_frob_new_message): Update.

7 years agoFix conflict between different uses of GETTEXTLIBDIR.
Bruno Haible [Tue, 2 Oct 2018 13:25:53 +0000 (15:25 +0200)] 
Fix conflict between different uses of GETTEXTLIBDIR.

Rationale: The programs installed in $(prefix)/lib/gettext/ are at different
locations before installation: some are in the source tree, some are in the
build tree.

* gettext-tools/src/msginit.c (project_id, project_id_version): Test
GETTEXTLIBDIR_SRCDIR, not GETTEXTLIBDIR.
(plural_forms): Test GETTEXTLIBDIR_BUILDDIR, not GETTEXTLIBDIR.
* gettext-tools/tests/msginit-3: Set GETTEXTLIBDIR_SRCDIR, not GETTEXTLIBDIR.
* gettext-tools/tests/msginit-4: Set both GETTEXTLIBDIR_SRCDIR and
GETTEXTLIBDIR_BUILDDIR.

7 years agoFix conflict between different uses of GETTEXTDATADIR.
Bruno Haible [Tue, 2 Oct 2018 12:57:22 +0000 (14:57 +0200)] 
Fix conflict between different uses of GETTEXTDATADIR.

* gettext-tools/src/read-tcl.c (msgdomain_read_tcl): Test GETTEXTTCLDIR, not
GETTEXTDATADIR.
* gettext-tools/tests/msgunfmt-tcl-1: Set GETTEXTTCLDIR, not GETTEXTDATADIR.

7 years agoFix msginit-4 test failure when run step-by-step.
Bruno Haible [Tue, 2 Oct 2018 12:43:43 +0000 (14:43 +0200)] 
Fix msginit-4 test failure when run step-by-step.

* gettext-tools/tests/msginit-4: Don't assume that the test is run in a
directory with just one POT file.

7 years agocldr-plurals: Improve error handling.
Bruno Haible [Tue, 2 Oct 2018 11:39:13 +0000 (13:39 +0200)] 
cldr-plurals: Improve error handling.

* gettext-tools/src/cldr-plurals.c (extract_rules): Let libxml2 show errors.
Don't assume that the error was an out-of-memory.

7 years agoRemove unnecessary trailing comma in struct initializers.
Bruno Haible [Mon, 1 Oct 2018 13:47:14 +0000 (15:47 +0200)] 
Remove unnecessary trailing comma in struct initializers.

* gettext-tools/src/msgattrib.c (long_options): Remove trailing comma in
initializer.
* gettext-tools/src/msgcat.c (long_options): Likewise.
* gettext-tools/src/msgcomm.c (long_options): Likewise.
* gettext-tools/src/msgconv.c (long_options): Likewise.
* gettext-tools/src/msgen.c (long_options): Likewise.
* gettext-tools/src/msgfilter.c (long_options): Likewise.
* gettext-tools/src/msgmerge.c (long_options): Likewise.
* gettext-tools/src/msgunfmt.c (long_options): Likewise.
* gettext-tools/src/msguniq.c (long_options): Likewise.
* gettext-tools/src/xgettext.c (long_options): Likewise.

7 years agoExplain how to concatenate POT files.
Bruno Haible [Mon, 1 Oct 2018 09:09:29 +0000 (11:09 +0200)] 
Explain how to concatenate POT files.

Reported by Hadi Farah in
<https://lists.gnu.org/archive/html/bug-gettext/2018-09/msg00026.html>.

* gettext-tools/doc/msgcat.texi: Explain how to concatenate POT files.

7 years agoInclude gnulib module 'mkdir', needed for older mingw versions.
Bruno Haible [Fri, 5 Oct 2018 20:12:05 +0000 (22:12 +0200)] 
Include gnulib module 'mkdir', needed for older mingw versions.

Reported by Maarten Bosmans at <https://savannah.gnu.org/bugs/?33379>.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'mkdir'.

7 years agoFix link error when building with --enable-shared on mingw.
Bruno Haible [Fri, 5 Oct 2018 08:43:53 +0000 (10:43 +0200)] 
Fix link error when building with --enable-shared on mingw.

* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO_OTHER): Add 'realloc-posix'.

7 years agoFix msginit-4 test failure on Cygwin with --enable-shared.
Bruno Haible [Tue, 2 Oct 2018 19:04:10 +0000 (21:04 +0200)] 
Fix msginit-4 test failure on Cygwin with --enable-shared.

* gettext-tools/src/msginit.c (plural_forms): Include the program's directory
in argv[0].

7 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 1 Oct 2018 22:26:26 +0000 (00:26 +0200)] 
Update after gnulib changed.

* gettext-runtime/intl/vasnprintf.c: Update from gnulib.
* gettext-runtime/libasprintf/vasnprintf.c: Update from gnulib.

7 years agoUpdate to newest gnulib.
Bruno Haible [Mon, 1 Oct 2018 09:33:14 +0000 (11:33 +0200)] 
Update to newest gnulib.

7 years agoAvoid test failures on 32-bit Cygwin in a 64-bit Cygwin environment.
Bruno Haible [Wed, 19 Sep 2018 07:39:01 +0000 (09:39 +0200)] 
Avoid test failures on 32-bit Cygwin in a 64-bit Cygwin environment.

In this situation, argv[0] is absolute, even though the program was invoked
as a file name without slashes (and thus found in $PATH).

* gettext-tools/tests/msgcmp-2: Normalize the program name better.
* gettext-tools/tests/msgcmp-3: Likewise.
* gettext-tools/tests/msgfmt-7: Likewise.
* gettext-tools/tests/msgfmt-8: Likewise.
* gettext-tools/tests/msgfmt-9: Likewise.
* gettext-tools/tests/msgfmt-10: Likewise.
* gettext-tools/tests/msgmerge-2: Likewise.
* gettext-tools/tests/msgmerge-9: Likewise.

7 years agoFix link error when building with --disable-shared on 64-bit Cygwin.
Bruno Haible [Tue, 18 Sep 2018 09:33:58 +0000 (11:33 +0200)] 
Fix link error when building with --disable-shared on 64-bit Cygwin.

* gnulib-local/lib/execute.c.diff: Remove file.
* gnulib-local/lib/spawn-pipe.c.diff: Remove file.
* gnulib-local/tests/test-environ.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.

7 years agoFix link error when building with --disable-shared on Cygwin and mingw.
Bruno Haible [Tue, 18 Sep 2018 07:28:11 +0000 (09:28 +0200)] 
Fix link error when building with --disable-shared on Cygwin and mingw.

* gettext-tools/configure.ac (LIBXML_STATIC): Define to 1 when using the
included libxml and building with --disable-shared.
* gnulib-local/lib/libxml/libxml.h (LIBXML_STATIC): Define to 1, not empty.

7 years agoautogen.sh: Fix use of undefined function.
Bruno Haible [Mon, 17 Sep 2018 20:25:45 +0000 (22:25 +0200)] 
autogen.sh: Fix use of undefined function.

* autogen.sh: Rewrite error message code.

7 years agoFix link error on Cygwin.
Bruno Haible [Sun, 16 Sep 2018 22:11:08 +0000 (00:11 +0200)] 
Fix link error on Cygwin.

Patch partially by Michael Haubenwallner at
https://gitlab.gnome.org/GNOME/libxml2/commit/c65c9e8ee07e2dab0647392c2bd1795a5bc99829

* gnulib-local/lib/libxml/xmlexports.in.h: Don't assume that _WIN32 is defined
on Cygwin.
(XMLPUBVAR): Define as 'extern', not as empty.

7 years agoFix "Unescaped left brace in regex is deprecated here" warnings from Perl 5.26.
Bruno Haible [Sun, 16 Sep 2018 23:27:02 +0000 (01:27 +0200)] 
Fix "Unescaped left brace in regex is deprecated here" warnings from Perl 5.26.

Reported and patch by Jehan <jehan@girinstud.io> <jehan@zemarmot.net> at
<https://savannah.gnu.org/bugs/?54088>.

* gettext-tools/doc/texi2html: Escape braces in regular expressions.
* gettext-runtime/libasprintf/texi2html: Likewise.

7 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 16 Sep 2018 23:18:04 +0000 (01:18 +0200)] 
Update after gnulib changed.

* gnulib-local/modules/fnmatch.diff: Update.
* gettext-runtime/intl/config.charset: Remove file.
* gettext-runtime/intl/localcharset.h: Update from gnulib.
* gettext-runtime/intl/localcharset.c: Likewise.
* gettext-runtime/intl/Makefile.in (DISTFILES.common): Remove config.charset.
(charset.alias): Remove target.
(install-exec): Don't install charset.alias.
(install-data): Don't chmod config.charset.
(installdirs): Don't create $(libdir).
(uninstall): Don't uninstall charset.alias.
(mostlyclean): Don't remove charset.alias.
* gettext-runtime/intl/lock.h: Update from gnulib.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/printf-parse.c: Likewise.
* gettext-runtime/libasprintf/printf-parse.c: Likewise.
* gettext-runtime/m4/extern-inline.m4: Likewise.
* gettext-runtime/m4/threadlib.m4: Likewise.
* Makefile.am (distcheck-hook): Don't compare config.charset, ref-add.sin,
ref-del.sin.

7 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 16 Sep 2018 23:07:31 +0000 (01:07 +0200)] 
Update to newest gnulib.

7 years agoFix lang-sh test failure in VPATH builds.
Bruno Haible [Sun, 16 Sep 2018 22:46:03 +0000 (00:46 +0200)] 
Fix lang-sh test failure in VPATH builds.

* gettext-tools/tests/lang-sh: Prepend the gettext-runtime/src build dir,
not the gettext-runtime/src source dir, to PATH.

7 years agolibintl: Improve locale handling on macOS 10.12 or newer.
Bruno Haible [Sun, 16 Sep 2018 17:09:41 +0000 (19:09 +0200)] 
libintl: Improve locale handling on macOS 10.12 or newer.

* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Make the
logic also work in locales such as "zh-Hans-DE".
* gettext-runtime/intl/setlocale.c: Include header files for CoreFoundation.
(libintl_setlocale): Try harder to set a locale for categories LC_CTYPE and
LC_MESSAGES.

7 years agoDon't assume that 'sed' supports alternation in regular expressions.
Bruno Haible [Sun, 16 Sep 2018 15:55:05 +0000 (17:55 +0200)] 
Don't assume that 'sed' supports alternation in regular expressions.

See https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Usual-Tools.html

* gettext-tools/tests/msginit-1: Don't use \| in a 'sed' regular expression.
* gettext-tools/tests/msginit-3: Likewise.
* gettext-tools/tests/msginit-4: Likewise.

7 years agoUpdate list of locale names with scripts on macOS.
Bruno Haible [Sun, 16 Sep 2018 15:10:03 +0000 (17:10 +0200)] 
Update list of locale names with scripts on macOS.

* gettext-runtime/intl/localename.c (gl_locale_name_canonicalize): Update
tables to match Mac OS X 10.13 and recent glibc.

7 years agoOops, fix typo.
Bruno Haible [Sun, 16 Sep 2018 15:06:25 +0000 (17:06 +0200)] 
Oops, fix typo.

* gettext-runtime/m4/intlmacosx.m4 (gt_INTL_MACOSX): Fix variable name.

7 years agoFix link error in "make check" when building with --disable-shared on macOS.
Bruno Haible [Sun, 16 Sep 2018 13:18:51 +0000 (15:18 +0200)] 
Fix link error in "make check" when building with --disable-shared on macOS.

* gnulib-local/modules/term-ostream-tests (test_term_ostream_LDADD): Add
@INTL_MACOSX_LIBS@.

7 years agoUse newer macOS APIs when possible.
Bruno Haible [Sun, 16 Sep 2018 12:43:20 +0000 (14:43 +0200)] 
Use newer macOS APIs when possible.

* gettext-runtime/m4/intlmacosx.m4 (gt_INTL_MACOSX): Check for
CFLocaleCopyPreferredLanguages.
* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Use
CFLocaleCopyPreferredLanguages when it exists.

7 years agoRevisit macOS specific code.
Bruno Haible [Sun, 16 Sep 2018 12:40:28 +0000 (14:40 +0200)] 
Revisit macOS specific code.

* gettext-runtime/intl/localename.c (gl_locale_name_default): Reduce code
duplication. Fix comments about Mac OS X versions.

7 years agolibintl: Fix language preferences on macOS 10.12 or newer.
Bruno Haible [Sun, 16 Sep 2018 02:50:22 +0000 (04:50 +0200)] 
libintl: Fix language preferences on macOS 10.12 or newer.

Reported by Kristian Rietveld <kris@loopnest.org> at
<https://savannah.gnu.org/bugs/?49560>.

* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Handle
preferences elements of the form "ll-CC" in a reasonable way.
* NEWS: Mention the change.

7 years agosetlocale: Improve support for locales not supported by libc.
Bruno Haible [Sun, 16 Sep 2018 01:09:06 +0000 (03:09 +0200)] 
setlocale: Improve support for locales not supported by libc.

Reported by Dapeng Gao <peter@dpgao.cc> at
<https://savannah.gnu.org/bugs/?54479>.

* gettext-runtime/intl/setlocale.c: Include <stdio.h>.
(libintl_setlocale): Use a more error-tolerant strategy when the locale to be
set is not supported by libc: Emit warnings instead of failing.

7 years agoFix link error when linking with libintl.a on macOS.
Bruno Haible [Sun, 16 Sep 2018 00:25:21 +0000 (02:25 +0200)] 
Fix link error when linking with libintl.a on macOS.

* gettext-runtime/intl/loadmsgcat.c (_nl_msg_cat_cntr): Zero-initialize on
macOS.

7 years agodoc: Assume texinfo 4.0 or newer.
Bruno Haible [Sat, 15 Sep 2018 22:45:45 +0000 (00:45 +0200)] 
doc: Assume texinfo 4.0 or newer.

* gettext-tools/doc/gettext.texi: Omit Next, Prev, Up fields from @node lines.
* gettext-runtime/libasprintf/autosprintf.texi: Likewise.

7 years agoReduce "make dist" time by 7 minutes.
Bruno Haible [Sat, 15 Sep 2018 22:26:26 +0000 (00:26 +0200)] 
Reduce "make dist" time by 7 minutes.

* configure.ac (AM_INIT_AUTOMAKE): Remove dist-xz and dist-lzip options.
* Admin/release-steps: Mention how to create the tarballs with higher
compression after "make dist".

7 years agoAdd support for translation lookup with context in shell scripts.
Bruno Haible [Sat, 15 Sep 2018 20:54:24 +0000 (22:54 +0200)] 
Add support for translation lookup with context in shell scripts.

Reported by Markus Gothe <nietzsche@lysator.liu.se>
in <https://savannah.gnu.org/bugs/?49899>.

* gettext-runtime/src/gettext.c (long_options): Add option '--context'.
(main): Handle option -c/--context.
(usage): Document option -c/--context. Split usage message.
* gettext-runtime/src/ngettext.c (long_options): Add option '--context'.
(main): Handle option -c/--context.
(usage): Document option -c/--context. Split usage message.
* gettext-runtime/src/gettext.sh.in (eval_pgettext, eval_npgettext): New
functions.
* gettext-tools/src/xgettext.h (struct arglist_parser): Add 'next_is_msgctxt'
field.
(arglist_parser_remember_msgctxt): New declaration.
* gettext-tools/src/xgettext.c (arglist_parser_alloc, arglist_parser_clone):
Update accordingly.
(arglist_parser_remember_msgctxt): New function.
* gettext-tools/src/x-sh.c (init_keywords): Recognize also eval_pgettext and
eval_npgettext.
(init_flag_table_sh): Set flags for eval_pgettext, eval_npgettext.
(substring_of_word): New function.
(read_command): Recognize and handle -c/--context argument of 'gettext' and
'ngettext'.
* gettext-tools/tests/lang-sh: Add test of message lookup with context.
* gettext-runtime/doc/rt-gettext.texi: Mention the --context option.
* gettext-runtime/doc/rt-ngettext.texi: Likewise.
* gettext-tools/doc/gettext.texi (sh, Preparing Shell Scripts, gettext.sh):
Mention the new shell functions.
(eval_pgettext Invocation, eval_npgettext Invocation): New subsubsections.
* gettext-tools/doc/xgettext.texi: Mention the support for eval_pgettext,
eval_npgettext.
* NEWS: Mention the changes.

7 years agogettext-runtime/intl/setlocale.c: Add fixes from gnulib.
Bruno Haible [Sat, 11 Aug 2018 15:35:51 +0000 (17:35 +0200)] 
gettext-runtime/intl/setlocale.c: Add fixes from gnulib.

2018-08-11  Bruno Haible  <bruno@clisp.org>

        setlocale: Trivial simplification.
        * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.

2017-04-21  Bruno Haible  <bruno@clisp.org>

        Fix test-mbrtowc5.sh failure on native Windows.
        * setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
        "C".

2016-03-22  Geert Janssens  <janssens-geert@telenet.be>

        setlocale: add "sv" to Windows language table
        * setlocale.c (language_table) [W32]: Add "sv".
        Reported in <https://savannah.gnu.org/bugs/?44588>.

2012-01-04  Bruno Haible  <bruno@clisp.org>

        Talk about "native Windows API", not "Win32".
        * setlocale.c: Update comments to mention native Windows.

7 years agoUpgrade to newer help2man.
Bruno Haible [Tue, 24 Jul 2018 22:56:02 +0000 (00:56 +0200)] 
Upgrade to newer help2man.

Reported by Bernhard M. Wiedemann in <https://savannah.gnu.org/bugs/?54367>.

* gettext-runtime/man/help2man: Upgrade to version 1.47.6, with one change:
  $source ||= "$program $version";
  replaced by
  $source ||= "$package $version";
* gettext-tools/man/help2man: Likewise.

7 years agoMake it possible to copy&paste strings from the HTML-formatted man pages.
Bruno Haible [Tue, 24 Jul 2018 22:25:09 +0000 (00:25 +0200)] 
Make it possible to copy&paste strings from the HTML-formatted man pages.

* gettext-runtime/man/Makefile.am (MAN2HTML_POSTPROCESS): New variable.
(gt_man2html): Use it.
* gettext-tools/man/Makefile.am (MAN2HTML_POSTPROCESS): New variable.
(gt_man2html): Use it.

7 years agoEnable the format_arg attribute also on clang on Mac OS X.
Bruno Haible [Tue, 3 Jul 2018 21:17:37 +0000 (23:17 +0200)] 
Enable the format_arg attribute also on clang on Mac OS X.

Reported by Tom Tromey <tom@tromey.com>
in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.

* gettext-runtime/intl/libgnuintl.in.h (_INTL_MAY_RETURN_STRING_ARG): On macOS,
use attribute __format_arg__ if the compiler is based on clang >= 3.0.

7 years agoMake the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE.
Bruno Haible [Tue, 3 Jul 2018 21:14:22 +0000 (23:14 +0200)] 
Make the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE.

Reported by Tom Tromey <tom@tromey.com>
in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.

* gettext-runtime/intl/libgnuintl.in.h (gettext, dgettext, dcgettext,
ngettext, dngettext, dcngettext): Add attribute __format_arg__ also to the
'static inline' functions.

7 years agoFix a NEWS entry.
Bruno Haible [Sun, 17 Jun 2018 21:04:36 +0000 (23:04 +0200)] 
Fix a NEWS entry.

NEWS: Fix entry from 2016-07-01.

7 years agoUpdate .gitignore.
Bruno Haible [Mon, 14 May 2018 18:59:58 +0000 (20:59 +0200)] 
Update .gitignore.

7 years agoxgettext: Improve support for specialized vector syntax in Scheme.
Bruno Haible [Mon, 14 May 2018 18:57:34 +0000 (20:57 +0200)] 
xgettext: Improve support for specialized vector syntax in Scheme.

Reported by Florent Angly <Florent.Angly@cslbehring.com>.

* gettext-tools/src/x-scheme.c (read_object): Don't call free_token on an
uninitialized token. Support recent syntax for homogeneous vector types (SRFI-4)
and byte vectors as well.
* NEWS: Mention the change.

7 years agolibintl: Ensure the *printf function overrides are POSIX compatible.
Bruno Haible [Sat, 12 May 2018 17:58:49 +0000 (19:58 +0200)] 
libintl: Ensure the *printf function overrides are POSIX compatible.

Reported by Eli Zaretskii <eliz@gnu.org>.

* gettext-runtime/intl/printf.c (USE_REPLACEMENT_CODE_ALWAYS): New macro.
(libintl_vfprintf, libintl_vsprintf, libintl_vsnprintf, libintl_vfwprintf,
libintl_vswprintf): Use it.
* NEWS: Mention the change.

7 years agoall: Replace more http and ftp URLs by https URLs.
Bruno Haible [Sat, 5 May 2018 11:39:22 +0000 (13:39 +0200)] 
all: Replace more http and ftp URLs by https URLs.

* autogen.sh: Use https: URLs.
* gettext-runtime/doc/nls.texi (Translating Teams, Available Packages): Likewise.
* gettext-tools/doc/gettext.texi: Likewise.
* gettext-tools/doc/FAQ.html: Likewise.
* gettext-tools/doc/tutorial.html: Likewise.
* gettext-tools/misc/gettextize.in: Likewise.
* gettext-tools/projects/GNOME/team-address: Likewise.
* gettext-tools/projects/GNOME/teams.url: Likewise.
* gettext-tools/projects/KDE/team-address: Likewise.
* gettext-tools/projects/KDE/teams.url: Likewise.
* gettext-tools/projects/TP/teams.url: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/tests/xgettext-its-1: Likewise.

7 years agoall: Use https: URLs in --version output.
Bruno Haible [Sat, 5 May 2018 11:35:04 +0000 (13:35 +0200)] 
all: Use https: URLs in --version output.

* gettext-runtime/src/envsubst.c: Use https: URL in --version output.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/gettext.sh.in: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/misc/autopoint.in: Likewise.
* gettext-tools/misc/convert-archive.in: Likewise.
* gettext-tools/misc/gettextize.in: Likewise.
* gettext-tools/src/cldr-plurals.c: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* gnulib-local/build-aux/moopp: Likewise.

7 years agoall: Replace http URLs by https URLs in copyright notices.
Bruno Haible [Sat, 5 May 2018 08:57:08 +0000 (10:57 +0200)] 
all: Replace http URLs by https URLs in copyright notices.

7 years agoSimplify code. Drop support for Borland C++ on Windows.
Bruno Haible [Sat, 5 May 2018 08:36:24 +0000 (10:36 +0200)] 
Simplify code. Drop support for Borland C++ on Windows.

* gettext-runtime/intl/dcigettext.c: Simplify
'defined _WIN32 || defined __WIN32__' to just 'defined _WIN32'.
* gettext-runtime/intl/l10nflist.c: Likewise.
* gettext-runtime/intl/langprefs.c: Likewise.
* gettext-runtime/intl/libgnuintl.in.h: Likewise.
* gettext-runtime/intl/loadinfo.h: Likewise.
* gettext-runtime/intl/setlocale.c: Likewise.
* gettext-runtime/intl/printf-parse.c: Likewise.
* gettext-runtime/libasprintf/printf-parse.c: Likewise.
* gettext-tools/src/format-c-parse.h: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gnulib-local/lib/basename.c: Likewise.

7 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 5 May 2018 00:23:08 +0000 (02:23 +0200)] 
Update after gnulib changed.

* Makefile.am (distcheck-hook): Update comparison of flexmember.h.
* gettext-runtime/intl/localcharset.c: Update from gnulib.
* gettext-runtime/intl/localename.c: Likewise.
* gettext-runtime/intl/lock.h: Likewise.
* gettext-runtime/intl/relocatable.c: Likewise.
* gettext-runtime/intl/vasnprintf.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/xsize.h: Likewise.
* gettext-runtime/libasprintf/vasnprintf.c: Likewise.
* gettext-runtime/m4/*.m4: Likewise.
* gettext-tools/examples/po/remove-potcdate.sin: Likewise.
* gnulib-local/lib/execute.c.diff: Update.

7 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 4 May 2018 20:38:19 +0000 (22:38 +0200)] 
Update to newest gnulib.

7 years agoAdd support for recent Java versions.
Bruno Haible [Sat, 24 Mar 2018 15:20:03 +0000 (16:20 +0100)] 
Add support for recent Java versions.

Reported by Emmanuel Bourg <ebourg@apache.org>
at <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892733>
via Santiago Vila.

* gettext-runtime/configure.ac: Require a Java compiler that supports
source-version 1.5 and target-version 1.6 (such as Java 6 or newer, or
GCJ 4.3 or newer).
* gettext-tools/src/write-java.c (msgdomain_write_java): Likewise
* gettext-tools/examples/hello-java-qtjambi/configure.ac: Likewise.
* gettext-tools/configure.ac: Require a Java compiler that supports
source-version 1.5 (such as Java 5 or newer, or GCJ 4.3 or newer).
* gettext-tools/examples/hello-java/configure.ac: Likewise.
* gettext-tools/examples/hello-java-awt/configure.ac: Likewise.
* gettext-tools/examples/hello-java-swing/configure.ac: Likewise.
* NEWS: Mention the change.

7 years agoUpdate README-alpha.
Bruno Haible [Sat, 24 Mar 2018 15:07:55 +0000 (16:07 +0100)] 
Update README-alpha.

* README-alpha: Don't suggest private email for bug reports about test releases.

7 years agoComment.
Bruno Haible [Sat, 24 Mar 2018 15:00:50 +0000 (16:00 +0100)] 
Comment.

* .dir-locals.el: Add comment.

7 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 24 Mar 2018 14:04:11 +0000 (15:04 +0100)] 
Update after gnulib changed.

* gnulib-local/lib/unistd.in.h.diff: Update.
* gnulib-local/lib/regexec.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove it.

7 years agoUpdate to newest gnulib
Bruno Haible [Sat, 24 Mar 2018 13:34:38 +0000 (14:34 +0100)] 
Update to newest gnulib

7 years agoUpdate NEWS file.
Bruno Haible [Sat, 24 Mar 2018 12:52:23 +0000 (13:52 +0100)] 
Update NEWS file.

* NEWS: Add a missing entry (for a change from 2016-12-15).

7 years agodoc: Fix statement about required Bison version.
Bruno Haible [Thu, 15 Mar 2018 15:53:05 +0000 (16:53 +0100)] 
doc: Fix statement about required Bison version.

Reported by Amit Chaudhuri <amit.k.chaudhuri@gmail.com>.

* HACKING: Required minimum Bison version is now 3.0, for cldr-plural.y.

7 years agoRename some files.
Bruno Haible [Sat, 27 Jan 2018 13:20:07 +0000 (14:20 +0100)] 
Rename some files.

* INSTALL.windows: Renamed from README.windows.
* Makefile.am (EXTRA_DIST): Update.
* gettext-runtime/INSTALL.windows: Renamed from gettext-runtime/README.windows.
* gettext-runtime/Makefile.am (EXTRA_DIST): Update.
* gettext-runtime/intl/INSTALL.windows: Renamed from gettext-runtime/intl/README.windows.
* gettext-runtime/intl/Makefile.in (DISTFILES.gettext): Update.
* gettext-runtime/libasprintf/INSTALL.windows: Renamed from gettext-runtime/libasprintf/README.windows.
* gettext-runtime/libasprintf/Makefile.am (EXTRA_DIST): Update.
* gettext-tools/INSTALL.windows: Renamed from gettext-tools/README.windows.
* gettext-tools/Makefile.am (EXTRA_DIST): Update.

7 years agoxgettext: Support '_' in number tokens in C++.
Bruno Haible [Sat, 27 Jan 2018 13:09:55 +0000 (14:09 +0100)] 
xgettext: Support '_' in number tokens in C++.

* gettext-tools/src/x-c.c (phase5_get): Recognize '_' in C++.
* NEWS: Update.

7 years agoxgettext: Support 'p'/'P' exponent markers in number tokens also in C.
Bruno Haible [Sun, 7 Jan 2018 02:20:06 +0000 (03:20 +0100)] 
xgettext: Support 'p'/'P' exponent markers in number tokens also in C.

* gettext-tools/src/x-c.c (phase5_get): Recognize sign after 'p' or 'P' also
in C.
* NEWS: Update.

7 years agoAvoid a test failure of lang-gawk.
Bruno Haible [Sun, 7 Jan 2018 01:33:38 +0000 (02:33 +0100)] 
Avoid a test failure of lang-gawk.

It's a bug in gawk 4.2.0, reported at
https://lists.gnu.org/archive/html/bug-gawk/2018-01/msg00026.html .

* gettext-tools/tests/lang-gawk: Skip the test if gawk's version is 4.2.0.

7 years agoAdd support for new C++ preprocessing number tokens.
Bruno Haible [Sat, 6 Jan 2018 17:45:22 +0000 (18:45 +0100)] 
Add support for new C++ preprocessing number tokens.

Reported by Moritz Bunkus <moritz@bunkus.org>
at <https://savannah.gnu.org/bugs/?50117>.

* gettext-tools/src/x-c.c (phase5_get): Recognize C++14 and C++17 extensions of
preprocessing number tokens.
* gettext-tools/tests/xgettext-c-22: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the change.

7 years agoComment fix.
Bruno Haible [Sat, 6 Jan 2018 17:37:27 +0000 (18:37 +0100)] 
Comment fix.

* gettext-tools/tests/xgettext-c-20: Fix typo in comment.

7 years agodoc: Document the data formats supported by the tools in a central place.
Bruno Haible [Sat, 6 Jan 2018 11:24:41 +0000 (12:24 +0100)] 
doc: Document the data formats supported by the tools in a central place.

* gettext-tools/doc/gettext.texi (Data Formats): New chapter.
(Internationalizable Data): Moved here from chapter "Programming Languages".

7 years agoAvoid a test failure of lang-csharp on Mac OS X.
Bruno Haible [Sat, 6 Jan 2018 04:52:52 +0000 (05:52 +0100)] 
Avoid a test failure of lang-csharp on Mac OS X.

* gettext-tools/tests/lang-csharp: Don't test in $LOCALE_FR on Mac OS X.

7 years agoxgettext: Add support for .properties files in UTF-8 encoding.
Bruno Haible [Sat, 6 Jan 2018 02:10:47 +0000 (03:10 +0100)] 
xgettext: Add support for .properties files in UTF-8 encoding.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add read-file, unistr/u8-check.
* gettext-tools/src/read-properties: Read the file into memory, then find out
about its encoding, then start parsing it.
* gettext-tools/tests/xgettext-properties-2: New file.
* gettext-tools/tests/xgettext-properties-3: New file.
* gettext-tools/tests/xgettext-properties-4: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* NEWS: Mention the change.

7 years agoAdd support for .rsj files.
Bruno Haible [Fri, 5 Jan 2018 22:42:46 +0000 (23:42 +0100)] 
Add support for .rsj files.

* gettext-tools/src/x-rst.h (EXTENSIONS_RST, SCANNERS_RST): Add RSJ scanner.
(extract_rsj): New declaration.
* gettext-tools/src/x-rst.c: Implement extraction from .rsj files.
* gettext-tools/src/xgettext.c (usage): Mention RSJ along with RST.
* gettext-tools/tests/xgettext-rst-1: New file.
* gettext-tools/tests/xgettext-rst-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* gettext-tools/tests/lang-pascal: Extract from .rsj file, if the compiler
generated it.
* gettext-tools/doc/gettext.texi (RST): Mention that .rsj files are supported
as well.
* gettext-tools/doc/xgettext.texi (Choice of input file language): Mention RSJ
along with RST.
* NEWS: Mention the change.

7 years agoFix failure of lang-javascript on Ubuntu 16.04.
Bruno Haible [Fri, 5 Jan 2018 22:14:21 +0000 (23:14 +0100)] 
Fix failure of lang-javascript on Ubuntu 16.04.

pkg-config almost never works. It is best to never use it.

* gettext-tools/tests/lang-javascript: Don't use pkg-config to test whether
the installed gjs is appropriate.

7 years agoFix a comment.
Bruno Haible [Fri, 5 Jan 2018 21:18:53 +0000 (22:18 +0100)] 
Fix a comment.

* gettext-tools/src/x-stringtable.h: Fix typo in comment.

7 years agodoc: More information for maintainers.
Bruno Haible [Thu, 4 Jan 2018 09:53:06 +0000 (10:53 +0100)] 
doc: More information for maintainers.

* HACKING: New section 'Additional requirements for maintainers'.

7 years agoUse locales with the customary names.
Bruno Haible [Thu, 4 Jan 2018 09:52:13 +0000 (10:52 +0100)] 
Use locales with the customary names.

On glibc systems, nowadays, the German and French locales are named
'de_DE.UTF-8' and 'fr_FR.UTF-8', respectively. This change avoids the need
to install similar locales with different names.

* gettext-tools/tests/gettext-3: Use locales with '.UTF-8' suffix.
* gettext-tools/tests/gettext-3-prg.c (lang): Likewise.

7 years agodoc: Add information about lua-gettext package.
Bruno Haible [Thu, 4 Jan 2018 08:32:15 +0000 (09:32 +0100)] 
doc: Add information about lua-gettext package.

* gettext-tools/doc/gettext.texi (Lua): Describe from where to get the
lua-gettext package.

7 years agodoc: Add information about Ubuntu packages.
Bruno Haible [Thu, 4 Jan 2018 08:25:23 +0000 (09:25 +0100)] 
doc: Add information about Ubuntu packages.

* gettext-tools/doc/gettext.texi (List of Programming Languages): Add a
subsection 'Ubuntu packages' for each.

7 years agoFix msgunfmt-3 failure (regression from 2017-09-24).
Bruno Haible [Wed, 3 Jan 2018 11:48:58 +0000 (12:48 +0100)] 
Fix msgunfmt-3 failure (regression from 2017-09-24).

* gettext-tools/tests/Makefile.am (EXTRA_DIST): Add sysdep-without-nul.mo.

7 years agoUpdate dependencies list.
Bruno Haible [Wed, 3 Jan 2018 01:34:33 +0000 (02:34 +0100)] 
Update dependencies list.

* HACKING: Add Lzip (needed for "make dist" since 2014-12-24).

7 years agoFix "make dist" of modified git checkouts.
Bruno Haible [Wed, 3 Jan 2018 01:32:55 +0000 (02:32 +0100)] 
Fix "make dist" of modified git checkouts.

This fixes error messages such as
tar: gettext-0.19.8.1.74-72e49-dirty/gettext-tools/gnulib-tests/test-term-ostream-xterm-linux-mandriva.out: file name is too long (max 99); not dumped
tar: gettext-0.19.8.1.74-72e49-dirty/gettext-runtime/intl-csharp/doc/GNU_Gettext_GettextResourceManager.html: file name is too long (max 99); not dumped

* configure.ac: Pass option 'tar-ustar' to AM_INIT_AUTOMAKE.
(am__tar): Use 'tar' option --format=ustar.