]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Change how language specific chapter is included. Based on patch from Benoît Guillon.
authorPetter Reinholdtsen <pere@hungry.com>
Mon, 12 Oct 2015 09:14:05 +0000 (11:14 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Mon, 12 Oct 2015 09:14:05 +0000 (11:14 +0200)
Makefile
freeculture-about-edition-en.xml [new file with mode: 0644]
freeculture.nb.po
freeculture.pot
freeculture.xml
po4a.cfg

index 4b96add174bd0f420ff8f9dd38ac1c16d6e48b16..e994d08da25f5026c2806082a763fc418881b94f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -60,16 +60,14 @@ PDF_XSLT = \
 
 all: lint lint.nb html epub pdf mobi
 
-freeculture.nb.po: freeculture.pot
+freeculture.nb.po freeculture.fr.po: freeculture.pot
        po4a --no-translations --msgmerge-opt --no-location po4a.cfg
 
 freeculture.nb.xml: freeculture.nb.po freeculture.xml
        po4a --translate-only freeculture.nb.xml po4a.cfg 
-       sed -i 's%&aboutedition;%<xi:include href="freeculture-about-edition-nb.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>%' $@
 
 freeculture.fr.xml: freeculture.fr.po freeculture.xml
        po4a --translate-only freeculture.fr.xml po4a.cfg 
-       sed -i 's%&aboutedition;%<xi:include href="freeculture-about-edition-fr.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>%' $@
 
 freeculture.es_419.po: freeculture.pot
        po4a --no-translations --msgmerge-opt --no-location po4a.cfg
@@ -156,6 +154,7 @@ freeculture.xml:
 # po4a.
 freeculture.pot: freeculture.xml cover-text.xml
        po4a-gettextize -o nodefault='<beginpage>' -o inline='<beginpage>' \
+          -o attributes='href' \
          -f docbook -m freeculture.xml -m cover-text.xml  > $@.new && mv $@.new $@
 
 stats: update-stats progress.png
diff --git a/freeculture-about-edition-en.xml b/freeculture-about-edition-en.xml
new file mode 100644 (file)
index 0000000..16d9bf2
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<?xml-stylesheet href="docbook-css-0.4/driver.css" type="text/css"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter label="" id="c-about-this-edition">
+  <title>About this edition</title>
+  <para>
+This new edition of <citetitle>Free Culture</citetitle> is published
+by volunteers as part of a project to translate the book to Norwegian
+bokmål.
+  </para>
+  <para>
+&ndash; Petter Reinholdtsen, Oslo 2015-10-11
+  </para>
+
+</chapter>
index 6321bd1ea1527147b1ff36afbdb097f6ef3ed863..34a986e7f333b9c617ee55f381bdf680767ec4d8 100644 (file)
@@ -13,7 +13,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Free Culture by Lawrence Lessig\n"
-"POT-Creation-Date: 2015-10-10 18:52+0200\n"
+"POT-Creation-Date: 2015-10-12 11:12+0200\n"
 "PO-Revision-Date: 2015-10-11 21:40+0000\n"
 "Last-Translator: Petter Reinholdtsen <pere@hungry.com>\n"
 "Language-Team: Norwegian Bokmål (http://www.transifex.com/pere/free-culture-"
@@ -29176,6 +29176,10 @@ msgstr ""
 "har hatt rett.  Denne trege eleven er som alltid takknemlig for hennes "
 "evigvarende tålmodighet og kjærlighet."
 
+#. type: Attribute 'href' of: <book><xi:include>
+msgid "freeculture-about-edition-en.xml"
+msgstr "freeculture-about-edition-nb.xml"
+
 #. type: Content of: <book><colophon><para>
 msgid ""
 "Free culture: How big media uses technology and the law to lock down culture "
index 65a93ae6f4480534ce5b968f5573cc90b128427b..0d96259dc93395472a81f7da5629f4792c249416 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2015-10-10 18:52+0200\n"
+"POT-Creation-Date: 2015-10-12 11:12+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -117,7 +117,7 @@ msgid "<placeholder type=\"inlinemediaobject\" id=\"0\"/>"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:95 freeculture.xml:15879
+#: freeculture.xml:95 freeculture.xml:15881
 msgid ""
 "This book is licensed under a Creative Commons license. This license permits "
 "non-commercial use of this work, so long as attribution is given.  For more "
@@ -21759,25 +21759,30 @@ msgid ""
 "patience and love."
 msgstr ""
 
+#. type: Attribute 'href' of: <book><xi:include>
+#: freeculture.xml:15761
+msgid "freeculture-about-edition-en.xml"
+msgstr ""
+
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15769
+#: freeculture.xml:15771
 msgid ""
 "Free culture: How big media uses technology and the law to lock down culture "
 "and control creativity / Lawrence Lessig."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15773
+#: freeculture.xml:15775
 msgid "Copyright &copy; 2004 Lawrence Lessig.  Some rights reserved."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15777
+#: freeculture.xml:15779
 msgid "<ulink url=\"http://free-culture.cc/\"/>"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15781
+#: freeculture.xml:15783
 msgid ""
 "Published in English and Norwegian Bokmål 2015 by Petter Reinholdtsen with "
 "help from many volunteers.  Typeset with <ulink "
@@ -21786,12 +21791,12 @@ msgid ""
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15788
+#: freeculture.xml:15790
 msgid "First published 2004 by The Penguin Press."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15792
+#: freeculture.xml:15794
 msgid ""
 "Excerpt from an editorial titled <quote>The Coming of Copyright "
 "Perpetuity,</quote> <citetitle>The New York Times</citetitle>, January 16, "
@@ -21800,7 +21805,7 @@ msgid ""
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15798
+#: freeculture.xml:15800
 msgid ""
 "Cartoon in figure <xref xrefstyle=\"template:%n\" "
 "linkend=\"fig-1711-vcr-handgun-cartoonfig\"/> by Paul Conrad, copyright "
@@ -21809,7 +21814,7 @@ msgid ""
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15804
+#: freeculture.xml:15806
 msgid ""
 "Diagram in figure <xref xrefstyle=\"template:%n\" "
 "linkend=\"fig-1761-pattern-modern-media-ownership\"/> courtesy of the office "
@@ -21817,19 +21822,19 @@ msgid ""
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15810
+#: freeculture.xml:15812
 msgid "Cover created by Petter Reinholdtsen using inkscape."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15814
+#: freeculture.xml:15816
 msgid ""
 "The quotes on the cover came from <ulink "
 "url=\"http://free-culture.cc/jacket/\"/>."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15819
+#: freeculture.xml:15821
 msgid ""
 "Portrait on the cover was created 2013 by ActuaLitté and licensed under a "
 "Creative Commons Attribution-ShareAlike 2.0 license.  It was downloaded from "
@@ -21838,49 +21843,49 @@ msgid ""
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15826
+#: freeculture.xml:15828
 msgid "Classifications:"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15830
+#: freeculture.xml:15832
 msgid "(Dewey)  306.4, 306.40973, 306.46, 341.7582, 343.7309/9"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15839
+#: freeculture.xml:15841
 msgid "(UDK) 347.78"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15843
+#: freeculture.xml:15845
 msgid "(US Library of Congress) KF2979.L47 2004"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15847
+#: freeculture.xml:15849
 msgid "(ACM CRCS) K.4.1"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15851
+#: freeculture.xml:15853
 msgid "Thomas Gramstad Forlag donated the ISBN numbers."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15855
+#: freeculture.xml:15857
 msgid ""
 "Printing was sponsed by NUUG Foundation, <ulink "
 "url=\"http://www.nuugfoundation.no/\"/>."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15860
+#: freeculture.xml:15862
 msgid "Includes index."
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15867
+#: freeculture.xml:15869
 msgid ""
 "The Docbook source is available from <ulink "
 "url=\"https://github.com/petterreinholdtsen/free-culture-lessig\"/>.  Please "
@@ -21888,64 +21893,64 @@ msgid ""
 msgstr ""
 
 #. type: Attribute 'fileref' of: <book><colophon><para><informalfigure><graphic>
-#: freeculture.xml:15874
+#: freeculture.xml:15876
 msgid "images/cc.svg"
 msgstr ""
 
 #. type: Content of: <book><colophon><para>
-#: freeculture.xml:15886
+#: freeculture.xml:15888
 msgid ""
 "This book is a proof reading draft.  Please visit the github URL above to "
 "get the latest version."
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><thead><row><entry>
-#: freeculture.xml:15895
+#: freeculture.xml:15897
 msgid "Format / MIME-type"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><thead><row><entry>
-#: freeculture.xml:15896
+#: freeculture.xml:15898
 msgid "ISBN"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15901
+#: freeculture.xml:15903
 msgid "US Trade edition from lulu.com"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15902
+#: freeculture.xml:15904
 msgid "978-82-8067-010-6"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15905
+#: freeculture.xml:15907
 msgid "application/pdf"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15906
+#: freeculture.xml:15908
 msgid "978-82-8067-011-3"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15909
+#: freeculture.xml:15911
 msgid "application/epub+zip"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15910
+#: freeculture.xml:15912
 msgid "978-82-8067-012-0"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15913
+#: freeculture.xml:15915
 msgid "application/x-mobipocket-ebook"
 msgstr ""
 
 #. type: Content of: <book><colophon><para><informaltable><tgroup><tbody><row><entry>
-#: freeculture.xml:15914
+#: freeculture.xml:15916
 msgid "978-82-8067-013-7"
 msgstr ""
 
index 3b5307350b81516d958771c6999e790003f370d2..786336f19ae97739f5c8cde92a98bdf7c82ecbd1 100644 (file)
@@ -9,7 +9,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" 
 [
-   <!ENTITY copy "©"> <!ENTITY aboutedition "">
+   <!ENTITY copy "©">
 ]>
 
 <book id="index" lang="en">
@@ -15758,7 +15758,9 @@ grateful for her perpetual patience and love.
 
 </chapter>
 
-&aboutedition;
+<xi:include href="freeculture-about-edition-en.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+  <xi:fallback/>
+</xi:include>
 
 <index></index>
 <colophon>
index 2e34adb86034daf4b46f596b0b27e6f375ba1fb5..50b66b956df63bab8b52e8e522ec7edbd1f94e16 100644 (file)
--- a/po4a.cfg
+++ b/po4a.cfg
@@ -1,7 +1,7 @@
 [po_directory] .
 
 [type: docbook] freeculture.xml $lang:$lang.xml \
-       opt:"-o untranslated='<listitem>' -M UTF-8 -k 1"
+       opt:"-o untranslated='<listitem>' -o attributes='href' -M UTF-8 -k 1"
 
 [type: docbook] cover-text.xml $lang:cover-text.$lang.xml \
        opt:"-M UTF-8 -k 1"