| 8 |
8 |
# All available translations |
| 9 |
9 |
TRANSALL = $(shell basename -s .po -a po/*.po) |
| 10 |
10 |
|
| 11 |
|
all: clean html translate |
|
11 |
all: clean html html-translations pdf pdf-translations |
| 12 |
12 |
|
| 13 |
13 |
html: style |
| 14 |
14 |
printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml |
| 15 |
15 |
xsltproc --xinclude -o ../build/C/index.html $(XUBUNTUXSL_HTML) C/index.xml |
| 16 |
16 |
sed -i 's@\(<p>The contributors to\) this translation of the \(documentation are:</p>\)@\1 the various translations of this \2@' ../build/C/credits-license.html |
| 17 |
17 |
|
| 18 |
|
epub: epubstyle |
|
18 |
epub: style-epub |
| 19 |
19 |
printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml |
| 20 |
20 |
xsltproc --xinclude -o ../build/C/ /usr/share/xml/docbook/stylesheet/nwalsh/epub3/chunk.xsl C/index.xml |
| 21 |
21 |
sed -i 's@\(<p>The contributors to\) this translation of the \(documentation are:</p>\)@\1 the various translations of this \2@' ../build/C/credits-license.html |
| … |
| 25 |
25 |
|
| 26 |
26 |
pdf: |
| 27 |
27 |
printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml |
| 28 |
|
xsltproc --stringparam paper.type "A4" --xinclude -o fo/C-A4.fo $(XUBUNTUXSL_PDF) C/index.xml |
|
28 |
xsltproc --stringparam paper.type A4 --xinclude -o fo/C-A4.fo $(XUBUNTUXSL_PDF) C/index.xml |
| 29 |
29 |
sed -i 's@\(>The contributors to\) this translation of the \(documentation are:</\)@\1 the various translations of this \2@' fo/C-A4.fo |
| 30 |
|
mkdir -p ../build/C |
| 31 |
|
fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/C-A4.fo -pdf ../build/C/xubuntu-documentation-A4.pdf |
| 32 |
|
sed 's@\(page-width\)="[^"]*" \(page-height\)="[^"]*"@\1="8.5in" \2="11in"@g' fo/C-A4.fo > fo/C-USletter.fo |
| 33 |
|
fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/C-USletter.fo -pdf ../build/C/xubuntu-documentation-USletter.pdf |
|
30 |
../scripts/pdf-create.sh C |
| 34 |
31 |
|
| 35 |
32 |
style: |
| 36 |
33 |
mkdir -p ../build/libs |
| … |
| 39 |
36 |
libs/admon \ |
| 40 |
37 |
libs/navig \ |
| 41 |
38 |
../build/libs/ |
|
39 |
@touch style |
| 42 |
40 |
|
| 43 |
|
epubstyle: |
|
41 |
style-epub: |
| 44 |
42 |
mkdir -p ../build/C/libs/images |
| 45 |
43 |
cp libs/images/preferences-desktop.png \ |
| 46 |
44 |
libs/images/system-lock-screen.png \ |
| … |
| 51 |
49 |
libs/images/key_icon.png \ |
| 52 |
50 |
../build/C/libs/images/ |
| 53 |
51 |
|
| 54 |
|
translate: get-translations |
|
52 |
translate: | get-translations |
| 55 |
53 |
../scripts/translate.sh $(TRANSOPTS) |
| 56 |
54 |
../scripts/translators.sh $(TRANSOPTS) |
|
55 |
@touch translate |
|
56 |
|
|
57 |
html-translations: style translate |
| 57 |
58 |
for dir in $(TRANSLATIONS); do \ |
| 58 |
59 |
xsltproc --xinclude -o ../build/$$dir/index.html $(XUBUNTUXSL_HTML) $$dir/index.xml; \ |
| 59 |
60 |
done |
| 60 |
61 |
|
| 61 |
|
translate-pdf: get-translations |
| 62 |
|
../scripts/translate.sh $(TRANSOPTS) |
| 63 |
|
../scripts/translators.sh $(TRANSOPTS) |
|
62 |
pdf-translations: translate |
| 64 |
63 |
for dir in $(TRANSLATIONS); do \ |
| 65 |
|
xsltproc --stringparam paper.type "A4" --xinclude -o fo/$$dir-A4.fo $(XUBUNTUXSL_PDF) $$dir/index.xml; \ |
| 66 |
|
mkdir -p ../build/$$dir; \ |
| 67 |
|
fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$$dir-A4.fo -pdf ../build/$$dir/xubuntu-documentation-A4.pdf; \ |
| 68 |
|
sed 's@\(page-width\)="[^"]*" \(page-height\)="[^"]*"@\1="8.5in" \2="11in"@g' fo/$$dir-A4.fo > fo/$$dir-USletter.fo; \ |
| 69 |
|
fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$$dir-USletter.fo -pdf ../build/$$dir/xubuntu-documentation-USletter.pdf; \ |
|
64 |
xsltproc --stringparam paper.type A4 --xinclude -o fo/$$dir-A4.fo $(XUBUNTUXSL_PDF) $$dir/index.xml; \ |
| 70 |
65 |
done |
|
66 |
../scripts/pdf-create.sh $(TRANSLATIONS) |
| 71 |
67 |
|
| 72 |
68 |
test: get-translations |
| 73 |
69 |
set -e; \ |
| … |
| 98 |
94 |
endif |
| 99 |
95 |
|
| 100 |
96 |
clean: |
| 101 |
|
rm -rf $(TRANSALL) C/translators.xml fo/ |
|
97 |
rm -rf $(TRANSALL) C/translators.xml fo/ style translate |