[Po4a-commits] "po4a/scripts po4apod-display-po, NONE, 1.1 po4apod-display-po.1, NONE, 1.1 po4aman-display-po.1, 1.2, 1.3"
Nicolas FRANÃOIS
nekral-guest at alioth.debian.org
Mon Jul 20 17:54:42 UTC 2009
Update of /cvsroot/po4a/po4a/scripts
In directory alioth:/tmp/cvs-serv20523/scripts
Modified Files:
po4aman-display-po.1
Added Files:
po4apod-display-po po4apod-display-po.1
Log Message:
* NEWS, scripts/po4apod-display-po, scripts/po4apod-display-po.1,
scripts/po4aman-display-po: Added script to display previews of
POD translations.
--- NEW FILE: po4apod-display-po ---
#!/bin/sh
MASTER=""
NAME=""
SECTION=""
PO=""
UTF8=""
function usage () {
echo "Usage : $(basename $0) -m POD_FILE -p PO_FILE"
}
while getopts m:p:uh option; do
case $option in
m)
MASTER=$OPTARG
;;
p)
PO=$OPTARG
;;
h)
usage
exit 0
;;
[?])
usage 1>&2
exit 1
;;
esac
done
if [[ -z $PO || -z $MASTER ]]; then
usage
exit 1
fi
if [ ! -f $PO ]; then
echo "Error: unable to find the file $PO."
usage
exit 1
fi
if [ ! -f $MASTER ]; then
echo "Error: unable to find the file $MASTER."
usage
exit 1
fi
# Can fail to retrieve the expected result with various files...
#NAME=$(basename $MASTER .pod | sed -e 's/\..//')
#SECTION=$(basename $MASTER .pod | sed -e 's/.*\.//')
po4a-translate -f pod -m $MASTER -p $PO \
| pod2man -r '' -c TRANSLATED -n $MASTER \
| man -l -
Index: po4aman-display-po.1
===================================================================
RCS file: /cvsroot/po4a/po4a/scripts/po4aman-display-po.1,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- po4aman-display-po.1 16 Apr 2006 22:09:33 -0000 1.2
+++ po4aman-display-po.1 20 Jul 2009 17:54:40 -0000 1.3
@@ -15,6 +15,16 @@
\fBpo4aman-display-po\fP can be used by a translator who wants to check
how the man page being translated in a PO will be displayed.
+The manual page must be in one of the formats supported by the po4a's
+\fIman\fP module.
+The manual page can be provided on the command line, or installed on the
+system.
+
+Manual pages generated from other formats, like docbook or pod, are not
+supported.
+See \fBpo4apod-display-po\fP for an equivalent supporting \fIpod\fP
+documents.
+
.SH OPTIONS
.TP
.BI "\-p " PO_FILE
@@ -33,5 +43,8 @@
.BI "\-o " PO4A_OPT
Some options to pass to \fBpo4a-translate\fP.
+.SH SEE ALSO
+\fBpo4apod-display-po\fP.(1)
+
.SH AUTHOR
Thomas Huriaux
--- NEW FILE: po4apod-display-po.1 ---
.TH PO4APOD-DISPLAY-PO 1 "2009-03-16" "Po4a Tools" "Po4a Tools"
.SH NAME
po4apod-display-po \- man display of a translated pod file according to a PO
.SH SYNOPSIS
.B po4apod-display-po
.B \-p
.I PO_FILE
.B \-m
.I POD_FILE
.RB [ \-o
.IR PO4A_OPT ]
.SH DESCRIPTION
\fBpo4apod-display-po\fP can be used by a translator who wants to check
how the man page, generated from a pod file, being translated in a PO will
be displayed. Generally, pod file is only available in source package or
embedded in Perl script.
.SH OPTIONS
.TP
.BI "\-p " PO_FILE
The PO file containing the translations.
.TP
.BI "\-m " POD_FILE
The original pod file used by po4a to generate PO file.
.br
.TP
.BI "\-o " PO4A_OPT
Some options to pass to \fBpo4a-translate\fP.
.SH SEE ALSO
\fBpo4aman-display-po\fP.(1)
.SH AUTHOR
Florentin Duneau
More information about the Po4a-commits
mailing list