8475 Commits

Author SHA1 Message Date
Bruno Haible
a79c981690 Release 0.24.1 v0.24.1 2025-05-02 19:34:56 +02:00
Bruno Haible
44aa09c87a 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.
2025-05-02 19:34:22 +02:00
Bruno Haible
faa267261d 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.
2025-05-02 19:33:43 +02:00
Bruno Haible
0fe557b678 build: Update after recent gettextize fix.
* gettext-tools/misc/add-to-archive: Look up the *.m4 files in
$datadir/gettext/m4, not $datadir/aclocal.
2025-05-02 19:33:43 +02:00
Bruno Haible
ec9dbddb54 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.
2025-05-02 17:04:04 +02:00
Bruno Haible
59782d1f8c 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.
2025-05-02 16:24:13 +02:00
Bruno Haible
8ce6f7d45e Update to the newest gnulib. 2025-05-02 15:29:02 +02:00
Bruno Haible
fec02ab99e 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.
2025-05-02 03:05:20 +02:00
Bruno Haible
d8b2faeb36 Update to the newest gnulib. 2025-05-02 03:03:35 +02:00
Bruno Haible
096228bcaf 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.
2025-04-30 16:43:48 +02:00
Bruno Haible
2fde1696aa 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.
2025-04-30 13:31:32 +02:00
Bruno Haible
402fd1b672 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.
2025-04-30 13:29:53 +02:00
Bruno Haible
2bcec7b8c2 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.
2025-04-24 22:32:27 +02:00
Bruno Haible
2b3739bdfe Update after gnulib changed.
* libtextstyle/autogen.sh: Don't avoid module 'locale-h'. vasnprintf now needs
localeconv, and localeconv depends on locale-h.
2025-04-24 22:32:27 +02:00
Bruno Haible
ca056729b0 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.
2025-04-24 22:32:27 +02:00
Bruno Haible
efd12f0358 Update to the newest gnulib. 2025-04-24 22:32:27 +02:00
Bruno Haible
befbca48b0 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.
2025-04-02 14:13:11 +02:00
Bruno Haible
4e82634a07 gettextize: Fix last commit.
* gettext-tools/m4/Makefile.am (OLD_M4_FILES): New variable.
(uninstall-macros): Delete only these files from @aclocaldir@.
2025-04-01 20:48:06 +02:00
Bruno Haible
02c475e2f3 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.
2025-04-01 16:18:07 +02:00
Bruno Haible
34840cd57f Release 0.24 v0.24 2025-02-25 14:44:17 +01:00
Bruno Haible
0029591257 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.
2025-02-25 14:30:08 +01:00
Bruno Haible
662463ace5 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.
2025-02-25 14:30:08 +01:00
Bruno Haible
0ef5e283cc examples: Fix hello-c++-gnome3.
* gettext-tools/examples/hello-c++-gnome3/autoclean.sh: Remove po/Makefile.in.in.
2025-02-25 14:30:08 +01:00
Bruno Haible
b2941724c4 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.
2025-02-25 14:30:02 +01:00
Bruno Haible
0c099d29a1 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.
2025-02-25 11:04:01 +01:00
Bruno Haible
64f89b7c81 Update to the newest gnulib. 2025-02-25 09:55:24 +01:00
Bruno Haible
2406f51927 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.
2025-02-24 20:44:30 +01:00
Bruno Haible
748c4bfe2f Update after gnulib changed.
* gettext-runtime/intl/setlocale.c: Include setlocale-messages.h.
(lc_messages_name): Remove variable.
2025-02-24 20:32:32 +01:00
Bruno Haible
e6900c5a38 Update to the newest gnulib. 2025-02-24 20:32:27 +01:00
Bruno Haible
a3fc66212d Prepare for prerelease.
* gettext-tools/po/POTFILES.in: Update file list.
2025-02-19 08:02:25 +01:00
Bruno Haible
db6cfccd7d Update to the newest gnulib. 2025-02-19 07:32:24 +01:00
Bruno Haible
26678fe64c Update after gnulib changed. 2025-02-18 20:55:06 +01:00
Bruno Haible
c5d6114aff libtextstyle: Avoid an error localeconv_used_without_requesting_gnulib_module_localeconv on mingw.
* libtextstyle/autogen.sh: Avoid module 'locale-h'.
2025-02-18 16:16:38 +01:00
Bruno Haible
31554caccc 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.
2025-02-13 06:12:33 +01:00
Bruno Haible
72171458db 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.
2025-02-13 06:12:33 +01:00
Bruno Haible
84b08869fc 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.
2025-02-12 10:39:35 +01:00
Bruno Haible
3cbdb13073 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.
2025-02-11 11:39:58 +01:00
Bruno Haible
a24c903f5f xgettext: Rust: Fix comments.
* gettext-tools/src/x-rust.c: Fix reference to the Rust specification.
2025-02-11 11:39:58 +01:00
Bruno Haible
b4f0ea4b3e 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).
2025-02-11 11:39:58 +01:00
Ivan Krylov
26d59b5d16 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
2025-02-10 08:51:07 +01:00
Bruno Haible
27ebe0a5e7 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.
2025-02-09 22:50:17 +01:00
Bruno Haible
dfb392a9d5 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.
2025-02-09 22:26:49 +01:00
Bruno Haible
d2e58a546e 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.
2025-02-09 19:32:23 +01:00
Bruno Haible
c12d248dd1 doc: Sort programming languages consistently.
* gettext-tools/doc/gettext.texi (No string concatenation): Sort the programming
languages like elsewhere in the doc.
2025-02-05 11:52:03 +01:00
Bruno Haible
cec8aba15b build: Remove undesired output from autopull.sh.
* autopull.sh (func_git_clone_shallow): Silence the initial branch hint.
2025-02-04 01:44:49 +01:00
Bruno Haible
e4d0804e5b Fix last two commits. 2025-02-04 01:40:01 +01:00
Bruno Haible
3022e633c5 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).
2025-02-04 01:03:53 +01:00
Bruno Haible
0aefc343e9 Update after gnulib changed.
* gettext-tools/libgettextpo/Makefile.am (config.h): Remove leading part of the
elements of $(libgnu_la_LIBADD).
2025-02-04 00:50:06 +01:00
Bruno Haible
e8226bde66 Update to the newest gnulib. 2025-02-04 00:48:56 +01:00
Bruno Haible
233153c595 Rust: Update .gitignore. 2025-02-03 18:08:23 +01:00