Up to [cvs.NetBSD.org] / pkgsrc / devel / gettext-lib
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
gettext: updated to 1.0
Version 1.0 - January 2026
Improvements for maintainers and distributors:
* In a po/ directory, the PO files are now exactly those that the
translators submitted or committed in version control, or a
translation project's daemon committed on behalf of the translators.
They are no longer regularly updated with respect to the POT file
in the same directory.
The advantage for maintainers is that the maintainer may commit the
PO files in version control, without getting
- lots of modified files shown by "git status",
- frequent merge conflicts when merging between branches,
- a voluminous version control history.
The advantage for distributors is that the role of files in a
release tarball are clearer: The PO files are source code, whereas
the POT file and the *.gmo files are generated files.
ATTENTION translators!
Translators who work directly on a package's source code (without
going through a translation project) now need to run "msginit"
before starting work on a PO file.
* A new program 'po-fetch' is provided, that fetches the translated
PO files from a translation project's site on the internet, and
updates the LINGUAS file accordingly.
* In a po/ directory, a new script 'fetch-po' is now added by 'gettextize'.
It provides the standard interface for fetching the translated PO files.
It typically either invokes the 'po-fetch' program or does nothing.
Improvements for translators:
* msginit:
- When the PO file already exists, 'msginit' now updates it w.r.t. the
POT file, like 'msgmerge' would do. Previously, 'msginit' failed with
an error message in this situation.
* Pretranslation:
- Two new programs, 'msgpre' and 'spit', are provided, that implement
machine translation through a locally installed Large Language Model
(LLM). 'msgpre' applies to an entire PO file, 'spit' to a single
message.
- The documentation has a new chapter "Pretranslation".
Improvements for maintainers:
* xgettext:
- The refactoring suggestion when a translatable string contains an URL
or email address can now be inhibited through a command-line option
'--no-check=url' or '--no-check=email', or through a comment in the
source code of the form
/* xgettext: no-url-check */
or
/* xgettext: no-email-check */
Programming languages support:
* OCaml:
- xgettext now supports OCaml.
- 'msgfmt -c' now verifies the syntax of translations of OCaml format
strings.
- A new example 'hello-ocaml' has been added.
* Rust:
- xgettext now recognizes 'gettextrs::gettext' invocations, like 'gettext'
invocations.
libgettextpo library:
* The function 'po_message_get_format' now supports distinguishing whether
a negative format string mark, such as 'no-c-format', is set or not.
* The new functions
po_message_has_workflow_flag
po_message_set_workflow_flag
po_message_workflow_flags_iterator, po_flag_next, po_flag_iterator_free
can be used to manipulate or inspect the workflow flags of a message.
* The new functions
po_message_has_sticky_flag
po_message_set_sticky_flag
po_message_sticky_flags_iterator, po_flag_next, po_flag_iterator_free
can be used to manipulate or inspect the sticky flags of a messsage.
Emacs PO mode:
Restore syntax highlighting in Emacs version 30 or newer.
Problem:
1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).
2) gettext-tools is _always_ built with gettext-lib.
3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.
4) The OS has built in gettext.
5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.
The result is that all the gettext functions are renamed to have the
'libintl_' prefix but libintl is not linked with and the following happens:
${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status
Solution:
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.
This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.
Bump PKGREVISION.
Remove @dirrm entries from PLISTs
Install the locale.alias file into an example directory, and copy it into place via REQD_FILES. This fixes a CHECK_FILES error. Bump the PKGREVISION to 5.
Mechanical changes to package PLISTs to make use of LIBTOOLIZE_PLIST. All library names listed by *.la files no longer need to be listed in the PLIST, e.g., instead of: lib/libfoo.a lib/libfoo.la lib/libfoo.so lib/libfoo.so.0 lib/libfoo.so.0.1 one simply needs: lib/libfoo.la and bsd.pkg.mk will automatically ensure that the additional library names are listed in the installed package +CONTENTS file. Also make LIBTOOLIZE_PLIST default to "yes".
bite the bullet and upgrade to 0.11.5 There are too many changes to list in a sensible way. The most visible change for me is that libintl requires libiconv now. Also untangled the 3 sub-pkgs -- a common patch dir makes it too complex. This pkg used to expose buildlink2 problems - the pkg libintl was pulled in in cases where USE_GNU_GETTEXT was not set. There were some improvements to libtool filtering, and x11/gtk builds now, so I hope this is settled.
Move pkg/ files into package's toplevel directory