summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Rampin <remirampin@gmail.com>2017-07-03 13:06:30 -0400
committerLars Wirzenius <liw@liw.fi>2017-07-16 22:19:12 +0300
commit365485541ea83c2c256582212d3125768637bc82 (patch)
tree8591c1419a848326f20b399ee65a46c94ede2193
parent00c5de9d1d23382d9475384fe428bb036b020aaa (diff)
downloadobnam-365485541ea83c2c256582212d3125768637bc82.tar.gz
Use additional code from format-de* for all langs
-rw-r--r--manual/Makefile35
-rwxr-xr-xmanual/format-de-html39
-rwxr-xr-xmanual/format-de-pdf38
-rwxr-xr-xmanual/format-html7
-rwxr-xr-xmanual/format-pdf8
5 files changed, 33 insertions, 94 deletions
diff --git a/manual/Makefile b/manual/Makefile
index ac291953..b8c22cf5 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -18,8 +18,9 @@
TITLE_EN = Backups with Obnam
TITLE_DE = Backups mit Obnam
-TITLE_FR = Sauvegardes avec Obnam
TRANS_DE = √úbersetzung: Jan Niggemann (jn@hz6.de)
+TITLE_FR = Sauvegardes avec Obnam
+TRANS_FR = Traduction : Pierrick Martinez, Remi Rampin
AUTHOR = Lars Wirzenius (liw@liw.fi)
VERSION = Version $(shell git describe || python ../setup.py --version)
@@ -27,13 +28,13 @@ en_sources = $(shell ls en/*.mdwn)
fr_sources = $(shell ls fr/*.mdwn)
de_sources = $(shell ls de/*.mdwn)
pdfs = \
- obnam-manual.en.pdf \
+ obnam-manual.en.pdf \
obnam-manual.fr.pdf \
- obnam-manual.de.pdf
+ obnam-manual.de.pdf
htmls = \
- obnam-manual.en.html \
+ obnam-manual.en.html \
obnam-manual.fr.html \
- obnam-manual.de.html
+ obnam-manual.de.html
all: html pdf
@@ -42,25 +43,33 @@ html: $(htmls)
pdf: $(pdfs)
obnam-manual.en.pdf: Makefile $(en_sources)
- ./format-pdf $@ "$(TITLE_EN)" "$(AUTHOR)" "$(VERSION)" $(en_sources)
+ ./format-pdf $@ \
+ "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "english" "" \
+ $(en_sources)
obnam-manual.en.html: Makefile $(en_sources) ../obnam.css
- ./format-html $@ "$(TITLE_EN)" "$(AUTHOR)" "$(VERSION)" $(en_sources)
+ ./format-html $@ \
+ "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "english" "" \
+ $(en_sources)
obnam-manual.fr.pdf: Makefile $(fr_sources)
- ./format-pdf $@ "$(TITLE_FR)" "$(AUTHOR)" "$(VERSION)" $(fr_sources)
+ ./format-pdf $@ \
+ "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "french" "$(TRANS_FR)" \
+ $(fr_sources)
obnam-manual.fr.html: Makefile $(fr_sources) ../obnam.css
- ./format-html $@ "$(TITLE_FR)" "$(AUTHOR)" "$(VERSION)" $(fr_sources)
+ ./format-html $@ \
+ "$(TITLE_FR)" "$(AUTHOR)" "$(VERSION)" "french" "$(TRANS_FR)" \
+ $(fr_sources)
obnam-manual.de.pdf: Makefile $(de_sources)
- ./format-de-pdf $@ \
- "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "$(TRANS_DE)" \
+ ./format-pdf $@ \
+ "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "german" "$(TRANS_DE)" \
$(de_sources)
obnam-manual.de.html: Makefile $(de_sources) ../obnam.css
- ./format-de-html $@ \
- "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "$(TRANS_DE)" \
+ ./format-html $@ \
+ "$(TITLE_DE)" "$(AUTHOR)" "$(VERSION)" "german" "$(TRANS_DE)" \
$(de_sources)
clean:
diff --git a/manual/format-de-html b/manual/format-de-html
deleted file mode 100755
index 5411942c..00000000
--- a/manual/format-de-html
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# Copyright 2014 Lars Wirzenius
-# Copyright 2014 Jan Niggemann
-#
-# This program 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.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# =*= License: GPL-3+ =*=
-
-set -eu
-
-OUTPUT="$1"
-TITLE="$2"
-AUTHOR="$3"
-VERSION="$4"
-TRANS_DE="$5"
-shift 5
-
-cat > 000.mdwn <<EOF
-% $TITLE
-% $AUTHOR
- $TRANS_DE
-% $VERSION
-EOF
-
-pandoc -H ../obnam.css --smart --toc --chapters --number-sections \
- --standalone --self-contained -V lang=german -V geometry:a4paper \
- -o "$OUTPUT" 000.mdwn "$@"
-rm -f 000.mdwn
diff --git a/manual/format-de-pdf b/manual/format-de-pdf
deleted file mode 100755
index 15ef78eb..00000000
--- a/manual/format-de-pdf
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Copyright 2014,2016 Lars Wirzenius
-# Copyright 2014,2017 Jan Niggemann
-#
-# This program 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.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# =*= License: GPL-3+ =*=
-
-set -eu
-
-OUTPUT="$1"
-TITLE="$2"
-AUTHOR="$3"
-VERSION="$4"
-TRANS_DE="$5"
-shift 5
-
-cat > 000.mdwn <<EOF
-% $TITLE
-% $AUTHOR
- $TRANS_DE
-% $VERSION
-EOF
-
-pandoc --smart --toc --chapters --number-sections \
- -V lang=german -V geometry:a4paper -o "$OUTPUT" 000.mdwn "$@"
-rm -f 000.mdwn
diff --git a/manual/format-html b/manual/format-html
index 14bc3750..238174a8 100755
--- a/manual/format-html
+++ b/manual/format-html
@@ -22,15 +22,18 @@ OUTPUT="$1"
TITLE="$2"
AUTHOR="$3"
VERSION="$4"
-shift 4
+LANG="$5"
+TRANSLATOR="$6"
+shift 6
cat > 000.mdwn <<EOF
% $TITLE
% $AUTHOR
+ $TRANSLATOR
% $VERSION
EOF
pandoc -H ../obnam.css --smart --toc --chapters --number-sections \
- --standalone --self-contained -V geometry:lettersize \
+ --standalone --self-contained -V lang="$LANG" -V geometry:a4paper \
-o "$OUTPUT" 000.mdwn "$@"
rm -f 000.mdwn
diff --git a/manual/format-pdf b/manual/format-pdf
index bba45c6e..e1cf9daf 100755
--- a/manual/format-pdf
+++ b/manual/format-pdf
@@ -22,13 +22,17 @@ OUTPUT="$1"
TITLE="$2"
AUTHOR="$3"
VERSION="$4"
-shift 4
+LANG="$5"
+TRANSLATOR="$6"
+shift 6
cat > 000.mdwn <<EOF
% $TITLE
% $AUTHOR
+ $TRANSLATOR
% $VERSION
EOF
-pandoc --smart --toc --chapters --number-sections -o "$OUTPUT" 000.mdwn "$@"
+pandoc --smart --toc --chapters --number-sections \
+ -V lang="$LANG" -V geometry:a4paper -o "$OUTPUT" 000.mdwn "$@"
rm -f 000.mdwn