Skip to content
Snippets Groups Projects
Verified Commit ed8845c6 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Manual: compatibility fix with Sphinx 3

sphinx.locale.l_ has been deprecated since Sphinx 1.8, and removed in Sphinx 3.

Use sphinx.locale._ instead.
parent faa4416b
Branches dmm
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ from docutils.parsers.rst import Directive, directives ...@@ -34,7 +34,7 @@ from docutils.parsers.rst import Directive, directives
from sphinx import addnodes from sphinx import addnodes
from sphinx.domains import Domain, ObjType from sphinx.domains import Domain, ObjType
from sphinx.locale import l_, _ from sphinx.locale import _
from sphinx.directives import ObjectDescription from sphinx.directives import ObjectDescription
from sphinx.roles import XRefRole from sphinx.roles import XRefRole
from sphinx.util.nodes import make_refnode from sphinx.util.nodes import make_refnode
...@@ -140,14 +140,14 @@ class DynCallable(DynObject): ...@@ -140,14 +140,14 @@ class DynCallable(DynObject):
has_arguments = True has_arguments = True
doc_field_types = [ doc_field_types = [
TypedField('arguments', label=l_('Arguments'), TypedField('arguments', label=_('Arguments'),
names=('argument', 'arg', 'parameter', 'param'), names=('argument', 'arg', 'parameter', 'param'),
typerolename='func', typenames=('paramtype', 'type')), typerolename='func', typenames=('paramtype', 'type')),
Field('returnvalue', label=l_('Returns'), has_arg=False, Field('returnvalue', label=_('Returns'), has_arg=False,
names=('returns', 'return')), names=('returns', 'return')),
Field('returntype', label=l_('Return type'), has_arg=False, Field('returntype', label=_('Return type'), has_arg=False,
names=('rtype',)), names=('rtype',)),
Field('example', label=l_('Example'), has_arg=False, Field('example', label=_('Example'), has_arg=False,
names=('ex',)), names=('ex',)),
] ]
...@@ -157,10 +157,10 @@ class DynClass(DynObject): ...@@ -157,10 +157,10 @@ class DynClass(DynObject):
allow_nesting = True allow_nesting = True
doc_field_types = [ doc_field_types = [
TypedField('members', label=l_('Members'), TypedField('members', label=_('Members'),
names=('argument', 'arg', ), names=('argument', 'arg', ),
typerolename='func', typenames=('type', )), typerolename='func', typenames=('type', )),
Field('example', label=l_('Example'), has_arg=False, Field('example', label=_('Example'), has_arg=False,
names=('ex',)), names=('ex',)),
] ]
...@@ -291,22 +291,22 @@ class DynareDomain(Domain): ...@@ -291,22 +291,22 @@ class DynareDomain(Domain):
name = 'dynare' name = 'dynare'
label = 'Dynare' label = 'Dynare'
object_types = { object_types = {
'function': ObjType(l_('function'), 'func'), 'function': ObjType(_('function'), 'func'),
'datesmethod': ObjType(l_('method'), 'datmeth'), 'datesmethod': ObjType(_('method'), 'datmeth'),
'dseriesmethod': ObjType(l_('method'), 'dsermeth'), 'dseriesmethod': ObjType(_('method'), 'dsermeth'),
'reportingmethod': ObjType(l_('method'), 'repmeth'), 'reportingmethod': ObjType(_('method'), 'repmeth'),
'matcomm': ObjType(l_('matlab command'), 'mcomm'), 'matcomm': ObjType(_('matlab command'), 'mcomm'),
'command': ObjType(l_('command'), 'comm'), 'command': ObjType(_('command'), 'comm'),
'class': ObjType(l_('class'), 'class'), 'class': ObjType(_('class'), 'class'),
'block': ObjType(l_('block'), 'bck'), 'block': ObjType(_('block'), 'bck'),
'confblock': ObjType(l_('config block'), 'cbck'), 'confblock': ObjType(_('config block'), 'cbck'),
'macrodir': ObjType(l_('macro directive'), 'mdir'), 'macrodir': ObjType(_('macro directive'), 'mdir'),
'construct': ObjType(l_('constructor'), 'cstr'), 'construct': ObjType(_('constructor'), 'cstr'),
'matvar': ObjType(l_('matlab variable'), 'mvar'), 'matvar': ObjType(_('matlab variable'), 'mvar'),
'specvar': ObjType(l_('special variable'), 'svar'), 'specvar': ObjType(_('special variable'), 'svar'),
'operator': ObjType(l_('operator'), 'op'), 'operator': ObjType(_('operator'), 'op'),
'constant': ObjType(l_('constant'), 'const'), 'constant': ObjType(_('constant'), 'const'),
'option': ObjType(l_('option'), 'opt'), 'option': ObjType(_('option'), 'opt'),
} }
directives = { directives = {
'function': DynFunction, 'function': DynFunction,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment