8826 Commits

Author SHA1 Message Date
Bruno Haible
0136f405d3 build: Distribute one more file.
* gettext-runtime/install-tests/Makefile.am (EXTRA_DIST): Add itest.pot.
2025-10-19 03:00:18 +02:00
Bruno Haible
3c3f36ee01 build: Distribute all tree-sitter patches.
* gettext-tools/Makefile.am (EXTRA_DIST): Add
build-aux/tree-sitter-d-optimization-bug.diff, added on 2025-05-03.
2025-10-19 02:54:54 +02:00
Bruno Haible
8c716a85ec New directory gettext-tools/wizard/po-templates/traditional/.
* gettext-tools/wizard/po-templates/traditional/*: New files, moved here from
gettext-runtime/po/.
* gettext-tools/wizard/po-templates/traditional/Makefile.in.in (install-data,
installdirs-data, uninstall-data, dist2): Remove special code for the
'gettext-tools' package.
* gettext-tools/wizard/po-templates/traditional/Makevars.template: Moved here
from gettext-tools/po/.
* autogen.sh: Copy the contents of the gettext-runtime/po/ and gettext-tools/po/
directories from gettext-tools/wizard/po-templates/traditional/.
* gettext-tools/wizard/Makefile.am (pkgdatadir, podir): New variables.
(po_DATA): Add po-templates/traditional/*.
(EXTRA_DIST): Likewise.
(uninstall-sources): Also remove $(podir)/Makevars.
* Makefile.am (distcheck-hook): Update.
2025-10-18 19:44:04 +02:00
Bruno Haible
5847bb1df1 doc: Mention how to localize other data formats.
* gettext-tools/doc/gettext.texi (Data Formats): Mention po4a. Describe how to
localize LibreOffice documents.
2025-10-17 09:30:21 +02:00
Bruno Haible
75a5c46616 po: Don't msgmerge the PO files through Makefile.in.in.
* gettext-runtime/po/Makefile.in.in (MSGMERGE_UPDATE): Remove variable.
(UPDATEPOFILES): Remove variable.
(POFILESDEPS*): Remove variables.
(.SUFFIXES): Add '.gpo'. Remove '.po-update'.
(.po.gpo): New rule.
($(POFILES)): Remove dependencies. Don't invoke MSGMERGE_UPDATE.
(mostlyclean): Add *.gpo.
(update-po): Don't make $(UPDATEPOFILES).
(.nop.po-update): Remove rule.
* gettext-runtime/po/Makevars (PO_DEPENDS_ON_POT): Remove variable.
* gettext-tools/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/po/Makevars.template (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-c/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-c-gnome2/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-c-gnome3/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-c-http/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-c++/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-c++20/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-c++-gnome2/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-c++-gnome3/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-c++-kde/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-objc/po/Makevars (PO_DEPENDS_ON_POT): Likewise.
* gettext-tools/examples/hello-objc-gnome2/po/Makevars (PO_DEPENDS_ON_POT):
Likewise.
* gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am (MSGMERGE_UPDATE):
Remove variable.
(UPDATEPOFILES): Remove variable.
(.SUFFIXES): Add '.gpo'. Remove '.po-update'.
(.po.gpo): New rule.
($(POFILES)): Remove dependencies. Don't invoke MSGMERGE_UPDATE.
(MOSTLYCLEANFILES): Add *.gpo.
(update-po): Don't make $(UPDATEPOFILES).
(.nop.po-update): Remove rule.
* gettext-tools/examples/hello-python/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-guile/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-clisp/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-librep/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-rust/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-go/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-go-http/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-ruby/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-sh/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-gawk/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-pascal/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-modula2/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-d/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-ocaml/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-smalltalk/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-perl/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-php/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-ycp/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-c++-qt/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-java/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-java-awt/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-java-swing/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-java-qtjambi/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-csharp/po/Makefile.am (MSGMERGE_UPDATE): Remove
variable.
(UPDATEPOFILES): Remove variable.
(RESOURCESDLLFILES): Change emitted commands to use an intermediate .gpo file.
(.SUFFIXES): Add '.gpo'. Remove '.po-update'.
(.po.gpo): New rule.
($(POFILES)): Remove dependencies. Don't invoke MSGMERGE_UPDATE.
(MOSTLYCLEANFILES): Add *.gpo.
(update-po): Don't make $(UPDATEPOFILES).
(.nop.po-update): Remove rule.
* gettext-tools/examples/hello-csharp-forms/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-tcl/po/Makefile.am (MSGMERGE_UPDATE): Remove
variable.
(UPDATEPOFILES): Remove variable.
(MSGFILES): Change emitted commands to use an intermediate .gpo file.
(.SUFFIXES): Add '.gpo'. Remove '.po-update'.
(.po.gpo): New rule.
($(POFILES)): Remove dependencies. Don't invoke MSGMERGE_UPDATE.
(MOSTLYCLEANFILES): Add *.gpo.
(update-po): Don't make $(UPDATEPOFILES).
(.nop.po-update): Remove rule.
* gettext-tools/examples/hello-tcl-tk/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (MSGMERGE_UPDATE):
Remove variable.
(UPDATEPOFILES): Remove variable.
(.SUFFIXES): Add '.gpo'. Remove '.po-update'.
($(POFILES)): Remove dependencies. Don't invoke MSGMERGE_UPDATE.
(update-po): Don't make $(UPDATEPOFILES).
(.nop.po-update): Remove rule.
* gettext-tools/examples/po/Makefile.am (MSGMERGE_OPTIONS): Add
--no-fuzzy-matching --quiet.
(MSGMERGE_UPDATE): Remove variable.
(UPDATEPOFILES): Remove variable.
(GPOFILES): New variable.
(.SUFFIXES): Add '.gpo'. Remove '.nop', '.po-update'.
(.po.gpo): New rule.
($(POFILES)): Remove rule.
(DISTCLEANFILES): New variable.
(update-po): Don't make $(UPDATEPOFILES). Make the small PO files.
(.nop.po-update): Remove rule.
* gettext-tools/examples/po/mmsmallpo.sh: Use $language.gpo instead of
$language.po.
* gettext-tools/doc/gettext.texi (Translations under Version Control): Remove
documentation of PO_DEPENDS_ON_POT.
(Release Management): Update wording.
* Admin/release-steps: Don't msgmerge the PO files from translationproject.org.
* NEWS: Mention the change.
2025-10-14 00:55:27 +02:00
Bruno Haible
2ff034612e examples: Fix hello-tcl* examples (regression 2024-12-06).
* gettext-tools/examples/hello-tcl*/po/Makefile.am (CATALOGS): Use suffix .msg,
not .gmo.
2025-10-13 02:15:25 +02:00
Bruno Haible
61a2bbacb5 check-examples: Update comments.
* gettext-tools/examples/check-examples: Update comments.
2025-10-12 22:36:56 +02:00
Bruno Haible
a3aef1a1d3 examples: Improve error message when there is a mistake in a PO file.
* gettext-tools/examples/hello-*/po/Makefile.am (.po.gmo): Use suffix .gpo
instead of .1po.
* gettext-tools/examples/hello-java*/po/Makefile.am (update-properties,
update-classes): Likewise.
* gettext-tools/examples/hello-c++-qt/po/Makefile.am (.po.qm): Likewise.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile ($(STRINGSFILES)):
Likewise.
2025-10-12 19:50:55 +02:00
Bruno Haible
4d64f8c471 xgettext: Rust: Recognize 'gettextrs::gettext' invocations like 'gettext'
invocations.

Reported by Schmiddiii <gnu-savannah@schmidhuberj.de>
at <https://savannah.gnu.org/bugs/?67601>.

* gettext-tools/src/x-rust.c (ts_symbol_scoped_identifier): New variable.
(extract_from_function_call): Accept a scoped_identifier as first argument.
(extract_from_node): Allow a scoped_identifier as callee.
(extract_rust): Initialize ts_symbol_scoped_identifier.
* gettext-tools/tests/xgettext-rust-1: Add another test case.
* gettext-tools/tests/xgettext-rust-6: Likewise.
* NEWS: Mention the fix.
2025-10-12 16:32:24 +02:00
Bruno Haible
731022e254 po: Improve error message when there is a mistake in a PO file.
* gettext-runtime/po/Makefile.in.in (.po.gmo): Use suffix .gpo instead of .1po.
2025-10-12 13:51:18 +02:00
Bruno Haible
4f380c8586 po: Simplify.
* gettext-runtime/po/Makefile.in.in (.NOEXPORT): Remove workaround for versions
of GNU make from before 1993.
2025-10-12 13:42:46 +02:00
Bruno Haible
5a0c27e5ab build: Move more code into libgettextsrc.
* gettext-tools/src/lang-table.h (language_table, language_table_size,
language_variant_table, language_variant_table_size): Mark as
LIBGETTEXTSRC_DLL_VARIABLE.
* gettext-tools/src/Makefile.am (libgettextsrc_la_SOURCES): Add msgl-fsearch.c,
lang-table.c, plural-count.c.
(msgmerge_SOURCES): Remove msgl-fsearch.c, lang-table.c, plural-count.c.
(msginit_SOURCES): Likewise.
* gettext-tools/src/FILES: Update.
2025-10-12 13:03:57 +02:00
Bruno Haible
092e5329e6 msginit: Produce a merged PO file instead of failing.
* gettext-tools/src/msginit.c: Include <omp.h>, msgl-merge.h, backupfile.h,
copy-file.h.
(catalogname): Remove variable.
(main): When the PO file already exists, create a backup file, then merge the
two files.
(usage): Say what happens if the output file already exists.
(struct header_entry_field): New type.
(fresh_fields): Renamed from fields.
(NFIELDS): Remove macro.
(FRESH_FIELDS_LAST_TRANSLATOR): Renamed from FIELD_LAST_TRANSLATOR.
(update_fields): New variable.
(UPDATE_FIELDS_LAST_TRANSLATOR): New macro.
(fill_header): Add 'fresh' parameter. Allocate field_value array on the heap.
* gettext-tools/src/Makefile.am (msginit_SOURCES): Add msgl-fsearch.c,
msgl-merge.c.
(msginit_CFLAGS, msginit_CXXFLAGS): Link with the OpenMP flags.
* gettext-tools/doc/msginit.texi: Say what happens if the output file already
exists.
* gettext-tools/doc/gettext.texi (Creating): Change title. Mention that msginit
can also be used when continuing an existing translation.
* NEWS: Mention the improvement.
2025-10-12 13:03:50 +02:00
Bruno Haible
e6bff68d9d Refactor: Librarify the core of msgmerge.
* gettext-tools/src/msgl-merge.h: New file, based on
gettext-tools/src/msgmerge.c.
* gettext-tools/src/msgl-merge.c: New file, based on
gettext-tools/src/msgmerge.c.
* gettext-tools/src/msgmerge.c: Include msgl-merge.h. Simplify includes.
Remove definitions that are moved to msgl-merge.c.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add msgl-merge.h.
(msgmerge_SOURCES): Add msgl-merge.c.
* gettext-tools/po/POTFILES.in: Add src/msgl-merge.c.
2025-10-12 02:12:49 +02:00
Bruno Haible
6da5013c70 OCaml: Tweak documentation.
* gettext-tools/doc/lang-ocaml.texi: Add note regarding format strings.
2025-10-12 00:12:58 +02:00
Bruno Haible
5ef6297855 Fix failure of lang-javascript on macOS 15. 2025-10-07 13:41:04 +02:00
Bruno Haible
fc26a91ef6 Update after gnulib changed. 2025-10-05 22:22:28 +02:00
Bruno Haible
dcb585cbf2 Refactor: New subdirectory gettext-tools/wizard/, part 2. 2025-10-05 22:19:36 +02:00
Bruno Haible
26413ef170 Refactor: New subdirectory gettext-tools/autotools/.
* gettext-tools/Makefile.am (SUBDIRS): Add autotools. Remove misc.
(distdir2): Update.
* gettext-tools/autotools/Makefile.am: Renamed from
gettext-tools/misc/Makefile.am.
* gettext-tools/autotools/archive.dir.tar: Renamed from
gettext-tools/misc/archive.dir.tar.
* gettext-tools/autotools/add-to-archive: Renamed from
gettext-tools/misc/add-to-archive.
* gettext-tools/autotools/cvsuser.c: Renamed from gettext-tools/misc/cvsuser.c.
* gettext-tools/autotools/convert-archive.in: Renamed from
gettext-tools/misc/convert-archive.in.
* gettext-tools/autotools/autopoint.in: Renamed from
gettext-tools/misc/autopoint.in.
* gettext-tools/configure.ac: Update AC_CONFIG_FILES invocations.
* gettext-tools/man/Makefile.am (man_MAN1AUTOTOOLS): Renamed from man_MAN1MISC.
($(man_MAN1AUTOTOOLS)): Renamed from $(man_MAN1MISC).
(autopoint.1): Update.
* gettext-tools/examples/po/Makefile.am (USE_BUILT_PROGS): Update.
* gettext-tools/tests/autopoint-1: Update.
* gettext-tools/tests/autopoint-2: Likewise.
* gettext-tools/tests/autopoint-3: Likewise.
* check-copyright-headers (func_check_file): Update.
2025-10-05 20:00:05 +02:00
Bruno Haible
fc271fe03b Put archive.dir.tar under version control, part 2.
* gettext-tools/misc/Makefile.am ($(srcdir)/archive.dir.tar): Remove rule.
2025-10-05 18:27:03 +02:00
Bruno Haible
21a3caa801 Refactor: New subdirectory gettext-tools/wizard/.
* gettext-tools/configure.ac: Invoke AC_CONFIG_FILES for wizard/Makefile,
wizard/gettextize, instead of for misc/gettextize.
* gettext-tools/Makefile.am (SUBDIRS): Add wizard.
(distdir2): Recurse into wizard/.
* gettext-tools/wizard/Makefile.am: New file, based on
gettext-tools/misc/Makefile.am.
* gettext-tools/wizard/gettextize.in: Renamed from
gettext-tools/misc/gettextize.in.
* gettext-tools/misc/Makefile.am (bin_SCRIPTS, DISTCLEANFILES): Remove
gettextize.
(install-data-local, uninstall-local, uninstall-sources): Remove rules.
* gettext-tools/man/Makefile.am (man_MAN1WIZARD): New variable.
(man_MAN1MISC): Remove gettextize.1.
($(man_MAN1WIZARD)): New rule.
(gettextize.1): Update.
($(man_MAN1MISC)): Simplify.
2025-10-05 17:33:27 +02:00
Bruno Haible
7e90ce557b Restore syntax highlighting in Emacs 30 or newer.
Reported by Sab Pyrope <sab.pyrope@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-03/msg00017.html>
and by Julien Palard <julien@palard.fr> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-10/msg00000.html>.

It's a regression in Emacs 30, in commit
17e26cf57e18c5df2172a7049591d89fc53b3fb6 .

* gettext-tools/emacs/HACKING: Document how to bisect Emacs regressions.
* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump to 2.31.
(po-mode): Invoke run-mode-hooks instead of run-hooks.
* NEWS: Mention the fix.
2025-10-02 22:50:11 +02:00
Bruno Haible
7546f94840 xgettext: Java: Remove unjustified warning "'}' found where ')' was expected".
Reported by Alexander Hubmann-Haidvogel <ahubmann@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00000.html>
and by Bjoern Voigt <bjoernv@arcor.de> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00023.html>.

* gettext-tools/src/x-java.c (extract_parenthesized): When a semicolon is seen
inside braces, start a new argparser instead of returning.
* gettext-tools/tests/xgettext-java-1: Add test cases with inner classes.
2025-10-01 00:04:45 +02:00
Bruno Haible
032b007fea tests: Increase debuggability.
* gettext-tools/tests/xgettext-python-9: Show the warnings in the log when
failing.
2025-09-30 23:59:22 +02:00
Bruno Haible
1dba8793ec libgettextpo: Add API for the workflow flags and the sticky flags.
Reported by Alexander Potashev <aspotashev@gmail.com>
at <https://savannah.gnu.org/bugs/?67470>.

* gettext-tools/src/message.h (format_flag, not_format_p): New declarations.
* gettext-tools/src/message.c (format_flag): New variable.
(not_format_p): New function.
* gettext-tools/src/write-po.c (make_format_description_string): Add comments.
(significant_format_p): Likewise.
* gettext-tools/libgettextpo/gettext-po.in.h (po_flag_iterator_t): New type.
(po_message_has_workflow_flag, po_message_set_workflow_flag,
po_message_workflow_flags_iterator): New declarations.
(po_message_has_sticky_flag, po_message_set_sticky_flag,
po_message_sticky_flags_iterator): New declarations.
(po_flag_iterator_free, po_flag_next): New declarations.
* gettext-tools/libgettextpo/gettext-po.c (struct po_flag_iterator): New type.
(po_message_has_workflow_flag, po_message_set_workflow_flag,
po_message_workflow_flags_iterator): New functions.
(po_message_get_format): Simplify by using not_format_p.
(po_message_has_sticky_flag, po_message_set_sticky_flag,
po_message_sticky_flags_iterator): New functions.
(po_flag_iterator_free, po_flag_next): New functions.
* gettext-tools/tests/gettextpo-1-prg.c (main): Add more test cases.
* gettext-tools/doc/gettext.texi (po_message_t API): Document the new functions.
(po_flag_iterator_t API): New subsection.
* NEWS: Mention the new functions.
2025-09-30 15:35:06 +02:00
Bruno Haible
f5fd381b40 libgettextpo: New function po_message_get_format.
Reported by Alexander Potashev <aspotashev@gmail.com> in
<https://savannah.gnu.org/bugs/?67485>.

* gettext-tools/libgettextpo/gettext-po.in.h (po_message_get_format): New
declaration.
* gettext-tools/libgettextpo/gettext-po.c (po_message_get_format): New function.
* gettext-tools/tests/gettextpo-1-prg.c (main): Test the return value of
po_message_get_format. Add a test case of po_message_set_format with value -1.
* gettext-tools/doc/gettext.texi (po_message_t API): Document
po_message_get_format.
* NEWS: Mention the change.
2025-09-27 13:20:39 +02:00
Bruno Haible
1f89fa1de8 Upgrade to libtool 2.6.0.
* m4/libtool.m4: Update from libtool-2.6.0.
* m4/ltoptions.m4: Likewise.
* m4/ltsugar.m4: Likewise.
* m4/ltversion.m4: Likewise.
* m4/lt~obsolete.m4: Likewise.
* build-aux/ltmain.sh: Likewise.
2025-09-22 00:41:29 +02:00
Bruno Haible
a32db7a22e gettext.h: Avoid warning with gcc < 4.2.
Reported by Orgad Shaneh <orgads@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00183.html>.

* gnulib-local/lib/gettext.h (gettext, dgettext, dcgettext): Don't use attribute
__gnu_inline__ with gcc < 4.2.
2025-09-14 18:37:36 +02:00
Bruno Haible
1910a92249 lang-javascript: Avoid failure on macOS 13..15.
* gettext-tools/tests/lang-javascript: On macOS, test only in the UTF-8 locale.
2025-09-14 09:47:44 +02:00
Bruno Haible
a73fd8a501 Update after gnulib changed.
* gettext-tools/libgrep/gnulib-lib/Makefile.am (AM_CPPFLAGS): Add -I option,
so that libintl.h gets found during the compilation of regex.c.
2025-09-14 04:43:06 +02:00
Bruno Haible
adc3ba97ed Put archive.dir.tar under version control.
This helps reducing CI failures when alpha.gnu.org is not responding.
It also simplifies the branch handling when a bug-fix release is made
on the maintenance branch of an older release.

* gettext-tools/misc/archive.dir.tar: New file.
* autopull.sh: Don't fetch it from alpha.gnu.org any more.
2025-09-08 16:20:17 +02:00
Bruno Haible
e2c4aba219 build: Make CI's git hostname rewriting rules apply.
* .gitmodules: Canonicalize savannah host name.
2025-09-08 08:43:32 +02:00
Bruno Haible
8f38e562d6 Update after gnulib changed.
* libtextstyle/tests/Makefile.am (AM_CFLAGS): Initialize.
* gettext-tools/gnulib-tests/Makefile.am (AM_CFLAGS): Initialize.
2025-09-04 00:40:21 +02:00
Bruno Haible
0736aca4af Update to the newest gnulib. 2025-09-04 00:30:53 +02:00
Bruno Haible
a40c7b7f84 doc: Update table of programming languages.
* gettext-tools/doc/gettext.texi (List of Programming Languages): Update table
in comments.
2025-08-24 01:20:29 +02:00
Bruno Haible
ce283b4b85 its: Improve libxml error handling.
When there is a non-fatal error, the previous code would just print a message
to stderr and continue the operation, without affecting the exit code.

* gettext-tools/src/its.c: Include <setjmp.h>, <stdarg.h>.
(xml_error_exit): New variable.
(structured_error): Longjmp to xml_error_exit.
(generic_error): New function.
(its_rule_list_add_from_file, its_rule_list_add_from_string,
its_rule_list_extract, its_merge_context_merge, its_merge_context_alloc,
its_merge_context_write): Invoke also xmlSetGenericErrorFunc. Use setjmp to
abort the operation when a non-fatal error occurs.
2025-08-13 22:20:46 +02:00
Bruno Haible
6836b43624 its: Fix error handling.
* gettext-tools/src/its.c (structured_error, its_rule_list_add_from_file,
its_rule_list_add_from_string, its_rule_list_extract, its_merge_context_alloc):
Swap error() arguments.
2025-08-11 16:54:20 +02:00
Bruno Haible
b1cbf5dd77 Rely more on Gnulib.
* gettext-tools/src/write-java.c (S_*): Remove macros, relying on gnulib module
sys_stat-h.
* gettext-tools/src/write-csharp.c (S_*): Likewise.
2025-08-10 22:03:19 +02:00
Bruno Haible
057cf901ba Use standard way of including <config.h>.
* gettext-runtime/src/*.c: Include <config.h> unconditionally.
* gettext-runtime/libasprintf/lib-asprintf.h: Likewise.
* libtextstyle/lib/color.c: Likewise.
* gnulib-local/lib/markup.c: Likewise.
* gettext-tools/src/*.y: Likewise.
* gettext-tools/src/*.c: Likewise.
* gettext-tools/libgrep/*.c: Likewise.
* gettext-tools/libgettextpo/*.c: Likewise.
* gettext-tools/tests/*.c: Likewise.
2025-08-10 17:34:20 +02:00
Bruno Haible
c4c7c3839a INSTALL: Tweak wording.
* INSTALL: Fix a copy-and-paste mistake.
2025-08-05 22:10:35 +02:00
Bruno Haible
eb25e838ad build: Make autogen.sh more reliable.
* autogen.sh: Fail if gnulib-tool fails.
2025-08-05 22:09:01 +02:00
Bruno Haible
b214284bcb tests: Fix a lang-go failure.
* gettext-tools/tests/lang-go: Add workaround against
"go: GOPROXY list is not the empty string, but contains no entries" error.
2025-08-05 08:43:59 +02:00
Bruno Haible
ae418b7028 Update after gnulib changed.
* gettext-tools/tests/Makefile.am (TESTS_ENVIRONMENT): Define top_builddir,
consistently with Gnulib.
* gettext-tools/tests/init-env.in (top_builddir): Remove definition here.
2025-08-05 07:39:14 +02:00
Bruno Haible
7e8f1357f4 Update to the newest gnulib. 2025-08-05 07:39:10 +02:00
Bruno Haible
2d6f665b97 intl-java: Remove an unused variable.
Reported by Coverity.

* gettext-runtime/intl-java/gnu/gettext/GettextResource.java (ngettextnull):
Remove an unused variable.
2025-08-03 20:11:40 +02:00
Bruno Haible
ae52c096d7 libcroco: Fix double-free and free-after-use bug.
Reported by Coverity.

* libtextstyle/gnulib-local/lib/libcroco/cr-sel-eng.c
(cr_sel_eng_unregister_pseudo_class_sel_handler): Don't access or free 'elem'
after it has been freed. Remove always-NULL variable.
2025-08-03 20:02:26 +02:00
Bruno Haible
6fa3d8eca2 intl: Fix a small memory leak.
Reported by Coverity.

* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): Free
sysdep_segment_values before 'goto invalid'.
2025-08-03 19:34:19 +02:00
Bruno Haible
cad29a148e examples: Fix a compiler warning.
* gettext-tools/examples/hello-objc-gnustep/Hello.m (Hello): Remove an unused
variable.
2025-08-03 19:33:22 +02:00
Bruno Haible
0e709dbdee gettext.m4: Fix build on Cygwin with gcc 13 or newer.
This gcc version links with -lintl -liconv by default, making it appear as if
gettext() et al. were defined in libc. But GNU gettext still needs to build a
new libintl.

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): On Cygwin, set
USE_INCLUDED_LIBINTL=yes regardless of the gcc version.
2025-08-01 22:23:22 +02:00
Bruno Haible
133de2a1c5 gettext.m4: Modernize.
* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Rename configure option
--with-included-gettext to --with-included-libintl. Rename cache
variable nls_cv_force_use_gnu_gettext to gt_cv_force_use_gnu_libintl.
Rename cache variable nls_cv_use_gnu_gettext to gt_cv_use_gnu_libintl.
2025-08-01 22:22:37 +02:00