]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
3 months agoRelease 0.24.2 0.24.x v0.24.2
Bruno Haible [Tue, 1 Jul 2025 22:04:50 +0000 (00:04 +0200)] 
Release 0.24.2

3 months agoPrepare for 0.24.2 release.
Bruno Haible [Tue, 1 Jul 2025 21:17:01 +0000 (23:17 +0200)] 
Prepare for 0.24.2 release.

* gettext-tools/misc/autopoint.in: Accept versions 0.23.2, 0.24.2.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.24.2.
* 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:47:42 +0000 (19:47 +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:30:18 +0000 (21:30 +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 19:30:14 +0000 (21:30 +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,
hash-map-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:30:10 +0000 (21:30 +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-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 *'.

4 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 5 Jun 2025 19:29:55 +0000 (21:29 +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:29:52 +0000 (21:29 +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.

5 months agoRelease 0.24.1 v0.24.1
Bruno Haible [Fri, 2 May 2025 17:34:56 +0000 (19:34 +0200)] 
Release 0.24.1

5 months agoUpdate translations from TP.
Bruno Haible [Fri, 2 May 2025 16:00:15 +0000 (18:00 +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.

5 months agoPrepare for 0.24.1 release.
Bruno Haible [Fri, 2 May 2025 15:19:48 +0000 (17:19 +0200)] 
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 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 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 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 after gnulib changed.
Bruno Haible [Thu, 24 Apr 2025 13:41:01 +0000 (15:41 +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 agoUpdate after gnulib changed.
Bruno Haible [Thu, 24 Apr 2025 14:15:24 +0000 (16:15 +0200)] 
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.

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

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:11 +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): New variables.

6 months agogettextize: Fix last commit.
Bruno Haible [Tue, 1 Apr 2025 18:48:06 +0000 (20:48 +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 [Tue, 1 Apr 2025 14:16:18 +0000 (16:16 +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.

7 months agoRelease 0.24 v0.24
Bruno Haible [Tue, 25 Feb 2025 13:44:17 +0000 (14:44 +0100)] 
Release 0.24

7 months agoexamples: Use infrastructure from gettext version 0.24.
Bruno Haible [Tue, 25 Feb 2025 12:41:30 +0000 (13:41 +0100)] 
examples: Use infrastructure from gettext version 0.24.

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

7 months agoexamples: Make hello-rust pass the check.
Bruno Haible [Tue, 25 Feb 2025 12:39:56 +0000 (13:39 +0100)] 
examples: Make hello-rust pass the check.

* gettext-tools/examples/check-examples (func_check_dist): Ignore the
till-present 'target' directory in hello-rust.
(func_check_dist_vpath): Likewise.

7 months agoexamples: Fix hello-c++-gnome3.
Bruno Haible [Tue, 25 Feb 2025 11:19:17 +0000 (12:19 +0100)] 
examples: Fix hello-c++-gnome3.

* gettext-tools/examples/hello-c++-gnome3/autoclean.sh: Remove po/Makefile.in.in.

7 months agoUpdate translations from TP.
Bruno Haible [Tue, 25 Feb 2025 10:10:15 +0000 (11:10 +0100)] 
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.

7 months agoPrepare for 0.24 release.
Bruno Haible [Tue, 25 Feb 2025 10:04:01 +0000 (11:04 +0100)] 
Prepare for 0.24 release.

* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* gettext-runtime/m4/gettext.m4: Update comments.
* gettext-runtime/m4/nls.m4: Likewise.
* gettext-runtime/m4/progtest.m4: Likewise.
* 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:3:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:4:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:13: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.24.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.24.
* NEWS: Update.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 25 Feb 2025 08:55:24 +0000 (09:55 +0100)] 
Update to the newest gnulib.

7 months agoxgettext: Implement a "reproducible" POT-Creation-Date value.
Bruno Haible [Mon, 24 Feb 2025 19:44:30 +0000 (20:44 +0100)] 
xgettext: Implement a "reproducible" POT-Creation-Date value.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add vc-mtime.
* gettext-tools/src/xgettext.c: Include vc-mtime.h, msgl-header.h.
(has_some_mtimes, max_of_mtimes, some_mtimes_failed): New variables.
(long_options): Add --reference option.
(main): Implement --reference option. Invoke consider_vc_mtime for the
--files-from option.
(usage): Document the --reference option.
(consider_vc_mtime): New function.
(read_exclusion_file, extract_from_file, extract_from_xml_file: Invoke
consider_vc_mtime.
(construct_header): Don't compute the value of POT-Creation-Date here.
(finalize_header): Compute it here.
* gettext-tools/doc/xgettext.texi: Document the --reference option.
* NEWS: Mention the change.

7 months agoUpdate after gnulib changed.
Bruno Haible [Sun, 23 Feb 2025 06:38:50 +0000 (07:38 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/setlocale.c: Include setlocale-messages.h.
(lc_messages_name): Remove variable.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Sun, 23 Feb 2025 06:25:24 +0000 (07:25 +0100)] 
Update to the newest gnulib.

7 months agoPrepare for prerelease.
Bruno Haible [Wed, 19 Feb 2025 06:37:20 +0000 (07:37 +0100)] 
Prepare for prerelease.

* gettext-tools/po/POTFILES.in: Update file list.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Wed, 19 Feb 2025 06:32:24 +0000 (07:32 +0100)] 
Update to the newest gnulib.

7 months agoUpdate after gnulib changed.
Bruno Haible [Tue, 18 Feb 2025 19:55:06 +0000 (20:55 +0100)] 
Update after gnulib changed.

7 months agolibtextstyle: Avoid an error localeconv_used_without_requesting_gnulib_module_localec...
Bruno Haible [Tue, 18 Feb 2025 15:16:38 +0000 (16:16 +0100)] 
libtextstyle: Avoid an error localeconv_used_without_requesting_gnulib_module_localeconv on mingw.

* libtextstyle/autogen.sh: Avoid module 'locale-h'.

7 months agoexamples: Add hello-c-http example.
Bruno Haible [Wed, 12 Feb 2025 09:54:08 +0000 (10:54 +0100)] 
examples: Add hello-c-http example.

* gettext-tools/examples/hello-c-http/INSTALL: New file.
* gettext-tools/examples/hello-c-http/autogen.sh: New file, based on
gettext-tools/examples/hello-c/autogen.sh.
* gettext-tools/examples/hello-c-http/autoclean.sh: New file, based on
gettext-tools/examples/hello-c/autoclean.sh.
* gettext-tools/examples/hello-c-http/hello-server.c: New file.
* gettext-tools/examples/hello-c-http/Makefile.am: New file, based on
gettext-tools/examples/hello-c/Makefile.am.
* gettext-tools/examples/hello-c-http/configure.ac: New file, based on
gettext-tools/examples/hello-c/configure.ac.
* gettext-tools/examples/hello-c-http/m4/Makefile.am: New file, copied from
gettext-tools/examples/hello-c/m4/Makefile.am.
* gettext-tools/examples/hello-c-http/po/POTFILES.in: New file.
* gettext-tools/examples/hello-c-http/po/Makevars: New file, copied from
gettext-tools/examples/hello-c/po/Makevars.
* gettext-tools/examples/hello-c-http/po/LINGUAS: New file, copied from
gettext-tools/examples/hello-c/po/LINGUAS.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Add
hello-c-http.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS): Update for
hello-c-http.
(hello-c-http.pot): New target.
(SMALLPOFILES_FOR_lang): Update for hello-c-http.
($(srcdir)/../hello-c-http/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-c-http as well.
* gettext-tools/examples/README: Mention hello-c-http.
* NEWS: Likewise.

7 months agointl: Update info about Galician and Tamil.
Bruno Haible [Thu, 13 Feb 2025 05:08:04 +0000 (06:08 +0100)] 
intl: Update info about Galician and Tamil.

* gettext-runtime/intl/setlocale.c (locales_with_principal_territory): Galician
is mostly spoken in Spain, not Portugal. Tamil is mostly spoken in India, not
Sri Lanka.

7 months agomsginit: Update info about Galician and Tamil.
Bruno Haible [Wed, 12 Feb 2025 09:39:35 +0000 (10:39 +0100)] 
msginit: Update info about Galician and Tamil.

* gettext-tools/src/msginit.c (catalogname_for_locale): Galician is mostly
spoken in Spain, not Portugal. Tamil is mostly spoken in India, not Sri Lanka.

7 months agoxgettext: Rust: Support named format string arguments.
Bruno Haible [Tue, 11 Feb 2025 10:37:40 +0000 (11:37 +0100)] 
xgettext: Rust: Support named format string arguments.

Reported by Kévin Commaille <zecakeh@tedomum.fr>
in <https://savannah.gnu.org/bugs/?56774>.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add unictype/property-xid-start,
unictype/property-xid-continue.
(GNULIB_MODULES_LIBGETTEXTPO): Likewise.
* gettext-tools/src/format-rust.c (struct named_arg): New type.
(struct spec): Add fields named_arg_count, named.
(named_arg_compare): New function.
(format_parse): Recognize named arguments.
(format_check): Search for differences also between the named arguments.
(format_print): Print also the named arguments.
* gettext-tools/tests/format-rust-1: Add test cases for named arguments.
* gettext-tools/tests/format-rust-2: Likewise.
* gettext-tools/doc/gettext.texi (rust-format): Describe rust-format in detail.

7 months agoxgettext: Rust: Fix comments.
Bruno Haible [Tue, 11 Feb 2025 08:25:57 +0000 (09:25 +0100)] 
xgettext: Rust: Fix comments.

* gettext-tools/src/x-rust.c: Fix reference to the Rust specification.

7 months agoRefactor.
Bruno Haible [Tue, 11 Feb 2025 08:49:08 +0000 (09:49 +0100)] 
Refactor.

* gettext-tools/src/format-ruby.c (format_parse): Use two different variables
named_allocated, numbered_allocated, instead of a single variable (assuming that
INVALID_MIXES_NAMED_UNNAMED is called when it should).

7 months agodoc: Suggest to not use ngettext() in a specific case.
Ivan Krylov [Mon, 10 Feb 2025 07:49:44 +0000 (08:49 +0100)] 
doc: Suggest to not use ngettext() in a specific case.

Edits from Ivan Krylov <ikrylov@disroot.org> at
<https://lists.gnu.org/archive/html/bug-gettext/2025-02/msg00000.html>
and Bruno Haible.

* gettext-tools/doc/gettext.texi (Plural forms): Suggest to not use ngettext()
in singular/plural cases without a number in the strings.

Copyright-paperwork-exempt: Yes

7 months agoRefactor: Allow for better static analysis, fixing some GCC analyzer warnings.
Bruno Haible [Sun, 9 Feb 2025 21:50:17 +0000 (22:50 +0100)] 
Refactor: Allow for better static analysis, fixing some GCC analyzer warnings.

* gettext-tools/src/cldr-plural.y: Define SB_NO_APPENDF.
* gettext-tools/src/its.c: Likewise.
* gettext-tools/src/read-desktop.c: Likewise.
* gettext-tools/src/read-properties.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.

7 months agoxgettext: Rust: Refactor.
Bruno Haible [Sun, 9 Feb 2025 21:26:49 +0000 (22:26 +0100)] 
xgettext: Rust: Refactor.

* gettext-tools/src/x-rust.c (contents): New variable.
(extract_from_function_call, extract_from_function_call_like,
extract_from_node): Remove the 'contents' parameter.
(extract_rust): Update.

7 months agoxgettext: Handle out-of-memory situation.
Bruno Haible [Sat, 8 Feb 2025 07:49:16 +0000 (08:49 +0100)] 
xgettext: Handle out-of-memory situation.

* gettext-tools/src/x-perl.c: Include xstring-desc.h.
(extract_quotelike): Call xsd_c instead of sd_c.
* gettext-tools/src/x-rust.c: Include xstring-desc.h.
(string_literal_value): Call xsd_c instead of sd_c. Call sb_xappend_desc
instead of sb_append_desc.

7 months agodoc: Sort programming languages consistently.
Bruno Haible [Wed, 5 Feb 2025 10:52:03 +0000 (11:52 +0100)] 
doc: Sort programming languages consistently.

* gettext-tools/doc/gettext.texi (No string concatenation): Sort the programming
languages like elsewhere in the doc.

8 months agobuild: Remove undesired output from autopull.sh.
Bruno Haible [Tue, 4 Feb 2025 00:44:49 +0000 (01:44 +0100)] 
build: Remove undesired output from autopull.sh.

* autopull.sh (func_git_clone_shallow): Silence the initial branch hint.

8 months agoFix last two commits.
Bruno Haible [Tue, 4 Feb 2025 00:40:01 +0000 (01:40 +0100)] 
Fix last two commits.

8 months agolibtextstyle: Improve namespacing.
Bruno Haible [Tue, 4 Feb 2025 00:03:53 +0000 (01:03 +0100)] 
libtextstyle: Improve namespacing.

* gettext-tools/libgettextpo/Makefile.am (COMPILATION_UNITS): Fix reference to
LIBOBJS variable.
(config.h): Remove leading part of the elements of
$(lts_libtextstyle_LTLIBOBJS).

8 months agoUpdate after gnulib changed.
Bruno Haible [Mon, 3 Feb 2025 23:50:06 +0000 (00:50 +0100)] 
Update after gnulib changed.

* gettext-tools/libgettextpo/Makefile.am (config.h): Remove leading part of the
elements of $(libgnu_la_LIBADD).

8 months agoUpdate to the newest gnulib.
Bruno Haible [Mon, 3 Feb 2025 23:48:56 +0000 (00:48 +0100)] 
Update to the newest gnulib.

8 months agoRust: Update .gitignore.
Bruno Haible [Mon, 3 Feb 2025 17:08:23 +0000 (18:08 +0100)] 
Rust: Update .gitignore.

8 months agoRust: Reference the example in the documentation.
Bruno Haible [Mon, 3 Feb 2025 07:24:09 +0000 (08:24 +0100)] 
Rust: Reference the example in the documentation.

* gettext-tools/doc/lang-rust.texi: Reference the example.

8 months agoJava: Doc comments.
Bruno Haible [Mon, 3 Feb 2025 06:27:46 +0000 (07:27 +0100)] 
Java: Doc comments.

* gettext-tools/doc/lang-java.texi: Add comments.

8 months agoSort programming languages like in the documentation.
Bruno Haible [Sun, 2 Feb 2025 10:39:54 +0000 (11:39 +0100)] 
Sort programming languages like in the documentation.

* gettext-tools/src/xgettext.c (usage): For the -L, -a, -k, --flag options, sort
the list of programming languages like in the documentation. Add Guile, Rust,
GSettings, that were forgotten earlier.
* gettext-tools/doc/xgettext.texi: Likewise.
* gettext-tools/examples/README: Sort the examples like the programming
languages in the documentation.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Likewise.
* 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): Likewise.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS, hello-*.pot,
SMALLPOFILES_FOR_lang, $(srcdir)/../hello-*/po/$(LL).po): Likewise.

8 months agotests: Fix a comment.
Bruno Haible [Sun, 2 Feb 2025 02:39:53 +0000 (03:39 +0100)] 
tests: Fix a comment.

* gettext-tools/tests/format-lua-2: Fix comment.

8 months agodoc: Explain why localizations are in separate files.
Bruno Haible [Sat, 1 Feb 2025 17:38:53 +0000 (18:38 +0100)] 
doc: Explain why localizations are in separate files.

* gettext-tools/doc/gettext.texi (Overview): Explain why the MO files should
not be embedded in the executable.

8 months agotests: Fix a comment.
Bruno Haible [Wed, 29 Jan 2025 14:31:59 +0000 (15:31 +0100)] 
tests: Fix a comment.

* gettext-tools/tests/lang-rust: Fix comment.

8 months agointl: Fix undefined behaviour.
Bruno Haible [Wed, 29 Jan 2025 11:30:02 +0000 (12:30 +0100)] 
intl: Fix undefined behaviour.

Found using clang's undefined-behaviour sanitizer:
CC="clang -fsanitize=undefined -fno-sanitize-recover=undefined".
It reported errors
dcigettext.c:1219:25: runtime error: applying non-zero offset 8 to null pointer
because the code was computing
    outbuf = freemem + sizeof (size_t);
where freemem == NULL.

* gettext-runtime/intl/dcigettext.c (_nl_find_msg): Initialize outbuf only after
having verified that freemem_size >= sizeof (size_t).

8 months agoxgettext: Rust: Fix xgettext-rust-stackovfl-* failures on MSVC 14/x86_64.
Bruno Haible [Wed, 29 Jan 2025 11:05:42 +0000 (12:05 +0100)] 
xgettext: Rust: Fix xgettext-rust-stackovfl-* failures on MSVC 14/x86_64.

* autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Add test-xfail.
* gettext-tools/src/Makefile.am (xgettext_LDFLAGS): On MSVC, use a larger
stack size.

8 months agoexamples: Add hello-rust example.
Bruno Haible [Tue, 28 Jan 2025 15:47:10 +0000 (16:47 +0100)] 
examples: Add hello-rust example.

* gettext-tools/examples/hello-rust/INSTALL: New file.
* gettext-tools/examples/hello-rust/autogen.sh: New file.
* gettext-tools/examples/hello-rust/autoclean.sh: New file.
* gettext-tools/examples/hello-rust/Cargo.toml.in: New file.
* gettext-tools/examples/hello-rust/src/main.rs.in: New file.
* gettext-tools/examples/hello-rust/Makefile.am: New file.
* gettext-tools/examples/hello-rust/configure.ac: New file.
* gettext-tools/examples/hello-rust/m4/Makefile.am: New file.
* gettext-tools/examples/hello-rust/po/Makefile.am: New file.
* gettext-tools/examples/hello-rust/po/LINGUAS: New file.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Add
hello-rust.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS): Update for
hello-rust.
(hello-rust.pot): New target.
(SMALLPOFILES_FOR_lang): Update for hello-rust.
($(srcdir)/../hello-rust/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-rust as well.
(func_check): Add a more useful body.
* gettext-tools/examples/README: Mention hello-rust.
* NEWS: Likewise.

8 months agoRust: Add lang-rust unit test.
Bruno Haible [Tue, 28 Jan 2025 10:45:28 +0000 (11:45 +0100)] 
Rust: Add lang-rust unit test.

* gettext-tools/tests/init.cfg (this_test_is_longrunning_): New function.
* gettext-tools/tests/lang-rust: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* HACKING: Reorder. Document prerequisites for Rust unit test.

8 months agoAdd Rust support.
Bruno Haible [Tue, 28 Jan 2025 10:11:56 +0000 (11:11 +0100)] 
Add Rust support.

* autopull.sh (func_git_clone_shallow): New function, based on
gnulib/top/bootstrap-funclib.sh.
Check out tree-sitter and tree-sitter-rust.
Create gettext-tools/tree-sitter.cfg.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add strnlen,
unictype/property-white-space.
(GNULIB_MODULES_LIBGETTEXTPO): Likewise.
* gettext-tools/build-aux/tree-sitter-portability.diff: New file.
* gettext-tools/build-aux/tree-sitter-rust-portability.diff: New file.
* gettext-tools/configure.ac: Set TREE_SITTER_VERSION, TREE_SITTER_RUST_VERSION.
* gettext-tools/Makefile.am (EXTRA_DIST): Add the tree-sitter configuration,
source code, and patches.
* gettext-tools/doc/lang-rust.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* gettext-tools/doc/gettext.texi (PO Files): Mention rust-format.
(Translators for other Languages): New subsection "Rust Format Strings".
(List of Programming Languages): Include lang-rust.texi.
* gettext-tools/doc/xgettext.texi: Document the -L Rust option.
* gettext-tools/src/message.h (format_rust): New enum value.
(NFORMATS): Increment.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add an
entry for format_rust.
* gettext-tools/src/format-rust.c: New file.
* gettext-tools/src/format.h (formatstring_rust): New declaration.
* gettext-tools/src/format.c (formatstring_parsers): Add formatstring_rust.
* gettext-tools/src/x-rust.h: New file.
* gettext-tools/src/x-rust.c: New file.
* gettext-tools/src/xgettext.c: Include x-rust.h.
(main): Invoke init_flag_table_rust, x_rust_extract_all, x_rust_keyword.
(usage): Document the -L Rust option.
(xgettext_record_flag): Support format_rust.
(language_to_extractor, extension_to_language): Support Rust.
* gettext-tools/src/FILES: Mention format-rust.c, x-rust.h, x-rust.c.
* gettext-tools/src/Makefile.am (noinst_LIBRARIES): New variable.
(noinst_HEADERS): Add x-rust.h.
(AM_CPPFLAGS): Add a -I option for tree-sitter.
(FORMAT_SOURCE): Add format-rust.c.
(LIBXGETTEXTTS): New variable.
(libxgettextts1_a_SOURCES, libxgettextts1_a_CPPFLAGS): New variables.
(libxgettextts2_a_SOURCES, libxgettextts2_a_CPPFLAGS): New variables.
(xgettext_SOURCES): Add x-rust.c.
(xgettext_LDADD, xgettext_DEPENDENCIES): Add $(LIBXGETTEXTTS).
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add
format-rust.c.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_rust.
* gettext-tools/tests/format-rust-1: New file.
* gettext-tools/tests/format-rust-2: New file.
* gettext-tools/tests/xgettext-rust-1: Fix string literal concatenation test.
Fix -k options.
* gettext-tools/tests/xgettext-rust-2: Fix gettext invocations.
* gettext-tools/tests/xgettext-rust-3: Fix string literal concatenation test.
Test multiline strings.
* gettext-tools/tests/xgettext-rust-4: Tweak.
* gettext-tools/tests/xgettext-rust-5: Fix test identifier.
* gettext-tools/tests/xgettext-rust-6: New file.
* gettext-tools/tests/xgettext-rust-7: New file.
* gettext-tools/tests/xgettext-rust-stackovfl-1: New file.
* gettext-tools/tests/xgettext-rust-stackovfl-2: New file.
* gettext-tools/tests/xgettext-rust-stackovfl-3: New file.
* gettext-tools/tests/xgettext-rust-stackovfl-4: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add the new tests.
* check-copyright-headers (func_check_file): Ignore tree-sitter files.
* NEWS: Mention the Rust support.

8 months agoPrepare for Rust support.
Kévin Commaille [Tue, 28 Jan 2025 10:08:52 +0000 (11:08 +0100)] 
Prepare for Rust support.

* gettext-tools/tests/xgettext-rust-1: New file, based on
gettext-tools/tests/xgettext-csharp-1.
* gettext-tools/tests/xgettext-rust-2: New file, based on
gettext-tools/tests/xgettext-csharp-2.
* gettext-tools/tests/xgettext-rust-3: New file, based on
gettext-tools/tests/xgettext-csharp-3.
* gettext-tools/tests/xgettext-rust-4: New file, based on
gettext-tools/tests/xgettext-csharp-4.
* gettext-tools/tests/xgettext-rust-5: New file, based on
gettext-tools/tests/xgettext-csharp-7.

8 months agoexamples: Improve autoclean.sh.
Bruno Haible [Tue, 28 Jan 2025 20:54:52 +0000 (21:54 +0100)] 
examples: Improve autoclean.sh.

* gettext-tools/examples/hello-c-gnome3/autoclean.sh: Do also the equivalent of
"make maintainer-clean".
* gettext-tools/examples/hello-c++-gnome3/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c++-kde/autoclean.sh: Likewise.
* gettext-tools/examples/hello-csharp/autoclean.sh: Likewise.
* gettext-tools/examples/hello-csharp-forms/autoclean.sh: Likewise.
* gettext-tools/examples/hello-pascal/autoclean.sh: Likewise.

8 months agoexamples: Assume autoconf >= 2.60.
Bruno Haible [Tue, 28 Jan 2025 16:55:38 +0000 (17:55 +0100)] 
examples: Assume autoconf >= 2.60.

* gettext-tools/examples/hello-clisp/configure.ac: Compute localedir based on
${datarootdir}, not ${datadir}.
* gettext-tools/examples/hello-gawk/configure.ac: Likewise.
* gettext-tools/examples/hello-guile/configure.ac: Likewise.
* gettext-tools/examples/hello-librep/configure.ac: Likewise.
* gettext-tools/examples/hello-pascal/configure.ac: Likewise.
* gettext-tools/examples/hello-perl/configure.ac: Likewise.
* gettext-tools/examples/hello-php/configure.ac: Likewise.
* gettext-tools/examples/hello-python/configure.ac: Likewise.
* gettext-tools/examples/hello-ruby/configure.ac: Likewise.
* gettext-tools/examples/hello-sh/configure.ac: Likewise.
* gettext-tools/examples/hello-smalltalk/configure.ac: Likewise.

8 months agolibtextstyle: Update after 2025-01-24 change.
Bruno Haible [Tue, 28 Jan 2025 14:55:54 +0000 (15:55 +0100)] 
libtextstyle: Update after 2025-01-24 change.

8 months agoformat-ruby: Fix error handling.
Bruno Haible [Tue, 28 Jan 2025 10:04:52 +0000 (11:04 +0100)] 
format-ruby: Fix error handling.

* gettext-tools/src/format-ruby.c (format_parse): Respect FDI_SET constraint.

8 months agoformat-python-brace: Fix error handling.
Bruno Haible [Tue, 28 Jan 2025 10:03:32 +0000 (11:03 +0100)] 
format-python-brace: Fix error handling.

* gettext-tools/src/format.h (FDI_SET): Improve comment.
* gettext-tools/src/format-python-brace.c (parse_directive): Improve error
messages. Respect FDI_SET constraint.

8 months agoMention the GNU make requirement more prominently.
Bruno Haible [Mon, 27 Jan 2025 10:45:48 +0000 (11:45 +0100)] 
Mention the GNU make requirement more prominently.

* NEWS: Mention the GNU make requirement.

8 months agobuild: Update package version handling after gnulib changed.
Bruno Haible [Tue, 28 Jan 2025 09:37:33 +0000 (10:37 +0100)] 
build: Update package version handling after gnulib changed.

* configure.ac: Drop postprocessing of git-version-gen output.
* gettext-runtime/configure.ac: Likewise.
* gettext-runtime/intl/configure.ac: Likewise.
* gettext-tools/configure.ac: Likewise.
* gettext-tools/examples/configure.ac: Likewise.

8 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 28 Jan 2025 09:34:27 +0000 (10:34 +0100)] 
Update to the newest gnulib.

8 months agobuild: Update package version handling after gnulib changed.
Bruno Haible [Sat, 25 Jan 2025 05:49:42 +0000 (06:49 +0100)] 
build: Update package version handling after gnulib changed.

* configure.ac: Invoke AC_INIT with arguments. Invoke gl_INIT_PACKAGE_VERSION
instead of gl_INIT_PACKAGE.
* gettext-runtime/configure.ac: Likewise.
* gettext-runtime/intl/configure.ac: Likewise.
* gettext-tools/configure.ac: Likewise.
* gettext-tools/examples/configure.ac: Likewise.
* libtextstyle/configure.ac: Likewise.

8 months agoUpdate to the newest gnulib.
Bruno Haible [Sat, 25 Jan 2025 05:46:22 +0000 (06:46 +0100)] 
Update to the newest gnulib.

8 months agolibtextstyle: Improve package version handling.
Bruno Haible [Fri, 24 Jan 2025 20:25:54 +0000 (21:25 +0100)] 
libtextstyle: Improve package version handling.

* libtextstyle/autogen.sh: Copy also m4/init-package-version.m4.
* libtextstyle/m4/init-package-version.m4: Remove file, moved to gnulib.

8 months agoTemporarily revert "po: Rename Makefile.in.in to Makefile.in."
Bruno Haible [Thu, 23 Jan 2025 22:58:12 +0000 (23:58 +0100)] 
Temporarily revert "po: Rename Makefile.in.in to Makefile.in."

8 months agobuild: Update release-steps after problem with .version has been fixed.
Bruno Haible [Thu, 23 Jan 2025 23:12:16 +0000 (00:12 +0100)] 
build: Update release-steps after problem with .version has been fixed.

8 months agobuild: Improve package version handling.
Bruno Haible [Thu, 23 Jan 2025 09:13:43 +0000 (10:13 +0100)] 
build: Improve package version handling.

* autogen.sh: Copy also m4/init-package-version.m4, m4/version-stamp.m4.
* configure.ac: Use gl_INIT_PACKAGE and gl_CONFIG_VERSION_STAMP.
* gettext-runtime/configure.ac: Use gl_INIT_PACKAGE.
* gettext-runtime/intl/configure.ac: Likewise.
* gettext-tools/configure.ac: Likewise.
* gettext-tools/examples/configure.ac: Likewise.
* Makefile.am (dist-tarball-version): New target.
($(top_srcdir)/.version): Remove target.

8 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 23 Jan 2025 09:08:00 +0000 (10:08 +0100)] 
Update to the newest gnulib.

8 months agoformat-kde-kuit: Fix test program.
Bruno Haible [Sun, 12 Jan 2025 06:35:20 +0000 (07:35 +0100)] 
format-kde-kuit: Fix test program.

* gettext-tools/src/format-kde-kuit.c: Fix compile-command.
(format_print): Make it compile. Print a '*' for each argument.

8 months agoformat-kde: Fix test program.
Bruno Haible [Sun, 12 Jan 2025 06:33:10 +0000 (07:33 +0100)] 
format-kde: Fix test program.

* gettext-tools/src/format-kde.c (format_print): Print a '*' for each argument.

8 months agoUpdate .gitignore after the recent refactorings.
Bruno Haible [Thu, 9 Jan 2025 17:25:14 +0000 (18:25 +0100)] 
Update .gitignore after the recent refactorings.

8 months agoFix a test failure when LC_ALL is set to a non-English locale.
Bruno Haible [Wed, 8 Jan 2025 19:47:51 +0000 (20:47 +0100)] 
Fix a test failure when LC_ALL is set to a non-English locale.

Reported by Simon Josefsson <simon@josefsson.org>
in <https://lists.gnu.org/archive/html/bug-gettext/2025-01/msg00008.html>.

* gettext-tools/tests/xgettext-its-2: When setting LC_MESSAGES, also unset
LC_ALL.

8 months agoxgettext: JavaScript: Parse recursive JSX expressions correctly.
Bruno Haible [Wed, 8 Jan 2025 14:15:41 +0000 (15:15 +0100)] 
xgettext: JavaScript: Parse recursive JSX expressions correctly.

Reported by <fiurgeist@gmail.com> at <https://savannah.gnu.org/bugs/?66643>.

* gettext-tools/src/x-javascript.c (phase5_get): Treat a '<' character in
level type level_embedded_js_in_xml like in the other level types.
* gettext-tools/tests/xgettext-javascript-6: Add another test case.
* NEWS: Mention the fix.

8 months agobuild: Achieve better tarball compression ratios in "make dist".
Bruno Haible [Wed, 8 Jan 2025 08:34:55 +0000 (09:34 +0100)] 
build: Achieve better tarball compression ratios in "make dist".

Suggested by Lasse Collin <lasse.collin@tukaani.org>
in <https://lists.gnu.org/archive/html/bug-gettext/2025-01/msg00011.html>.

* configure.ac (am__tar): Sort the files by basename.

8 months agoRefactor: Use function str_endswith.
Bruno Haible [Fri, 3 Jan 2025 15:22:41 +0000 (16:22 +0100)] 
Refactor: Use function str_endswith.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Use
str_endswith.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Add
str_endswith.

8 months agoRefactor: Use function str_startswith.
Bruno Haible [Fri, 3 Jan 2025 15:19:12 +0000 (16:19 +0100)] 
Refactor: Use function str_startswith.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (should_enable_hyperlinks):
Use str_startswith.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Add
str_startswith.
* gettext-tools/src/cldr-plural.y (yylex): Use str_startswith.
* gettext-tools/src/format-java.c (message_format_parse, choice_format_parse):
Likewise.
* gettext-tools/src/msgl-check.c (plural_help, check_header_entry): Likewise.
* gettext-tools/src/read-catalog-abstract.c (parse_comment_filepos): Likewise.
* gettext-tools/src/read-csharp.c (msgdomain_read_csharp): Likewise.
* gettext-tools/src/write-csharp.c (msgdomain_write_csharp): Likewise.
* gettext-tools/src/x-perl.c (skip_pod): Likewise.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO): Add
str_startswith.

9 months agoUpdate to the newest gnulib.
Bruno Haible [Fri, 3 Jan 2025 15:12:24 +0000 (16:12 +0100)] 
Update to the newest gnulib.

9 months agoRefactor: Use GNU coding style.
Bruno Haible [Fri, 3 Jan 2025 13:51:22 +0000 (14:51 +0100)] 
Refactor: Use GNU coding style.

* gnulib-local/lib/markup.c (slow_name_validate, unescape_string_inplace,
clear_attributes, markup_parse_context_parse): Break lines before the operator.