bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] gendocs: Output timestamp in English.


From: Simon Josefsson
Subject: [PATCH] gendocs: Output timestamp in English.
Date: Tue, 25 Oct 2022 23:43:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi.

I noticed that the generated InetUtils manual had a locale problem in
the timestamp:

https://www.gnu.org/software/inetutils/manual/

The script gendocs.sh has:

: "${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}"
...
curdate=`$SETLANG date '+%B %d, %Y'`

The reason seems to be LC_TIME which PureOS 10 for some reason set.

jas@latte:~/src/gnulib$ locale
LANG=sv_SE.UTF-8
LANGUAGE=
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC=sv_SE.UTF-8
LC_TIME=sv_SE.UTF-8
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER=sv_SE.UTF-8
LC_NAME=sv_SE.UTF-8
LC_ADDRESS=sv_SE.UTF-8
LC_TELEPHONE=sv_SE.UTF-8
LC_MEASUREMENT=sv_SE.UTF-8
LC_IDENTIFICATION=sv_SE.UTF-8
LC_ALL=
jas@latte:~/src/gnulib$ env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= date '+%B %d, 
%Y'
oktober 25, 2022
jas@latte:~/src/gnulib$ env LANG= LC_TIME= LC_MESSAGES= LC_ALL= LANGUAGE= date 
'+%B %d, %Y'
October 25, 2022
jas@latte:~/src/gnulib$ 

The attached patch fixes this.

/Simon
From 1575cb2bb925bd0b4bd160e06e05d39303c5cca5 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Tue, 25 Oct 2022 23:39:15 +0200
Subject: [PATCH] gendocs: Output timestamp in English.

* build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".
---
 ChangeLog            | 5 +++++
 build-aux/gendocs.sh | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6f4bea5c1c..f410dbe048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-25  Simon Josefsson  <simon@josefsson.org>
+
+       gendocs: Output timestamp in English.
+       * build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".
+
 2022-10-23  Bruno Haible  <bruno@clisp.org>
 
        assert-h: Make static_assert work on Solaris 11.4.
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index f6811eea46..ff00029283 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,7 +2,7 @@
 # gendocs.sh -- generate a GNU manual in many formats.  This script is
 #   mentioned in maintain.texi.  See the help message below for usage details.
 
-scriptversion=2022-01-01.00
+scriptversion=2022-10-25.23
 
 # Copyright 2003-2022 Free Software Foundation, Inc.
 #
@@ -40,7 +40,7 @@ srcdir=`pwd`
 
scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh";
 
templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template";
 
-: "${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}"
+: "${SETLANG="env LANG= LC_TIME= LC_MESSAGES= LC_ALL= LANGUAGE="}"
 : "${MAKEINFO="makeinfo"}"
 : "${TEXI2DVI="texi2dvi"}"
 : "${DOCBOOK2HTML="docbook2html"}"
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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