summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2016-08-18 13:19:19 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2016-08-18 13:19:19 +0000
commitb7dd952a235eefd68ac1ad0ab7c13f98491e35d6 (patch)
tree0928e3ab6d448a08476ce3f350f0f3c31c14cd82 /docutils
parent6351d088a3eb6245e2ec0a64df7783c2e9ee0418 (diff)
downloaddocutils-b7dd952a235eefd68ac1ad0ab7c13f98491e35d6.tar.gz
Apply [ 133 ] Persian mappings by Shahin Azad.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7967 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/languages/fa.py61
-rw-r--r--docutils/parsers/rst/languages/fa.py101
2 files changed, 162 insertions, 0 deletions
diff --git a/docutils/languages/fa.py b/docutils/languages/fa.py
new file mode 100644
index 000000000..58351d4fa
--- /dev/null
+++ b/docutils/languages/fa.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+# $Id: fa.py 4564 2016-08-10 11:48:42Z
+# Author: Shahin <me@5hah.in>
+# 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.
+
+"""
+Persian-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+ # fixed: language-dependent
+ 'author': 'نویسنده',
+ 'authors': 'نویسندگان',
+ 'organization': 'سازمان',
+ 'address': 'آدرس',
+ 'contact': 'تماس',
+ 'version': 'نسخه',
+ 'revision': 'بازبینی',
+ 'status': 'وضعیت',
+ 'date': 'تاریخ',
+ 'copyright': 'کپی‌رایت',
+ 'dedication': 'تخصیص',
+ 'abstract': 'چکیده',
+ 'attention': 'توجه!',
+ 'caution': 'احتیاط!',
+ 'danger': 'خطر!',
+ 'error': 'خطا',
+ 'hint': 'راهنما',
+ 'important': 'مهم',
+ 'note': 'یادداشت',
+ 'tip': 'نکته',
+ 'warning': 'اخطار',
+ 'contents': 'محتوا'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+ # language-dependent: fixed
+ 'author': 'نویسنده',
+ 'authors': 'نویسندگان',
+ 'organization': 'سازمان',
+ 'address': 'آدرس',
+ 'contact': 'تماس',
+ 'version': 'نسخه',
+ 'revision': 'بازبینی',
+ 'status': 'وضعیت',
+ 'date': 'تاریخ',
+ 'copyright': 'کپی‌رایت',
+ 'dedication': 'تخصیص',
+ 'abstract': 'چکیده'}
+"""Persian (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/fa.py b/docutils/parsers/rst/languages/fa.py
new file mode 100644
index 000000000..467c2c889
--- /dev/null
+++ b/docutils/parsers/rst/languages/fa.py
@@ -0,0 +1,101 @@
+# -*- coding: utf-8 -*-
+# $Id: fa.py 4564 2016-08-10 11:48:42Z
+# Author: Shahin <me@5hah.in>
+# 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.
+
+"""
+Persian-language mappings for language-dependent features of
+reStructuredText.
+"""
+
+__docformat__ = 'reStructuredText'
+
+
+directives = {
+ # language-dependent: fixed
+ 'توجه': 'attention',
+ 'احتیاط': 'caution',
+ 'کد': 'code',
+ 'بلوک-کد': 'code',
+ 'کد-منبع': 'code',
+ 'خطر': 'danger',
+ 'خطا': 'error',
+ 'راهنما': 'hint',
+ 'مهم': 'important',
+ 'یادداشت': 'note',
+ 'نکته': 'tip',
+ 'اخطار': 'warning',
+ 'تذکر': 'admonition',
+ 'نوار-کناری': 'sidebar',
+ 'موضوع': 'topic',
+ 'بلوک-خط': 'line-block',
+ 'تلفظ-پردازش-شده': 'parsed-literal',
+ 'سر-فصل': 'rubric',
+ 'کتیبه': 'epigraph',
+ 'نکات-برجسته': 'highlights',
+ 'نقل-قول': 'pull-quote',
+ 'ترکیب': 'compound',
+ 'ظرف': 'container',
+ #'questions': 'questions',
+ 'جدول': 'table',
+ 'جدول-csv': 'csv-table',
+ 'جدول-لیست': 'list-table',
+ #'qa': 'questions',
+ #'faq': 'questions',
+ 'متا': 'meta',
+ 'ریاضی': 'math',
+ #'imagemap': 'imagemap',
+ 'تصویر': 'image',
+ 'شکل': 'figure',
+ 'شامل': 'include',
+ 'خام': 'raw',
+ 'جایگزین': 'replace',
+ 'یونیکد': 'unicode',
+ 'تاریخ': 'date',
+ 'کلاس': 'class',
+ 'قانون': 'role',
+ 'قانون-پیش‌فرض': 'default-role',
+ 'عنوان': 'title',
+ 'محتوا': 'contents',
+ 'شماره-فصل': 'sectnum',
+ 'شماره‌گذاری-فصل': 'sectnum',
+ 'سرآیند': 'header',
+ 'پاصفحه': 'footer',
+ #'footnotes': 'footnotes',
+ #'citations': 'citations',
+ 'یادداشت-هدف': 'target-notes',
+ }
+"""Persian name to registered (in directives/__init__.py) directive name
+mapping."""
+
+roles = {
+ # language-dependent: fixed
+ 'مخفف': 'abbreviation',
+ 'سرنام': 'acronym',
+ 'کد': 'code',
+ 'شاخص': 'index',
+ 'زیرنویس': 'subscript',
+ 'بالانویس': 'superscript',
+ 'عنوان': 'title-reference',
+ 'نیرو': 'pep-reference',
+ 'تاکید': 'emphasis',
+ 'قوی': 'strong',
+ 'لفظی': 'literal',
+ 'ریاضی': 'math',
+ 'منبع-نام‌گذاری': 'named-reference',
+ 'منبع-ناشناس': 'anonymous-reference',
+ 'منبع-پانویس': 'footnote-reference',
+ 'منبع-نقل‌فول': 'citation-reference',
+ 'منبع-جایگزینی': 'substitution-reference',
+ 'هدف': 'target',
+ 'منبع-uri': 'uri-reference',
+ 'uri': 'uri-reference',
+ 'url': 'uri-reference',
+ 'خام': 'raw',}
+"""Mapping of Persian role names to canonical role names for interpreted text.
+"""