Fix sphinx warnings
This commit fixes the following warning: RemovedInSphinx30Warning: sphinx.locale.l_() is deprecated. Please use `_()` instead.
This commit is contained in:
parent
4272dcac1d
commit
db45fb483c
|
@ -64,18 +64,18 @@ class RubyObject(ObjectDescription):
|
||||||
}
|
}
|
||||||
|
|
||||||
doc_field_types = [
|
doc_field_types = [
|
||||||
TypedField('parameter', label=l_('Parameters'),
|
TypedField('parameter', label=_('Parameters'),
|
||||||
names=('param', 'parameter', 'arg', 'argument'),
|
names=('param', 'parameter', 'arg', 'argument'),
|
||||||
typerolename='obj', typenames=('paramtype', 'type')),
|
typerolename='obj', typenames=('paramtype', 'type')),
|
||||||
TypedField('variable', label=l_('Variables'), rolename='obj',
|
TypedField('variable', label=_('Variables'), rolename='obj',
|
||||||
names=('var', 'ivar', 'cvar'),
|
names=('var', 'ivar', 'cvar'),
|
||||||
typerolename='obj', typenames=('vartype',)),
|
typerolename='obj', typenames=('vartype',)),
|
||||||
GroupedField('exceptions', label=l_('Raises'), rolename='exc',
|
GroupedField('exceptions', label=_('Raises'), rolename='exc',
|
||||||
names=('raises', 'raise', 'exception', 'except'),
|
names=('raises', 'raise', 'exception', 'except'),
|
||||||
can_collapse=True),
|
can_collapse=True),
|
||||||
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',)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -482,8 +482,8 @@ class RubyModuleIndex(Index):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name = 'modindex'
|
name = 'modindex'
|
||||||
localname = l_('Ruby Module Index')
|
localname = _('Ruby Module Index')
|
||||||
shortname = l_('modules')
|
shortname = _('modules')
|
||||||
|
|
||||||
def generate(self, docnames=None):
|
def generate(self, docnames=None):
|
||||||
content = {}
|
content = {}
|
||||||
|
@ -550,17 +550,17 @@ class RubyDomain(Domain):
|
||||||
name = 'rb'
|
name = 'rb'
|
||||||
label = 'Ruby'
|
label = 'Ruby'
|
||||||
object_types = {
|
object_types = {
|
||||||
'function': ObjType(l_('function'), 'func', 'obj'),
|
'function': ObjType(_('function'), 'func', 'obj'),
|
||||||
'global': ObjType(l_('global variable'), 'global', 'obj'),
|
'global': ObjType(_('global variable'), 'global', 'obj'),
|
||||||
'method': ObjType(l_('method'), 'meth', 'obj'),
|
'method': ObjType(_('method'), 'meth', 'obj'),
|
||||||
'class': ObjType(l_('class'), 'class', 'obj'),
|
'class': ObjType(_('class'), 'class', 'obj'),
|
||||||
'exception': ObjType(l_('exception'), 'exc', 'obj'),
|
'exception': ObjType(_('exception'), 'exc', 'obj'),
|
||||||
'classmethod': ObjType(l_('class method'), 'meth', 'obj'),
|
'classmethod': ObjType(_('class method'), 'meth', 'obj'),
|
||||||
'attr_reader': ObjType(l_('attribute'), 'attr', 'obj'),
|
'attr_reader': ObjType(_('attribute'), 'attr', 'obj'),
|
||||||
'attr_writer': ObjType(l_('attribute'), 'attr', 'obj'),
|
'attr_writer': ObjType(_('attribute'), 'attr', 'obj'),
|
||||||
'attr_accessor': ObjType(l_('attribute'), 'attr', 'obj'),
|
'attr_accessor': ObjType(_('attribute'), 'attr', 'obj'),
|
||||||
'const': ObjType(l_('const'), 'const', 'obj'),
|
'const': ObjType(_('const'), 'const', 'obj'),
|
||||||
'module': ObjType(l_('module'), 'mod', 'obj'),
|
'module': ObjType(_('module'), 'mod', 'obj'),
|
||||||
}
|
}
|
||||||
|
|
||||||
directives = {
|
directives = {
|
||||||
|
|
Loading…
Reference in New Issue