trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trans-coord/gnun/server/gnun AUTHORS ChangeLog ...


From: Ineiev
Subject: trans-coord/gnun/server/gnun AUTHORS ChangeLog ...
Date: Wed, 31 Jan 2024 10:38:21 -0500 (EST)

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Ineiev <ineiev> 24/01/31 10:38:21

Modified files:
        gnun/server/gnun: AUTHORS ChangeLog GNUmakefile NEWS THANKS 
                          config.mk.in configure.ac gnun-preconvert.in 
        gnun/server/gnun/tests: convert 
Added files:
        gnun/server/gnun/m4: ax_po4a.m4 

Log message:
        Update for newer PO4A releases.  Reported on trans-coord-devel@
        by Javier Fernández Retenaga on 2024-01-30.
        
        * GNUmakefile (PO4A-GETTEXTIZEFLAGS): Rename to
        PO4A-UPDATEPOFLAGS.
        * configure.ac: Move PO4A-related checks to the AX_PO4A and
        AX_PO4A_NOTICE macros defined in m4/ax_po4a.m4.
        Improve handling of --with-linguas.
        * config.mk.in (PO4A_UPDATEPO): New variable.
        * m4/ax_po4.m4: New file.  Detect po4a-update and configure
        the (hopefully) right executable to make POT files.
        * GNUmakeifle: Use PO4A_UPDATEPO instead of PO4A_GETTEXTIZE.
        * gnun-preconvert.in:
        * tests/convert: Make it work with newer releases of PO4A.
        * AUTHORS:
        * NEWS:
        * THANKS: Update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/AUTHORS?cvsroot=trans-coord&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.517&r2=1.518
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.207&r2=1.208
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.165&r2=1.166
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/THANKS?cvsroot=trans-coord&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/config.mk.in?cvsroot=trans-coord&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/configure.ac?cvsroot=trans-coord&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-preconvert.in?cvsroot=trans-coord&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/m4/ax_po4a.m4?cvsroot=trans-coord&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/tests/convert?cvsroot=trans-coord&r1=1.6&r2=1.7

Patches:
Index: AUTHORS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/AUTHORS,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- AUTHORS     11 Apr 2023 05:53:35 -0000      1.33
+++ AUTHORS     31 Jan 2024 15:38:20 -0000      1.34
@@ -30,7 +30,7 @@
         gnun-preconvert.in, gnun-report.in,
         link-diff.awk, make-prototype.awk,
         priorities.mk, update-localized-urls.in, sort.awk.in, sort-linguas,
-        m4/ax_arg_prog.m4, m4/ax_arg_progs.m4,
+        m4/ax_arg_prog.m4, m4/ax_arg_progs.m4, m4/ax_po4a.m4
         all files in test/.
 
     Some changes in AUTHORS, configure.ac, GNUmakefile, GNUmakefile.team,

Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.517
retrieving revision 1.518
diff -u -b -r1.517 -r1.518
--- ChangeLog   29 Jan 2024 11:50:52 -0000      1.517
+++ ChangeLog   31 Jan 2024 15:38:20 -0000      1.518
@@ -1,3 +1,23 @@
+2024-01-31  Pavel Kharitonov  <ineiev@gnu.org>
+
+       Update for newer PO4A releases.  Reported on trans-coord-devel@
+       by Javier Fernández Retenaga on 2024-01-30.
+
+       * GNUmakefile (PO4A-GETTEXTIZEFLAGS): Rename to
+       PO4A-UPDATEPOFLAGS.
+       * configure.ac: Move PO4A-related checks to the AX_PO4A and
+       AX_PO4A_NOTICE macros defined in m4/ax_po4a.m4.
+       Improve handling of --with-linguas.
+       * config.mk.in (PO4A_UPDATEPO): New variable.
+       * m4/ax_po4.m4: New file.  Detect po4a-update and configure
+       the (hopefully) right executable to make POT files.
+       * GNUmakeifle: Use PO4A_UPDATEPO instead of PO4A_GETTEXTIZE.
+       * gnun-preconvert.in:
+       * tests/convert: Make it work with newer releases of PO4A.
+       * AUTHORS:
+       * NEWS:
+       * THANKS: Update.
+
 2024-01-29  Pavel Kharitonov  <ineiev@gnu.org>
 
        * doc/gnun.texi (Per-Directory Templates): Add more details on how
@@ -5149,7 +5169,8 @@
        български.
 
  Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
-   2017, 2018, 2019, 2020, 2021, 2022, 2023 Free Software Foundation, Inc.
+   2017, 2018, 2019, 2020,
+   2021, 2022, 2023, 2024 Free Software Foundation, Inc.
 
  This file is part of GNUnited Nations.
 

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -b -r1.207 -r1.208
--- GNUmakefile 11 Apr 2023 05:53:35 -0000      1.207
+++ GNUmakefile 31 Jan 2024 15:38:20 -0000      1.208
@@ -42,7 +42,7 @@
 ADD-FUZZY-DIFF := $(pkglibexecdir)/add-fuzzy-diff
 COPY-MSGID := $(pkglibexecdir)/copy-msgid
 
-PO4A-GETTEXTIZEFLAGS := -o porefs=none
+PO4A-UPDATEPOFLAGS := -o porefs=none
 PO4A-TRANSLATEFLAGS := --keep=0
 
 # <style> shouldn't wrap because it may contain generated
@@ -563,7 +563,7 @@
 define generate-pot
 $(MAILFAIL) $(NOTIFYSKIP) $(web-addr) \
   "[GNUN Error] POT generation of $(subst $(rootdir)/,,$@) failed" \
-  $(PO4A_GETTEXTIZE) $(PO4A-XHTMLFLAGS) $(PO4A-GETTEXTIZEFLAGS) \
+  $(PO4A_UPDATEPO) $(PO4A-XHTMLFLAGS) $(PO4A-UPDATEPOFLAGS) \
   --master $< --po $@.tmp
 $(SED) --in-place \
  '1,/^$$$$/{\

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -b -r1.165 -r1.166
--- NEWS        12 Apr 2023 18:19:22 -0000      1.165
+++ NEWS        31 Jan 2024 15:38:20 -0000      1.166
@@ -1,5 +1,19 @@
 GNUnited Nations NEWS - User-visible changes.
 
+* Changes in GNUnited Nations 1.5 (????-??-??)
+
+** In newer PO4A releases, po4a-update must be used to generate POT files;
+   vice versa, in older PO4A versions, po4a-update isn't usable for that,
+   and po4a-gettextize should be used.  The configure script runs checks
+   and selects the right program.
+
+** Bugs fixed in 1.5
+
+*** configure printed a false positive about sorting installcheck
+    when all languages were selected.
+
+*** tests/convert resulted in a false positive with newer PO4A.
+
 * Changes in GNUnited Nations 1.4 (2023-04-12)
 
 ** An option to select set of languages for sorting is added to the configure

Index: THANKS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/THANKS,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- THANKS      11 Apr 2023 05:53:35 -0000      1.26
+++ THANKS      31 Jan 2024 15:38:20 -0000      1.27
@@ -15,6 +15,7 @@
 Hossam Hossny
 Jan Owoc
 Jason Self
+Javier Fernández Retenaga
 Joerg Kohne
 Karl Berry
 NIIBE Yutaka

Index: config.mk.in
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/config.mk.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- config.mk.in        11 Apr 2023 05:53:35 -0000      1.18
+++ config.mk.in        31 Jan 2024 15:38:20 -0000      1.19
@@ -35,6 +35,7 @@
 MSGFMT         := @MSGFMT@
 MSGMERGE       := @MSGMERGE@
 PO4A_GETTEXTIZE        := @PO4A_GETTEXTIZE@
+PO4A_UPDATEPO  := @PO4A_UPDATEPO@
 PO4A_TRANSLATE := @PO4A_TRANSLATE@
 WDIFF          := @WDIFF@
 MULTIVIEWS     := @MULTIVIEWS@

Index: configure.ac
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/configure.ac,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- configure.ac        12 Apr 2023 18:19:22 -0000      1.67
+++ configure.ac        31 Jan 2024 15:38:20 -0000      1.68
@@ -170,6 +170,7 @@
     if ${GREP} -q "^$i " $srcdir/sort-linguas; then echo $i; fi; \
   done`
     with_linguas=`echo $with_linguas | sed 's/ /,/g'` 
+    AS_CASE(["x$with_linguas"], [x], [with_linguas=all])
   ],
   [with_linguas=all]
 )
@@ -269,24 +270,7 @@
 AS_CASE(["x$WDIFF"], [x], [have_wdiff=no], [have_wdiff=yes])
 AM_CONDITIONAL([HAVE_WDIFF], [test -n "$WDIFF"])
 
-AX_ARG_PROG([PO4A_GETTEXTIZE], [the 'po4a-gettextize' program],
-            [po4a-gettextize])
-
-AX_ARG_PROG([PO4A_TRANSLATE], [the 'po4a-translate' program], [po4a-translate])
-
-# This is a weak test; should be replaced with a feature check.
-AS_CASE(["x$PO4A_TRANSLATE"], [x], [], [
-  AC_CACHE_CHECK([if po4a version is at least 0.37], [gnun_cv_recent_po4a],
-                 [gnun_cv_recent_po4a=no
-                 po4a_version=`$PO4A_TRANSLATE --version 2> /dev/null \
-                   | $GREP po4a | $AWK '{print $3}' | $SED 's/.$//'`
-                 AX_COMPARE_VERSION([$po4a_version], [ge], [0.37],
-                 [gnun_cv_recent_po4a=yes])])
-])
-recent_po4a=$gnun_cv_recent_po4a
-AS_CASE(["x$recent_po4a"], [xyes], [], [recent_po4a=no])
-# Po4a is useless for our purpose if awk is missing.
-AS_CASE([$decent_awk], [no], [recent_po4a=no])
+AX_PO4A
 
 AX_ARG_PROG([MAIL], [the 'mail' program], [mail])
 
@@ -384,10 +368,9 @@
 
 AM_CONDITIONAL([HAVE_VALIDATION], [test "$have_validation" = yes])
 AM_CONDITIONAL([NO_DTD], [test "$have_dtds" = no])
-AM_CONDITIONAL([HAVE_PO4A], [test "$recent_po4a" = yes])
 
 AC_CONFIG_FILES([Makefile doc/Makefile dtd/Makefile config.mk])
-AS_CASE(["$decent_gettext-$recent_po4a"], [yes-yes],
+AS_CASE(["$decent_gettext-$have_po4a"], [yes-yes],
         [AC_CONFIG_FILES([gnun-preconvert])])
 AS_CASE([$have_validation], [yes],
   [AC_CONFIG_FILES([expand-ssi.awk])])
@@ -399,7 +382,7 @@
 Basic make operations...                $decent_make
 PO files manipulation, make report...   $decent_gettext
 gnun-add-fuzzy-diff...                  $have_wdiff
-POT/HTML generation...                  $recent_po4a
+POT/HTML generation...                  $have_po4a
 HTML validation...                      $have_validation
 NOTIFY/ANNOUNCE support...              $have_mail
 VCS support...                          $have_vcs $cvs $svn $bzr
@@ -436,7 +419,7 @@
 
 ])])
 AS_CASE([$have_sorted_lists], [yes],
-[ AS_CASE([",$with_linguas,"], [*lt*], [],
+[ AS_CASE([",$with_linguas,"], [*,lt,* | ,all,], [],
   [ AC_MSG_WARN([
 
 The lt language code wasn't selected for sorting; make installcheck will fail.
@@ -444,3 +427,4 @@
 ])
   ])
 ])
+AX_PO4A_NOTICE

Index: gnun-preconvert.in
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/gnun-preconvert.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gnun-preconvert.in  7 Apr 2023 08:45:02 -0000       1.8
+++ gnun-preconvert.in  31 Jan 2024 15:38:20 -0000      1.9
@@ -39,7 +39,7 @@
 MASTER from HTML to PO format.
 
 Options:
-  -e, --encoding=ENC         Specify encoding for TRANSLATION (if not UTF-8)
+  -e, --encoding=ENC         Specify encoding for TRANSLATION (if not utf-8)
   -v, --version              Display version info and exit
   -h, --help                 Display this help and exit
 
@@ -139,7 +139,7 @@
 
 po=${translation%.html}.po
 
-@PO4A_GETTEXTIZE@ -f xhtml -M UTF-8 -L "$encoding" \
+@PO4A_GETTEXTIZE@ -f xhtml -M utf-8 -L "$encoding" \
   -l "$translation" -m "$master" -p "$po" \
   -o ontagerror=silent -o "attributes=<meta>content" -o "translated=W<pre>" \
   || exit 1

Index: tests/convert
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/tests/convert,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- tests/convert       10 Apr 2023 12:04:34 -0000      1.6
+++ tests/convert       31 Jan 2024 15:38:21 -0000      1.7
@@ -57,10 +57,11 @@
 "${MSGCAT}" "${srcdir}/preconv.pr.po" > preconv.pr.po
 mv conv1.pr.po conv.pr.po
 diff preconv.pr.po conv.pr.po || exit 1
-"${bindir}/gnun-preconvert" -e UTF-8 conv.pr.html -- "${srcdir}/conv.html" \
+"${bindir}/gnun-preconvert" -e utf-8 conv.pr.html -- "${srcdir}/conv.html" \
   || exit 1
 "${MSGCAT}" conv.pr.po > conv1.pr.po
 "${SED}" -e "$substitute_notices" -e '/^#: /d' -e '/^"Language: .*\\n"$/d' -e \
+  's/^\("Content-Type:.*charset=\).*\\n"$/\1UTF-8\\n"/' -e \
   's/^\("Content-Transfer-Encoding:\) .*\\n"$/\1 ENCODING"/' -e \
   's/^\("POT-Creation-Date:\) '"$date_mask"'\\n"$/\1 '"$timestamp"'\\n"/' \
   < conv1.pr.po > conv.pr.po

Index: m4/ax_po4a.m4
===================================================================
RCS file: m4/ax_po4a.m4
diff -N m4/ax_po4a.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/ax_po4a.m4       31 Jan 2024 15:38:21 -0000      1.1
@@ -0,0 +1,97 @@
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
+#   2017, 2018, 2019, 2020,
+#   2021, 2022, 2023, 2024 Free Software Foundation, Inc.
+
+# This file is part of GNUnited Nations.
+
+# GNUnited Nations is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# GNUnited Nations is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNUnited Nations.  If not, see <http://www.gnu.org/licenses/>.
+
+# SYNOPSIS
+#
+#   AX_PO4A()
+#
+# DESCRIPTION
+#
+# Configure PO4A executables to use.
+# In particular, test if po4a-updatepo is usable for making POT files.
+# Set PO4A_GETTEXTIZE, PO4A_TRANSLATE PO4A_UPDATE, have_po4a,
+# have_po4a_tepo, have_po4a_ize variables.
+# Define HAVE_PO4A conditional.
+
+AC_DEFUN([AX_PO4A], [
+  AX_ARG_PROG([PO4A_GETTEXTIZE], [the 'po4a-gettextize' program],
+    [po4a-gettextize])
+  AX_ARG_PROG([PO4A_UPDATEPO], [the 'po4a-updatepo' program], [po4a-updatepo])
+  AX_ARG_PROG([PO4A_TRANSLATE], [the 'po4a-translate' program],
+    [po4a-translate])
+  AC_MSG_CHECKING([whether $PO4A_UPDATEPO can create POT files])
+  AS_ECHO(['<p>test</p>']) > ./conftest.html
+  po4a_args="-o porefs=none --format=xhtml --master-charset=utf-8"
+  po4a_args="$po4a_args -o ontagerror=silent"
+  po4a_args="$po4a_args --master ./conftest.html --po ./conftest.pot"
+  have_po4a_tepo=no
+  AS_IF([$PO4A_UPDATEPO $po4a_args > /dev/null 2>&1], [have_po4a_tepo=yes])
+  AC_MSG_RESULT([$have_po4a_tepo])
+  AS_CASE([$have_po4a_tepo], [no],
+    [
+      PO4A_UPDATEPO=
+      have_po4a_ize=no
+      AC_MSG_CHECKING([whether $PO4A_GETTEXTIZE can create POT files])
+      AS_IF([$PO4A_GETTEXTIZE $po4a_args > /dev/null 2>&1],
+        [have_po4a_ize=yes])
+      AC_MSG_RESULT([$have_po4a_ize])
+      AS_CASE([$have_po4a_ize], [yes], [PO4A_UPDATEPO="$PO4A_GETTEXTIZE"])
+    ])
+  # This is a weak test; should be replaced with a feature check.
+  AS_CASE(["x$PO4A_UPDATEPO"], [x], [], [
+    AC_CACHE_CHECK([if po4a version is at least 0.37], [gnun_cv_recent_po4a],
+                   [gnun_cv_recent_po4a=no
+                   po4a_version=`$PO4A_TRANSLATE --version 2> /dev/null \
+                     | $GREP po4a | $AWK '{print $3}' | $SED 's/.$//'`
+                   AX_COMPARE_VERSION([$po4a_version], [ge], [0.37],
+                   [gnun_cv_recent_po4a=yes])])
+  ])
+  have_po4a=$gnun_cv_recent_po4a
+  AS_CASE(["x$have_po4a"], [xyes], [], [have_po4a=no])
+  # Po4a is useless for our purpose if awk is missing.
+  AS_CASE([$decent_awk], [no], [have_po4a=no])
+  # No usable executable for POT generation found.
+  AS_CASE([$have_po4a_tepo-$have_po4a_ize], [no-no], [have_po4a=no])
+  AM_CONDITIONAL([HAVE_PO4A], [test "$have_po4a" = yes])
+]) dnl AX_PO4A
+
+# SYNOPSIS
+#
+#   AX_PO4A_NOTICE()
+#
+# DESCRIPTION
+#
+# Interpret results of AX_PO4A and display the respective warnings. 
+
+AC_DEFUN([AX_PO4A_NOTICE], [
+  AS_CASE([$have_po4a_tepo], [no], [
+    AS_CASE([$have_po4a_ize], [no], [
+      AC_MSG_WARN([
+
+Usable PO4A executables are not found.  Building HTML files will fail.
+
+])    ],
+      [ AC_MSG_WARN([
+
+The po4a-updatepo executable isn't usable, po4a-gettextize will be used.
+
+])
+      ])
+    ]) dnl AS_CASE([$have_po4a_tepo]
+]) dnl AX_PO4A_NOTICE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]