8558 Commits

Author SHA1 Message Date
Bruno Haible
957ecb5ea6 Release 0.25 v0.25 2025-05-07 18:48:47 +02:00
Bruno Haible
4b48ab4c4f 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.
2025-05-07 18:18:49 +02:00
Bruno Haible
20070edd81 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-07 18:18:49 +02:00
Bruno Haible
cbe56ffe46 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.
2025-05-07 18:18:49 +02:00
Bruno Haible
43f5ac51dd doc: Clarify how to obtain the various autoconf macros.
* gettext-tools/doc/gettext.texi (autoconf macros): Suggest to use gettextize or
autopoint. Discourage autoreconf.
2025-05-07 18:18:48 +02:00
Bruno Haible
62c466c7f9 Update .gitignore. 2025-05-07 18:18:48 +02:00
Bruno Haible
a06a91814c Update to a newer gnulib. 2025-05-07 13:42:11 +02:00
Bruno Haible
6971fcded9 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.
2025-05-06 17:51:58 +02:00
Bruno Haible
d23acdb852 tests: Avoid xgettext-git-1 failure on AIX.
* gettext-tools/tests/xgettext-git-1: Don't use shell pattern matching with
braces.
2025-05-06 10:01:07 +02:00
Bruno Haible
ef9a4aca8f intl-modula2: Try to fix a build failure on macOS.
* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LIBADD): Avoid
automake error.
2025-05-05 22:15:51 +02:00
Bruno Haible
8e77f38164 intl-modula2: Try to fix a build failure on macOS.
* gettext-runtime/intl-modula2/Makefile.am (libintl_m2_la_LIBADD): New variable.
2025-05-05 21:56:30 +02:00
Bruno Haible
cd93b66a0d PACKAGING: Revisit intl-d and intl-modula2 packaging.
* PACKAGING: Suggest packaging libintl_d and libintl_m2 each in a separate
package.
2025-05-05 19:08:55 +02:00
Bruno Haible
0e0e1de23d Update after gnulib changed. 2025-05-05 18:55:39 +02:00
Bruno Haible
46cc1558ac tests: Avoid xgettext-git-1 failure on native Windows. 2025-05-05 15:09:12 +02:00
Bruno Haible
de4b858e63 Update to the newest gnulib. 2025-05-05 15:09:12 +02:00
Bruno Haible
468a351531 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.
2025-05-05 13:27:37 +02:00
Bruno Haible
52fe9fc876 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.
2025-05-05 12:26:23 +02:00
Bruno Haible
7b2f29018a tests: Avoid a lang-modula2 failure.
* gettext-tools/tests/lang-modula2: Skip the test if gm2 is not working.
2025-05-05 12:26:23 +02:00
Bruno Haible
03d289ae21 tests: Add a comment regarding a lang-modula2 failure.
* gettext-tools/tests/lang-modula2: Add comment.
2025-05-05 03:01:37 +02:00
Bruno Haible
4e1c588f21 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.
2025-05-05 03:01:37 +02:00
Bruno Haible
6ecc423cdc 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.
2025-05-05 01:54:11 +02:00
Bruno Haible
26348e4f88 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.
2025-05-04 18:44:22 +02:00
Bruno Haible
a6cafd7ae4 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.
2025-05-04 18:44:22 +02:00
Bruno Haible
ecd4036ee7 Update to the newest gnulib. 2025-05-04 18:44:22 +02:00
Bruno Haible
2fab281e18 Update release steps. 2025-05-04 12:15:14 +02:00
Bruno Haible
54fca1b4ab 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".
2025-05-03 13:08:11 +02:00
Bruno Haible
5de2623883 xgettext: D: Work around a gcc miscompilation bug.
* gettext-tools/build-aux/tree-sitter-d-optimization-bug.diff: New file.
* autopull.sh: Apply it.
2025-05-03 03:51:49 +02:00
Bruno Haible
76bfa2f87c 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.
2025-05-02 20:04:57 +02:00
Bruno Haible
fa98427c77 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:12:22 +02:00
Bruno Haible
4d743ba206 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:02:17 +02:00
Bruno Haible
26c8529d0e 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:06:45 +02:00
Bruno Haible
b71cbac4fa tests: Fix test failure with git versions < 2.23.
* gettext-tools/tests/xgettext-git-1: Use 'git checkout' instead of
'git restore'.
2025-05-02 15:28:23 +02:00
Bruno Haible
3fbb7e1b6e Update to the newest gnulib. 2025-05-02 15:28:23 +02:00
Bruno Haible
7e61dc102e 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 02:46:11 +02:00
Bruno Haible
b1168e7d07 Update to the newest gnulib. 2025-05-02 02:46:11 +02:00
Bruno Haible
1077d538be 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.
2025-05-02 00:38:57 +02:00
Bruno Haible
edff5c9ab2 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:06 +02:00
Bruno Haible
0387d77646 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:26:57 +02:00
Bruno Haible
6e2d484a30 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:25:22 +02:00
Bruno Haible
e87aaccabe build: Ignore -Wduplicated-branches warnings.
* m4/more-warnings.m4 (gt_MORE_WARNINGS): Don't add the -Wduplicated-branches
option.
2025-04-29 02:15:55 +02:00
Bruno Haible
fe9d3fd320 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.
2025-04-28 17:11:13 +02:00
Bruno Haible
8dce4dcce0 tests: Support older GNU Modula-2 compilers.
* gettext-tools/tests/lang-modula2: Don't use the option -fscaffold-main.
2025-04-28 16:22:32 +02:00
Bruno Haible
7a5e1e6f62 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.
2025-04-25 16:47:51 +02:00
Bruno Haible
204b0aadca 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.
2025-04-25 16:05:49 +02:00
Bruno Haible
e7650ab0fa 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.
2025-04-25 13:06:15 +02:00
Bruno Haible
281658406b 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.
2025-04-25 03:20:42 +02:00
Bruno Haible
09203499b4 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.
2025-04-25 03:16:28 +02:00
Bruno Haible
de3fff8d99 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.
2025-04-25 03:16:21 +02:00
Bruno Haible
ce82524f02 Update to the newest gnulib. 2025-04-25 01:32:57 +02:00
Bruno Haible
411a5c31d4 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.
2025-04-25 01:30:07 +02:00