From: Bruno Haible Date: Mon, 9 Dec 2024 03:59:35 +0000 (+0100) Subject: Use new approach for gnulib localizations. X-Git-Tag: v0.24~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=adce2d596fcf5a3ecb5c67c4dc8730d3042ef67c;p=thirdparty%2Fgettext.git 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. --- diff --git a/gettext-runtime/po/POTFILES.in b/gettext-runtime/po/POTFILES.in index 13cfe96a5..791de449a 100644 --- a/gettext-runtime/po/POTFILES.in +++ b/gettext-runtime/po/POTFILES.in @@ -1,15 +1,9 @@ # List of files which contain translatable strings. -# Copyright (C) 1995, 1998, 2001-2003, 2005-2006, 2023 Free Software Foundation, Inc. +# Copyright (C) 1995-2024 Free Software Foundation, Inc. # This file is free software, distributed under GNU GPL v3+. # For updating this file, look at the result of: -# $ LC_ALL=C grep -l '[^A-Za-z_]_(' {gnulib-lib,src}/*.[chly] - -# Files from the portability library -gnulib-lib/closeout.c -gnulib-lib/error.c -gnulib-lib/getopt.c -gnulib-lib/xalloc-die.c +# $ LC_ALL=C grep -l '[^A-Za-z_]_(' src/*.[chly] # Package source files src/envsubst.c diff --git a/gettext-runtime/src/envsubst.c b/gettext-runtime/src/envsubst.c index 303c03c6b..e5d1f070d 100644 --- a/gettext-runtime/src/envsubst.c +++ b/gettext-runtime/src/envsubst.c @@ -79,6 +79,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-runtime/src/gettext.c b/gettext-runtime/src/gettext.c index cedfc4c8b..dc598ea8b 100644 --- a/gettext-runtime/src/gettext.c +++ b/gettext-runtime/src/gettext.c @@ -86,6 +86,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-runtime/src/ngettext.c b/gettext-runtime/src/ngettext.c index 432de1ec2..b467cc2dd 100644 --- a/gettext-runtime/src/ngettext.c +++ b/gettext-runtime/src/ngettext.c @@ -82,6 +82,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-tools/po/POTFILES.in b/gettext-tools/po/POTFILES.in index e528d821f..b09c673c8 100644 --- a/gettext-tools/po/POTFILES.in +++ b/gettext-tools/po/POTFILES.in @@ -3,33 +3,7 @@ # This file is free software, distributed under GNU GPL v3+. # For updating this file, look at the result of: -# $ LC_ALL=C grep -l '[^A-Za-z_]_(' {gnulib-lib,src,libgettextpo}/*.[chly] - -# Files from the portability library -gnulib-lib/argmatch.c -gnulib-lib/clean-temp.c -gnulib-lib/clean-temp-simple.c -gnulib-lib/closeout.c -gnulib-lib/copy-file.c -gnulib-lib/csharpcomp.c -gnulib-lib/csharpexec.c -gnulib-lib/error.c -gnulib-lib/execute.c -gnulib-lib/gai_strerror.c -gnulib-lib/getaddrinfo.c -gnulib-lib/getopt.c -gnulib-lib/javacomp.c -gnulib-lib/javaexec.c -gnulib-lib/javaversion.c -gnulib-lib/obstack.c -gnulib-lib/openat-die.c -gnulib-lib/os2-spawn.c -gnulib-lib/pipe-filter-ii.c -gnulib-lib/quotearg.c -gnulib-lib/spawn-pipe.c -gnulib-lib/wait-process.c -gnulib-lib/xalloc-die.c -gnulib-lib/xsetenv.c +# $ LC_ALL=C grep -l '[^A-Za-z_]_(' {src,libgettextpo}/*.[chly] # Package source files src/cldr-plurals.c @@ -143,8 +117,5 @@ src/x-tcl.c src/x-vala.c src/x-ycp.c src/user-email.sh.in -libgettextpo/error.c libgettextpo/gettext-po.c libgettextpo/markup.c -libgettextpo/obstack.c -libgettextpo/xalloc-die.c diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index 13a63b8d8..e137b9ccb 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -236,6 +236,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c index d17a065b6..259701fe8 100644 --- a/gettext-tools/src/hostname.c +++ b/gettext-tools/src/hostname.c @@ -145,6 +145,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-tools/src/msgattrib.c b/gettext-tools/src/msgattrib.c index d3e939ac7..8851d9772 100644 --- a/gettext-tools/src/msgattrib.c +++ b/gettext-tools/src/msgattrib.c @@ -161,6 +161,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgcat.c b/gettext-tools/src/msgcat.c index 74566ed6b..ff8ac523f 100644 --- a/gettext-tools/src/msgcat.c +++ b/gettext-tools/src/msgcat.c @@ -129,6 +129,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgcmp.c b/gettext-tools/src/msgcmp.c index 536b12986..831380056 100644 --- a/gettext-tools/src/msgcmp.c +++ b/gettext-tools/src/msgcmp.c @@ -106,6 +106,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgcomm.c b/gettext-tools/src/msgcomm.c index 3bca7caae..f0f02730a 100644 --- a/gettext-tools/src/msgcomm.c +++ b/gettext-tools/src/msgcomm.c @@ -128,6 +128,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgconv.c b/gettext-tools/src/msgconv.c index cd23e93bd..c9b9b488c 100644 --- a/gettext-tools/src/msgconv.c +++ b/gettext-tools/src/msgconv.c @@ -117,6 +117,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgen.c b/gettext-tools/src/msgen.c index 64bc434e3..f65b87281 100644 --- a/gettext-tools/src/msgen.c +++ b/gettext-tools/src/msgen.c @@ -119,6 +119,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c index 783daa4b5..cb69c34e7 100644 --- a/gettext-tools/src/msgexec.c +++ b/gettext-tools/src/msgexec.c @@ -117,6 +117,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgfilter.c b/gettext-tools/src/msgfilter.c index ba0a940f1..461519b74 100644 --- a/gettext-tools/src/msgfilter.c +++ b/gettext-tools/src/msgfilter.c @@ -151,6 +151,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgfmt.c b/gettext-tools/src/msgfmt.c index 108a373d8..d215fce45 100644 --- a/gettext-tools/src/msgfmt.c +++ b/gettext-tools/src/msgfmt.c @@ -267,6 +267,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msggrep.c b/gettext-tools/src/msggrep.c index d063542f1..1098bf5ad 100644 --- a/gettext-tools/src/msggrep.c +++ b/gettext-tools/src/msggrep.c @@ -164,6 +164,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index e63d9d0a3..b76ebeb6b 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -158,6 +158,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index c344f05b9..91d48afb4 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -205,6 +205,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msgunfmt.c b/gettext-tools/src/msgunfmt.c index 2666eeffa..8d4abfe1a 100644 --- a/gettext-tools/src/msgunfmt.c +++ b/gettext-tools/src/msgunfmt.c @@ -132,6 +132,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/msguniq.c b/gettext-tools/src/msguniq.c index dda868643..9511d657f 100644 --- a/gettext-tools/src/msguniq.c +++ b/gettext-tools/src/msguniq.c @@ -121,6 +121,7 @@ main (int argc, char **argv) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE); diff --git a/gettext-tools/src/recode-sr-latin.c b/gettext-tools/src/recode-sr-latin.c index 348eb8711..bf4673de3 100644 --- a/gettext-tools/src/recode-sr-latin.c +++ b/gettext-tools/src/recode-sr-latin.c @@ -76,6 +76,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-tools/src/urlget.c b/gettext-tools/src/urlget.c index bd961295b..f1dc7da72 100644 --- a/gettext-tools/src/urlget.c +++ b/gettext-tools/src/urlget.c @@ -101,6 +101,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); textdomain (PACKAGE); /* Ensure that write errors on stdout are detected. */ diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 61ec96bc7..fa8acf305 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -359,6 +359,7 @@ main (int argc, char *argv[]) /* Set the text message domain. */ bindtextdomain (PACKAGE, relocate (LOCALEDIR)); + bindtextdomain ("gnulib", relocate (GNULIB_LOCALEDIR)); bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR)); textdomain (PACKAGE);