8322 Commits

Author SHA1 Message Date
Bruno Haible
c12b25dc82 Release 0.23 v0.23 2024-12-01 12:34:55 +01:00
Bruno Haible
1b01b306a8 examples: Use infrastructure from gettext version 0.23.
* gettext-tools/examples/hello-*/configure.ac: Use AM_GNU_GETTEXT_VERSION with
version 0.23.
* gettext-tools/examples/hello-c++-kde/configure.in.in: Likewise.
* gettext-tools/examples/hello-*/m4/Makefile.am: Update .m4 file list.
2024-12-01 12:31:10 +01:00
Bruno Haible
7763a32cae Update translations from TP.
* gettext-runtime/po/*.po: Update from TP.
* gettext-tools/po/*.po: Update from TP.
* gettext-tools/po/LINGUAS: Add ka.
* gettext-tools/examples/po/*.po: Update from TP.
2024-12-01 12:30:14 +01:00
Bruno Haible
05762df5d7 Prepare for 0.23 release.
* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* gettext-runtime/po/Makefile.in.in: Bump Origin version and
GETTEXT_MACRO_VERSION.
* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Bump GETTEXT_MACRO_VERSION
accordingly.
* gettext-runtime/m4/gettext.m4: Update comments.
* 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:1:4.
* libtextstyle/lib/Makefile.am (LTV_*): Bump to 2:2:2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:11: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.23.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.23.
* NEWS, gettext-runtime/NEWS: Update.
2024-12-01 10:39:52 +01:00
Bruno Haible
581489bb31 Update after gnulib changed. 2024-12-01 08:54:06 +01:00
Bruno Haible
2369d29e27 Update to the newest gnulib. 2024-12-01 08:50:00 +01:00
Bruno Haible
f55873531e xgettext: C: Revisit "hexadecimal escape sequence out of range" warnings.
Reported by Vaclav Slavik <vaclav@slavik.io>
at <https://savannah.gnu.org/bugs/?65053>.

* gettext-tools/src/x-c.c (get_string_element): Add context argument. Don't warn
for character literals. For wide strings, use a different warning and complain
about "out of range" only for values >= 0x110000.
(phase5_get): Distinguish normal string literals and wide string literals.
2024-12-01 08:40:52 +01:00
Bruno Haible
b181b91a32 intl: Fix lang-c++ failure on MSVC, caused by last commit.
* gettext-runtime/intl/libgnuintl.in.h (_INTL_HAS_FORCE_INLINE,
_INTL_FORCE_INLINE): New macros.
(_INTL_REDIRECT_INLINE): Don't define in C++ mode when _INTL_HAS_FORCE_INLINE
is not set.
2024-11-30 09:41:21 +01:00
Bruno Haible
e4a1c66c1d intl: Avoid conflict between libintl.h and some C++ header files.
Reported Pierre Ossman <ossman@cendio.se>
at <https://savannah.gnu.org/bugs/?64006>.

* gettext-runtime/intl/libgnuintl.in.h (*printf, newlocale, duplocale,
freelocale, setlocale): Use _INTL_REDIRECT_INLINE or _INTL_ASM as alternatives
to _INTL_REDIRECT_MACROS, avoiding conflicts with inline functions in mingw
and MSVC <stdio.h>.
2024-11-28 20:22:47 +01:00
Bruno Haible
e822f894b4 intl: Avoid possible error from libintl.h in C++ mode.
* gettext-runtime/intl/libgnuintl.in.h (gettext, dgettext, dcgettext, ngettext,
dngettext, dcngettext, textdomain, bindtextdomain, wbindtextdomain,
bind_textdomain_codeset): In the _INTL_REDIRECT_INLINE redirects, in C++ mode,
avoid a compilation error if the function is globally declared in some .h file.
2024-11-28 14:02:12 +01:00
Bruno Haible
d897bcbd98 doc: Avoid @table, as it cannot be used to produce decent-looking output. 2024-11-27 22:24:29 +01:00
Bruno Haible
2362548da3 doc: Mention C.UTF-8 locale.
Reported by nl6720 at <https://savannah.gnu.org/bugs/?62815>.

* gettext-tools/doc/gettext.texi (Locale Names): Mention the C.UTF-8 locale.
2024-11-27 12:56:07 +01:00
Bruno Haible
2e779cb324 Add installation information for the tarball users and from a git checkout.
We want to have an INSTALL file that contains installation instructions for
the tarball users. These instructions are necessarily package specific,
because they need to list the prerequisites or reference the DEPENDENCIES
file.

Additionally, many people who are not aware that tarballs are the primary
means for source code distribution of GNU packages check out the git repository
and then expect to see instructions for installing from that git checkout
in the INSTALL file. See e.g. <https://savannah.gnu.org/bugs/?62196>.

Unfortunately, both Automake (with strictness option = 'gnu') and 'bootstrap'
both contain code to copy the generic (not package specific) installation
instructions to the file 'INSTALL'. This is not what we want, so we disable
it. (Other packages handle this issue by putting part of the installation
instructions into the README file. This is suboptimal, because this is not
what the README file is for.)

* autogen.sh: Import INSTALL.generic from gnulib.
* INSTALL: Entirely rewritten, based on poke/INSTALL.
* Makefile.am (EXTRA_DIST): Add INSTALL.generic.
* libtextstyle/autogen.sh: Import INSTALL.generic from gnulib.
* libtextstyle/INSTALL: Entirely rewritten, based on poke/INSTALL.
* libtextstyle/Makefile.am (EXTRA_DIST): Add INSTALL.generic.
2024-11-27 11:40:31 +01:00
Bruno Haible
6a82c91e02 lang-perl-*: Avoid FAIL on macOS.
Reported by Hanspeter Niederstrasser <nieder@users.sourceforge.net>
at <https://savannah.gnu.org/bugs/?66461>.

* gettext-tools/tests/lang-perl-1: On macOS, don't test the ISO-8859-1 locale.
* gettext-tools/tests/lang-perl-2: Likewise.
2024-11-27 00:57:00 +01:00
Bruno Haible
48667189c3 Fix compilation error when pgettext is used.
Reported by Friedrich Beckmann <friedrich.beckmann@posteo.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00189.html>.

* gnulib-local/lib/gettext.h: Include <locale.h>.
2024-11-24 15:16:06 +01:00
Bruno Haible
f992779f2a Upgrade to libtool 2.5.4.
* m4/libtool.m4: Update from libtool-2.5.4.
* m4/ltversion.m4: Likewise.
* build-aux/ltmain.sh: Likewise.
2024-11-22 19:20:39 +01:00
Bruno Haible
62adf9f077 po: Fix build failure with parallel make.
Reported by Lubomir Rintel <lkundrak@v3.sk> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-06/msg00022.html>.

* gettext-runtime/po/Makefile.in.in (.NOTPARALLEL): Add this special target.
2024-11-19 20:07:32 +01:00
Bruno Haible
b598250a70 doc: Improve typography in man pages.
Patch by наб <nabijaczleweli@nabijaczleweli.xyz> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-01/msg00019.html>.

* gettext-runtime/man/bind_textdomain_codeset.3.in: After "e.g." or "i.e.",
use \&.
2024-11-19 19:18:44 +01:00
Bruno Haible
3c46bcf105 doc: Use GNU coding style in man pages.
Reported by наб <nabijaczleweli@nabijaczleweli.xyz> in
<https://lists.gnu.org/archive/html/bug-gettext/2022-01/msg00019.html>.

* gettext-runtime/man/gettext.3.in: In C code snippets, put a space before '('
and after ','.
* gettext-runtime/man/bind_textdomain_codeset.3.in: Likewise.
2024-11-19 19:11:18 +01:00
Bruno Haible
35f408fd83 xgettext: PHP: Stop recognizing ASP tags <% and %> (removed in PHP 7.0).
Reported by David Robinson <dave@netterra.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2021-10/msg00000.html>.

* gettext-tools/src/x-php.c (skip_html): Don't recognize '<%' and '<%='
any more.
(phase2_getc, phase3_getc, phase4_get): In comments, don't treat '%>' like '?>'
any more.
2024-11-19 18:03:45 +01:00
Bruno Haible
59a82e1e1c libgettextpo: Extend the function po_message_set_format.
Reported by Alexander Potashev <aspotashev@gmail.com>
at <https://savannah.gnu.org/bugs/?61160>.

* gettext-tools/libgettextpo/gettext-po.c (po_message_set_format): Support a
negative value.
* gettext-tools/libgettextpo/gettext-po.in.h (po_message_set_format): Mention
effects of po_message_set_format (..., -1).
* gettext-tools/doc/gettext.texi (po_message_t API): Likewise.
* NEWS: Mention the change.
2024-11-19 16:26:45 +01:00
Bruno Haible
9aa0a6be5c Improve comments.
* gettext-tools/src/locating-rules.h (locating_rule_list_locate): Improve
specification.
* gettext-tools/src/sentence.h (sentence_end): Likewise.
2024-11-19 09:47:35 +01:00
Bruno Haible
59f996755f Avoid undefined behaviour.
* gettext-tools/src/quote.h (scan_quoted): Add comment. Avoid undefined
behaviour if length==0.
2024-11-19 09:47:14 +01:00
Bruno Haible
cc2fdc9e73 Fix "gcc -Wzero-as-null-pointer-constant" warnings.
* libtextstyle/gnulib-local/lib/libcroco/cr-enc-handler.c (gv_default_aliases):
Use NULL, not 0, to denote a null pointer.
* libtextstyle/gnulib-local/lib/libcroco/cr-om-parser.c
(cr_om_parser_parse_paths_to_cascade): Likewise.
* gettext-tools/libgrep/kwset.c (kwsalloc, kwsincr, kwsprep, cwexec, kwsexec):
Likewise.
2024-11-16 07:51:24 +01:00
Bruno Haible
c5823dafad Refactor.
* gettext-tools/src/cldr-plural-exp.c: Don't include <unistd.h>, unistr.h.
* gettext-tools/src/cldr-plural.y: Don't include <unistd.h>.
2024-11-08 16:00:04 +01:00
Bruno Haible
55f9683ca4 Refactor.
* gettext-tools/src/cldr-plural.y: Untabify.
(struct cldr_plural_parse_args): New type, moved here from
gettext-tools/src/cldr-plural-exp.h.
(cldr_plural_parse): New function, moved here from
gettext-tools/src/cldr-plural-exp.c.
* gettext-tools/src/cldr-plural-exp.h: Reorder declarations.
(struct cldr_plural_parse_args): Remove declaration.
* gettext-tools/src/cldr-plural-exp.c: Don't include cldr-plural.h. Reorder
functions.
(cldr_plural_parse): Remove function.
2024-11-08 15:54:46 +01:00
Bruno Haible
db39e984f9 Update the GFDL text.
* libtextstyle/doc/fdl.texi: Update from gnulib/doc/fdl-1.3.texi.
2024-11-07 10:16:51 +01:00
Bruno Haible
2756efc539 Upgrade from GFDL 1.2 to GFDL 1.3.
* gettext-runtime/libasprintf/fdl.texi: Update from gnulib/doc/fdl-1.3.texi.
* gettext-tools/doc/fdl.texi: Likewise.
* gettext-runtime/libasprintf/autosprintf.texi: Update reference.
* gettext-tools/doc/gettext.texi: Likewise.
2024-11-07 10:16:36 +01:00
Bruno Haible
f58d3e697e Update the GPL and LGPL text.
* gettext-runtime/intl/COPYING.LIB: Update from
<https://ftp.gnu.org/gnu/Licenses/lgpl-2.1.txt>.
* gettext-runtime/libasprintf/COPYING.LIB: Likewise.
* gettext-runtime/libasprintf/gpl.texi: Update from gnulib/doc/gpl-2.0.texi.
* gettext-runtime/libasprintf/lgpl.texi: Update from gnulib/doc/lgpl-2.1.texi.
* gettext-tools/doc/gpl.texi: Update from gnulib/doc/gpl-2.0.texi.
* gettext-tools/doc/lgpl.texi: Update from gnulib/doc/lgpl-2.1.texi.
2024-11-07 09:51:44 +01:00
Bruno Haible
ceef32d03a build: Fix "make distcheck" after the line-breaking algorithm changed, part 2.
* gettext-tools/configure.ac (MSGMERGE): Test $cross_compiling, since
$CROSS_COMPILING is not set at this point.
2024-11-06 20:41:29 +01:00
Bruno Haible
7185ecbc55 Update legally relevant info.
* AUTHORS: Incorporate records from gnu.org:/gd/gnuorg/copyright.list.
2024-10-28 20:13:38 +01:00
Bruno Haible
5e5841c978 doc: Improve usability of generated PDF.
* gettext-tools/doc/gettext.texi: Use a brown colour for interactive links.
2024-10-28 12:53:05 +01:00
Bruno Haible
fb38661cab build: Fix "make distcheck" failure (regression 2024-10-23).
* check-copyright-headers (func_check_file): Update after DISCLAIM was renamed.
2024-10-25 09:56:29 +02:00
Bruno Haible
ee33eefee5 doc: Add some words about dialects.
Reported by John Cowan <cowan@ccil.org>
at <https://savannah.gnu.org/bugs/?47838>.

* gettext-tools/doc/gettext.texi (The LANGUAGE variable): Add a paragraph
about Chinese.
(Dialects): New section.
2024-10-24 13:40:20 +02:00
Bruno Haible
817671a4d5 doc: Tweaks.
* gettext-tools/doc/gettext.texi (Responsibilities): Tweaks, from
Benno Schulenberg.
2024-10-23 21:27:58 +02:00
Bruno Haible
c042678d3e doc: Revise "Translators" chapter.
* gettext-tools/doc/gettext.texi (Trans Intro 0, Trans Intro 1, Discussions,
Organization, Information Flow): Remove sections.
(Organization, Responsibilities): New sections.
2024-10-23 13:28:35 +02:00
Bruno Haible
68aa84952a Rename and distribute the disclaimer file.
* gettext-tools/misc/disclaim-translations.txt: Renamed from
gettext-tools/misc/DISCLAIM.
* gettext-tools/Makefile.am (EXTRA_DIST): Update.
(pkgdata_DATA): New variable.
2024-10-23 13:28:35 +02:00
Bruno Haible
8c9c600555 build: Simplify.
* gettext-tools/Makefile.am (gettextsrcdir): Remove variable.
(pkgdata_SCRIPTS): Renamed from gettextsrc_SCRIPTS.
2024-10-23 13:28:35 +02:00
Bruno Haible
24bfd16669 Fix test failure of autopoint-3 on Cygwin.
It was broken since commit "tests: Use libtool in autopoint-3 test" (2014-09-05):
The Makefile specified to link the 'hello' program without libtool
(and thus Automake generated a direct link command without libtool),
but the LDADD variable used @LTLIBINTL@. On Cygwin, this led to a use of
the -R option, which the compiler does not understand:
x86_64-pc-cygwin-gcc: error: unrecognized command line option ‘-R’; did you mean ‘-R’?

* gettext-tools/tests/autopoint-3: Don't invoke LT_INIT. Use @LIBINTL@,
not @LTLIBINTL@. Don't touch ltmain.sh.
2024-10-23 09:59:49 +02:00
Bruno Haible
6dd0270bf6 Improve handling of Windows DLL directories when executing programs.
Reported by Michele Locati <mlocati@gmail.com>
at <https://savannah.gnu.org/bugs/?66356>.

Revert commit e2839b591c from 2019-05-01. Instead, use gnulib's new feature.

* gettext-tools/src/Makefile.am (DEFS): Define BINDIR.
* gettext-tools/src/msginit.c: Don't include configmake.h.
(main): Don't add BINDIR to PATH globally.
(get_user_email, language_team_address, plural_forms): Pass a dll_dirs argument
to create_pipe_in.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Remove configmake.
2024-10-23 09:39:50 +02:00
Bruno Haible
9f12416651 Update after gnulib changed.
* gettext-tools/src/msgexec.c (process_string): Update create_pipe_out
invocation.
* gettext-tools/src/write-resources.c (execute_writing_input): Likewise.
* gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email,
language_team_address, plural_forms): Update create_pipe_in invocations.
* gettext-tools/src/read-csharp.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-java.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-resources.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-tcl.c (msgdomain_read_tcl): Likewise.
* gettext-tools/src/x-ruby.c (extract_ruby): Likewise.
* gettext-tools/src/urlget.c (execute_it, fetch): Update execute invocations.
2024-10-22 22:24:44 +02:00
Bruno Haible
354401161c Update to the newest gnulib. 2024-10-22 22:16:51 +02:00
Bruno Haible
b0d18de562 Update the translation disclaimer.
From Craig Topham <copyright-clerk@fsf.org>.

* gettext-tools/misc/DISCLAIM: Update.
2024-10-22 12:33:35 +02:00
Bruno Haible
c76ad63ec1 doc: Update after Automake changed.
* gettext-tools/doc/gettextize.texi: Update now that Automake with option 'gnu'
no longer requires ABOUT-NLS. Cf.
<https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=a2def8cdef>.
2024-10-21 00:46:53 +02:00
Bruno Haible
8f089a25a4 doc: Add an example regarding xgettext.
Reported by Andrea G. Monaco <andrea.monaco@autistici.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-12/msg00036.html>.

* gettext-tools/doc/xgettext.texi: Add an example.
2024-10-18 19:19:38 +02:00
Bruno Haible
c31a5e4e90 xgettext: Python: Add test for warning that was broken in 0.21.x and 0.22.x.
Reported by Max Smolens <msmolens@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-10/msg00001.html>.

* gettext-tools/tests/xgettext-python-9: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
2024-10-18 01:16:12 +02:00
Bruno Haible
b147f89713 doc: Clarify locale names and language names.
Reported by Arfrever <arfrever.fta@gmail.com>
at <https://savannah.gnu.org/bugs/?59062>.

* gettext-runtime/doc/nls.texi (INSTALL Matters, Using This Package): Mention
ll_CC as alterntive to ll, and that ll can be a 3-letter code.
* gettext-tools/doc/gettext.texi (Locale Names, Header Entry, Installers):
Likewise.
2024-10-17 23:53:17 +02:00
Bruno Haible
10eafd9e5d intl: Fix a memory leak.
* gettext-runtime/intl/finddomain.c (_nl_find_domain): If there was an alias and
_nl_explode_name or _nl_make_l10nflist fails, free the allocated memory. Avoid
'goto'.
2024-10-15 21:52:30 +02:00
Bruno Haible
d2293e7a80 gettext.h: Avoid "warning: ISO C++ forbids variable length array" with -pedantic.
Both "g++ -pedantic" and "clang++ -pedantic" warn about use of VLAs.
Since we cannot distinguish "g++" from "g++ -pedantic" through a preprocessor
macro, it's best to not use a VLA in C++.

Reported by Jens Seidel <jensseidel@users.sf.net>
via <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547798>
at <https://savannah.gnu.org/bugs/index.php?55149>.

* gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define
to 0 in C++ mode.
2024-10-15 16:49:13 +02:00
Bruno Haible
eeab24002b msgen: Convert charset=CHARSET to charset=ASCII.
Reported at <https://savannah.gnu.org/bugs/index.php?20923>.

* gettext-tools/src/msgen.c: Include msgl-ascii.h, c-strstr.h, xalloc.h.
(fill_header): New function, based on fill_header in msginit.c.
(main): Invoke it.
* gettext-tools/tests/msgen-1: Provide as input a POT file with charset=CHARSET,
and verify that the output has charset=ASCII.
2024-10-15 16:04:45 +02:00