Your message dated Thu, 17 Aug 2006 10:52:49 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#368997: /usr/bin/po4aman-display-po: improvements to
po4aman-display-po
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: po4a
Version: 0.25-1
Severity: minor
File: /usr/bin/po4aman-display-po
Tags: patch
The attached patch modifies the po4aman-display-po script by
- removing useless ';' from a few lines
- making it work when /bin/sh isn't bash (the usage function definition
yields a syntax error with dash)
- quoting a few variables
- using iconv -t latin1 because it's what man expects
- replacing `command` with the standard $(command) form
- fixing the "trap" usage
Cheers,
Julien Cristau
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.15-1-686
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages po4a depends on:
ii gettext 0.14.5-3 GNU Internationalization utilities
ii libsgmls-perl 1.03ii-31 Perl modules for processing SGML p
ii perl 5.8.8-4 Larry Wall's Practical Extraction
ii perl-modules 5.8.8-4 Core Perl modules
ii sp 1.3.4-1.2.1-47 James Clark's SGML parsing tools
Versions of packages po4a recommends:
ii liblocale-gettext-perl 1.05-1 Using libc functions for internati
ii libterm-readkey-perl 2.30-3 A perl module for simple terminal
ii libtext-wrapi18n-perl 0.06-4 internationalized substitute of Te
-- no debconf information
--- po4a~/scripts/po4aman-display-po 2006-04-13 01:47:31.000000000 +0200
+++ po4a/scripts/po4aman-display-po 2006-05-24 04:04:27.000000000 +0200
@@ -5,38 +5,37 @@
# and call po4a-translate.
#
-OPTIONS="";
+OPTIONS=""
-function usage() {
- echo "Usage: $0 -p PO_FILE [-m MASTER_FILE] [-o PO4A_OPT]";
- return 0;
+usage() {
+ echo "Usage: $0 -p PO_FILE [-m MASTER_FILE] [-o PO4A_OPT]"
+ return 0
}
while getopts m:p:ho: option
do
case $option in
m)
- MASTER=$OPTARG;
+ MASTER="$OPTARG"
;;
p)
- PO=$OPTARG;
+ PO="$OPTARG"
;;
o)
- OPTIONS="-o $OPTARG $OPTIONS";
+ OPTIONS="-o $OPTARG $OPTIONS"
;;
h)
- usage;
- exit 0;
+ usage
+ exit 0
;;
[?])
- usage 1>&2;
- exit 1;
+ usage 1>&2
+ exit 1
;;
esac
done
-if [ -z "$MASTER" ] && [ -n "$PO" ]
-then
+if [ -z "$MASTER" ] && [ -n "$PO" ]; then
echo "No manpage specified."
echo "Trying to find the manpage according to a line reference in the PO."
file=$(grep -m 1 "^#:" $PO | sed -e 's/^.* \(.*\):.*$/\1/')
@@ -44,67 +43,58 @@
ext=""
echo Looking for manpage: $file
MASTER=$(man -w $file)
- if [ $? != "0" ]
- then
+ if [ "$?" != "0" ]; then
ext=$(echo $file | sed -e 's/^.*\.\([1-9].*\)$/\1/' -e 's/\..*//')
file=$(echo $file | sed -e 's/\.[1-9].*//')
echo looking for manpage $file in section $ext
MASTER=$(man -w $ext $file)
- if [ $? != "0" ]
- then
+ if [ $? != "0" ]; then
file=$(echo $file | sed -e 's/\..*//')
echo looking for manpage $file in section $ext
MASTER=$(man -w $ext $file)
- if [ $? != "0" ]
- then
+ if [ $? != "0" ]; then
echo No manpage found for $PO
echo you must provide the manpage with the -m option
MASTER=""
fi
fi
fi
- if [ -n "$MASTER" ]
- then
+ if [ -n "$MASTER" ]; then
echo Using: $MASTER as the original manpage
fi
fi
# checking mandatory options
-if [ -z $MASTER ];
-then
- usage 1>&2;
- exit 1;
-fi;
-if [ -z $PO ];
-then
- usage 1>&2;
- exit 1;
-fi;
+if [ -z "$MASTER" ]; then
+ usage 1>&2
+ exit 1
+fi
+if [ -z "$PO" ]; then
+ usage 1>&2
+ exit 1
+fi
# checking files
-if [ ! -e $MASTER ];
-then
- echo "Error: could not find master file: $MASTER" 1>&2;
- exit 1;
-fi;
-if [ ! -e $PO ];
-then
- echo "Error: could not find po file: $PO" 1>&2;
- exit 1;
-fi;
+if [ ! -e "$MASTER" ]; then
+ echo "Error: could not find master file: $MASTER" 1>&2
+ exit 1
+fi
+if [ ! -e "$PO" ]; then
+ echo "Error: could not find po file: $PO" 1>&2
+ exit 1
+fi
-if [ "${MASTER%.gz}" = "$MASTER" ];
-then
- MAINNAME=$MASTER;
+if [ "${MASTER%.gz}" = "$MASTER" ]; then
+ MAINNAME="$MASTER"
else
- MAINNAME=`mktemp`;
- trap "rm $MAINNAME" EXIT SIGINT;
- gunzip -c $MASTER > $MAINNAME;
-fi;
+ MAINNAME=$(mktemp)
+ trap "rm $MAINNAME" EXIT INT
+ gunzip -c "$MASTER" > $MAINNAME
+fi
-CHARSET_MASTER=`file -i $MAINNAME | cut -d "=" -f 2`;
-CHARSET_PO=`file -i $PO | cut -d "=" -f 2`;
+CHARSET_MASTER=$(file -i "$MAINNAME" | cut -d "=" -f 2)
+CHARSET_PO=$(file -i "$PO" | cut -d "=" -f 2)
-po4a-translate -f man -k 0 -m $MAINNAME -M $CHARSET_MASTER \
- -p $PO $OPTIONS| iconv -f $CHARSET_PO -t // | man -l -
+po4a-translate -f man -k 0 -m "$MAINNAME" -M "$CHARSET_MASTER" \
+ -p "$PO" $OPTIONS| iconv -f "$CHARSET_PO" -t latin1//translit | man -l -
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Version: 0.26-1
The changelog of 0.26-1 was not processed, and this bug was not
automatically closed.
Here is an extract of the 0.26-1 changelog:
* po4aman-display-po improvements. Closes: #368997
--
Nekral
--- End Message ---