]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
3 months agoPrepare for 0.23.2 release.
Bruno Haible [Tue, 1 Jul 2025 14:15:22 +0000 (16:15 +0200)] 
Prepare for 0.23.2 release.

* gettext-tools/misc/autopoint.in: Accept version 0.23.2.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.23.2.
* NEWS: Update.

3 months agoautopoint: Update copyright year.
Bruno Haible [Tue, 1 Jul 2025 14:03:46 +0000 (16:03 +0200)] 
autopoint: Update copyright year.

* gettext-tools/misc/autopoint.in: Update copyright year.

3 months agoautopoint: Don't fail if no gettext version is specified, part 2.
Bruno Haible [Tue, 1 Jul 2025 14:50:52 +0000 (16:50 +0200)] 
autopoint: Don't fail if no gettext version is specified, part 2.

* gettext-tools/misc/autopoint.in (func_trace_sed): Recognize also macro calls
without arguments.
* gettext-tools/tests/autopoint-1: Update for new autopoint behaviour.

3 months agoautopoint: Don't fail if no gettext version is specified.
Bruno Haible [Tue, 1 Jul 2025 13:00:27 +0000 (15:00 +0200)] 
autopoint: Don't fail if no gettext version is specified.

Rationale: https://lists.gnu.org/archive/html/bug-gettext/2025-06/msg00009.html

* gettext-tools/misc/autopoint.in: Instead of failing with "Missing version",
use version 0.23.1. Set omitintl=yes if there is no AM_GNU_GETTEXT invocation.

3 months agobuild: Fix build error on MSVC with --enable-shared.
Bruno Haible [Fri, 6 Jun 2025 17:48:24 +0000 (19:48 +0200)] 
build: Fix build error on MSVC with --enable-shared.

* autogen.sh: Avoid the float-h-tests, since they reference the variables
gl_FLT_SNAN, gl_DBL_SNAN, gl_LDBL_SNAN.

3 months agobuild: Fix build failure on Cygwin and mingw without preinstalled libunistring.
Bruno Haible [Fri, 6 Jun 2025 13:34:31 +0000 (15:34 +0200)] 
build: Fix build failure on Cygwin and mingw without preinstalled libunistring.

* gettext-tools/configure.ac: Define DLL_VARIABLE and LIBGETTEXTSRC_DLL_VARIABLE
on Cygwin and mingw like on MSVC.

3 months agolibtextstyle: Fix build failure on Cygwin < 3.4.6.
Bruno Haible [Fri, 6 Jun 2025 10:56:05 +0000 (12:56 +0200)] 
libtextstyle: Fix build failure on Cygwin < 3.4.6.

* libtextstyle/lib/Makefile.am (config.h): Don't rename the _imp_ variable
associated with the gl_get_setlocale_null_lock function.

4 months agobuild: Fix MSVC builds with --enable-shared, part 2.
Bruno Haible [Thu, 5 Jun 2025 12:48:20 +0000 (14:48 +0200)] 
build: Fix MSVC builds with --enable-shared, part 2.

* gettext-tools/configure.ac (DLL_VARIABLE): On MSVC with --enable-shared, when
compiling the static .o files inside libgettextlib, define to empty, not to
'__declspec(dllimport)'.
(LIBGETTEXTSRC_DLL_VARIABLE): On MSVC with --enable-shared, when compiling the
static .o files inside libgettextsrc), define to empty, not to
'__declspec(dllimport)'.

4 months agobuild: Fix "make install" in MSVC builds with --enable-shared.
Bruno Haible [Thu, 5 Jun 2025 09:11:10 +0000 (11:11 +0200)] 
build: Fix "make install" in MSVC builds with --enable-shared.

The problem was that intl-8.dll was not installed with execute permissions.

* gettext-runtime/intl/Makefile.am (install-exec-libintl): Use $(INSTALL),
not $(INSTALL_DATA), with libtool --mode=install.
* INSTALL.windows: Remove constraint to use --disable-shared on MSVC.

4 months agobuild: Fix MSVC builds with --enable-shared.
Bruno Haible [Thu, 5 Jun 2025 09:11:07 +0000 (11:11 +0200)] 
build: Fix MSVC builds with --enable-shared.

This was a regression in commit 8e914861708ed459a2ae8157eb60d89375ab46cd
from 2023-09-06.

Thanks to Kirill Makurin <maiddaisuki@outlook.com> for fruitful discussions.

* gettext-tools/configure.ac (WOE32DLL): New C macro.
(DLL_VARIABLE): On MSVC with --enable-shared, define to '__declspec(dllexport)'
when compiling libgettextlib, and define to '__declspec(dllimport)' when
compiling the programs in src/.
(LIBGETTEXTSRC_DLL_VARIABLE): New C macro.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Define the C macro
IN_LIBGETTEXTLIB.
* gettext-tools/src/Makefile.am (libgettextsrc_la_CPPFLAGS): Define the C macro
IN_LIBGETTEXTSRC.
* gettext-tools/src/format.h: Use LIBGETTEXTSRC_DLL_VARIABLE instead of
DLL_VARIABLE.
* gettext-tools/src/message.h: Likewise.
* gettext-tools/src/msgl-cat.h: Likewise.
* gettext-tools/src/plural-table.h: Likewise.
* gettext-tools/src/po-charset.h: Likewise.
* gettext-tools/src/po-error.h: Likewise.
* gettext-tools/src/read-catalog.h: Likewise.
* gettext-tools/src/read-po.h: Likewise.
* gettext-tools/src/read-properties.h: Likewise.
* gettext-tools/src/read-stringtable.h: Likewise.
* gettext-tools/src/sentence.h: Likewise.
* gettext-tools/src/write-po.h: Likewise.
* gettext-tools/src/write-properties.h: Likewise.
* gettext-tools/src/write-stringtable.h: Likewise.
* gettext-tools/src/xerror-handler.h: Likewise.
* gettext-tools/libgettextpo/Makefile.am (config.h): Override the value of
LIBGETTEXTSRC_DLL_VARIABLE.
* gettext-runtime/configure.ac (WOE32DLL): New C macro.
(DLL_VARIABLE): Define to empty always.

4 months agoFix compilation error on MSVC due to conflict of different stdlib.h files.
Bruno Haible [Thu, 5 Jun 2025 09:11:03 +0000 (11:11 +0200)] 
Fix compilation error on MSVC due to conflict of different stdlib.h files.

Reported by Kirill Makurin <maiddaisuki@outlook.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-05/msg00071.html>.

* autogen.sh: Change gnulib-tool invocation for libgrep.
* gettext-tools/configure.ac (AC_CONFIG_FILES): Add libgrep/gnulib-lib/Makefile.
* gettext-tools/libgrep/Makefile.am: Don't include Makefile.gnulib.
(SUBDIRS): New variable.
(noinst_LIBRARIES): Add libgrep.a.
(AM_CPPFLAGS): Add -I options for gnulib-lib subdirectory.
(libgrep_a_DEPENDENCIES): New variable.
* gettext-tools/libgrep/gnulib-lib/Makefile.am: New file.
* gettext-tools/src/Makefile.am (LIBGREP): Add ../libgrep/gnulib-lib/libgnu.a.

9 months agoRelease 0.23.1 v0.23.1
Bruno Haible [Tue, 31 Dec 2024 12:20:05 +0000 (13:20 +0100)] 
Release 0.23.1

9 months agoUpdate translations from TP.
Bruno Haible [Tue, 31 Dec 2024 11:27:38 +0000 (12:27 +0100)] 
Update translations from TP.

9 months agoPrepare for 0.23.1 release.
Bruno Haible [Tue, 31 Dec 2024 11:35:20 +0000 (12:35 +0100)] 
Prepare for 0.23.1 release.

* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 12:2:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:3:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:12:5.
* gettext-tools/misc/autopoint.in: Likewise. Accept version 0.23.1.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.23.1.
* NEWS: Update.

9 months agodoc: Update list of dependencies.
Bruno Haible [Tue, 31 Dec 2024 10:55:50 +0000 (11:55 +0100)] 
doc: Update list of dependencies.

9 months agoUpdate after gnulib changed.
Bruno Haible [Sat, 28 Dec 2024 08:17:56 +0000 (09:17 +0100)] 
Update after gnulib changed.

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC,
GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES, GNULIB_MODULES_TOOLS_OTHER,
GNULIB_MODULES_LIBGETTEXTPO): Use the new names of renamed gnulib modules.
* gnulib-local/modules/backupfile (Depends-on): Likewise.
* gnulib-local/modules/closeout (Depends-on): Likewise.
* gnulib-local/modules/libtextstyle-dummy (Depends-on): Likewise.
* gnulib-local/modules/libxml (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/fd-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/html-styled-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/iconv-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/memory-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/noop-styled-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Likewise.

9 months agolang-python-*: Fix test failures on mingw with UCRT.
Bruno Haible [Tue, 24 Dec 2024 15:48:26 +0000 (16:48 +0100)] 
lang-python-*: Fix test failures on mingw with UCRT.

* gettext-tools/tests/lang-python-1: Disable ISO8859_LOCALE_UNSUPPORTED for
Python 3. Set PYTHONIOENCODING environment variable.
* gettext-tools/tests/lang-python-2: Likewise.

9 months agolibtextstyle: Fix a test failure on MSYS2.
Bruno Haible [Mon, 23 Dec 2024 21:42:27 +0000 (22:42 +0100)] 
libtextstyle: Fix a test failure on MSYS2.

* libtextstyle/gnulib-local/tests/test-term-ostream-xterm-msys2.out: New file.
* libtextstyle/gnulib-local/tests/test-term-ostream-xterm.sh: Use it as an
expected test result.
* libtextstyle/gnulib-local/modules/term-ostream-tests (Files): Add it.
* libtextstyle/Makefile.am (EXTRA_DIST): Likewise.

9 months agoexamples: Don't fail configuration of hello-objc if no Objective-C compiler is found...
Bruno Haible [Mon, 23 Dec 2024 19:17:24 +0000 (20:17 +0100)] 
examples: Don't fail configuration of hello-objc if no Objective-C compiler is found, part 2.

* gettext-tools/examples/po/xsmallpot.sh: Don't remove the m4_pushdef, m4_popdef
lines from hello-objc*/configure.ac.

9 months agoexamples: Don't fail configuration of hello-objc if no Objective-C compiler is found.
Bruno Haible [Mon, 23 Dec 2024 17:59:12 +0000 (18:59 +0100)] 
examples: Don't fail configuration of hello-objc if no Objective-C compiler is found.

* gettext-tools/examples/hello-objc/configure.ac: Map AC_MSG_FAILURE to
AC_MSG_WARN.

9 months agohello-c-gnome3: Document build dependencies.
Bruno Haible [Wed, 18 Dec 2024 18:29:44 +0000 (19:29 +0100)] 
hello-c-gnome3: Document build dependencies.

* HACKING: Mention Gtk3 dependency.

9 months agohello-c-gnome3: Fix "make distcheck".
Bruno Haible [Mon, 16 Dec 2024 21:18:45 +0000 (22:18 +0100)] 
hello-c-gnome3: Fix "make distcheck".

* gettext-tools/examples/hello-c-gnome3/Makefile.am (BUILT_SOURCES): Add
hello.desktop.
(gschemas.compiled): Make it work in VPATH builds.
(CLEANFILES): Remove resources.c. Don't mention hello.desktop twice.
(MAINTAINERCLEANFILES): Add resources.c.
* gettext-tools/examples/hello-c-gnome3/autoclean.sh: Remove also resources.c,
hello.desktop.in.

9 months agohello-c-gnome3: Fix an error "Settings schema 'org.gnu.gettext.examples.hello' is...
Bruno Haible [Mon, 16 Dec 2024 13:58:07 +0000 (14:58 +0100)] 
hello-c-gnome3: Fix an error "Settings schema 'org.gnu.gettext.examples.hello' is not installed".

* gettext-tools/examples/hello-c-gnome3/configure.ac: Invoke
gl_BUILD_TO_HOST_LOCALEDIR, gl_BUILD_TO_HOST_PKGDATADIR.
* gettext-tools/examples/hello-c-gnome3/Makefile.am (DEFS): Define also
PKGDATADIR.
(pkgdata_DATA): New variable.
* gettext-tools/examples/hello-c-gnome3/hello.c (main): Add PKGDATADIR to the
GSETTINGS_SCHEMA_DIR value.

9 months agohello-c-gnome3: Exit when the window's close button is clicked.
Bruno Haible [Mon, 16 Dec 2024 12:49:38 +0000 (13:49 +0100)] 
hello-c-gnome3: Exit when the window's close button is clicked.

* gettext-tools/examples/hello-c-gnome3/hello.c
(hello_application_window_dispose): Remove function.
(hello_application_window_class_init): Don't overwrite the 'dispose' field.

9 months agodoc: Update list of dependencies.
Bruno Haible [Mon, 16 Dec 2024 19:38:30 +0000 (20:38 +0100)] 
doc: Update list of dependencies.

* gettext-tools/doc/lang-csharp.texi: Mention dotnet8 as alternative.
* gettext-tools/tests/lang-csharp: Likewise.
* gettext-tools/doc/lang-pascal.texi: Replace fpk with fpc.
* gettext-tools/tests/lang-pascal: Likewise.
* gettext-tools/doc/lang-wxwidgets.texi: Mention libwxgtk3.2-dev as alternative.
* gettext-tools/tests/lang-objc: Mention the gobjc package.
* gettext-tools/tests/lang-rst: Mention the fp-utils package.
* gettext-tools/tests/lang-vala: Mention valac as alternative.

9 months agodoc: Update reference to lua-gettext package.
Bruno Haible [Sun, 15 Dec 2024 17:44:14 +0000 (18:44 +0100)] 
doc: Update reference to lua-gettext package.

* gettext-tools/doc/lang-lua.texi: Update lua-gettext installation instructions.
* HACKING: Update lua version requirements and lua-gettext installation
instructions.

9 months agolibxml: Fix a gcc 13 -Wformat-truncation warning.
Bruno Haible [Thu, 12 Dec 2024 10:24:11 +0000 (11:24 +0100)] 
libxml: Fix a gcc 13 -Wformat-truncation warning.

* gnulib-local/lib/libxml/uri.c (xmlURIEscape): Use a buffer of size 12, not 10.

9 months agodoc: Update list of dependencies.
Bruno Haible [Wed, 11 Dec 2024 20:31:35 +0000 (21:31 +0100)] 
doc: Update list of dependencies.

* DEPENDENCIES: Add libattr.
* HACKING: Stop mentioning XEmacs. Add note regarding GNU Smalltalk.
Mention dotnet as alternative to Mono. Mention wxgtk version 3.2.

9 months agoUse new approach for gnulib localizations.
Bruno Haible [Mon, 9 Dec 2024 03:59:35 +0000 (04:59 +0100)] 
Use new approach for gnulib localizations.

* gettext-runtime/po/POTFILES.in: Remove files that come from gnulib.
* gettext-tools/po/POTFILES.in: Likewise.
* gettext-runtime/src/envsubst.c (main): Invoke bindtextdomain for the domain
'gnulib'.
* gettext-runtime/src/gettext.c (main): Likewise.
* gettext-runtime/src/ngettext.c (main): Likewise.
* gettext-tools/src/cldr-plurals.c (main): Likewise.
* gettext-tools/src/hostname.c (main): Likewise.
* gettext-tools/src/msgattrib.c (main): Likewise.
* gettext-tools/src/msgcat.c (main): Likewise.
* gettext-tools/src/msgcmp.c (main): Likewise.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msgconv.c (main): Likewise.
* gettext-tools/src/msgen.c (main): Likewise.
* gettext-tools/src/msgexec.c (main): Likewise.
* gettext-tools/src/msgfilter.c (main): Likewise.
* gettext-tools/src/msgfmt.c (main): Likewise.
* gettext-tools/src/msggrep.c (main): Likewise.
* gettext-tools/src/msginit.c (main): Likewise.
* gettext-tools/src/msgmerge.c (main): Likewise.
* gettext-tools/src/msgunfmt.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/src/recode-sr-latin.c (main): Likewise.
* gettext-tools/src/urlget.c (main): Likewise.
* gettext-tools/src/xgettext.c (main): Likewise.

9 months agoUpdate after gnulib changed.
Bruno Haible [Sun, 8 Dec 2024 17:46:45 +0000 (18:46 +0100)] 
Update after gnulib changed.

* gettext-tools/src/Makefile.am (DEFS): Remove definition of BISON_LOCALEDIR,
now present in config.h.

9 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 31 Dec 2024 10:04:14 +0000 (11:04 +0100)] 
Update to the newest gnulib.

9 months agoexamples: hello-python: Make it work with Python 3.
Bruno Haible [Fri, 6 Dec 2024 10:48:36 +0000 (11:48 +0100)] 
examples: hello-python: Make it work with Python 3.

* gettext-tools/examples/hello-python/hello.py.in: Add parenthese around print's
arguments.

9 months agoUpdate packaging instructions.
Bruno Haible [Tue, 3 Dec 2024 13:46:32 +0000 (14:46 +0100)] 
Update packaging instructions.

* PACKAGING: Update file list. Update C# explanations.

9 months agotests: Fix lang-c++20 failure with g++ >= 14 or clang++ >= 19.
Bruno Haible [Mon, 2 Dec 2024 11:09:40 +0000 (12:09 +0100)] 
tests: Fix lang-c++20 failure with g++ >= 14 or clang++ >= 19.

* gettext-tools/tests/lang-c++20: Support newer C++ versions. Try option
-std=gnu++26, necessary for newer C++ versions.

9 months agoexamples: Update hello-c++20 to work with g++ >= 14 and clang++ >= 19.
Bruno Haible [Mon, 2 Dec 2024 11:07:49 +0000 (12:07 +0100)] 
examples: Update hello-c++20 to work with g++ >= 14 and clang++ >= 19.

* gettext-tools/examples/hello-c++20/configure.ac: Support newer C++ versions.
Try option -std=gnu++26, necessary for newer C++ versions.
* gettext-tools/examples/hello-c++20/hello.cc (main): Use different code in
newer C++.

9 months agoFix compilation error with libxml2 >= 2.12.0 and gcc >= 14.
Bruno Haible [Sun, 1 Dec 2024 18:35:51 +0000 (19:35 +0100)] 
Fix compilation error with libxml2 >= 2.12.0 and gcc >= 14.

Reported by Sam James <sam@gentoo.org>
at <https://savannah.gnu.org/bugs/?66506>.

* gettext-tools/src/its.c: Include <libxml/xmlversion.h>.
(structured_error): Adapt to API change.

10 months agoUpdate NEWS.
Bruno Haible [Sun, 1 Dec 2024 13:55:30 +0000 (14:55 +0100)] 
Update NEWS.

* NEWS: Move an entry.

10 months agoRelease 0.23 v0.23
Bruno Haible [Sun, 1 Dec 2024 11:34:55 +0000 (12:34 +0100)] 
Release 0.23

10 months agoexamples: Use infrastructure from gettext version 0.23.
Bruno Haible [Sun, 1 Dec 2024 11:31:10 +0000 (12:31 +0100)] 
examples: Use infrastructure from gettext version 0.23.

* gettext-tools/examples/hello-*/configure.ac: Use AM_GNU_GETTEXT_VERSION with
version 0.23.
* gettext-tools/examples/hello-c++-kde/configure.in.in: Likewise.
* gettext-tools/examples/hello-*/m4/Makefile.am: Update .m4 file list.

10 months agoUpdate translations from TP.
Bruno Haible [Sun, 1 Dec 2024 09:46:36 +0000 (10:46 +0100)] 
Update translations from TP.

* gettext-runtime/po/*.po: Update from TP.
* gettext-tools/po/*.po: Update from TP.
* gettext-tools/po/LINGUAS: Add ka.
* gettext-tools/examples/po/*.po: Update from TP.

10 months agoPrepare for 0.23 release.
Bruno Haible [Sun, 1 Dec 2024 09:39:52 +0000 (10:39 +0100)] 
Prepare for 0.23 release.

* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* gettext-runtime/po/Makefile.in.in: Bump Origin version and
GETTEXT_MACRO_VERSION.
* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Bump GETTEXT_MACRO_VERSION
accordingly.
* gettext-runtime/m4/gettext.m4: Update comments.
* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 12:1:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:2:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:11:5.
* gettext-runtime/src/envsubst.c (main): Update copyright year in --version
output.
* gettext-runtime/src/gettext.c (main): Likewise.
* gettext-runtime/src/gettext.sh.in (func_version): Likewise.
* gettext-runtime/src/ngettext.c (main): Likewise.
* gettext-tools/src/cldr-plurals.c (main): Likewise.
* gettext-tools/src/hostname.c (main): Likewise.
* gettext-tools/src/msgattrib.c (main): Likewise.
* gettext-tools/src/msgcat.c (main): Likewise.
* gettext-tools/src/msgcmp.c (main): Likewise.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msgconv.c (main): Likewise.
* gettext-tools/src/msgen.c (main): Likewise.
* gettext-tools/src/msgexec.c (main): Likewise.
* gettext-tools/src/msgfilter.c (main): Likewise.
* gettext-tools/src/msgfmt.c (main): Likewise.
* gettext-tools/src/msggrep.c (main): Likewise.
* gettext-tools/src/msginit.c (main): Likewise.
* gettext-tools/src/msgmerge.c (main): Likewise.
* gettext-tools/src/msgunfmt.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/src/recode-sr-latin.c (main): Likewise.
* gettext-tools/src/urlget.c (main): Likewise.
* gettext-tools/src/xgettext.c (main): Likewise.
* gettext-tools/misc/convert-archive.in (func_version): Likewise.
* gettext-tools/misc/gettextize.in (func_version): Likewise.
* gettext-tools/misc/autopoint.in: Likewise. Accept version 0.23.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.23.
* NEWS, gettext-runtime/NEWS: Update.

10 months agoUpdate after gnulib changed.
Bruno Haible [Sun, 1 Dec 2024 07:54:06 +0000 (08:54 +0100)] 
Update after gnulib changed.

10 months agoUpdate to the newest gnulib.
Bruno Haible [Sun, 1 Dec 2024 07:50:00 +0000 (08:50 +0100)] 
Update to the newest gnulib.

10 months agoxgettext: C: Revisit "hexadecimal escape sequence out of range" warnings.
Bruno Haible [Sun, 1 Dec 2024 07:40:52 +0000 (08:40 +0100)] 
xgettext: C: Revisit "hexadecimal escape sequence out of range" warnings.

Reported by Vaclav Slavik <vaclav@slavik.io>
at <https://savannah.gnu.org/bugs/?65053>.

* gettext-tools/src/x-c.c (get_string_element): Add context argument. Don't warn
for character literals. For wide strings, use a different warning and complain
about "out of range" only for values >= 0x110000.
(phase5_get): Distinguish normal string literals and wide string literals.

10 months agointl: Fix lang-c++ failure on MSVC, caused by last commit.
Bruno Haible [Sat, 30 Nov 2024 08:41:21 +0000 (09:41 +0100)] 
intl: Fix lang-c++ failure on MSVC, caused by last commit.

* gettext-runtime/intl/libgnuintl.in.h (_INTL_HAS_FORCE_INLINE,
_INTL_FORCE_INLINE): New macros.
(_INTL_REDIRECT_INLINE): Don't define in C++ mode when _INTL_HAS_FORCE_INLINE
is not set.

10 months agointl: Avoid conflict between libintl.h and some C++ header files.
Bruno Haible [Thu, 28 Nov 2024 19:22:47 +0000 (20:22 +0100)] 
intl: Avoid conflict between libintl.h and some C++ header files.

Reported Pierre Ossman <ossman@cendio.se>
at <https://savannah.gnu.org/bugs/?64006>.

* gettext-runtime/intl/libgnuintl.in.h (*printf, newlocale, duplocale,
freelocale, setlocale): Use _INTL_REDIRECT_INLINE or _INTL_ASM as alternatives
to _INTL_REDIRECT_MACROS, avoiding conflicts with inline functions in mingw
and MSVC <stdio.h>.

10 months agointl: Avoid possible error from libintl.h in C++ mode.
Bruno Haible [Thu, 28 Nov 2024 12:56:16 +0000 (13:56 +0100)] 
intl: Avoid possible error from libintl.h in C++ mode.

* gettext-runtime/intl/libgnuintl.in.h (gettext, dgettext, dcgettext, ngettext,
dngettext, dcngettext, textdomain, bindtextdomain, wbindtextdomain,
bind_textdomain_codeset): In the _INTL_REDIRECT_INLINE redirects, in C++ mode,
avoid a compilation error if the function is globally declared in some .h file.

10 months agodoc: Avoid @table, as it cannot be used to produce decent-looking output.
Bruno Haible [Wed, 27 Nov 2024 21:22:41 +0000 (22:22 +0100)] 
doc: Avoid @table, as it cannot be used to produce decent-looking output.

10 months agodoc: Mention C.UTF-8 locale.
Bruno Haible [Wed, 27 Nov 2024 11:56:07 +0000 (12:56 +0100)] 
doc: Mention C.UTF-8 locale.

Reported by nl6720 at <https://savannah.gnu.org/bugs/?62815>.

* gettext-tools/doc/gettext.texi (Locale Names): Mention the C.UTF-8 locale.

10 months agoAdd installation information for the tarball users and from a git checkout.
Bruno Haible [Wed, 27 Nov 2024 10:40:31 +0000 (11:40 +0100)] 
Add installation information for the tarball users and from a git checkout.

We want to have an INSTALL file that contains installation instructions for
the tarball users. These instructions are necessarily package specific,
because they need to list the prerequisites or reference the DEPENDENCIES
file.

Additionally, many people who are not aware that tarballs are the primary
means for source code distribution of GNU packages check out the git repository
and then expect to see instructions for installing from that git checkout
in the INSTALL file. See e.g. <https://savannah.gnu.org/bugs/?62196>.

Unfortunately, both Automake (with strictness option = 'gnu') and 'bootstrap'
both contain code to copy the generic (not package specific) installation
instructions to the file 'INSTALL'. This is not what we want, so we disable
it. (Other packages handle this issue by putting part of the installation
instructions into the README file. This is suboptimal, because this is not
what the README file is for.)

* autogen.sh: Import INSTALL.generic from gnulib.
* INSTALL: Entirely rewritten, based on poke/INSTALL.
* Makefile.am (EXTRA_DIST): Add INSTALL.generic.
* libtextstyle/autogen.sh: Import INSTALL.generic from gnulib.
* libtextstyle/INSTALL: Entirely rewritten, based on poke/INSTALL.
* libtextstyle/Makefile.am (EXTRA_DIST): Add INSTALL.generic.

10 months agolang-perl-*: Avoid FAIL on macOS.
Bruno Haible [Tue, 26 Nov 2024 23:57:00 +0000 (00:57 +0100)] 
lang-perl-*: Avoid FAIL on macOS.

Reported by Hanspeter Niederstrasser <nieder@users.sourceforge.net>
at <https://savannah.gnu.org/bugs/?66461>.

* gettext-tools/tests/lang-perl-1: On macOS, don't test the ISO-8859-1 locale.
* gettext-tools/tests/lang-perl-2: Likewise.

10 months agoFix compilation error when pgettext is used.
Bruno Haible [Sun, 24 Nov 2024 14:16:06 +0000 (15:16 +0100)] 
Fix compilation error when pgettext is used.

Reported by Friedrich Beckmann <friedrich.beckmann@posteo.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00189.html>.

* gnulib-local/lib/gettext.h: Include <locale.h>.

10 months agoUpgrade to libtool 2.5.4.
Bruno Haible [Fri, 22 Nov 2024 18:20:39 +0000 (19:20 +0100)] 
Upgrade to libtool 2.5.4.

* m4/libtool.m4: Update from libtool-2.5.4.
* m4/ltversion.m4: Likewise.
* build-aux/ltmain.sh: Likewise.

10 months agopo: Fix build failure with parallel make.
Bruno Haible [Tue, 19 Nov 2024 19:07:32 +0000 (20:07 +0100)] 
po: Fix build failure with parallel make.

Reported by Lubomir Rintel <lkundrak@v3.sk> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-06/msg00022.html>.

* gettext-runtime/po/Makefile.in.in (.NOTPARALLEL): Add this special target.

10 months agodoc: Improve typography in man pages.
Bruno Haible [Tue, 19 Nov 2024 18:18:44 +0000 (19:18 +0100)] 
doc: Improve typography in man pages.

Patch by наб <nabijaczleweli@nabijaczleweli.xyz> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-01/msg00019.html>.

* gettext-runtime/man/bind_textdomain_codeset.3.in: After "e.g." or "i.e.",
use \&.

10 months agodoc: Use GNU coding style in man pages.
Bruno Haible [Tue, 19 Nov 2024 18:11:18 +0000 (19:11 +0100)] 
doc: Use GNU coding style in man pages.

Reported by наб <nabijaczleweli@nabijaczleweli.xyz> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-01/msg00019.html>.

* gettext-runtime/man/gettext.3.in: In C code snippets, put a space before '('
and after ','.
* gettext-runtime/man/bind_textdomain_codeset.3.in: Likewise.

10 months agoxgettext: PHP: Stop recognizing ASP tags <% and %> (removed in PHP 7.0).
Bruno Haible [Tue, 19 Nov 2024 17:03:45 +0000 (18:03 +0100)] 
xgettext: PHP: Stop recognizing ASP tags <% and %> (removed in PHP 7.0).

Reported by David Robinson <dave@netterra.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2021-10/msg00000.html>.

* gettext-tools/src/x-php.c (skip_html): Don't recognize '<%' and '<%='
any more.
(phase2_getc, phase3_getc, phase4_get): In comments, don't treat '%>' like '?>'
any more.

10 months agolibgettextpo: Extend the function po_message_set_format.
Bruno Haible [Tue, 19 Nov 2024 15:26:45 +0000 (16:26 +0100)] 
libgettextpo: Extend the function po_message_set_format.

Reported by Alexander Potashev <aspotashev@gmail.com>
at <https://savannah.gnu.org/bugs/?61160>.

* gettext-tools/libgettextpo/gettext-po.c (po_message_set_format): Support a
negative value.
* gettext-tools/libgettextpo/gettext-po.in.h (po_message_set_format): Mention
effects of po_message_set_format (..., -1).
* gettext-tools/doc/gettext.texi (po_message_t API): Likewise.
* NEWS: Mention the change.

10 months agoImprove comments.
Bruno Haible [Tue, 19 Nov 2024 08:47:35 +0000 (09:47 +0100)] 
Improve comments.

* gettext-tools/src/locating-rules.h (locating_rule_list_locate): Improve
specification.
* gettext-tools/src/sentence.h (sentence_end): Likewise.

10 months agoAvoid undefined behaviour.
Bruno Haible [Tue, 19 Nov 2024 08:47:14 +0000 (09:47 +0100)] 
Avoid undefined behaviour.

* gettext-tools/src/quote.h (scan_quoted): Add comment. Avoid undefined
behaviour if length==0.

10 months agoFix "gcc -Wzero-as-null-pointer-constant" warnings.
Bruno Haible [Sat, 16 Nov 2024 06:51:24 +0000 (07:51 +0100)] 
Fix "gcc -Wzero-as-null-pointer-constant" warnings.

* libtextstyle/gnulib-local/lib/libcroco/cr-enc-handler.c (gv_default_aliases):
Use NULL, not 0, to denote a null pointer.
* libtextstyle/gnulib-local/lib/libcroco/cr-om-parser.c
(cr_om_parser_parse_paths_to_cascade): Likewise.
* gettext-tools/libgrep/kwset.c (kwsalloc, kwsincr, kwsprep, cwexec, kwsexec):
Likewise.

10 months agoRefactor.
Bruno Haible [Fri, 8 Nov 2024 15:00:04 +0000 (16:00 +0100)] 
Refactor.

* gettext-tools/src/cldr-plural-exp.c: Don't include <unistd.h>, unistr.h.
* gettext-tools/src/cldr-plural.y: Don't include <unistd.h>.

10 months agoRefactor.
Bruno Haible [Fri, 8 Nov 2024 14:54:46 +0000 (15:54 +0100)] 
Refactor.

* gettext-tools/src/cldr-plural.y: Untabify.
(struct cldr_plural_parse_args): New type, moved here from
gettext-tools/src/cldr-plural-exp.h.
(cldr_plural_parse): New function, moved here from
gettext-tools/src/cldr-plural-exp.c.
* gettext-tools/src/cldr-plural-exp.h: Reorder declarations.
(struct cldr_plural_parse_args): Remove declaration.
* gettext-tools/src/cldr-plural-exp.c: Don't include cldr-plural.h. Reorder
functions.
(cldr_plural_parse): Remove function.

10 months agoUpdate the GFDL text.
Bruno Haible [Thu, 7 Nov 2024 09:16:51 +0000 (10:16 +0100)] 
Update the GFDL text.

* libtextstyle/doc/fdl.texi: Update from gnulib/doc/fdl-1.3.texi.

10 months agoUpgrade from GFDL 1.2 to GFDL 1.3.
Bruno Haible [Thu, 7 Nov 2024 09:16:36 +0000 (10:16 +0100)] 
Upgrade from GFDL 1.2 to GFDL 1.3.

* gettext-runtime/libasprintf/fdl.texi: Update from gnulib/doc/fdl-1.3.texi.
* gettext-tools/doc/fdl.texi: Likewise.
* gettext-runtime/libasprintf/autosprintf.texi: Update reference.
* gettext-tools/doc/gettext.texi: Likewise.

10 months agoUpdate the GPL and LGPL text.
Bruno Haible [Thu, 7 Nov 2024 08:43:44 +0000 (09:43 +0100)] 
Update the GPL and LGPL text.

* gettext-runtime/intl/COPYING.LIB: Update from
<https://ftp.gnu.org/gnu/Licenses/lgpl-2.1.txt>.
* gettext-runtime/libasprintf/COPYING.LIB: Likewise.
* gettext-runtime/libasprintf/gpl.texi: Update from gnulib/doc/gpl-2.0.texi.
* gettext-runtime/libasprintf/lgpl.texi: Update from gnulib/doc/lgpl-2.1.texi.
* gettext-tools/doc/gpl.texi: Update from gnulib/doc/gpl-2.0.texi.
* gettext-tools/doc/lgpl.texi: Update from gnulib/doc/lgpl-2.1.texi.

10 months agobuild: Fix "make distcheck" after the line-breaking algorithm changed, part 2.
Bruno Haible [Wed, 6 Nov 2024 19:41:29 +0000 (20:41 +0100)] 
build: Fix "make distcheck" after the line-breaking algorithm changed, part 2.

* gettext-tools/configure.ac (MSGMERGE): Test $cross_compiling, since
$CROSS_COMPILING is not set at this point.

11 months agoUpdate legally relevant info.
Bruno Haible [Mon, 28 Oct 2024 19:13:38 +0000 (20:13 +0100)] 
Update legally relevant info.

* AUTHORS: Incorporate records from gnu.org:/gd/gnuorg/copyright.list.

11 months agodoc: Improve usability of generated PDF.
Bruno Haible [Mon, 28 Oct 2024 11:53:05 +0000 (12:53 +0100)] 
doc: Improve usability of generated PDF.

* gettext-tools/doc/gettext.texi: Use a brown colour for interactive links.

11 months agobuild: Fix "make distcheck" failure (regression 2024-10-23).
Bruno Haible [Fri, 25 Oct 2024 07:56:29 +0000 (09:56 +0200)] 
build: Fix "make distcheck" failure (regression 2024-10-23).

* check-copyright-headers (func_check_file): Update after DISCLAIM was renamed.

11 months agodoc: Add some words about dialects.
Bruno Haible [Thu, 24 Oct 2024 11:40:20 +0000 (13:40 +0200)] 
doc: Add some words about dialects.

Reported by John Cowan <cowan@ccil.org>
at <https://savannah.gnu.org/bugs/?47838>.

* gettext-tools/doc/gettext.texi (The LANGUAGE variable): Add a paragraph
about Chinese.
(Dialects): New section.

11 months agodoc: Tweaks.
Bruno Haible [Wed, 23 Oct 2024 19:27:58 +0000 (21:27 +0200)] 
doc: Tweaks.

* gettext-tools/doc/gettext.texi (Responsibilities): Tweaks, from
Benno Schulenberg.

11 months agodoc: Revise "Translators" chapter.
Bruno Haible [Wed, 23 Oct 2024 11:06:34 +0000 (13:06 +0200)] 
doc: Revise "Translators" chapter.

* gettext-tools/doc/gettext.texi (Trans Intro 0, Trans Intro 1, Discussions,
Organization, Information Flow): Remove sections.
(Organization, Responsibilities): New sections.

11 months agoRename and distribute the disclaimer file.
Bruno Haible [Wed, 23 Oct 2024 11:27:58 +0000 (13:27 +0200)] 
Rename and distribute the disclaimer file.

* gettext-tools/misc/disclaim-translations.txt: Renamed from
gettext-tools/misc/DISCLAIM.
* gettext-tools/Makefile.am (EXTRA_DIST): Update.
(pkgdata_DATA): New variable.

11 months agobuild: Simplify.
Bruno Haible [Wed, 23 Oct 2024 11:27:07 +0000 (13:27 +0200)] 
build: Simplify.

* gettext-tools/Makefile.am (gettextsrcdir): Remove variable.
(pkgdata_SCRIPTS): Renamed from gettextsrc_SCRIPTS.

11 months agoFix test failure of autopoint-3 on Cygwin.
Bruno Haible [Wed, 23 Oct 2024 07:59:49 +0000 (09:59 +0200)] 
Fix test failure of autopoint-3 on Cygwin.

It was broken since commit "tests: Use libtool in autopoint-3 test" (2014-09-05):
The Makefile specified to link the 'hello' program without libtool
(and thus Automake generated a direct link command without libtool),
but the LDADD variable used @LTLIBINTL@. On Cygwin, this led to a use of
the -R option, which the compiler does not understand:
x86_64-pc-cygwin-gcc: error: unrecognized command line option ‘-R’; did you mean ‘-R’?

* gettext-tools/tests/autopoint-3: Don't invoke LT_INIT. Use @LIBINTL@,
not @LTLIBINTL@. Don't touch ltmain.sh.

11 months agoImprove handling of Windows DLL directories when executing programs.
Bruno Haible [Wed, 23 Oct 2024 07:39:50 +0000 (09:39 +0200)] 
Improve handling of Windows DLL directories when executing programs.

Reported by Michele Locati <mlocati@gmail.com>
at <https://savannah.gnu.org/bugs/?66356>.

Revert commit e2839b591c from 2019-05-01. Instead, use gnulib's new feature.

* gettext-tools/src/Makefile.am (DEFS): Define BINDIR.
* gettext-tools/src/msginit.c: Don't include configmake.h.
(main): Don't add BINDIR to PATH globally.
(get_user_email, language_team_address, plural_forms): Pass a dll_dirs argument
to create_pipe_in.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Remove configmake.

11 months agoUpdate after gnulib changed.
Bruno Haible [Tue, 22 Oct 2024 20:24:44 +0000 (22:24 +0200)] 
Update after gnulib changed.

* gettext-tools/src/msgexec.c (process_string): Update create_pipe_out
invocation.
* gettext-tools/src/write-resources.c (execute_writing_input): Likewise.
* gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email,
language_team_address, plural_forms): Update create_pipe_in invocations.
* gettext-tools/src/read-csharp.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-java.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-resources.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-tcl.c (msgdomain_read_tcl): Likewise.
* gettext-tools/src/x-ruby.c (extract_ruby): Likewise.
* gettext-tools/src/urlget.c (execute_it, fetch): Update execute invocations.

11 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 22 Oct 2024 20:16:51 +0000 (22:16 +0200)] 
Update to the newest gnulib.

11 months agoUpdate the translation disclaimer.
Bruno Haible [Tue, 22 Oct 2024 10:33:35 +0000 (12:33 +0200)] 
Update the translation disclaimer.

From Craig Topham <copyright-clerk@fsf.org>.

* gettext-tools/misc/DISCLAIM: Update.

11 months agodoc: Update after Automake changed.
Bruno Haible [Sun, 20 Oct 2024 22:46:53 +0000 (00:46 +0200)] 
doc: Update after Automake changed.

* gettext-tools/doc/gettextize.texi: Update now that Automake with option 'gnu'
no longer requires ABOUT-NLS. Cf.
<https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=a2def8cdef>.

11 months agodoc: Add an example regarding xgettext.
Bruno Haible [Fri, 18 Oct 2024 17:19:38 +0000 (19:19 +0200)] 
doc: Add an example regarding xgettext.

Reported by Andrea G. Monaco <andrea.monaco@autistici.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-12/msg00036.html>.

* gettext-tools/doc/xgettext.texi: Add an example.

11 months agoxgettext: Python: Add test for warning that was broken in 0.21.x and 0.22.x.
Bruno Haible [Thu, 17 Oct 2024 23:16:12 +0000 (01:16 +0200)] 
xgettext: Python: Add test for warning that was broken in 0.21.x and 0.22.x.

Reported by Max Smolens <msmolens@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-10/msg00001.html>.

* gettext-tools/tests/xgettext-python-9: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

11 months agodoc: Clarify locale names and language names.
Bruno Haible [Thu, 17 Oct 2024 21:53:17 +0000 (23:53 +0200)] 
doc: Clarify locale names and language names.

Reported by Arfrever <arfrever.fta@gmail.com>
at <https://savannah.gnu.org/bugs/?59062>.

* gettext-runtime/doc/nls.texi (INSTALL Matters, Using This Package): Mention
ll_CC as alterntive to ll, and that ll can be a 3-letter code.
* gettext-tools/doc/gettext.texi (Locale Names, Header Entry, Installers):
Likewise.

11 months agointl: Fix a memory leak.
Bruno Haible [Tue, 15 Oct 2024 19:52:30 +0000 (21:52 +0200)] 
intl: Fix a memory leak.

* gettext-runtime/intl/finddomain.c (_nl_find_domain): If there was an alias and
_nl_explode_name or _nl_make_l10nflist fails, free the allocated memory. Avoid
'goto'.

11 months agogettext.h: Avoid "warning: ISO C++ forbids variable length array" with -pedantic.
Bruno Haible [Tue, 15 Oct 2024 14:49:13 +0000 (16:49 +0200)] 
gettext.h: Avoid "warning: ISO C++ forbids variable length array" with -pedantic.

Both "g++ -pedantic" and "clang++ -pedantic" warn about use of VLAs.
Since we cannot distinguish "g++" from "g++ -pedantic" through a preprocessor
macro, it's best to not use a VLA in C++.

Reported by Jens Seidel <jensseidel@users.sf.net>
via <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547798>
at <https://savannah.gnu.org/bugs/index.php?55149>.

* gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define
to 0 in C++ mode.

11 months agomsgen: Convert charset=CHARSET to charset=ASCII.
Bruno Haible [Tue, 15 Oct 2024 14:04:45 +0000 (16:04 +0200)] 
msgen: Convert charset=CHARSET to charset=ASCII.

Reported at <https://savannah.gnu.org/bugs/index.php?20923>.

* gettext-tools/src/msgen.c: Include msgl-ascii.h, c-strstr.h, xalloc.h.
(fill_header): New function, based on fill_header in msginit.c.
(main): Invoke it.
* gettext-tools/tests/msgen-1: Provide as input a POT file with charset=CHARSET,
and verify that the output has charset=ASCII.

11 months agoRefactor.
Bruno Haible [Tue, 15 Oct 2024 13:42:46 +0000 (15:42 +0200)] 
Refactor.

* gettext-tools/src/msgl-header.h (header_set_charset): New declaration.
* gettext-tools/src/msgl-header.c (header_set_charset): New function.
* gettext-tools/src/msgl-iconv.c: Include msgl-header.h.
(iconv_message_list_internal): Use header_set_charset.
* gettext-tools/src/x-po.c: Include msgl-header.h.
(extract): Use header_set_charset.
* gettext-tools/src/FILES: Update.

11 months agoits: Add ability to check *.its and *.loc files with XML Schema 1.1.
Bruno Haible [Tue, 15 Oct 2024 00:37:28 +0000 (02:37 +0200)] 
its: Add ability to check *.its and *.loc files with XML Schema 1.1.

* gettext-tools/src/its.xsd10: Renamed from gettext-tools/src/its.xsd.
(RulesType): Enumerate all possible rules in the ITS namespace, instead of using
a wildcard.
(OtherRuleType): New element.
* gettext-tools/src/its.xsd11: Copied from gettext-tools/src/its.xsd.
(LocNoteRuleType): Enable assertion.
* gettext-tools/src/locating-rules.xsd10: Renamed from
gettext-tools/src/locating-rules.xsd.
* gettext-tools/src/locating-rules.xsd11: Copied from
gettext-tools/src/locating-rules.xsd.
(LocatingRuleType): Enable assertion.
* gettext-tools/src/Makefile.am (schema_DATA): Add its.xsd10, its.xsd11,
locating-rules.xsd10, locating-rules.xsd11. Remove its.xsd, locating-rules.xsd.
* gettext-tools/build-aux/xml-validate-10.in: New file.
* gettext-tools/build-aux/xml-validate-11.in: New file.
* gettext-tools/configure.ac: Substitute HAVE_JAVAEXEC.
(AC_CONFIG_FILES): Create build-aux/xml-validate-10, build-aux/xml-validate-11.
* gettext-tools/Makefile.am (DISTCLEANFILES): Add build-aux/xml-validate-10,
build-aux/xml-validate-11.
* gettext-tools/its/Makefile.am: Revert last commit.
(check-local): Check each file both using the XML Schema 1.0 and the XML Schema
1.1.
* gettext-tools/doc/gettext.texi (ITS Rules): Mention the two versions of
its.xsd.
(Location Rules): Mention the two versions of locating-rules.xsd.
* HACKING: Mention Xerces2-J.

11 months agoits: Work around xmllint bug.
Bruno Haible [Mon, 14 Oct 2024 15:24:52 +0000 (17:24 +0200)] 
its: Work around xmllint bug.

* gettext-tools/its/Makefile.am (check-local): Skip the ITS_FILES checks if
xmllint cannot grok the its.xsd schema.

11 months agopo: Add a copyright and license notice to the Rules-quot auxiliary files.
Bruno Haible [Sun, 13 Oct 2024 23:41:49 +0000 (01:41 +0200)] 
po: Add a copyright and license notice to the Rules-quot auxiliary files.

Reported by Joël Krähemann <jkraehemann@gmail.com>
at <https://savannah.gnu.org/bugs/?57973>.

* gettext-runtime/po/quot.sed: Add a copyright and all-permissive license
notice.
* gettext-runtime/po/boldquot.sed: Likewise.
* gettext-runtime/po/en@quot.header: Likewise.
* gettext-runtime/po/en@boldquot.header: Likewise.
* gettext-runtime/po/insert-header.sed: Use an all-permissive license notice.
* gettext-runtime/po/Rules-quot: Likewise.
(.insert-header.po-update-en): After running the *.insert-header script,
eliminate lines that start with %%.

11 months agopo: Assume a 'sed' that supports '#' for introducing comments.
Bruno Haible [Sun, 13 Oct 2024 20:37:39 +0000 (22:37 +0200)] 
po: Assume a 'sed' that supports '#' for introducing comments.

This is standardized in POSIX since POSIX:2001 (= SUSv3).
It is supported on all platforms that I could test:
GNU, macOS 10.5, FreeBSD 5, NetBSD 7, OpenBSD 6, AIX 7, Solaris 10 and 11,
busybox (2019).

* gettext-runtime/po/remove-potcdate.sed: Renamed from
gettext-runtime/po/remove-potcdate.sin.
* gettext-runtime/po/Makefile.in.in (DISTFILES.common): Update.
(.SUFFIXES): Remove .sin.
(.sin.sed): Remove rule.
($(DOMAIN).pot-update): Use remove-potcdate.sed in $(srcdir).
(mostlyclean): Don't remove remove-potcdate.sed.
* autogen.sh: Update.
* Makefile.am (distcheck-hook): Update.
* gettext-tools/examples/po/remove-potcdate.sed: Renamed from
gettext-tools/examples/po/remove-potcdate.sin.
* gettext-tools/examples/po/Makefile.am ($(DOMAIN).pot-update): Use
remove-potcdate.sed in $(srcdir).
(MOSTLYCLEANFILES): Don't add remove-potcdate.sed.
(EXTRA_DIST): Update.
* gettext-tools/examples/hello-*/po/Makefile.am ($(DOMAIN).pot-update): Use
remove-potcdate.sed in $(srcdir).
(MOSTLYCLEANFILES): Don't add remove-potcdate.sed.
(EXTRA_DIST): Update.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile
($(DOMAIN).pot-update): Remove dependency on remove-potcdate.sed.
(internal-clean): Remove rule.
* gettext-tools/examples/hello-*/autogen.sh: Update.
* gettext-tools/examples/hello-*/autoclean.sh: Update.

11 months agopo: Assume a 'sed' that supports '#' for introducing comments.
Bruno Haible [Sun, 13 Oct 2024 20:36:41 +0000 (22:36 +0200)] 
po: Assume a 'sed' that supports '#' for introducing comments.

This is standardized in POSIX since POSIX:2001 (= SUSv3).
It is supported on all platforms that I could test:
GNU, macOS 10.5, FreeBSD 5, NetBSD 7, OpenBSD 6, AIX 7, Solaris 10 and 11,
busybox (2019).

* gettext-runtime/po/insert-header.sed: Renamed from
gettext-runtime/po/insert-header.sin.
* gettext-runtime/po/Rules-quot (DISTFILES.common.extra1): Update.
(en@quot.insert-header, en@boldquot.insert-header): Use insert-header.sed
instead of insert-header.sin.
* autogen.sh: Update.
* Makefile.am (distcheck-hook): Update.
* gettext-tools/examples/hello-*/autogen.sh: Update.
* gettext-tools/doc/gettext.texi (po/LINGUAS): Update.

11 months agoits: Extend schema so that docbook4.its and docbook5.its pass.
Bruno Haible [Sun, 13 Oct 2024 22:28:38 +0000 (00:28 +0200)] 
its: Extend schema so that docbook4.its and docbook5.its pass.

* gettext-tools/src/its.xsd: Add an <any> element that catches other rules.

11 months agotests: Add more unit tests regarding Desktop files.
Bruno Haible [Sun, 13 Oct 2024 18:58:37 +0000 (20:58 +0200)] 
tests: Add more unit tests regarding Desktop files.

Reported by Felix Riemann at <https://savannah.gnu.org/bugs/?51177>
and by Daniel <daniel.rf710@gmail.com>
at <https://savannah.gnu.org/bugs/?63455>.

* gettext-tools/tests/xgettext-desktop-3: New file.
* gettext-tools/tests/msgfmt-desktop-4: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.

11 months agoxgettext: Desktop: Correct the line numbers in the output and in error messages.
Bruno Haible [Sun, 13 Oct 2024 18:18:15 +0000 (20:18 +0200)] 
xgettext: Desktop: Correct the line numbers in the output and in error messages.

* gettext-tools/src/read-desktop.c (struct token_ty): Add a 'lineno' field.
(desktop_lex): Correct the line numbers in error messages. For a token of type
token_type_pair, store the line number.
(desktop_parse): Pass the line number from the token to
desktop_reader_handle_pair.
* gettext-tools/tests/xgettext-desktop-1: Update expected output.
* gettext-tools/tests/xgettext-desktop-2: Likewise.
* NEWS: Mention the change.

11 months agotests: Make it easier to single-step the msgfmt-* tests.
Bruno Haible [Sun, 13 Oct 2024 18:49:01 +0000 (20:49 +0200)] 
tests: Make it easier to single-step the msgfmt-* tests.

* gettext-tools/tests/msgfmt-desktop-1: Assign a default to MSGFMT.
* gettext-tools/tests/msgfmt-desktop-2: Likewise.
* gettext-tools/tests/msgfmt-desktop-3: Likewise.
* gettext-tools/tests/msgfmt-xml-1: Likewise.
* gettext-tools/tests/msgfmt-xml-2: Likewise.
* gettext-tools/tests/msgfmt-xml-3: Likewise.
* gettext-tools/tests/msgfmt-xml-4: Likewise.
* gettext-tools/tests/msgfmt-xml-5: Likewise.

11 months agomsgmerge, msginit: Reject POT files with non-ASCII character, except in UTF-8, part 2.
Bruno Haible [Sun, 13 Oct 2024 16:57:51 +0000 (18:57 +0200)] 
msgmerge, msginit: Reject POT files with non-ASCII character, except in UTF-8, part 2.

* gettext-tools/src/msgl-charset.c (check_pot_charset): Tweak the new code.

11 months agomsgmerge, msginit: Reject POT files with non-ASCII characters, except in UTF-8.
Bruno Haible [Sun, 13 Oct 2024 16:47:47 +0000 (18:47 +0200)] 
msgmerge, msginit: Reject POT files with non-ASCII characters, except in UTF-8.

Reported by Martin Quinson <mquinson@debian.org>
at <https://savannah.gnu.org/bugs/?65104>.

* gettext-tools/src/msgl-charset.h (check_pot_charset): New declaration.
* gettext-tools/src/msgl-charset.c: Include msgl-ascii.h.
(check_pot_charset): New function.
* gettext-tools/src/msginit.c: Include msgl-charset.h.
(main): Invoke check_pot_charset.
* gettext-tools/src/msgmerge.c: Include msgl-charset.h.
(merge): Invoke check_pot_charset.
* gettext-tools/src/FILES: Update.
* gettext-tools/tests/testdata/nonascii.pot: New file.
* gettext-tools/tests/msginit-5: New file.
* gettext-tools/tests/msgmerge-charset-4: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
(EXTRA_DIST): Add testdata/nonascii.pot.

11 months agotests: Reorganize msgmerge tests.
Bruno Haible [Sun, 13 Oct 2024 16:28:39 +0000 (18:28 +0200)] 
tests: Reorganize msgmerge tests.

* gettext-tools/tests/msgmerge-9: Renamed from gettext-tools/tests/msgmerge-18.
* gettext-tools/tests/msgmerge-10: Renamed from gettext-tools/tests/msgmerge-19.
* gettext-tools/tests/msgmerge-11: Renamed from gettext-tools/tests/msgmerge-20.
* gettext-tools/tests/msgmerge-12: Renamed from gettext-tools/tests/msgmerge-25.
* gettext-tools/tests/msgmerge-13: Renamed from gettext-tools/tests/msgmerge-26.
* gettext-tools/tests/msgmerge-14: Renamed from gettext-tools/tests/msgmerge-27.
* gettext-tools/tests/msgmerge-15: Renamed from gettext-tools/tests/msgmerge-29.
* gettext-tools/tests/Makefile.am (TESTS): Update.