i18n: update Russian translation
[git-cola.git] / docs / conf.py
blob46751324e0bb4ffacd9359b5275d21c5ad163161
1 # -*- coding: utf-8 -*-
2 import os
3 import sys
5 try:
6 import sphinx_rtd_theme
7 except ImportError:
8 sphinx_rtd_theme = None
10 # Add the cola source directory to sys.path
11 docdir = os.path.abspath(os.path.realpath(__file__))
12 srcdir = os.path.dirname(os.path.dirname(docdir))
13 extrasdir = os.path.join(srcdir, 'extras')
14 sys.path.insert(1, extrasdir)
16 extensions = [
17 'sphinx.ext.autodoc',
18 'sphinx.ext.doctest',
19 'sphinx.ext.todo',
20 'sphinx.ext.coverage',
21 'sphinxtogithub',
22 'jaraco.packaging.sphinx',
23 'rst.linker',
25 if sphinx_rtd_theme:
26 extensions.append('sphinx_rtd_theme')
28 templates_path = ['_templates']
29 source_suffix = '.rst'
30 source_encoding = 'utf-8'
31 master_doc = 'index'
33 project = 'git-cola'
34 copyright = '2007-2022, David Aguilar and contributors'
35 authors = 'David Aguilar and contributors'
37 versionfile = os.path.join(srcdir, 'cola', '_version.py')
38 scope = {}
39 with open(versionfile) as f:
40 exec(f.read(), scope)
42 # The short X.Y version.
43 version = scope['VERSION']
44 # The full version, including alpha/beta/rc tags.
45 release = version
47 exclude_trees = ['_build']
48 add_function_parentheses = True
49 pygments_style = 'default'
51 if sphinx_rtd_theme:
52 html_theme = 'sphinx_rtd_theme'
53 html_theme_path = ['_themes']
54 html_static_path = ['_static']
55 html_show_sourcelink = True
56 htmlhelp_basename = 'git-cola-doc'
58 man_pages = [
59 ('git-cola', 'git-cola', 'The highly caffeinated Git GUI', authors, '1'),
60 ('git-dag', 'git-dag', 'The sleek and powerful Git history browser', authors, '1'),
63 # Sphinx 4.0 creates sub-directories for each man section.
64 # Disable this feature for consistency across Sphinx versions.
65 man_make_section_directory = False
67 latex_documents = [
69 'index',
70 'git-cola.tex',
71 'git-cola Documentation',
72 'David Aguilar and contributors',
73 'manual',
77 # Example configuration for intersphinx: refer to the Python standard library.
78 intersphinx_mapping = {'https://docs.python.org/3': None}
80 link_files = {
81 '../CHANGES.rst': dict(
82 using=dict(GH='https://github.com'),
83 replace=[
84 dict(
85 pattern=r'(Issue #|\B#)(?P<issue>\d+)',
86 url='{package_url}/issues/{issue}',
88 dict(
89 pattern=r'\B\+(?P<pull>\d+)',
90 url='{package_url}/pull/{pull}',
92 dict(
93 pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
94 with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
96 dict(
97 pattern=r'PEP[- ](?P<pep_number>\d+)',
98 url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',