Bruno Haible
7d6d59eb6a
po-mode: Tweak.
...
* gettext-tools/emacs/po-mode.el: Require Emacs >= 23, like before.
(po-mode-version-string): Bump to 2.32.
2026-01-02 05:09:01 +01:00
gemmaro
934fcbf7a1
po-mode: Add po-subedit-mode-hook.
...
Reported by <KAction@gnu.org> at
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890295 >.
* gettext-tools/emacs/po-mode.el (po-subedit-mode-hook): Add the
customize variable.
2026-01-02 02:47:35 +01:00
gemmaro
dce47fc998
po-mode: Use define-derived-mode for po-subedit-mode.
...
* gettext-tools/emacs/po-mode.el (po-subedit-mode): Define as derived
mode from text mode using define-derived-mode.
(po-subedit-mode-syntax-table, po-mode-abbrev-table): Remove these
variables, as define-derived-mode creates them automatically.
(po-edit-string): Use po-subedit-mode instead of text-mode. Remove
local abbrev table, keymap, syntax table, and hook invocation, since
define-derived-mode handles these automatically. Move easy-menu
definition to the define-derived-mode body.
(Package-Requires): Add minimum Emacs version requirement. The
define-derived-mode was probably introduced in Emacs 19.23, and commit
7797a29e9 dropped support for Emacs versions before 23.
2026-01-02 02:47:13 +01:00
Collin Funk
969c026038
msgfmt: Don't overflow the stack with large values for --alignment.
...
Reported by <maxtodeath@gmail.com> at <https://savannah.gnu.org/bugs/?67743 >.
* gettext-tools/src/write-mo.c (write_table): Use xmalloca instead of
alloca to allocate the buffer to fill with NUL bytes.
2025-12-31 19:24:40 +01:00
Bruno Haible
c979c72860
doc: Mention the issue of LLM licenses.
...
* gettext-tools/doc/gettext.texi (Installing an LLM): Discuss LLM license and
size.
2025-12-31 18:10:11 +01:00
Bruno Haible
7c7ff10dcf
po-fetch: Clarify the directory.
...
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gettext/2025-12/msg00030.html >.
* gettext-tools/misc/po-fetch.in (func_usage): Mention the output files
location.
* gettext-tools/doc/po-fetch.texi: Likewise.
2025-12-31 02:03:38 +01:00
Bruno Haible
2a14d41159
Document the relation between fetch-po and version control.
...
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gettext/2025-12/msg00030.html >.
* gettext-tools/doc/gettext.texi (po/fetch-po): Add a reference.
(Translations under Version Control): Remove subsection.
(PO Template File under Version Control?): New subsection.
(Translations under Version Control?): New subsection.
2025-12-31 01:58:57 +01:00
Bruno Haible
207e12cc80
build: Avoid link error on native Windows with --enable-shared.
...
Reported by Michele Locati <michele@locati.it> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-12/msg00038.html >.
* gettext-tools/src/country-table.h (country_table, country_table_size): Remove
LIBGETTEXTSRC_DLL_VARIABLE annotation.
2025-12-31 00:37:14 +01:00
Bruno Haible
d806c61240
po-fetch: Add man page.
...
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gettext/2025-12/msg00030.html >.
* gettext-tools/man/po-fetch.x: New file.
* gettext-tools/man/po-fetch.1.diff: New file.
* gettext-tools/man/Makefile.am (man_aux): Add po-fetch.x.
(man_MAN1MISC): New variable.
(man_MAN1): Include it.
(man_HTML): Add po-fetch.1.html.
($(man_MAN1MISC)): New rule.
(po-fetch.1, po-fetch.1.html): State dependencies.
* PACKAGING: Update.
2025-12-31 00:11:05 +01:00
Bruno Haible
9c21b898dc
build: Fix generation of man pages on native Windows.
...
* gettext-tools/man/Makefile.am ($(man_MAN1WIZARD), $(man_MAN1AUTOTOOLS)): Write
$${progname}, not $${progname}$(EXEEXT).
2025-12-31 00:10:38 +01:00
Bruno Haible
03d7277dec
build: Reject libjson-c versions older than 0.13.
...
Reported by Michele Locati <michele@locati.it> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-12/msg00036.html >.
* DEPENDENCIES: Require libjson-c >= 0.13.
* gettext-tools/configure.ac (LIBJSON_C): Reject libjson-c versions older than
0.13.
2025-12-30 22:09:03 +01:00
Bruno Haible
c326dfe6cb
Fix "make dist" error when BUILT_SPIT_IN_C is false.
...
* gettext-tools/src/Makefile.am (noinst_SCRIPTS): Add 'spit'.
(spit): New rule.
(BUILT_SOURCES, MOSTLYCLEANFILES): Add it.
2025-12-30 01:26:21 +01:00
Bruno Haible
e549b33dfa
New program 'msgpre'.
...
* gettext-tools/src/msgpre.c: New file, based on gettext-tools/src/msgfilter.c.
* gettext-tools/src/FILES: Describe msgpre.c.
* gettext-tools/src/Makefile.am (bin_PROGRAMS): Add msgpre.
(msgpre_SOURCES, msgpre_LDADD, msgpre_DEPENDENCIES, msgpre_CPPFLAGS,
msgpre_LDFLAGS): New variables.
* gettext-tools/po/POTFILES.in: Add msgpre.c.
* gettext-tools/man/msgpre.x: New file.
* gettext-tools/man/Makefile.am (man_aux): Add msgpre.x.
(man_MAN1SRC): Add msgpre.1.
(man_HTML): Add msgpre.1.html.
(msgpre.1, msgpre.1.html): Add dependencies.
* gettext-tools/doc/gettext.texi (msgpre Invocation): New section.
* gettext-tools/doc/msgpre.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* gettext-tools/Makefile.am (programs-for-distdir): Create msgpre.
(distdir1, gen-man1): Update for the msgpre.1 manual page.
* NEWS: Mention the new program.
2025-12-29 19:51:19 +01:00
Bruno Haible
9670fdddf2
Whitespace tweaks.
...
* gettext-tools/src/msgfilter.c: Fix indentation.
* gettext-tools/src/*.c: GNU coding style.
* gettext-tools/tests/*.c: Likewise.
2025-12-28 12:32:56 +01:00
Bruno Haible
f12d6634be
New program 'spit'.
...
* gettext-tools/machine-translation/README: New file.
* gettext-tools/machine-translation/prototype/README: New file.
* gettext-tools/machine-translation/prototype/OllamaSpit.java: New file.
* gettext-tools/machine-translation/prototype/ollama-spit.c: New file.
* gettext-tools/machine-translation/prototype/ollama-spit.go: New file.
* gettext-tools/machine-translation/prototype/ollama-spit.py: New file.
* gettext-tools/machine-translation/prototype/ollama-spit.sh: New file.
* gettext-tools/configure.ac (INCJSON_C, LIBJSON_C, INCCURL, LIBCURL): New
variables.
(BUILD_SPIT_IN_C): New conditional.
(AC_CONFIG_FILES): Add src/spit.py.
* gettext-tools/src/country-table.h: New file.
* gettext-tools/src/country-table.c: New file.
* gettext-tools/src/spit.c: New file.
* gettext-tools/src/spit.py.in: New file.
* gettext-tools/src/FILES: Mention the new files.
* gettext-tools/src/Makefile.am (bin_PROGRAMS): Conditionally add 'spit'.
(noinst_SCRIPTS): New variable.
(noinst_HEADERS): Add country-table.h.
(spit_SOURCES, spit_CFLAGS, spit_LDADD, spit_DEPENDENCIES, spit_CPPFLAGS,
spit_LDFLAGS): New variables.
(install-exec-local): Conditionally install spit.py.
(installdirs-local, uninstall-local): Update accordingly.
(DISTCLEANFILES): Add spit.py.
* gettext-tools/po/POTFILES.in: Add spit.c.
* gettext-tools/man/spit.x: New file.
* gettext-tools/man/Makefile.am (man_aux): Add spit.x.
(man_MAN1SRC): Add spit.1.
(man_HTML): Add spit.1.html.
(spit.1, spit.1.html): Add dependencies.
* gettext-tools/doc/gettext.texi (Pretranslating): New chapter.
* gettext-tools/doc/spit.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* DEPENDENCIES: Update URLs for libxml2. Add libjson-c, libcurl, Python, the
Python module 'requests'.
* PACKAGING: Mention the 'spit' program and its manual page.
* NEWS: Mention the change.
2025-12-28 12:30:37 +01:00
Bruno Haible
7b2f1337c6
Update ISO 3166 country codes list.
...
* gettext-tools/doc/ISO_3166: Update to match current Wikipedia.
* gettext-tools/doc/iso-3166.texi: Likewise.
* gettext-tools/src/msginit.c (catalogname_for_locale): Likewise.
2025-12-26 22:50:10 +01:00
Bruno Haible
d6f50b989a
Fix compilation error with MSVC 14 (regression 2025-12-19).
...
* gettext-tools/src/msgl-merge.c (match_domain): Move variable declaration out
of an OpenMP 'for' loop. Reduce scope of local variables.
2025-12-22 21:00:39 +01:00
Bruno Haible
6c3c33fbed
Fix compilation errors with older C compilers (regression 2025-12-19).
...
* gnulib-local/lib/xerror.c (multiline_internal): Add a semicolon between
a label and a declaration.
* gettext-tools/src/write-po.c (wrap): Likewise.
* gettext-tools/src/format-go.c (format_parse): Likewise.
2025-12-22 15:05:33 +01:00
Bruno Haible
0b7f5fc259
Simplify code.
...
* gettext-tools/src/its.c (_its_encode_special_chars,
_its_encode_special_chars_for_merge): Remove unnecessary memory store.
2025-12-19 21:50:39 +01:00
Bruno Haible
72906c560a
Update file list.
...
* gettext-tools/src/FILES: Update.
2025-12-19 21:47:24 +01:00
Bruno Haible
14d79c924c
Modernize coding style: Reduce scope of local variables.
...
* HACKING (Coding Style): New section, copied from gnulib/HACKING.
* gettext-runtime/src/envsubst.c: Reduce scope of local variables.
* gettext-runtime/src/escapes.h: Likewise.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-runtime/src/printf-command.c: Likewise.
* gettext-runtime/src/printf_gettext.c: Likewise.
* gettext-runtime/src/printf_ngettext.c: Likewise.
* gnulib-local/lib/addext.c: Likewise.
* gnulib-local/lib/backupfile.c: Likewise.
* gnulib-local/lib/gettext.h: Likewise.
* gnulib-local/lib/markup.c: Likewise.
* gnulib-local/lib/xerror.c: Likewise.
* libtextstyle/gnulib-local/lib/file-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/html-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/memory-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c: Likewise.
* libtextstyle/lib/color.c: Likewise.
* libtextstyle/lib/misc.c: Likewise.
* gettext-tools/src/cldr-plural-exp.c: Likewise.
* gettext-tools/src/cldr-plurals.c: Likewise.
* gettext-tools/src/file-list.c: Likewise.
* gettext-tools/src/filter-quote.c: Likewise.
* gettext-tools/src/format-awk.c: Likewise.
* gettext-tools/src/format-boost.c: Likewise.
* gettext-tools/src/format-c++-brace.c: Likewise.
* gettext-tools/src/format-c.c: Likewise.
* gettext-tools/src/format-c-parse.h: Likewise.
* gettext-tools/src/format-csharp.c: Likewise.
* gettext-tools/src/format-d.c: Likewise.
* gettext-tools/src/format-elisp.c: Likewise.
* gettext-tools/src/format-gcc-internal.c: Likewise.
* gettext-tools/src/format-gfc-internal.c: Likewise.
* gettext-tools/src/format-go.c: Likewise.
* gettext-tools/src/format-java-printf.c: Likewise.
* gettext-tools/src/format-java.c: Likewise.
* gettext-tools/src/format-javascript.c: Likewise.
* gettext-tools/src/format-kde-kuit.c: Likewise.
* gettext-tools/src/format-kde.c: Likewise.
* gettext-tools/src/format-librep.c: Likewise.
* gettext-tools/src/format-lisp.c: Likewise.
* gettext-tools/src/format-lua.c: Likewise.
* gettext-tools/src/format-modula2.c: Likewise.
* gettext-tools/src/format-ocaml.c: Likewise.
* gettext-tools/src/format-pascal.c: Likewise.
* gettext-tools/src/format-perl-brace.c: Likewise.
* gettext-tools/src/format-perl.c: Likewise.
* gettext-tools/src/format-php.c: Likewise.
* gettext-tools/src/format-python-brace.c: Likewise.
* gettext-tools/src/format-python.c: Likewise.
* gettext-tools/src/format-qt-plural.c: Likewise.
* gettext-tools/src/format-qt.c: Likewise.
* gettext-tools/src/format-ruby.c: Likewise.
* gettext-tools/src/format-rust.c: Likewise.
* gettext-tools/src/format-scheme.c: Likewise.
* gettext-tools/src/format-sh-printf.c: Likewise.
* gettext-tools/src/format-sh.c: Likewise.
* gettext-tools/src/format-smalltalk.c: Likewise.
* gettext-tools/src/format-tcl.c: Likewise.
* gettext-tools/src/format.c: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/if-error.c: Likewise.
* gettext-tools/src/its.c: Likewise.
* gettext-tools/src/locating-rules.c: Likewise.
* gettext-tools/src/message.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgl-ascii.c: Likewise.
* gettext-tools/src/msgl-cat.c: Likewise.
* gettext-tools/src/msgl-charset.c: Likewise.
* gettext-tools/src/msgl-check.c: Likewise.
* gettext-tools/src/msgl-english.c: Likewise.
* gettext-tools/src/msgl-equal.c: Likewise.
* gettext-tools/src/msgl-fsearch.c: Likewise.
* gettext-tools/src/msgl-header.c: Likewise.
* gettext-tools/src/msgl-iconv.c: Likewise.
* gettext-tools/src/msgl-merge.c: Likewise.
* gettext-tools/src/msgl-ofn.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/open-catalog.c: Likewise.
* gettext-tools/src/plural-count.c: Likewise.
* gettext-tools/src/po-charset.c: Likewise.
* gettext-tools/src/po-time.c: Likewise.
* gettext-tools/src/read-catalog.c: Likewise.
* gettext-tools/src/read-catalog-abstract.c: Likewise.
* gettext-tools/src/read-catalog-file.c: Likewise.
* gettext-tools/src/read-catalog-special.c: Likewise.
* gettext-tools/src/read-csharp.c: Likewise.
* gettext-tools/src/read-desktop.c: Likewise.
* gettext-tools/src/read-java.c: Likewise.
* gettext-tools/src/read-mo.c: Likewise.
* gettext-tools/src/read-po-lex.c: Likewise.
* gettext-tools/src/read-properties.c: Likewise.
* gettext-tools/src/read-resources.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/read-tcl.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/search-path.c: Likewise.
* gettext-tools/src/str-list.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/write-catalog.c: Likewise.
* gettext-tools/src/write-csharp.c: Likewise.
* gettext-tools/src/write-desktop.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-mo.c: Likewise.
* gettext-tools/src/write-po.c: Likewise.
* gettext-tools/src/write-properties.c: Likewise.
* gettext-tools/src/write-qt.c: Likewise.
* gettext-tools/src/write-resources.c: Likewise.
* gettext-tools/src/write-stringtable.c: Likewise.
* gettext-tools/src/write-tcl.c: Likewise.
* gettext-tools/src/write-xml.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-d.c: Likewise.
* gettext-tools/src/x-desktop.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-go.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-modula2.c: Likewise.
* gettext-tools/src/x-ocaml.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-po.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-ruby.c: Likewise.
* gettext-tools/src/x-rust.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-typescript-impl.h: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
* gettext-tools/src/xerror-handler.c: Likewise.
* gettext-tools/src/xg-arglist-callshape.c: Likewise.
* gettext-tools/src/xg-arglist-context.c: Likewise.
* gettext-tools/src/xg-arglist-parser.c: Likewise.
* gettext-tools/src/xg-check.c: Likewise.
* gettext-tools/src/xg-encoding.c: Likewise.
* gettext-tools/src/xg-message.c: Likewise.
* gettext-tools/src/xg-mixed-string.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
2025-12-19 21:46:48 +01:00
Bruno Haible
8448582011
xgettext: Optimize vc-mtime usage.
...
* gettext-tools/src/xgettext.c (extract_from_xml_file): Don't augment
files_for_vc_mtime twice.
2025-12-12 19:25:45 +01:00
Bruno Haible
c7ce599588
Modernize coding style: Avoid 'goto' statements where possible.
...
* gettext-tools/src/msgfmt.c (get_languages): Use if/else instead of 'goto'.
2025-12-12 11:28:00 +01:00
Bruno Haible
abb256e01e
Modernize coding style: Avoid 'continue;' statements where possible.
...
* gettext-tools/src/cldr-plurals.c (extract_rules): Use if/else instead of
'continue;'.
* gettext-tools/src/msgfmt.c (msgfmt_operand_list_add_from_directory): Likewise.
* gettext-tools/src/read-po-lex.c (po_gram_lex): Likewise.
* gettext-tools/src/sentence.c (sentence_end): Likewise.
* gettext-tools/src/x-awk.c (extract_parenthesized): Use 'break;' instead of
'continue;'.
* gettext-tools/src/x-c.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-csharp.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-java.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-javascript.c (extract_balanced): Likewise.
* gettext-tools/src/x-lua.c (extract_balanced): Likewise.
* gettext-tools/src/x-modula2.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-php.c (extract_balanced): Likewise.
* gettext-tools/src/x-python.c (extract_balanced): Likewise.
* gettext-tools/src/x-vala.c (extract_balanced): Likewise.
* gettext-tools/src/x-ycp.c (extract_parenthesized): Likewise.
2025-12-11 10:38:17 +01:00
Bruno Haible
387a2e083a
tests: Remove a left-over debugging trace.
...
* gettext-tools/tests/xgettext-20: Remove a 'set -x' statement.
2025-12-01 19:56:59 +01:00
Bruno Haible
0f23092fe8
autopoint: Diagnose multiple invocations of AM_GNU_GETTEXT_VERSION.
...
Reported by Santiago Vila in
<https://lists.gnu.org/archive/html/bug-gettext/2025-11/msg00001.html >.
* gettext-tools/autotools/autopoint.in: Report an error if "$xreq" or "$xver"
consists of more than one line.
2025-11-05 15:01:12 +01:00
Bruno Haible
05f57bcd68
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-10-24 15:43:21 +02:00
Bruno Haible
6eb3598f76
build: Add scripts for fetching the PO files.
...
* gettext-runtime/po/fetch-po: New file.
* gettext-tools/po/fetch-po: New file.
* gettext-tools/examples/po/fetch-po: New file.
* check-copyright-headers (func_check_file): Don't complain about the LINGUAS
files, that will now have more than 10 lines.
2025-10-24 15:43:00 +02:00
Bruno Haible
f3edef2e5b
po: Add customizable 'fetch-po' script.
...
* gettext-tools/wizard/po-templates/traditional/fetch-po: New file.
* gettext-tools/wizard/Makefile.am (po_SCRIPTS): New variable.
(EXTRA_DIST): Add the po_SCRIPTS.
* gettext-tools/wizard/gettextize.in: Copy but don't overwrite po/fetch-po.
* gettext-tools/wizard/po-templates/traditional/Makefile.in.in (fetch-po): New
target.
* gettext-tools/examples/po/Makefile.am (fetch-po): New target.
* gettext-tools/examples/hello-*/po/Makefile.am (fetch-po): New target.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (fetch-po): New
target.
* gettext-tools/doc/gettext.texi (po/fetch-po): New subsection.
(po/LINGUAS): Explain how it related to the 'fetch-po' script.
(Release Management): Document how to fetch the PO files before a release.
* NEWS: Mention the change.
2025-10-24 14:08:26 +02:00
Bruno Haible
e003323602
New program 'po-fetch'.
...
* gettext-tools/misc/po-fetch.in: New file.
* gettext-tools/misc/Makefile.am: New file.
* gettext-tools/configure.ac: Add AC_CONFIG_FILES invocations for the misc/
directory.
* gettext-tools/Makefile.am (SUBDIRS): Add misc.
(EXTRA_DIST): Remove misc/disclaim-translations.txt.
(pkgdata_DATA): Remove variable.
* gettext-tools/doc/po-fetch.texi: New file.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add it.
* gettext-tools/doc/gettext.texi (po-fetch): Add global menu entry.
(po-fetch Invocation): New section.
* PACKAGING: Mention the installed 'po-fetch' program.
* NEWS: Mention 'po-fetch'.
2025-10-21 15:54:18 +02:00
Bruno Haible
5f955e8193
build: Remove duplicate file from version control.
...
* gettext-tools/examples/po/remove-potcdate.sed: Remove file.
* autogen.sh: Copy remove-potcdate.sed to
gettext-tools/examples/po/remove-potcdate.sed.
2025-10-19 08:34:24 +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
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
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