Commit 5c6bf5db authored by François Grisez's avatar François Grisez

Fixes selector's links on between enums

parent 7f9636f9
......@@ -8,12 +8,7 @@
{{#enums}}
{{{sectionName}}}
{{#isNotJava}}
.. {{#write_declarator}}enum{{/write_declarator}}:: {{{fullName}}}
{{/isNotJava}}
{{#isJava}}
.. java:type:: public enum {{{name}}};
{{/isJava}}
.. {{#write_declarator}}enum{{/write_declarator}}:: {{{declaration}}}
{{#briefDesc}}
{{#lines}}
......@@ -25,7 +20,7 @@
{{#isNotJava}}
{{#enumerators}}
.. {{#write_declarator}}enumerator{{/write_declarator}}:: {{{name}}}{{#value}} = {{{value}}}{{/value}}
.. {{#write_declarator}}enumerator{{/write_declarator}}:: {{{name}}}
{{#briefDesc}}
{{#lines}}
......
......@@ -235,6 +235,7 @@ class EnumsPage(SphinxPage):
'selector' : self._make_selector(enum)
}
translatedEnum['sectionName'] = RstTools.make_section(translatedEnum['name'])
translatedEnum['declaration'] = 'public enum {0}'.format(translatedEnum['name']) if self.lang.langCode == 'Java' else translatedEnum['name']
self.enums.append(translatedEnum)
def _translate_enum_values(self, enum):
......
......@@ -403,6 +403,7 @@ class ReferenceTranslationError(TranslationError):
class Translator:
def __init__(self, langCode):
self.langCode = langCode
self.textWidth = 80
self.nameTranslator = metaname.Translator.get(langCode)
self.langTranslator = abstractapi.Translator.get(langCode)
......@@ -553,12 +554,11 @@ class SphinxTranslator(Translator):
def __init__(self, langCode):
Translator.__init__(self, langCode)
if langCode == 'C':
self.domain = 'c'
self.domain = 'cpp'
self.classDeclarator = 'type'
self.methodDeclarator = 'function'
self.enumDeclarator = 'type'
self.enumeratorDeclarator = 'var'
self.enumeratorReferencer = 'data'
self.enumDeclarator = 'enum'
self.enumeratorDeclarator = 'enumerator'
self.methodReferencer = 'func'
elif langCode == 'Cpp':
self.domain = 'cpp'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment