Bug#1088003: update-locale.8: Some remarks and editorial changes for this man page
Package: locales
Version: 2.40-3
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"
[Use "groff -e ' $' <file>" to find trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
troff: backtrace: file '<stdin>':7
troff:<stdin>:7: warning: trailing space in the line
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.11.7-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages locales depends on:
ii debconf [debconf-2.0] 1.5.87
ii libc-bin 2.40-3
ii libc-l10n 2.40-3
locales recommends no packages.
locales suggests no packages.
-- debconf information excluded
Input file is update-locale.8
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
So any 'generator' should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
This is just a simple quality control measure.
The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Input text line longer than 80 bytes.
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
Not beginning each input sentence on a new line.
Lines should thus be shorter.
See man-pages(7), item 'semantic newline'.
-.-
The difference between the formatted output of the original and patched file
can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -u <out1> <out2>
and for groff, using
"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output of 'diff -u' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-.
Output from "mandoc -T lint update-locale.8 ": (shortened list)
5 skipping paragraph macro
7 whitespace at end of input line
-.-.
Output from "test-groff -mandoc -t -ww -b -z update-locale.8 ": (shortened list)
1 trailing space in the line
-.-.
Output from "mandoc -T lint update-locale.8 ":
mandoc: update-locale.8:3:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-locale.8:3:4: STYLE: whitespace at end of input line
mandoc: update-locale.8:6:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-locale.8:6:4: STYLE: whitespace at end of input line
mandoc: update-locale.8:7:14: STYLE: whitespace at end of input line
mandoc: update-locale.8:12:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-locale.8:12:4: STYLE: whitespace at end of input line
mandoc: update-locale.8:41:4: STYLE: whitespace at end of input line
mandoc: update-locale.8:45:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-locale.8:45:4: STYLE: whitespace at end of input line
mandoc: update-locale.8:48:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-locale.8:48:4: STYLE: whitespace at end of input line
-.-.
-.-.
Remove space characters at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".
3:.LP
6:.LP
7:update-locale
12:.LP
41:.TP
45:.LP
48:.LP
-.-.
Two or more space charaters between printable characters
28:Define file containing locale variables. (Default:
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ":
troff: backtrace: file '<stdin>':7
troff:<stdin>:7: warning: trailing space in the line
--- update-locale.8 2024-11-21 18:45:18.015767786 +0000
+++ update-locale.8.new 2024-11-21 18:56:09.338676475 +0000
@@ -1,15 +1,15 @@
.TH UPDATE-LOCALE 8 "April 2006" "Debian GNU/Linux"
.SH "NAME"
-.LP
+.
update-locale \- Modify global locale settings
.SH "SYNTAX"
-.LP
-update-locale
+.
+update-locale
.RI [ OPTIONS ]
[\fIvar\fP=\fIlocale\fP | \fIvar\fP]
[...]
.SH "DESCRIPTION"
-.LP
+.
This program can be called by maintainer scripts when Debian packages are
installed or removed, it updates the \fI/etc/locale.conf\fP file to
reflect changes in system configuration related to global locale settings.
@@ -25,7 +25,8 @@ Display an help message and exit.
Variables which are not set on command-line are cleared out.
.TP
.BI \-\-locale\-file " FILE"
-Define file containing locale variables. (Default:
+Define file containing locale variables.
+(Default:
.IR /etc/locale.conf )
.TP
.B \-\-no\-checks
@@ -38,12 +39,12 @@ The command
.ft R
sets \fBLANG\fP to \fBen_CA.UTF-8\fP and removes definitions for \fBLANGUAGE\fP.
.SH "FILES"
-.TP
+.TP
.I /etc/locale.conf
File where global locale settings are stored.
.SH "AUTHOR"
-.LP
+.
Denis Barbier <barbier@linuxfr.org>
.SH "SEE ALSO"
-.LP
+.
\fBlocale\-gen\fP(8), \fBlocale\fP(1)
Reply to: