summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/asciidoc.txt6
-rw-r--r--lang-de.conf35
-rw-r--r--tests/data/lang-en-test.txt10
-rw-r--r--tests/testasciidoc.conf3
4 files changed, 44 insertions, 10 deletions
diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt
index cd56ab0..14a82c6 100644
--- a/doc/asciidoc.txt
+++ b/doc/asciidoc.txt
@@ -4993,12 +4993,16 @@ you need to be aware of:
$ a2x -a lang=es doc/article.txt
-- If you are outputting html or xhtml directly from asciidoc(1) you'll
+- If you are outputting HTML directly from asciidoc(1) you'll
need to set the various `*_caption` attributes to match your target
language (see the list of captions and titles in the `[attributes]`
section of the default `asciidoc.conf` file). The easiest way is to
create a language `.conf` file (see the AsciiDoc's `lang-en.conf`
file).
++
+NOTE: You still use the 'NOTE', 'CAUTION', 'TIP', 'WARNING',
+'IMPORTANT' captions in the AsciiDoc source, they get translated in
+the HTML output file.
- asciidoc(1) automatically loads configuration files named like
`lang-<lang>.conf` where `<lang>` is a two letter language code that
diff --git a/lang-de.conf b/lang-de.conf
index b63a1bf..c3611f9 100644
--- a/lang-de.conf
+++ b/lang-de.conf
@@ -1,15 +1,42 @@
-[attributes]
+#
+# AsciiDoc German language configuration file.
+#
+[attributes]
+# Captions, used by (X)HTML backends.
+# Captions on RHS are displayed in outputs.
ifdef::basebackend-html[]
-# Captions, used by HTML backends.
caution_caption=Achtung
important_caption=Wichtig
note_caption=Anmerkung
tip_caption=Tipp
warning_caption=Warnung
-figure_caption="Abbildung: "
-table_caption="Tabelle: "
+figure_caption=
+table_caption=
+toc_title=Inhaltsverzeichnis
endif::basebackend-html[]
+
+[specialsections]
+# DocBook special sections.
+# The regular expression on LHS is matched against source titles.
+ifdef::basebackend-docbook[]
+
+ifdef::doctype-article[]
+^Abstract$=sect-abstract
+endif::doctype-article[]
+
+ifdef::doctype-book[]
+^Colophon$=sect-colophon
+^Dedication$=sect-dedication
+^Preface$=sect-preface
+endif::doctype-book[]
+
+^Index$=sect-index
+^(Bibliography|References)$=sect-bibliography
+^Glossary$=sect-glossary
+^Appendix [A-Z][:.](?P<title>.*)$=sect-appendix
+
+endif::basebackend-docbook[]
diff --git a/tests/data/lang-en-test.txt b/tests/data/lang-en-test.txt
index 875d923..b3984bd 100644
--- a/tests/data/lang-en-test.txt
+++ b/tests/data/lang-en-test.txt
@@ -36,19 +36,19 @@ endif::doctype-book[]
The First Section
-----------------
-// Translate caption.
+Admonishments
+~~~~~~~~~~~~~
+Do not translate in the source file -- they are translated to the
+output file
+
NOTE: Lorum ipsum.
-// Translate caption.
TIP: Lorum ipsum.
-// Translate caption.
WARNING: Lorum ipsum.
-// Translate caption.
CAUTION: Lorum ipsum.
-// Translate caption.
IMPORTANT: Lorum ipsum.
.Tiger
diff --git a/tests/testasciidoc.conf b/tests/testasciidoc.conf
index 85c024a..25cce13 100644
--- a/tests/testasciidoc.conf
+++ b/tests/testasciidoc.conf
@@ -178,3 +178,6 @@ lang-en-book
% options
[('--doctype','book')]
+% attributes
+{'toc':True}
+