diff options
author | Daniel Hartwig <mandyke@gmail.com> | 2012-05-31 19:00:37 +0800 |
---|---|---|
committer | Daniel Hartwig <mandyke@gmail.com> | 2012-05-31 19:39:29 +0800 |
commit | f694b9796a82ebe04435e15d39b162bae02e31e6 (patch) | |
tree | b1f20cf65bc4ea6efc9a6672ad3b3cb34edc6400 /doc | |
parent | 3f3a963073e8e6f2d729f8499ee133eb1778f55b (diff) | |
download | aptitude-f694b9796a82ebe04435e15d39b162bae02e31e6.tar.gz |
Tidy generation, encoding of README files
Encoding issues are now taken care of by html-to-text.
No longer are there "ASCII" hacks in stylesheets and
such.
Some READMEs were available but not installed. Even
though some of these are older translations they are
now all installed to the system.
* doc/aptitude-txt.xsl:
- removed ASCII hacks which did not work
* doc/fixup-text:
- removed this script, no longer needed
* doc/html-to-text:
- now takes mandatory output encoding argument
* explicitly set encodings
- README.en → ISO-8859-1
- README.{cs,es,fr,fi,it,ja} → UTF-8
* po/*.po:
- updated for these changes
- clear incorrect msgstr where the translator
had mistaken the purpose of "README"
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/aptitude-txt.xsl | 41 | ||||
-rw-r--r-- | doc/common.mk | 7 | ||||
-rw-r--r-- | doc/cs/Makefile.am | 4 | ||||
-rw-r--r-- | doc/de/Makefile.am | 2 | ||||
-rw-r--r-- | doc/en/Makefile.am | 5 | ||||
-rw-r--r-- | doc/es/Makefile.am | 2 | ||||
-rw-r--r-- | doc/fi/Makefile.am | 7 | ||||
-rwxr-xr-x | doc/fixup-text | 9 | ||||
-rw-r--r-- | doc/fr/Makefile.am | 2 | ||||
-rwxr-xr-x | doc/html-to-text | 7 | ||||
-rw-r--r-- | doc/it/Makefile.am | 2 | ||||
-rw-r--r-- | doc/ja/Makefile.am | 6 |
13 files changed, 29 insertions, 67 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 22de1536..e4644af2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS=cs de en es fi fr it ja pl po4a -EXTRA_DIST=aptitude-common.xsl aptitude-html.xsl aptitude-man.xsl aptitude-txt.xsl aptitude.css fixup-text html-to-text +EXTRA_DIST=aptitude-common.xsl aptitude-html.xsl aptitude-man.xsl aptitude-txt.xsl aptitude.css html-to-text PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \ "$(top_srcdir)/doc/po4a/po4a.cfg" diff --git a/doc/aptitude-txt.xsl b/doc/aptitude-txt.xsl index 0a0c5c0b..16ff7331 100644 --- a/doc/aptitude-txt.xsl +++ b/doc/aptitude-txt.xsl @@ -11,45 +11,4 @@ <xsl:param name="preferred.mediaobject.role">text</xsl:param> -<!-- Force DocBook to use ASCII durnit --> -<xsl:param name='local.l10n.xml' select='document("")'/> -<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> - <l:l10n language="en"> - <l:context name='xref-number-and-title'> - <l:template name="section" text="the section called ``%t''"/> - <l:template name="sect1" text="the section called ``%t''"/> - <l:template name="sect2" text="the section called ``%t''"/> - <l:template name="sect3" text="the section called ``%t''"/> - <l:template name="sect4" text="the section called ``%t''"/> - <l:template name="sect5" text="the section called ``%t''"/> - <l:template name="figure" text="Figure %n, ``%t''"/> - </l:context> - - <l:context name='xref'> - <l:template name="section" text="the section called ``%t''"/> - <l:template name="sect1" text="the section called ``%t''"/> - <l:template name="sect2" text="the section called ``%t''"/> - <l:template name="sect3" text="the section called ``%t''"/> - <l:template name="sect4" text="the section called ``%t''"/> - <l:template name="sect5" text="the section called ``%t''"/> - </l:context> - - - <!-- Apparently I can't do anything about an em-dash appearing - in the refentry. :( - --> - - <l:dingbat key="startquote" text="``"/> - <l:dingbat key="endquote" text="''"/> - - <l:dingbat key="nestedstartquote" text="`"/> - <l:dingbat key="nestedendquote" text="'"/> - - <l:dingbat key="singlestartquote" text="`"/> - <l:dingbat key="singleendquote" text="'"/> - - <l:dingbat key="bullet" text="*"/> - </l:l10n> -</l:i18n> - </xsl:stylesheet> diff --git a/doc/common.mk b/doc/common.mk index b78ca753..716b6ecb 100644 --- a/doc/common.mk +++ b/doc/common.mk @@ -7,6 +7,8 @@ HTML2TEXT=$(top_srcdir)/doc/html-to-text localemandir=$(mandir)/$(LANGCODE) htmldir=$(docdir)/html/$(LANGCODE) +pkgdata_DATA=$(README) + images/%.png: images/%.svg rsvg-convert -x 1.5 -y 1.5 -f png -o $@ $< @@ -28,9 +30,6 @@ install-data-hook: $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir) $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) - $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir) - $(MANPAGE): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-man.xsl -rm -fr output-man $(MANPAGE) xsltproc -o output-man/aptitude.8 $(top_srcdir)/doc/aptitude-man.xsl aptitude.xml @@ -43,7 +42,7 @@ $(MANPAGE): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-man.xsl $(README): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-txt.xsl -rm -fr output-txt/ xsltproc -o output-txt/index.html $(top_srcdir)/doc/aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) + $(HTML2TEXT) output-txt/index.html $(README_encoding) > $(README) doc-css-stamp: doc-html-stamp $(top_srcdir)/doc/aptitude.css rm -f output-html/aptitude.css diff --git a/doc/cs/Makefile.am b/doc/cs/Makefile.am index 80833ba5..7a64c4f0 100644 --- a/doc/cs/Makefile.am +++ b/doc/cs/Makefile.am @@ -26,7 +26,7 @@ clean-local: -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp -rm -fr $(MANPAGE) $(README) -# pkgdata_DATA=$(README) +pkgdata_DATA=$(README) install-data-hook: $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 @@ -47,7 +47,7 @@ $(MANPAGE): aptitude.xml $(srcdir)/../aptitude-man.xsl $(README): aptitude.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl -rm -fr output-txt/ xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl $(srcdir)/aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) + $(HTML2TEXT) output-txt/index.html utf-8 > $(README) doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css rm -f output-html/aptitude.css diff --git a/doc/de/Makefile.am b/doc/de/Makefile.am index bdc043b8..5494f2da 100644 --- a/doc/de/Makefile.am +++ b/doc/de/Makefile.am @@ -56,7 +56,7 @@ $(MANPAGE): $(XMLSOURCES) $(srcdir)/../aptitude-man.xsl $(README): $(XMLSOURCES) $(srcdir)/../aptitude-txt.xsl -rm -fr output-txt xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) + $(HTML2TEXT) output-txt/index.html utf-8 > $(README) doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css rm -f output-html/aptitude.css diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index 9cddd9c9..b48e28aa 100644 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -29,7 +29,8 @@ install-data-hook: $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/en $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/en/images - $(INSTALL_DATA) README.en $(DESTDIR)$(pkgdatadir)/README + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) + $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir)/README doc-stamp: doc-html-stamp doc-css-stamp $(README) man-stamp touch doc-stamp @@ -47,7 +48,7 @@ aptitude.8 aptitude-create-state-bundle.1 aptitude-run-state-bundle.1: man-stamp $(README): $(srcdir)/aptitude.xml $(srcdir)/manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl -rm -fr output-txt/ xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl $(srcdir)/aptitude.xml - $(HTML2TEXT) output-txt/index.html | $(srcdir)/../fixup-text > $(README) + $(HTML2TEXT) output-txt/index.html iso-8859-1 > $(README) doc-fo-stamp: $(srcdir)/aptitude.xml $(srcdir)/manpage.xml $(srcdir)/../aptitude-fo.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES) -rm -fr output-fo/ diff --git a/doc/es/Makefile.am b/doc/es/Makefile.am index 89451b50..4633a661 100644 --- a/doc/es/Makefile.am +++ b/doc/es/Makefile.am @@ -7,6 +7,8 @@ SUBDIRS=images EXTRA_DIST= LANGCODE=es +README_encoding=utf-8 + XMLSOURCES=aptitude.xml manpage.xml IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/fi/Makefile.am b/doc/fi/Makefile.am index 0356b30c..4202f2fa 100644 --- a/doc/fi/Makefile.am +++ b/doc/fi/Makefile.am @@ -18,6 +18,8 @@ HTML2TEXT=$(srcdir)/../html-to-text IMAGES = $(wildcard $(srcdir)/images/*.png) +pkgdata_DATA=$(README) + all-local: doc-stamp clean-local: @@ -28,12 +30,11 @@ clean-local: install-data-hook: $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8 + $(mkinstalldirs) $(DESTDIR)$(docdir)/html/$(LANGCODE)/images $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/$(LANGCODE) $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/$(LANGCODE)/images - $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE) - doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) touch doc-stamp @@ -46,7 +47,7 @@ $(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl $(README): aptitude.xml manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl -rm -fr output-txt/ xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl $(srcdir)/aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) + $(HTML2TEXT) output-txt/index.html utf-8 > $(README) doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css rm -f output-html/aptitude.css diff --git a/doc/fixup-text b/doc/fixup-text deleted file mode 100755 index 47417e4f..00000000 --- a/doc/fixup-text +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -exec sed -e 's/—/--/g -s/→/->/g -s/λ/lambda/g - -# These seem to be for Finnish: -s/Ž/Zh/g -s/š/sh/g' diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am index 34245663..b551b834 100644 --- a/doc/fr/Makefile.am +++ b/doc/fr/Makefile.am @@ -7,6 +7,8 @@ SUBDIRS=images EXTRA_DIST=fixman LANGCODE=fr +README_encoding=utf-8 + XMLSOURCES=aptitude.xml manpage.xml IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/html-to-text b/doc/html-to-text index c8428d7f..7c7956f8 100755 --- a/doc/html-to-text +++ b/doc/html-to-text @@ -1,6 +1,11 @@ #!/bin/bash # +# Usage: html-to-text input encoding +# # This is just a layer of indirection so the html-to-text utility can # be changed in a central location. -exec elinks -dump -no-references -no-numbering "$@" +in="$1" +encoding=$2 + +exec elinks -dump -dump-charset $encoding -no-references -no-numbering "$in" diff --git a/doc/it/Makefile.am b/doc/it/Makefile.am index 38d2fa5f..86408c5f 100644 --- a/doc/it/Makefile.am +++ b/doc/it/Makefile.am @@ -7,6 +7,8 @@ SUBDIRS=images EXTRA_DIST= LANGCODE=it +README_encoding=utf-8 + XMLSOURCES=aptitude.xml manpage.xml IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/ja/Makefile.am b/doc/ja/Makefile.am index 496e0a0b..43a63897 100644 --- a/doc/ja/Makefile.am +++ b/doc/ja/Makefile.am @@ -20,6 +20,8 @@ htmldir=$(DESTDIR)$(docdir)/html/$(LANGCODE) IMAGES = $(wildcard $(srcdir)/images/*.png) +pkgdata_DATA=$(README) + if USE_PO4A all-local: doc-stamp else @@ -40,8 +42,6 @@ install-data-hook: $(INSTALL_DATA) output-html/*.html output-html/*.css $(htmldir) $(INSTALL_DATA) output-html/images/* $(htmldir)/images -# $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir)/$(README) - doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) touch doc-stamp @@ -61,7 +61,7 @@ $(MANPAGE): $(XMLSOURCES) $(srcdir)/../aptitude-man.xsl $(README): $(XMLSOURCES) $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl -rm -fr output-txt/ xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) + $(HTML2TEXT) output-txt/index.html utf-8 > $(README) doc-db2latex-stamp: output-db2latex/aptitude.tex $(IMAGES) ln -s ../images output-db2latex/images |