]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
6 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.

6 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.

6 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.

6 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.

6 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).

6 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

6 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.

6 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.

6 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.

6 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.

6 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.

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

6 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).

6 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).

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

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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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).

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

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

6 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.

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

6 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.

6 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."

6 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.

6 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.

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

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

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

7 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.

7 months agolibtextstyle: Recognize number of colours in TERM=*-direct.
Bruno Haible [Fri, 3 Jan 2025 01:16:38 +0000 (02:16 +0100)] 
libtextstyle: Recognize number of colours in TERM=*-direct.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Fix
recognition of TERM values that end in "-direct".

7 months agolibtextstyle: Add comments.
Bruno Haible [Fri, 3 Jan 2025 00:05:39 +0000 (01:05 +0100)] 
libtextstyle: Add comments.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Add
comments.

7 months agoUpdate after gnulib changed.
Bruno Haible [Thu, 2 Jan 2025 13:12:12 +0000 (14:12 +0100)] 
Update after gnulib changed.

* gettext-runtime/src/envsubst.c (subst_from_stdin): Use sd_ function prefix
instead of string_desc_ function prefix.
* gettext-tools/src/its.c (set_doc_encoding_utf8, _its_is_valid_simple_gen_xml,
is_valid_xhtml_element, is_valid_html_element, is_no_end_html_element):
Likewise.
* gettext-tools/src/msgl-ascii.c (is_ascii_string_desc): Likewise.
* gettext-tools/src/msgl-iconv.c (convert_string_desc_directly): Likewise.
* gettext-tools/src/read-desktop.c (desktop_lex): Likewise.
* gettext-tools/src/x-awk.c (phase2_getc, phase3_get): Likewise.
* gettext-tools/src/x-c.c (phase5_get): Likewise.
* gettext-tools/src/x-perl.c (get_here_document, extract_quotelike_pass1,
extract_quotelike_pass1_utf8, extract_quotelike, extract_triple_quotelike,
extract_quotelike_pass3, extract_variable, interpolate_keywords, x_perl_prelex):
Likewise.
* gettext-tools/src/x-php.c (phase4_get): Likewise.
* gettext-tools/src/x-rst.c (parse_integer): Likewise.
* gettext-tools/src/x-ycp.c (phase2_getc, phase5_get): Likewise.
* gettext-tools/src/xg-encoding.c (string_desc_from_current_source_encoding):
Likewise.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 2 Jan 2025 13:06:07 +0000 (14:06 +0100)] 
Update to the newest gnulib.

7 months agomsgfmt: Fix python-brace-format checking.
Bruno Haible [Tue, 31 Dec 2024 23:49:01 +0000 (00:49 +0100)] 
msgfmt: Fix python-brace-format checking.

Reported at <https://savannah.gnu.org/bugs/index.php?48872>.

* gettext-tools/src/format-python-brace.c (format_check): Fix comment. Do the
cmp > 0 check also if equality==false.
* gettext-tools/src/format-python.c (format_check): Fix comment.
* gettext-tools/src/format-ruby.c (format_check): Likewise.
* gettext-tools/src/format-sh.c (format_check): Likewise.

7 months agoWhen reading PO files, treat CRLF line terminators like LF, part 2.
Bruno Haible [Tue, 31 Dec 2024 16:03:56 +0000 (17:03 +0100)] 
When reading PO files, treat CRLF line terminators like LF, part 2.

* gettext-tools/tests/Makefile.am (EXTRA_DIST): Add testdata/crlf.pot.

7 months agoMerge from 0.23.x branch: Prepare for 0.23.1 release.
Bruno Haible [Tue, 31 Dec 2024 15:48:02 +0000 (16:48 +0100)] 
Merge from 0.23.x branch: Prepare for 0.23.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-runtime/intl/Makefile.am (LTV_*): Bump to 12:2:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:3:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:12:5.
* gettext-tools/misc/autopoint.in: Likewise. Accept version 0.23.1.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.23.1.

7 months agoMerge from 0.23.x branch: Update NEWS file for release 0.23.1.
Bruno Haible [Tue, 31 Dec 2024 15:45:09 +0000 (16:45 +0100)] 
Merge from 0.23.x branch: Update NEWS file for release 0.23.1.

7 months agodoc: Update list of dependencies.
Bruno Haible [Tue, 31 Dec 2024 10:57:30 +0000 (11:57 +0100)] 
doc: Update list of dependencies.

7 months agoWhen reading PO files, treat CRLF line terminators like LF.
Bruno Haible [Tue, 31 Dec 2024 01:43:41 +0000 (02:43 +0100)] 
When reading PO files, treat CRLF line terminators like LF.

Reported by Hendy Irawan <hendy@hendyirawan.com> at
<https://savannah.gnu.org/bugs/?52395>.

* gettext-tools/src/read-po-internal.h (MBFILE_MAX_PUSHBACK): Renamed from
NPUSHBACK. Increase by 1.
(struct mbfile): Rename field 'have_pushback' to 'pushback_count'.
* gettext-tools/src/read-po-lex.c (mbfile_init): Update.
(mbfile_getc): Read pushed-back character before testing for sticky EOF.
(mbfile_ungetc): Update.
(mbfile_getc_normalized): New function.
(lex_getc): Invoke mbfile_getc_normalized instead of mbfile_getc.
* gettext-tools/tests/testdata/crlf.pot: New file.
* gettext-tools/tests/msgcat-23: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

7 months agoUpdate after gnulib changed.
Bruno Haible [Sat, 28 Dec 2024 08:17:56 +0000 (09:17 +0100)] 
Update after gnulib changed.

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC,
GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES, GNULIB_MODULES_TOOLS_OTHER,
GNULIB_MODULES_LIBGETTEXTPO): Use the new names of renamed gnulib modules.
* gnulib-local/modules/backupfile (Depends-on): Likewise.
* gnulib-local/modules/closeout (Depends-on): Likewise.
* gnulib-local/modules/libtextstyle-dummy (Depends-on): Likewise.
* gnulib-local/modules/libxml (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/fd-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/html-styled-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/iconv-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/memory-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/noop-styled-ostream (Depends-on): Likewise.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Likewise.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Sat, 28 Dec 2024 08:14:03 +0000 (09:14 +0100)] 
Update to the newest gnulib.

7 months agobuild: Fix "make dist" result when run in a VPATH build.
Bruno Haible [Fri, 27 Dec 2024 09:39:27 +0000 (10:39 +0100)] 
build: Fix "make dist" result when run in a VPATH build.

Suggested by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00181.html>.

* Makefile.am (gen-ChangeLogs): Consider $(srcdir).

7 months agointl: Support the UTF-8 environment on native Windows.
Bruno Haible [Mon, 23 Dec 2024 16:54:38 +0000 (17:54 +0100)] 
intl: Support the UTF-8 environment on native Windows.

Reported by Lasse Collin <lasse.collin@tukaani.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-12/msg00111.html>.

* gettext-runtime/intl/setlocale.c: Include <windows.h>.
(setlocale_unixlike): In the UTF-8 environment, append a suffix ".65001"
to the locale names passed to the native setlocale().

7 months agointl: Handle LC_MESSAGES correctly on native Windows.
Bruno Haible [Mon, 23 Dec 2024 16:50:14 +0000 (17:50 +0100)] 
intl: Handle LC_MESSAGES correctly on native Windows.

* gettext-runtime/intl/setlocale.c (libintl_setlocale): Revamp the LC_ALL case
if LC_MESSAGES is 1729.

7 months agoUpdate to the newest gnulib.
Bruno Haible [Mon, 23 Dec 2024 16:58:36 +0000 (17:58 +0100)] 
Update to the newest gnulib.

7 months agolang-python-*: Fix test failures on mingw with UCRT.
Bruno Haible [Tue, 24 Dec 2024 15:48:26 +0000 (16:48 +0100)] 
lang-python-*: Fix test failures on mingw with UCRT.

* gettext-tools/tests/lang-python-1: Disable ISO8859_LOCALE_UNSUPPORTED for
Python 3. Set PYTHONIOENCODING environment variable.
* gettext-tools/tests/lang-python-2: Likewise.

7 months agolibtextstyle: Fix a test failure on MSYS2.
Bruno Haible [Mon, 23 Dec 2024 21:42:27 +0000 (22:42 +0100)] 
libtextstyle: Fix a test failure on MSYS2.

* libtextstyle/gnulib-local/tests/test-term-ostream-xterm-msys2.out: New file.
* libtextstyle/gnulib-local/tests/test-term-ostream-xterm.sh: Use it as an
expected test result.
* libtextstyle/gnulib-local/modules/term-ostream-tests (Files): Add it.
* libtextstyle/Makefile.am (EXTRA_DIST): Likewise.

7 months agoFix test failure of lang-ruby.
Bruno Haible [Mon, 23 Dec 2024 21:26:30 +0000 (22:26 +0100)] 
Fix test failure of lang-ruby.

* gettext-tools/tests/lang-ruby: Skip the test if 'rxgettext' is not installed.

7 months agoexamples: Don't fail build if rxgettext is not installed.
Bruno Haible [Mon, 23 Dec 2024 20:37:36 +0000 (21:37 +0100)] 
examples: Don't fail build if rxgettext is not installed.

* gettext-tools/examples/po/xsmallpot.sh: Ignore a 'make' failure in the
hello-ruby example.
* gettext-tools/examples/po/hello-ruby.pot: New generated file.

7 months agoexamples: Don't fail configuration of hello-objc if no Objective-C compiler is found...
Bruno Haible [Mon, 23 Dec 2024 19:17:24 +0000 (20:17 +0100)] 
examples: Don't fail configuration of hello-objc if no Objective-C compiler is found, part 2.

* gettext-tools/examples/po/xsmallpot.sh: Don't remove the m4_pushdef, m4_popdef
lines from hello-objc*/configure.ac.

7 months agoexamples: Find the Objective-C compiler out-of-the-box on AlmaLinux 9 systems.
Bruno Haible [Mon, 23 Dec 2024 18:01:58 +0000 (19:01 +0100)] 
examples: Find the Objective-C compiler out-of-the-box on AlmaLinux 9 systems.

* gettext-tools/examples/hello-objc-gnome2/configure.ac: Invoke AC_PROG_OBJC
with a customized search list. Don't invoke AC_PROC_CC.

7 months agoexamples: Don't fail configuration of hello-objc if no Objective-C compiler is found.
Bruno Haible [Mon, 23 Dec 2024 17:59:12 +0000 (18:59 +0100)] 
examples: Don't fail configuration of hello-objc if no Objective-C compiler is found.

* gettext-tools/examples/hello-objc/configure.ac: Map AC_MSG_FAILURE to
AC_MSG_WARN.

7 months agopo: Remove a comment that is not valid any more since 2002-01-07.
Bruno Haible [Fri, 20 Dec 2024 14:56:48 +0000 (15:56 +0100)] 
po: Remove a comment that is not valid any more since 2002-01-07.

The comment "Target 'all' must not depend on target '$(DOMAIN).pot-update'"
does not hold any more:
  all <- all-yes <- $(srcdir)/stamp-po <- $(srcdir)/$(DOMAIN).pot
and the latter rule executes
  $(MAKE) $(DOMAIN).pot-update

* gettext-runtime/po/Makefile.in: Remove comment.
* gettext-tools/examples/po/Makefile.am: Likewise.
* gettext-tools/examples/*/po/Makefile.am: Likewise.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile: Likewise.

7 months agoNew example 'hello-c++-gnome3'.
Bruno Haible [Wed, 18 Dec 2024 18:04:47 +0000 (19:04 +0100)] 
New example 'hello-c++-gnome3'.

* gettext-tools/examples/hello-c++-gnome3: New directory, based on
gettext-tools/examples/hello-c-gnome3.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Update.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS,
SMALLPOFILES_FOR_lang): Update.
* gettext-tools/examples/README: Update.
* gettext-tools/examples/check-examples: Handle this directory as well.
* NEWS: Mention the new example.
* HACKING: Mention the gtkmm dependency.

7 months agohello-c-gnome3: Document build dependencies.
Bruno Haible [Wed, 18 Dec 2024 18:29:44 +0000 (19:29 +0100)] 
hello-c-gnome3: Document build dependencies.

* HACKING: Mention Gtk3 dependency.

7 months agohello-c-gnome3: Add a simpler "hello world" program.
Bruno Haible [Wed, 18 Dec 2024 10:14:29 +0000 (11:14 +0100)] 
hello-c-gnome3: Add a simpler "hello world" program.

* gettext-tools/examples/hello-c-gnome3/README: New file.
* gettext-tools/examples/hello-c-gnome3/hello2.c: New file, based on
gettext-tools/examples/hello-c-gnome3/hello.c.
* gettext-tools/examples/hello-c-gnome3/hello2.desktop.in.in: New file, based on
gettext-tools/examples/hello-c-gnome3/hello.desktop.in.in.
* gettext-tools/examples/hello-c-gnome3/hello2.gresource.xml: New file, based on
gettext-tools/examples/hello-c-gnome3/hello.gresource.xml.
* gettext-tools/examples/hello-c-gnome3/hello2.ui: Renamed from
gettext-tools/examples/hello-c-gnome3/hello.ui.
* gettext-tools/examples/hello-c-gnome3/hello2.gschema.xml: New file, based on
gettext-tools/examples/hello-c-gnome3/hello.gschema.xml.
* gettext-tools/examples/hello-c-gnome3/hello.c: Greatly simplified.
* gettext-tools/examples/hello-c-gnome3/hello.ui: Use an <object> element
instead of a <template> element.
* gettext-tools/examples/hello-c-gnome3/hello.gschema.xml: Remove file.
* gettext-tools/examples/hello-c-gnome3/Makefile.am (bin_PROGRAMS): Add hello2.
(hello-resources.c): Renamed from resources.c.
(hello2_SOURCES): New variable.
(hello2-resources.c): New target.
(desktop_DATA): Add hello2.desktop.
(hello2.desktop.in, hello2.desktop): New targets.
(BUILT_SOURCES, CLEANFILES, MAINTAINERCLEANFILES): Update.
(EXTRA_DIST): Remove hello.gschema.xml. Add hello2.desktop.in.in,
hello2.desktop.in, hello2.gresource.xml, hello2.ui, hello2.gschema.xml.
* gettext-tools/examples/hello-c-gnome3/po/POTFILES.in: Update.
* gettext-tools/examples/hello-c-gnome3/autoclean.sh: Update.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES): Update.
* gettext-tools/examples/po/Makefile.am (POTFILES): Update.

7 months agohello-c-gnome3: Make more robust.
Bruno Haible [Wed, 18 Dec 2024 00:55:10 +0000 (01:55 +0100)] 
hello-c-gnome3: Make more robust.

* gettext-tools/examples/hello-c-gnome3/hello.c (hello_application_window_init):
Initialize label_id explicitly.

8 months agohello-c-gnome3: Fix "make distcheck".
Bruno Haible [Mon, 16 Dec 2024 21:18:45 +0000 (22:18 +0100)] 
hello-c-gnome3: Fix "make distcheck".

* gettext-tools/examples/hello-c-gnome3/Makefile.am (BUILT_SOURCES): Add
hello.desktop.
(gschemas.compiled): Make it work in VPATH builds.
(CLEANFILES): Remove resources.c. Don't mention hello.desktop twice.
(MAINTAINERCLEANFILES): Add resources.c.
* gettext-tools/examples/hello-c-gnome3/autoclean.sh: Remove also resources.c,
hello.desktop.in.

8 months agohello-c-gnome3: Avoid translator mistakes regarding markup (e.g. in de.po).
Bruno Haible [Mon, 16 Dec 2024 14:31:39 +0000 (15:31 +0100)] 
hello-c-gnome3: Avoid translator mistakes regarding markup (e.g. in de.po).

* gettext-tools/examples/hello-c-gnome3/hello.c (hello_application_window_init):
Move HTML markup outside of translatable strings.

8 months agohello-c-gnome3: Fix an error "Settings schema 'org.gnu.gettext.examples.hello' is...
Bruno Haible [Mon, 16 Dec 2024 13:58:07 +0000 (14:58 +0100)] 
hello-c-gnome3: Fix an error "Settings schema 'org.gnu.gettext.examples.hello' is not installed".

* gettext-tools/examples/hello-c-gnome3/configure.ac: Invoke
gl_BUILD_TO_HOST_LOCALEDIR, gl_BUILD_TO_HOST_PKGDATADIR.
* gettext-tools/examples/hello-c-gnome3/Makefile.am (DEFS): Define also
PKGDATADIR.
(pkgdata_DATA): New variable.
* gettext-tools/examples/hello-c-gnome3/hello.c (main): Add PKGDATADIR to the
GSETTINGS_SCHEMA_DIR value.

8 months agohello-c-gnome3: Exit when the window's close button is clicked.
Bruno Haible [Mon, 16 Dec 2024 12:49:38 +0000 (13:49 +0100)] 
hello-c-gnome3: Exit when the window's close button is clicked.

* gettext-tools/examples/hello-c-gnome3/hello.c
(hello_application_window_dispose): Remove function.
(hello_application_window_class_init): Don't overwrite the 'dispose' field.

8 months agoRename some examples.
Bruno Haible [Mon, 16 Dec 2024 10:48:10 +0000 (11:48 +0100)] 
Rename some examples.

* gettext-tools/examples/hello-c-gnome2: Renamed from
gettext-tools/examples/hello-c-gnome.
* gettext-tools/examples/hello-c++-gnome2: Renamed from
gettext-tools/examples/hello-c++-gnome.
* gettext-tools/examples/hello-objc-gnome2: Renamed from
gettext-tools/examples/hello-objc-gnome.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Update.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS,
SMALLPOFILES_FOR_lang): Update.
* gettext-tools/examples/README: Update.
* gettext-tools/examples/check-examples: Update.
* check-copyright-headers: Update.

8 months agoNew example 'hello-ruby'.
Bruno Haible [Mon, 16 Dec 2024 10:27:14 +0000 (11:27 +0100)] 
New example 'hello-ruby'.

* gettext-tools/examples/hello-ruby: New directory, based on
gettext-tools/examples/hello-php.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES, EXAMPLESDIRS): Update.
* gettext-tools/examples/po/Makefile.am (POTFILES, SMALLPOTS,
SMALLPOFILES_FOR_lang): Update.
* gettext-tools/examples/README: Update.
* gettext-tools/examples/check-examples: Handle this directory as well.
* NEWS: Mention the new example.

8 months agoRuby: Add unit test for Ruby support.
Bruno Haible [Mon, 16 Dec 2024 19:07:38 +0000 (20:07 +0100)] 
Ruby: Add unit test for Ruby support.

* gettext-tools/tests/lang-ruby: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

8 months agodoc: Update list of dependencies.
Bruno Haible [Mon, 16 Dec 2024 19:38:30 +0000 (20:38 +0100)] 
doc: Update list of dependencies.

* gettext-tools/doc/lang-csharp.texi: Mention dotnet8 as alternative.
* gettext-tools/tests/lang-csharp: Likewise.
* gettext-tools/doc/lang-pascal.texi: Replace fpk with fpc.
* gettext-tools/tests/lang-pascal: Likewise.
* gettext-tools/doc/lang-wxwidgets.texi: Mention libwxgtk3.2-dev as alternative.
* gettext-tools/tests/lang-objc: Mention the gobjc package.
* gettext-tools/tests/lang-rst: Mention the fp-utils package.
* gettext-tools/tests/lang-vala: Mention valac as alternative.

8 months agoFix "make distcheck" failure (regression from "po: Rename Makefile.in.in to Makefile...
Bruno Haible [Mon, 16 Dec 2024 13:26:16 +0000 (14:26 +0100)] 
Fix "make distcheck" failure (regression from "po: Rename Makefile.in.in to Makefile.in.").

* gettext-runtime/po/Makefile.in (DISTFILES.common): Remove Makefile.in.

8 months agodoc: Update reference to lua-gettext package.
Bruno Haible [Sun, 15 Dec 2024 17:44:14 +0000 (18:44 +0100)] 
doc: Update reference to lua-gettext package.

* gettext-tools/doc/lang-lua.texi: Update lua-gettext installation instructions.
* HACKING: Update lua version requirements and lua-gettext installation
instructions.

8 months agointl-java: Fix a deprecation warning.
Bruno Haible [Thu, 12 Dec 2024 10:52:59 +0000 (11:52 +0100)] 
intl-java: Fix a deprecation warning.

* gettext-runtime/intl-java/gnu/gettext/GettextResource.java (ngettextnull): Use
Long.valueOf(n) instead of new Long(n).

8 months agolibtextstyle: Fix a gcc 13 -Wunused-result warning.
Bruno Haible [Thu, 12 Dec 2024 10:34:26 +0000 (11:34 +0100)] 
libtextstyle: Fix a gcc 13 -Wunused-result warning.

* libtextstyle/gnulib-local/lib/glib/gstrfuncs.c (g_strdup_vprintf): Don't
assume that vasprintf leaves the pointed-to variable unchanged when it fails.

8 months agolibxml: Fix a gcc 13 -Wformat-truncation warning.
Bruno Haible [Thu, 12 Dec 2024 10:24:11 +0000 (11:24 +0100)] 
libxml: Fix a gcc 13 -Wformat-truncation warning.

* gnulib-local/lib/libxml/uri.c (xmlURIEscape): Use a buffer of size 12, not 10.

8 months agoSilence -Wstack-protector warnings from Ubuntu gcc 13 and 14.
Bruno Haible [Thu, 12 Dec 2024 09:40:53 +0000 (10:40 +0100)] 
Silence -Wstack-protector warnings from Ubuntu gcc 13 and 14.

* m4/more-warnings.m4 (gt_MORE_WARNINGS): Silence -Wstack-protector also
for newer gcc versions.

8 months agodoc: Update list of dependencies.
Bruno Haible [Wed, 11 Dec 2024 20:31:35 +0000 (21:31 +0100)] 
doc: Update list of dependencies.

* DEPENDENCIES: Add libattr.
* HACKING: Stop mentioning XEmacs. Add note regarding GNU Smalltalk.
Mention dotnet as alternative to Mono. Mention wxgtk version 3.2.

8 months agopo: Rename Makefile.in.in to Makefile.in.
Bruno Haible [Tue, 10 Dec 2024 03:32:36 +0000 (04:32 +0100)] 
po: Rename Makefile.in.in to Makefile.in.

* gettext-runtime/po/Makefile.in: Renamed from gettext-runtime/po/Makefile.in.in.
(distclean): Don't remove Makefile.in.
* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Remove the 'po-directories'
commands.
* gettext-runtime/configure.ac: Update AC_OUTPUT invocation.
* gettext-runtime/Makefile.am (maintainer-update-po): Update.
* gettext-tools/configure.ac: Update AC_OUTPUT invocation.
* gettext-tools/Makefile.am (maintainer-update-po): Update.
* gettext-tools/doc/gettext.texi (Translator advice, po/Rules-*, configure.ac,
Files under Version Control, Maintainers for other Languages): Update.
* gettext-tools/doc/gettextize.texi: Update.
* gettext-tools/examples/README: Update.
* gettext-tools/examples/hello-c/autoclean.sh: Update.
* gettext-tools/examples/hello-c-gnome/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c-gnome3/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c++/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c++-gnome/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c++-kde/autoclean.sh: Likewise.
* gettext-tools/examples/hello-c++20/autoclean.sh: Likewise.
* gettext-tools/examples/hello-objc/autoclean.sh: Likewise.
* gettext-tools/examples/hello-objc-gnome/autoclean.sh: Likewise.
* gettext-tools/misc/autopoint.in: Update search for po directories.
* gettext-tools/misc/gettextize.in: Treat Makefile.in like Makefile.in.in
before. Treat Makefile.in.in as a removed file.
* gettext-tools/tests/autopoint-2: Prepare for bumping ARCHIVE_VERSION.
* gettext-tools/tests/autopoint-3: Likewise.
* autogen.sh: Copy po/Makefile.in instead of po/Makefile.in.in.
* Makefile.am (distcheck-hook): Update.
* NEWS: Mention the change.

8 months agobuild: Read LINGUAS at 'make' time, not at 'configure' time, part 2.
Bruno Haible [Tue, 10 Dec 2024 03:06:36 +0000 (04:06 +0100)] 
build: Read LINGUAS at 'make' time, not at 'configure' time, part 2.

* gettext-tools/examples/hello-csharp*/po/Makefile.am: Remove a comment.
* gettext-tools/examples/hello-tcl*/po/Makefile.am: Likewise.

8 months agoUse new approach for gnulib localizations.
Bruno Haible [Mon, 9 Dec 2024 03:59:35 +0000 (04:59 +0100)] 
Use new approach for gnulib localizations.

* gettext-runtime/po/POTFILES.in: Remove files that come from gnulib.
* gettext-tools/po/POTFILES.in: Likewise.
* gettext-runtime/src/envsubst.c (main): Invoke bindtextdomain for the domain
'gnulib'.
* gettext-runtime/src/gettext.c (main): 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.

8 months agoUpdate after gnulib changed.
Bruno Haible [Sun, 8 Dec 2024 17:46:45 +0000 (18:46 +0100)] 
Update after gnulib changed.

* gettext-tools/src/Makefile.am (DEFS): Remove definition of BISON_LOCALEDIR,
now present in config.h.