summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2013-07-03 09:57:36 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2013-07-03 09:57:36 +0000
commit8ef7dacc3f3202a40537601cac89eaa11e4b3f21 (patch)
treeb7c9320b298510e0b2ec931ee6dc85e27a07a295
parentf245cbee666c5027d6337e37cf5a6e6067c23c9f (diff)
downloaddocutils-8ef7dacc3f3202a40537601cac89eaa11e4b3f21.tar.gz
Apply #106 and #107: language support for danish.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7678 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--docutils/languages/da.py62
-rw-r--r--docutils/parsers/rst/languages/da.py113
2 files changed, 175 insertions, 0 deletions
diff --git a/docutils/languages/da.py b/docutils/languages/da.py
new file mode 100644
index 000000000..28dc1607d
--- /dev/null
+++ b/docutils/languages/da.py
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+# $Id$
+# Author: E D
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome. Before doing a new translation, please
+# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Danish-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+ # fixed: language-dependent
+ 'author': u'Forfatter',
+ 'authors': u'Forfattere',
+ 'organization': u'Organisation',
+ 'address': u'Adresse',
+ 'contact': u'Kontakt',
+ 'version': u'Version',
+ 'revision': u'Revision',
+ 'status': u'Status',
+ 'date': u'Dato',
+ 'copyright': u'Copyright',
+ 'dedication': u'Dedikation',
+ 'abstract': u'Resumé',
+ 'attention': u'Giv agt!',
+ 'caution': u'Pas på!',
+ 'danger': u'!FARE!',
+ 'error': u'Fejl',
+ 'hint': u'Vink',
+ 'important': u'Vigtigt',
+ 'note': u'Bemærk',
+ 'tip': u'Tips',
+ 'warning': u'Advarsel',
+ 'contents': u'Indhold'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+ # language-dependent: fixed
+ u'forfatter': 'author',
+ u'forfattere': 'authors',
+ u'organisation': 'organization',
+ u'adresse': 'address',
+ u'kontakt': 'contact',
+ u'version': 'version',
+ u'revision': 'revision',
+ u'status': 'status',
+ u'dato': 'date',
+ u'copyright': 'copyright',
+ u'dedikation': 'dedication',
+ u'resume': 'abstract',
+ u'resumé': 'abstract'}
+"""Danish (lowcased) to canonical name mapping for bibliographic fields."""
+
+author_separators = [';', ',']
+"""List of separator strings for the 'Authors' bibliographic field. Tried in
+order."""
diff --git a/docutils/parsers/rst/languages/da.py b/docutils/parsers/rst/languages/da.py
new file mode 100644
index 000000000..0e40bcb9f
--- /dev/null
+++ b/docutils/parsers/rst/languages/da.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# $Id$
+# Author: E D
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome. Before doing a new translation, please
+# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Danish-language mappings for language-dependent features of
+reStructuredText.
+"""
+
+__docformat__ = 'reStructuredText'
+
+
+directives = {
+ # language-dependent: fixed
+ u'giv agt': 'attention',
+ u'pas på': 'caution',
+ u'kode': 'code',
+ u'kode-blok': 'code',
+ u'kildekode': 'code',
+ u'fare': 'danger',
+ u'fejl': 'error',
+ u'vink': 'hint',
+ u'vigtigt': 'important',
+ u'bemærk': 'note',
+ u'tips': 'tip',
+ u'advarsel': 'warning',
+ u'formaning': 'admonition',
+ u'sidebjælke': 'sidebar',
+ u'emne': 'topic',
+ u'linje-blok': 'line-block',
+ u'linie-blok': 'line-block',
+ u'parset-literal': 'parsed-literal',
+ u'rubrik': 'rubric',
+ u'epigraf': 'epigraph',
+ u'fremhævninger': 'highlights',
+ u'pull-quote (translation required)': 'pull-quote',
+ u'compound (translation required)': 'compound',
+ u'container (translation required)': 'container',
+ #'questions': 'questions',
+ u'tabel': 'table',
+ u'csv-tabel': 'csv-table',
+ u'liste-tabel': 'list-table',
+ #'qa': 'questions',
+ #'faq': 'questions',
+ u'meta': 'meta',
+ u'math (translation required)': 'math',
+ #'imagemap': 'imagemap',
+ u'billede': 'image',
+ u'figur': 'figure',
+ u'inkludér': 'include',
+ u'inkluder': 'include',
+ u'rå': 'raw',
+ u'erstat': 'replace',
+ u'unicode': 'unicode',
+ u'dato': 'date',
+ u'klasse': 'class',
+ u'rolle': 'role',
+ u'forvalgt-rolle': 'default-role',
+ u'titel': 'title',
+ u'indhold': 'contents',
+ u'sektnum': 'sectnum',
+ u'sektions-nummerering': 'sectnum',
+ u'sidehovede': 'header',
+ u'sidefod': 'footer',
+ #'footnotes': 'footnotes',
+ #'citations': 'citations',
+ u'target-notes (translation required)': 'target-notes',
+ u'restructuredtext-test-direktiv': 'restructuredtext-test-directive'}
+"""Danish name to registered (in directives/__init__.py) directive name
+mapping."""
+
+roles = {
+ # language-dependent: fixed
+ u'forkortelse': 'abbreviation',
+ u'fork': 'abbreviation',
+ u'akronym': 'acronym',
+ u'ac (translation required)': 'acronym',
+ u'kode': 'code',
+ u'indeks': 'index',
+ u'i': 'index',
+ u'subscript (translation required)': 'subscript',
+ u'sub (translation required)': 'subscript',
+ u'superscript (translation required)': 'superscript',
+ u'sup (translation required)': 'superscript',
+ u'titel-reference': 'title-reference',
+ u'titel': 'title-reference',
+ u't': 'title-reference',
+ u'pep-reference': 'pep-reference',
+ u'pep': 'pep-reference',
+ u'rfc-reference': 'rfc-reference',
+ u'rfc': 'rfc-reference',
+ u'emfase': 'emphasis',
+ u'kraftig': 'strong',
+ u'literal': 'literal',
+ u'math (translation required)': 'math',
+ u'navngivet-reference': 'named-reference',
+ u'anonym-reference': 'anonymous-reference',
+ u'fodnote-reference': 'footnote-reference',
+ u'citation-reference (translation required)': 'citation-reference',
+ u'substitutions-reference': 'substitution-reference',
+ u'target (translation required)': 'target',
+ u'uri-reference': 'uri-reference',
+ u'uri': 'uri-reference',
+ u'url': 'uri-reference',
+ u'rå': 'raw',}
+"""Mapping of Danish role names to canonical role names for interpreted text.
+"""