]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
3 months agoRelease 0.25.1 0.25.x v0.25.1
Bruno Haible [Tue, 1 Jul 2025 23:22:30 +0000 (01:22 +0200)] 
Release 0.25.1

3 months agoPrepare for 0.25.1 release.
Bruno Haible [Tue, 1 Jul 2025 22:10:38 +0000 (00:10 +0200)] 
Prepare for 0.25.1 release.

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

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 agoFix an autoreconf failure in packages that only need AM_NLS.
Bruno Haible [Tue, 1 Jul 2025 12:27:37 +0000 (14:27 +0200)] 
Fix an autoreconf failure in packages that only need AM_NLS.

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

* gettext-tools/m4/Makefile.am (aclocaldir, aclocal_DATA): New variables.
* PACKAGING: Update.

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:44:05 +0000 (19:44 +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 "make install" in MSVC builds with --enable-shared.
Bruno Haible [Thu, 5 Jun 2025 19:37:08 +0000 (21:37 +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 some crashes when building with --enable-shared on MSVC.
Bruno Haible [Thu, 5 Jun 2025 19:37:04 +0000 (21:37 +0200)] 
build: Fix some crashes when building with --enable-shared on MSVC.

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

* gnulib-local/lib/gl_carray_list.h.diff: New file.
* gnulib-local/lib/gl_hash_map.h.diff: New file.
* gnulib-local/lib/gl_hash_set.h.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.

4 months agobuild: Fix MSVC builds with --enable-shared.
Bruno Haible [Thu, 5 Jun 2025 19:37:01 +0000 (21:37 +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.

* autogen.sh: Among the gnulib-tests, avoid the modules array-map-tests,
array-oset-tests, carray-list-tests, and uninorm/decomposing-form-tests, since
they use variables from libgettextlib.
* gettext-tools/configure.ac (GL_GNULIB_LIBUNISTRING_DLL_VARIABLE_NAME): New
variable.
(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 agoUpdate after gnulib changed.
Bruno Haible [Thu, 5 Jun 2025 19:36:54 +0000 (21:36 +0200)] 
Update after gnulib changed.

* gettext-tools/src/msgl-iconv.h (convert_string_desc_directly): Change result
type to rw_string_desc_t.
* gettext-tools/src/msgl-iconv.c (convert_string_desc_directly): Likewise.
* gettext-tools/src/its.c (_its_is_valid_simple_gen_xml): Omit casts to
'char *'. Don't use sd_c_casecmp, sd_cmp as function pointers.
* gettext-tools/src/xg-encoding.h (string_desc_from_current_source_encoding):
Change result type to rw_string_desc_t.
* gettext-tools/src/xg-encoding.c (from_current_source_encoding): Return
converted result directly, without a cast.
(string_desc_from_current_source_encoding): Change result type to
rw_string_desc_t. Return converted result directly, without a cast. Invoke
sd_readwrite.
* gettext-tools/src/x-perl.c (get_here_document): Add benign cast.
(extract_quotelike_pass1, extract_quotelike_pass1_utf8): Change result type to
rw_string_desc_t.
(extract_quotelike, extract_triple_quotelike): Update.
(extract_quotelike_pass3): Add benign casts.
(interpolate_keywords): Don't call sd_set_char_at on a string_desc_t.
* gettext-tools/src/x-d.c (handle_comments, is_string_literal,
string_literal_accumulate_pieces, extract_from_function_call,
extract_from_function_call_without_args, extract_from_template_instantation,
extract_from_node): Omit casts to 'char *'.
* gettext-tools/src/x-go.c (string_literal_accumulate_pieces,
string_literal_value, scan_import_spec, get_type_from_type_identifier_node,
get_type_from_type_node, store_type_declaration, get_mvtypes_of_expression,
store_var_spec, store_const_spec, store_function_declaration,
augment_for_type_declaration, augment_for_parameter_list, augment_for_var_spec,
augment_for_const_spec, augment_for_short_variable_declaration, handle_comments,
extract_from_function_call, extract_from_node): Omit casts to 'char *'.
* gettext-tools/src/x-rust.c (handle_comments, string_literal_value): Omit casts
to 'char *'. Add benign casts.
(extract_from_function_call, extract_from_function_call_like,
extract_from_node): Omit casts to 'char *'.
* gettext-tools/src/x-typescript-impl.h (handle_comments,
sbru_prepend_lone_surrogate): Omit casts to 'char *'.
(sbru_xprepend_unicode): Add benign casts.
(string_literal_accumulate_pieces, string_literal_value,
extract_from_function_call, extract_from_node): Omit casts to 'char *'.

4 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 5 Jun 2025 19:36:51 +0000 (21:36 +0200)] 
Update to the newest gnulib.

4 months agoFix compilation error on MSVC due to conflict of different stdlib.h files.
Bruno Haible [Thu, 5 Jun 2025 19:36:47 +0000 (21:36 +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.

4 months agoRelease 0.25 v0.25
Bruno Haible [Wed, 7 May 2025 16:48:47 +0000 (18:48 +0200)] 
Release 0.25

4 months agoexamples: Use infrastructure from gettext version 0.25.
Bruno Haible [Wed, 7 May 2025 16:07:15 +0000 (18:07 +0200)] 
examples: Use infrastructure from gettext version 0.25.

* gettext-tools/examples/hello-*/configure.ac: Use AM_GNU_GETTEXT_VERSION with
version 0.25.
* gettext-tools/examples/hello-c++-kde/configure.in.in: Likewise.

4 months agoUpdate translations from TP.
Bruno Haible [Wed, 7 May 2025 13:30:06 +0000 (15:30 +0200)] 
Update translations from TP.

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

4 months agoPrepare for 0.25 release.
Bruno Haible [Wed, 7 May 2025 13:06:24 +0000 (15:06 +0200)] 
Prepare for 0.25 release.

* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* 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/po/Makefile.in.in: Update Origin.
* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 12:4:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:5:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:14:5.
* gettext-tools/misc/autopoint.in: Likewise. Accept version 0.25.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.25.

4 months agodoc: Clarify how to obtain the various autoconf macros.
Bruno Haible [Wed, 7 May 2025 16:03:18 +0000 (18:03 +0200)] 
doc: Clarify how to obtain the various autoconf macros.

* gettext-tools/doc/gettext.texi (autoconf macros): Suggest to use gettextize or
autopoint. Discourage autoreconf.

4 months agoUpdate .gitignore.
Bruno Haible [Wed, 7 May 2025 16:16:48 +0000 (18:16 +0200)] 
Update .gitignore.

4 months agoUpdate to a newer gnulib.
Bruno Haible [Wed, 7 May 2025 11:42:11 +0000 (13:42 +0200)] 
Update to a newer gnulib.

5 months agointl-modula2: Try to fix a build failure on macOS.
Bruno Haible [Tue, 6 May 2025 15:51:58 +0000 (17:51 +0200)] 
intl-modula2: Try to fix a build failure on macOS.

* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LDFLAGS): Revert last
two commits. Instead, use -L and -l options.

5 months agotests: Avoid xgettext-git-1 failure on AIX.
Bruno Haible [Tue, 6 May 2025 08:01:07 +0000 (10:01 +0200)] 
tests: Avoid xgettext-git-1 failure on AIX.

* gettext-tools/tests/xgettext-git-1: Don't use shell pattern matching with
braces.

5 months agointl-modula2: Try to fix a build failure on macOS.
Bruno Haible [Mon, 5 May 2025 20:15:51 +0000 (22:15 +0200)] 
intl-modula2: Try to fix a build failure on macOS.

* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LIBADD): Avoid
automake error.

5 months agointl-modula2: Try to fix a build failure on macOS.
Bruno Haible [Mon, 5 May 2025 19:56:30 +0000 (21:56 +0200)] 
intl-modula2: Try to fix a build failure on macOS.

* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LIBADD): New variable.

5 months agoPACKAGING: Revisit intl-d and intl-modula2 packaging.
Bruno Haible [Mon, 5 May 2025 17:08:55 +0000 (19:08 +0200)] 
PACKAGING: Revisit intl-d and intl-modula2 packaging.

* PACKAGING: Suggest packaging libintl_d and libintl_m2 each in a separate
package.

5 months agoUpdate after gnulib changed.
Bruno Haible [Mon, 5 May 2025 16:55:39 +0000 (18:55 +0200)] 
Update after gnulib changed.

5 months agotests: Avoid xgettext-git-1 failure on native Windows.
Bruno Haible [Sun, 4 May 2025 23:31:34 +0000 (01:31 +0200)] 
tests: Avoid xgettext-git-1 failure on native Windows.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Mon, 5 May 2025 13:08:26 +0000 (15:08 +0200)] 
Update to the newest gnulib.

5 months agodoc: xgettext: More doc regarding --generated.
Bruno Haible [Mon, 5 May 2025 11:24:57 +0000 (13:24 +0200)] 
doc: xgettext: More doc regarding --generated.

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

* gettext-tools/doc/xgettext.texi: Mention the --generated option in the
--files-from description.

5 months agodoc: Update list of examples.
Bruno Haible [Mon, 5 May 2025 08:03:03 +0000 (10:03 +0200)] 
doc: Update list of examples.

* gettext-tools/doc/lang-c.texi: Update the list of examples.
* gettext-tools/doc/lang-ruby.texi: Mention the hello-ruby example.

5 months agotests: Avoid a lang-modula2 failure.
Bruno Haible [Mon, 5 May 2025 10:24:52 +0000 (12:24 +0200)] 
tests: Avoid a lang-modula2 failure.

* gettext-tools/tests/lang-modula2: Skip the test if gm2 is not working.

5 months agotests: Add a comment regarding a lang-modula2 failure.
Bruno Haible [Mon, 5 May 2025 01:00:58 +0000 (03:00 +0200)] 
tests: Add a comment regarding a lang-modula2 failure.

* gettext-tools/tests/lang-modula2: Add comment.

5 months agointl-modula2: Fix a build failure on Ubuntu 22.04.
Bruno Haible [Mon, 5 May 2025 01:00:00 +0000 (03:00 +0200)] 
intl-modula2: Fix a build failure on Ubuntu 22.04.

* gettext-runtime/configure.ac: Substitute M2SHLIBEXT.
* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LDFLAGS): Attempt
harder to find the libm2pim library.

5 months agobuild: Avoid possible problems due to AC_REQUIRE in if/else branches.
Bruno Haible [Sun, 4 May 2025 23:50:26 +0000 (01:50 +0200)] 
build: Avoid possible problems due to AC_REQUIRE in if/else branches.

* gettext-runtime/configure.ac: Use AS_IF when at least one of the if/else
branches invokes a complicated Autoconf macro.
* gettext-tools/configure.ac: Likewise.

5 months agoAvoid some clang -Wthread-safety-analysis warnings.
Bruno Haible [Sun, 4 May 2025 15:31:11 +0000 (17:31 +0200)] 
Avoid some clang -Wthread-safety-analysis warnings.

* gettext-tools/src/x-typescript-impl.h (sbru_init): Declare with
_GL_ATTRIBUTE_ACQUIRE_CAPABILITY.
(sbru_xdupfree_c): Declare with _GL_ATTRIBUTE_RELEASE_CAPABILITY.

5 months agoxgettext: Allow ignoring specific files in the POT-Creation-Date computation.
Bruno Haible [Sun, 4 May 2025 14:42:38 +0000 (16:42 +0200)] 
xgettext: Allow ignoring specific files in the POT-Creation-Date computation.

Reported by Vaclav Slavik <vaclav@slavik.io>
at <https://savannah.gnu.org/users/vslavik>.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add hashkey-string, set.
* gettext-tools/src/xgettext.c: Include gl_set.h, gl_xset.h, gl_hash_set.h,
hashkey-string.h.
(generated_files): New variables.
(long_options): New option '--generated'.
(main): Initialize generated_files. Handle the option '--generated'.
(usage): Document the option '--generated'.
(finalize_header): Filter out the generated_files from the file list.
* gettext-tools/doc/xgettext.texi: Document the option '--generated'.
* gettext-tools/tests/xgettext-git-1: Test the --generated option.
* NEWS: Mention the new option.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Sun, 4 May 2025 16:43:46 +0000 (18:43 +0200)] 
Update to the newest gnulib.

5 months agoUpdate release steps.
Bruno Haible [Sun, 4 May 2025 10:15:14 +0000 (12:15 +0200)] 
Update release steps.

5 months agodoc: Clarify that the minimum needed GCC version is 4.4.
Bruno Haible [Sat, 3 May 2025 11:08:11 +0000 (13:08 +0200)] 
doc: Clarify that the minimum needed GCC version is 4.4.

Rationale: With GCC version 4.1.2 or 4.2.1, all tree-sitter based extractors
in xgettext crash at runtime when compiled with optimization. Whereas
GCC 4.4.7 works fine.

* DEPENDENCIES: State "GCC 4.4 or newer".

5 months agoxgettext: D: Work around a gcc miscompilation bug.
Bruno Haible [Sat, 3 May 2025 01:51:49 +0000 (03:51 +0200)] 
xgettext: D: Work around a gcc miscompilation bug.

* gettext-tools/build-aux/tree-sitter-d-optimization-bug.diff: New file.
* autopull.sh: Apply it.

5 months agoMerge from 0.24.x branch: Prepare for 0.24.1 release.
Bruno Haible [Fri, 2 May 2025 15:19:48 +0000 (17:19 +0200)] 
Merge from 0.24.x branch: Prepare for 0.24.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-tools/misc/autopoint.in: Likewise. Accept version 0.24.1.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.24.1.

5 months agobuild: Update after recent gettextize fix.
Bruno Haible [Fri, 2 May 2025 16:30:05 +0000 (18:30 +0200)] 
build: Update after recent gettextize fix.

* gettext-tools/misc/add-to-archive: Look up the *.m4 files in
$datadir/gettext/m4, not $datadir/aclocal.

5 months agoxgettext: Give a hint about --no-git when max_vc_mtime() took more than 10 sec.
Bruno Haible [Fri, 2 May 2025 15:02:17 +0000 (17:02 +0200)] 
xgettext: Give a hint about --no-git when max_vc_mtime() took more than 10 sec.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add getrusage.
* gettext-tools/src/xgettext.c: Include <sys/resource.h>.
(max_mtime): New function.
(finalize_header): Invoke it.

5 months agoxgettext: Add an option to opt-out of the use of git for the POT-Creation-Date.
Bruno Haible [Fri, 2 May 2025 14:06:45 +0000 (16:06 +0200)] 
xgettext: Add an option to opt-out of the use of git for the POT-Creation-Date.

Reported by Serhii Tereshchenko at <https://savannah.gnu.org/bugs/?66865>.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add stat-time.
* gettext-tools/src/xgettext.c: Include stat-time.h.
(xgettext_no_git): New variable.
(long_options): Add option '--no-git'.
(main): Handle the option --no-git.
(usage): Document the option --no-git.
(struct accumulator): New type, copied from gnulib/lib/vc-mtime.c.
(accumulate): New function, copied from gnulib/lib/vc-mtime.c.
(max_mtime_without_git): New function, based on gnulib/lib/vc-mtime.c.
(finalize_header): Conditionally invoke max_mtime_without_git instead of
max_vc_mtime.
* gettext-tools/doc/xgettext.texi: Document the option --no-git.
* NEWS: Mention the change.

5 months agotests: Fix test failure with git versions < 2.23.
Bruno Haible [Fri, 2 May 2025 10:35:39 +0000 (12:35 +0200)] 
tests: Fix test failure with git versions < 2.23.

* gettext-tools/tests/xgettext-git-1: Use 'git checkout' instead of
'git restore'.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Fri, 2 May 2025 13:27:52 +0000 (15:27 +0200)] 
Update to the newest gnulib.

5 months agoxgettext: Speed up the computation of the POT-Creation-Date.
Bruno Haible [Thu, 1 May 2025 22:45:01 +0000 (00:45 +0200)] 
xgettext: Speed up the computation of the POT-Creation-Date.

Reported by Serhii Tereshchenko, Arthur, Adam YS, Foucauld Degeorges
at <https://savannah.gnu.org/bugs/?66865>.

* gettext-tools/src/xgettext.c (has_some_mtimes, max_of_mtimes, some_mtimes_failed): Remove variables.
(files_for_vc_mtime): New variable.
(main): Initialize files_for_vc_mtime. Update files_for_vc_mtime instead of calling consider_vc_mtime.
(consider_vc_mtime): Remove function.
(read_exclusion_file, extract_from_file, extract_from_xml_file): Update files_for_vc_mtime instead of calling consider_vc_mtime.
(finalize_header): Call max_vc_mtime.
* NEWS: Mention the speedup.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 1 May 2025 23:11:50 +0000 (01:11 +0200)] 
Update to the newest gnulib.

5 months agotests: Add a test for xgettext's computation of the POT-Creation-Date.
Bruno Haible [Thu, 1 May 2025 22:38:57 +0000 (00:38 +0200)] 
tests: Add a test for xgettext's computation of the POT-Creation-Date.

* gettext-tools/tests/testdata/repo.tar.gz: New file.
* gettext-tools/tests/xgettext-git-1: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
(EXTRA_DIST): Add testdata/repo.tar.gz.

5 months agobuild: Take the mem-hash-map module from Gnulib now, part 2.
Bruno Haible [Wed, 30 Apr 2025 14:43:06 +0000 (16:43 +0200)] 
build: Take the mem-hash-map module from Gnulib now, part 2.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add next-prime.
* gettext-tools/src/write-mo.c: Include next-prime.h.
* gettext-tools/src/write-qt.c: Likewise.

5 months agobuild: Take the mem-hash-map module from Gnulib now.
Bruno Haible [Wed, 30 Apr 2025 11:26:57 +0000 (13:26 +0200)] 
build: Take the mem-hash-map module from Gnulib now.

* gnulib-local/lib/mem-hash-map.h: Remove file.
* gnulib-local/lib/mem-hash-map.c: Remove file.
* gnulib-local/modules/mem-hash-map: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Wed, 30 Apr 2025 01:52:29 +0000 (03:52 +0200)] 
Update to the newest gnulib.

* gnulib-local/lib/hash.h.diff: Remove file.
* gnulib-local/lib/hash.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* autogen.sh: Avoid module hashcode-string1.

5 months agobuild: Ignore -Wduplicated-branches warnings.
Bruno Haible [Tue, 29 Apr 2025 00:15:55 +0000 (02:15 +0200)] 
build: Ignore -Wduplicated-branches warnings.

* m4/more-warnings.m4 (gt_MORE_WARNINGS): Don't add the -Wduplicated-branches
option.

5 months agoModula-2: Fix linking of libintl_m2 on non-ELF platforms.
Bruno Haible [Mon, 28 Apr 2025 15:11:13 +0000 (17:11 +0200)] 
Modula-2: Fix linking of libintl_m2 on non-ELF platforms.

* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LDFLAGS): Link with
libm2pim.la.

5 months agotests: Support older GNU Modula-2 compilers.
Bruno Haible [Mon, 28 Apr 2025 14:22:32 +0000 (16:22 +0200)] 
tests: Support older GNU Modula-2 compilers.

* gettext-tools/tests/lang-modula2: Don't use the option -fscaffold-main.

5 months agoModula-2 support: Simplify build system.
Bruno Haible [Fri, 25 Apr 2025 14:47:51 +0000 (16:47 +0200)] 
Modula-2 support: Simplify build system.

* gettext-runtime/intl-modula2/Makefile.am (nodist_m2include_HEADERS): New
variable.
(installdirs-modula2-sources, uninstall-modula2-sources): Remove rules.
(install-data-local, installdirs-local, uninstall-local): Remove dependencies.

5 months agoModula-2 support: Fix VPATH builds.
Bruno Haible [Fri, 25 Apr 2025 12:29:20 +0000 (14:29 +0200)] 
Modula-2 support: Fix VPATH builds.

* gettext-runtime/intl-modula2/Makefile.am (install-modula2-sources): Take
Libintl.def from the build dir, not from the source dir.
* gettext-tools/tests/lang-modula2: Search for Libintl.def in the build dir,
not in the source dir.

5 months agoexamples: Add hello-modula2 example.
Bruno Haible [Fri, 25 Apr 2025 08:15:08 +0000 (10:15 +0200)] 
examples: Add hello-modula2 example.

* gettext-tools/examples/hello-modula2/INSTALL: New file.
* gettext-tools/examples/hello-modula2/autogen.sh: New file.
* gettext-tools/examples/hello-modula2/autoclean.sh: New file.
* gettext-tools/examples/hello-modula2/hello.mod.in: New file.
* gettext-tools/examples/hello-modula2/Makefile.am: New file.
* gettext-tools/examples/hello-modula2/configure.ac: New file.
* gettext-tools/examples/hello-modula2/m4/Makefile.am: New file.
* gettext-tools/examples/hello-modula2/po/LINGUAS: New file.
* gettext-tools/examples/hello-modula2/po/Makefile.am: New file.
* gettext-tools/examples/installpaths.in: Define also libdir.
* gettext-tools/m4/Makefile.am (examplesbuildaux_DATA): Add modula2comp.m4.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Add
hello-modula2.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS): Update for
hello-modula2.
(hello-modula2.pot): New target.
(SMALLPOFILES_FOR_lang): Update for hello-modula2.
($(srcdir)/../hello-modula2/po/$(LL).po): New rule.
* gettext-tools/examples/check-examples (func_check_autoclean_all,
func_check_distclean_all, func_check_maintainerclean_all,
func_check_maintainerclean_vpath_all, func_check_dist_all,
func_check_dist_vpath_all, func_check_install_all, func_check_uninstall_all,
func_check_distcheck_all, func_check_all): Handle hello-modula2 as well.
* gettext-tools/examples/README: Mention hello-modula2.
* gettext-tools/doc/lang-modula2.texi: Likewise.
* NEWS: Likewise.

5 months agoModula-2 support: Add a unit test.
Bruno Haible [Fri, 25 Apr 2025 01:18:15 +0000 (03:18 +0200)] 
Modula-2 support: Add a unit test.

* autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Add modula2, modula2comp-script.
* gettext-tools/configure.ac: Set and substitute BUILDMODULA2.
* gettext-tools/tests/init-env.in: Propagate MODULA2_CHOICE, BUILDMODULA2, M2C,
M2FLAGS.
* gettext-tools/tests/lang-modula2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

5 months agoModula-2 support: Add Modula-2 support in the tools.
Bruno Haible [Thu, 24 Apr 2025 23:45:56 +0000 (01:45 +0200)] 
Modula-2 support: Add Modula-2 support in the tools.

* gettext-tools/doc/lang-modula2.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* gettext-tools/doc/gettext.texi (PO Files): Mention modula2-format.
(No string concatenation): Mention string concatenation in Modula-2.
(Translators for other Languages): New subsection "Modula-2 Format Strings".
(List of Programming Languages): Include lang-modula2.texi.
* gettext-tools/doc/xgettext.texi: Document the -L Modula-2 option.
* gettext-tools/src/message.h (format_modula2): New enum value.
(NFORMATS): Increment.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add an
entry for format_modula2.
* gettext-tools/src/format-modula2.c: New file.
* gettext-tools/src/format.h (formatstring_modula2): New declaration.
* gettext-tools/src/format.c (formatstring_parsers): Add formatstring_modula2.
* gettext-tools/src/x-modula2.h: New file.
* gettext-tools/src/x-modula2.c: New file.
* gettext-tools/src/xgettext.c: Include x-modula2.h.
(flag_table_modula2): New variable.
(main): Invoke init_flag_table_modula2, x_modula2_extract_all,
x_modula2_keyword.
(usage): Document the -L Modula-2 option.
(xgettext_record_flag): Support format_modula2.
(language_to_extractor, extension_to_language): Support Modula-2.
* gettext-tools/src/FILES: Mention format-modula2.c, x-modula2.h, x-modula2.c.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add x-modula2.h.
(FORMAT_SOURCE): Add format-modula2.c.
(xgettext_SOURCES): Add x-modula2.c.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add
format-modula2.c.
* gettext-tools/po/POTFILES.in: Add src/format-modula2.c, src/x-modula2.c.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_modula2.
* gettext-tools/tests/format-modula2-1: New file.
* gettext-tools/tests/format-modula2-2: New file.
* gettext-tools/tests/xgettext-modula2-1: New file.
* gettext-tools/tests/xgettext-modula2-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add the new tests.
* NEWS: Mention the Modula-2 support.

5 months agoModula-2 support: Add the runtime library.
Bruno Haible [Thu, 24 Apr 2025 23:33:16 +0000 (01:33 +0200)] 
Modula-2 support: Add the runtime library.

* gnulib-local/m4/modula2.m4: New file.
* gnulib-local/modules/modula2: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add modula2.m4 and the 'modula2'
module.
* autogen.sh (GNULIB_MODULES_RUNTIME_OTHER): Add modula2, modula2comp-script.
* gettext-runtime/intl-modula2/Libintl.def.in: New file.
* gettext-runtime/intl-modula2/Libintl.mod: New file.
* gettext-runtime/intl-modula2/LibintlFromC.def: New file.
* gettext-runtime/intl-modula2/Makefile.am: New file.
* gettext-runtime/intl-modula2/HACKING: New file.
* gettext-runtime/configure.ac: Invoke gt_MODULA2_CHOICE, gt_MODULA2COMP.
Determine VALUE_OF_LC_* for each LC_* constant. Set the variable BUILDMODULA2
and the Automake conditional BUILD_MODULA2.
* gettext-runtime/Makefile.am (SUBDIRS): Add intl-modula2.
* NEWS: Mention libintl_m2.so.
* gettext-runtime/NEWS: Likewise.
* PACKAGING: Add the interface and binary for the libintl_m2 library.
* DEPENDENCIES: Mention the Modula-2 compiler and runtime.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 24 Apr 2025 23:32:57 +0000 (01:32 +0200)] 
Update to the newest gnulib.

5 months agoexamples: Fix the D example.
Bruno Haible [Thu, 24 Apr 2025 23:30:07 +0000 (01:30 +0200)] 
examples: Fix the D example.

* gettext-tools/Makefile.am (examplesbuildaux_DATA): Add dcomp.sh.in.
* gettext-tools/m4/Makefile.am (examplesbuildaux_DATA): Add dcomp.m4.

5 months agoexamples: Fix the Go examples.
Bruno Haible [Thu, 24 Apr 2025 23:28:42 +0000 (01:28 +0200)] 
examples: Fix the Go examples.

* gettext-tools/Makefile.am (examplesbuildaux_DATA): Add gocomp.sh.in.
* gettext-tools/m4/Makefile.am (examplesbuildaux_DATA): Add gocomp.m4.

5 months agoexamples: Fix the C# examples.
Bruno Haible [Thu, 24 Apr 2025 23:25:08 +0000 (01:25 +0200)] 
examples: Fix the C# examples.

* gettext-tools/m4/Makefile.am (examplesbuildaux_DATA): Add csharp.m4.

5 months agoexamples: Fix reference to examples/build-aux/ directory (regr. 2005-03-22).
Bruno Haible [Thu, 24 Apr 2025 23:22:41 +0000 (01:22 +0200)] 
examples: Fix reference to examples/build-aux/ directory (regr. 2005-03-22).

* gettext-tools/examples/installpaths.in (EXAMPLESCONFIGDIR): Correct value.

5 months agotests: Fix the lang-d test.
Bruno Haible [Thu, 24 Apr 2025 23:13:11 +0000 (01:13 +0200)] 
tests: Fix the lang-d test.

* gettext-tools/tests/lang-d: Reencode in ISO-8859-1 encoding.

5 months agointl: Export libintl_{new,dup,free}locale from libintl.so on OpenBSD.
Bruno Haible [Thu, 24 Apr 2025 20:31:40 +0000 (22:31 +0200)] 
intl: Export libintl_{new,dup,free}locale from libintl.so on OpenBSD.

Reported by Christian Weisgerber <naddy@mips.inka.de>.

* gnulib-local/lib/getlocalename_l-unsafe.c.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add it.
* gettext-runtime/intl/configure.ac (rpl_newlocale, rpl_duplocale,
rpl_freelocale): Redirect to symbols prefixed with 'libintl_', not '_libintl_'.
* gettext-runtime/intl/Makefile.am (BUILT_SOURCES): Add libgnuintl.h.

5 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 24 Apr 2025 20:13:55 +0000 (22:13 +0200)] 
Update to the newest gnulib.

5 months agoxgettext: D: Allow comments between the parts of concatenated string literals.
Bruno Haible [Wed, 23 Apr 2025 17:50:04 +0000 (19:50 +0200)] 
xgettext: D: Allow comments between the parts of concatenated string literals.

* gettext-tools/src/x-d.c (is_add_expression_with_tilde): New function.
(is_string_literal, string_literal_accumulate_pieces): Use it.
* gettext-tools/tests/xgettext-d-2: Add another test case regarding string
concatenation.

5 months agoxgettext: Go: More unit tests.
Bruno Haible [Wed, 23 Apr 2025 16:54:41 +0000 (18:54 +0200)] 
xgettext: Go: More unit tests.

* gettext-tools/tests/xgettext-go-6: Add more test cases regarding string
concatenation.

5 months agoRefactor: Make format-lua.c more similar to format-elisp.c.
Bruno Haible [Wed, 23 Apr 2025 14:50:34 +0000 (16:50 +0200)] 
Refactor: Make format-lua.c more similar to format-elisp.c.

* gettext-tools/src/format-lua.c (format_parse): Allocate the final spec on the
heap only once parsing was successful.

5 months agobuild: Simplify.
Bruno Haible [Tue, 22 Apr 2025 13:28:41 +0000 (15:28 +0200)] 
build: Simplify.

* gettext-runtime/configure.ac: Don't test whether setlocale exists.

5 months agoUpdate after gnulib changed.
Bruno Haible [Wed, 16 Apr 2025 14:29:46 +0000 (16:29 +0200)] 
Update after gnulib changed.

* gitsub.sh: Update from gnulib.

5 months agoUpdate after gnulib changed.
Bruno Haible [Tue, 15 Apr 2025 11:17:58 +0000 (13:17 +0200)] 
Update after gnulib changed.

* libtextstyle/autogen.sh: Don't avoid module 'locale-h'. vasnprintf now needs
localeconv, and localeconv depends on locale-h.

5 months agobuild: Simplify D configuration-time support.
Bruno Haible [Tue, 15 Apr 2025 10:58:43 +0000 (12:58 +0200)] 
build: Simplify D configuration-time support.

* gettext-runtime/configure.ac: Don't search for the D compiler a second time
(already done by gt_DCOMP).
* gettext-tools/configure.ac: Likewise.

6 months agobuild: Simplify last commit.
Bruno Haible [Wed, 2 Apr 2025 12:47:40 +0000 (14:47 +0200)] 
build: Simplify last commit.

* gettext-tools/src/Makefile.am (LIBXGETTEXTX): Remove variable.

6 months agobuild: Make it possible to compile x-go.c with GCC 11 in 1 GB of RAM.
Bruno Haible [Wed, 2 Apr 2025 12:39:28 +0000 (14:39 +0200)] 
build: Make it possible to compile x-go.c with GCC 11 in 1 GB of RAM.

* gettext-tools/src/Makefile.am (LIBXGETTEXTX, libxgettextx_a_SOURCES,
libxgettextx_a_CPPFLAGS, libxgettextx_a_CFLAGS): New variables.
(xgettext_SOURCES): Remove x-go.c.
(noinst_LIBRARIES, xgettext_LDADD, xgettext_DEPENDENCIES): Add $(LIBXGETTEXTX).

6 months agobuild: Make it possible to compile tree-sitter with GCC 11 in 1 GB of RAM.
Bruno Haible [Wed, 2 Apr 2025 12:13:47 +0000 (14:13 +0200)] 
build: Make it possible to compile tree-sitter with GCC 11 in 1 GB of RAM.

* gettext-tools/src/Makefile.am (libxgettextts1_a_CFLAGS,
libxgettextts2_a_CFLAGS, libxgettextts3_a_CFLAGS, libxgettextts4_a_CFLAGS): New
variables.

6 months agogettextize: Fix last commit.
Bruno Haible [Wed, 2 Apr 2025 12:08:22 +0000 (14:08 +0200)] 
gettextize: Fix last commit.

* gettext-tools/m4/Makefile.am (OLD_M4_FILES): New variable.
(uninstall-macros): Delete only these files from @aclocaldir@.

6 months agogettextize: Fix bad interactions between autoreconf and autopoint.
Bruno Haible [Wed, 2 Apr 2025 12:07:39 +0000 (14:07 +0200)] 
gettextize: Fix bad interactions between autoreconf and autopoint.

Reported by Sebastian Pipping <sebastian@pipping.org>
in <https://savannah.gnu.org/bugs/index.php?66968>.

* gettext-tools/m4/Makefile.am (aclocaldir): Remove variable.
(pkgdatadir, macrosdir): Add variables.
(macros_DATA): Renamed from aclocal_DATA.
(install-data-local, uninstall-local, uninstall-macros): New targets.
* gettext-tools/misc/gettextize.in: Copy the *.m4 files from
$datadir/gettext/m4, not from $datadir/aclocal.
* gettext-tools/doc/gettext.texi (aclocal): Don't recommend to add option
--install to ACLOCAL_MFLAGS. Instead, recommend one-time use of --system-acdir.
* PACKAGING: Expect *.m4 files in $prefix/share/gettext/m4, not in
$prefix/share/aclocal.
* NEWS: Mention the fix.

6 months agoexamples: Add hello-d example.
Bruno Haible [Tue, 1 Apr 2025 21:11:13 +0000 (23:11 +0200)] 
examples: Add hello-d example.

* gettext-tools/examples/hello-d/INSTALL: New file.
* gettext-tools/examples/hello-d/autogen.sh: New file.
* gettext-tools/examples/hello-d/autoclean.sh: New file.
* gettext-tools/examples/hello-d/hello.d.in: New file.
* gettext-tools/examples/hello-d/Makefile.am: New file.
* gettext-tools/examples/hello-d/configure.ac: New file.
* gettext-tools/examples/hello-d/m4/Makefile.am: New file.
* gettext-tools/examples/hello-d/po/LINGUAS: New file.
* gettext-tools/examples/hello-d/po/Makefile.am: New file.
* gettext-tools/examples/installpaths.in: Define also includedir.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Add hello-d.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS): Update for hello-d.
(hello-d.pot): New target.
(SMALLPOFILES_FOR_lang): Update for hello-d.
($(srcdir)/../hello-d/po/$(LL).po): New rule.
* gettext-tools/examples/check-examples (func_check_autoclean_all,
func_check_distclean_all, func_check_maintainerclean_all,
func_check_maintainerclean_vpath_all, func_check_dist_all,
func_check_dist_vpath_all, func_check_install_all, func_check_uninstall_all,
func_check_distcheck_all, func_check_all): Handle hello-d as well.
* gettext-tools/examples/README: Mention hello-d.
* gettext-tools/doc/lang-d.texi: Likewise.
* NEWS: Likewise.

6 months agoD support: Add a unit test.
Bruno Haible [Tue, 1 Apr 2025 15:20:31 +0000 (17:20 +0200)] 
D support: Add a unit test.

* autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Add d, dcomp-script.
* gettext-tools/configure.ac: Set and substitute BUILDD.
* gettext-tools/tests/init-env.in: Propagate D_CHOICE, BUILDD.
* gettext-tools/tests/lang-d: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

6 months agoD support: Add D support in the tools.
Bruno Haible [Tue, 1 Apr 2025 09:51:08 +0000 (11:51 +0200)] 
D support: Add D support in the tools.

* autopull.sh: Check out tree-sitter-d. Set TREE_SITTER_D_VERSION.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add unistr/u16-check,
unistr/u16-to-u8, unistr/u32-check, unistr/u32-to-u8.
* gettext-tools/build-aux/tree-sitter-d-portability.diff: New file.
* gettext-tools/configure.ac: Set TREE_SITTER_D_VERSION.
* gettext-tools/Makefile.am (EXTRA_DIST): Add the tree-sitter-d source code and
patch.
* gettext-tools/doc/lang-d.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* gettext-tools/doc/gettext.texi (PO Files): Mention d-format.
(No string concatenation): Mention string concatenation and string interpolation
in D.
(Translators for other Languages): New subsection "D Format Strings".
(List of Programming Languages): Include lang-d.texi.
* gettext-tools/doc/xgettext.texi: Document the -L D option.
* gettext-tools/src/message.h (format_d): New enum value.
(NFORMATS): Increment.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add an
entry for format_d.
* gettext-tools/src/format-d.c: New file, based on
gettext-tools/src/format-lisp.c.
* gettext-tools/src/format.h (formatstring_d): New declaration.
* gettext-tools/src/format.c (formatstring_parsers): Add formatstring_d.
* gettext-tools/src/x-d.h: New file.
* gettext-tools/src/x-d.c: New file, based on gettext-tools/src/x-rust.c and
gettext-tools/src/x-go.c.
* gettext-tools/src/html5-entities.h: New file.
* gettext-tools/src/xgettext.c: Include x-d.h.
(flag_table_d): New variable.
(main): Invoke init_flag_table_d, x_d_extract_all, x_d_keyword.
(usage): Document the -L D option.
(xgettext_record_flag): Support format_d.
(language_to_extractor, extension_to_language): Support D.
* gettext-tools/src/xg-message.c (decide_is_format, remember_a_message_plural):
Add better heuristic for c-format and d-format.
* gettext-tools/src/FILES: Mention format-d.c, x-d.h, x-d.c, html5-entities.h.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add x-d.h, html5-entities.h.
(FORMAT_SOURCE): Add format-d.c.
(libxgettextts2_a_SOURCES): Add d-parser.c, d-scanner.c.
(xgettext_SOURCES): Add x-d.c.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add
format-d.c.
* gettext-tools/po/POTFILES.in: Add src/format-d.c, src/x-d.c.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_d.
* gettext-tools/tests/format-d-1: New file.
* gettext-tools/tests/format-d-2: New file.
* gettext-tools/tests/xgettext-d-1: New file.
* gettext-tools/tests/xgettext-d-2: New file.
* gettext-tools/tests/xgettext-d-3: New file.
* gettext-tools/tests/xgettext-d-4: New file.
* gettext-tools/tests/xgettext-d-5: New file, based on
gettext-tools/tests/xgettext-rust-5.
* gettext-tools/tests/xgettext-d-6: New file, based on
gettext-tools/tests/xgettext-rust-7.
* gettext-tools/tests/testdata/dprog.utf-8.d: New file.
* gettext-tools/tests/testdata/dprog.utf-8+bom.d: New file, based on
gettext-tools/tests/testdata/dprog.utf-8.d.
* gettext-tools/tests/testdata/dprog.utf-16be.d: New file, based on
gettext-tools/tests/testdata/dprog.utf-8.d.
* gettext-tools/tests/testdata/dprog.utf-16le.d: New file, based on
gettext-tools/tests/testdata/dprog.utf-8.d.
* gettext-tools/tests/testdata/dprog.utf-32be.d: New file, based on
gettext-tools/tests/testdata/dprog.utf-8.d.
* gettext-tools/tests/testdata/dprog.utf-32le.d: New file, based on
gettext-tools/tests/testdata/dprog.utf-8.d.
* gettext-tools/tests/Makefile.am (TESTS): Add the new tests.
(EXTRA_DIST): Add the new testdata files.
* NEWS: Mention the D support.

6 months agoD support: Add the runtime library.
Bruno Haible [Tue, 1 Apr 2025 00:18:40 +0000 (02:18 +0200)] 
D support: Add the runtime library.

* gnulib-local/m4/d.m4: New file.
* gnulib-local/modules/d: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add d.m4 and the 'd' module.
* autogen.sh (GNULIB_MODULES_RUNTIME_OTHER): Add d, dcomp-script.
* gettext-runtime/intl-d/Makefile.am: New file.
* gettext-runtime/intl-d/gnu/libintl/package.d: New file.
* gettext-runtime/intl-d/gnu/libintl/libintl.d: New file.
* gettext-runtime/intl-d/gnu/libintl/internal/low.d: New file.
* gettext-runtime/configure.ac: Invoke gt_D_CHOICE, gt_DCOMP. Set the variable
BUILDD and the Automake conditional BUILD_D.
* gettext-runtime/Makefile.am (SUBDIRS): Add intl-d.
* NEWS: Mention libintl_d.a.
* gettext-runtime/NEWS: Likewise.
* PACKAGING: Add the sources and binary for the libintl_d library.
* DEPENDENCIES: Mention the D compiler and runtime.

6 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 1 Apr 2025 00:25:15 +0000 (02:25 +0200)] 
Update to the newest gnulib.

6 months agoObjective-C: xgettext: Strengthen tests.
Bruno Haible [Thu, 27 Mar 2025 18:09:57 +0000 (19:09 +0100)] 
Objective-C: xgettext: Strengthen tests.

* gettext-tools/tests/xgettext-objc-1: Add test cases with format strings.

6 months agodoc: Small updates.
Bruno Haible [Tue, 25 Mar 2025 21:38:49 +0000 (22:38 +0100)] 
doc: Small updates.

Reported by Michael Chirico <michaelchirico4@gmail.com>.

* gettext-tools/doc/gettext.texi (The LANGUAGE variable): Rephrase
recommendation for Norwegian users.
(Header Entry): Remove statement about old versions of Emacs.

6 months agoRefactor: Use more of c-ctype.h.
Bruno Haible [Sun, 23 Mar 2025 19:17:56 +0000 (20:17 +0100)] 
Refactor: Use more of c-ctype.h.

* gettext-tools/src/format-awk.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-boost.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-c-parse.h (isdigit): Remove macro.
(format_parse_entrails): Use c_isdigit instead.
* gettext-tools/src/format-c++-brace.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-elisp.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-gcc-internal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-gfc-internal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-go.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-java-printf.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-javascript.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-librep.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-lua.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-pascal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-perl.c (isdigit): Remove macro.
(c_isnonzerodigit): Renamed from isnonzerodigit.
(format_parse): Use c_isdigit instead of isdigit.
* gettext-tools/src/format-php.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-python.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-ruby.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-tcl.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.

6 months agoComment cleanup.
Bruno Haible [Sun, 23 Mar 2025 18:39:28 +0000 (19:39 +0100)] 
Comment cleanup.

* gettext-tools/src/format-rust.c: Remove obsolete comment.

6 months agoUpdate after gnulib changed.
Bruno Haible [Sat, 22 Mar 2025 12:20:36 +0000 (13:20 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/setlocale.c: Include setlocale-fixes.h instead of
setlocale-messages.h.
(setlocale_unixlike) [__ANDROID__]: Use setlocale_fixed instead of setlocale.
(setlocale_improved): On Android, use setlocale_fixed_null instead of setlocale.

6 months agoUpdate to the newest gnulib.
Bruno Haible [Sat, 22 Mar 2025 12:20:27 +0000 (13:20 +0100)] 
Update to the newest gnulib.

6 months agoAvoid bit rot of unused code.
Bruno Haible [Fri, 21 Mar 2025 22:55:42 +0000 (23:55 +0100)] 
Avoid bit rot of unused code.

* gettext-tools/src/format-lisp.c: Include attribute.h.
(intersection): Mark with MAYBE_UNUSED instead of '#ifdef unused'.
* gettext-tools/src/format-scheme.c (intersection): Likewise.
* gettext-tools/src/x-csharp.c (phase5_ungetc): Likewise.
* gettext-tools/src/x-php.c (phase3_ungetc): Likewise.

6 months agoSimplify strtoul() invocation.
Bruno Haible [Fri, 21 Mar 2025 21:37:12 +0000 (22:37 +0100)] 
Simplify strtoul() invocation.

* gnulib-local/lib/markup.c: Don't include <errno.h>.
(unescape_string_inplace): Don't reset or test errno.

6 months agoWork around an strtoul() misfeature.
Bruno Haible [Fri, 21 Mar 2025 18:44:33 +0000 (19:44 +0100)] 
Work around an strtoul() misfeature.

* gettext-runtime/src/ngettext.c: Include <ctype.h>.
(main): When parsing a nonnegative number, disallow leading whitespace and sign.
* gettext-tools/tests/tstngettext.c: Include <ctype.h>.
(worker_thread): When parsing a nonnegative number, disallow leading whitespace
and sign.
* gnulib-local/lib/markup.c (unescape_string_inplace): When parsing a numeric
character entity, disallow leading whitespace and sign, and report a too large
number as "non-permitted character" rather than "Numerical result out of range".
* gettext-tools/src/msgfmt.c (main): When parsing the '-a' argument, disallow
leading whitespace and sign and check whether the value is a power of 2.
* gettext-tools/src/read-stringtable.c: Include c-ctype.h.
(comment_line_end): When parsing a line number, disallow leading whitespace and
sign.

6 months agoRefactor.
Bruno Haible [Thu, 20 Mar 2025 16:04:11 +0000 (17:04 +0100)] 
Refactor.

* gettext-tools/src/x-rust.c (ts_language_symbol, ts_language_field): Follow GNU
coding style.
* gettext-tools/src/x-go.c (ts_language_symbol, ts_language_field): Likewise.
* gettext-tools/src/x-typescript-impl.h (ts_language_symbol, ts_language_field):
Likewise.

6 months agoMakevars template: Fix small mistake.
Bruno Haible [Thu, 20 Mar 2025 11:02:45 +0000 (12:02 +0100)] 
Makevars template: Fix small mistake.

* gettext-tools/po/Makevars.template: Correct statement about copyright.
* gettext-runtime/po/Makevars: Likewise.
* gettext-tools/po/Makevars: Likewise.
* gettext-tools/examples/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-*/po/Makevars: Likewise.
* gettext-tools/examples/hello-*/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile: Likewise.

6 months agodoc: Fix small mistake.
Bruno Haible [Thu, 20 Mar 2025 10:48:58 +0000 (11:48 +0100)] 
doc: Fix small mistake.

* gettext-tools/doc/xgettext.texi: Correct statement about copyright.

6 months agodoc: Mention strings with embedded expressions in TypeScript.
Bruno Haible [Tue, 11 Mar 2025 13:52:02 +0000 (14:52 +0100)] 
doc: Mention strings with embedded expressions in TypeScript.

* gettext-tools/doc/gettext.texi (No string concatenation): Mention
"template literals" in TypeScript.