Commits

Jon Waltman committed 8e57ee6

Follow the behavior described by :confval:`primary_domain` to display domain object names and use this as the category in Texinfo desc_signatures.

  • Participants
  • Parent commits 64487b2

Comments (0)

Files changed (1)

File sphinx/writers/texinfo.py

         if objtype != 'describe':
             for id in node.get('ids'):
                 self.add_anchor(id, node)
-        # use the localized name for the category
+        # use the full name of the objtype for the category
         try:
             domain = self.builder.env.domains[node.parent['domain']]
-            lname = domain.object_types[objtype].lname
+            primary = self.builder.config.primary_domain
+            name = domain.get_type_name(domain.object_types[objtype],
+                                        primary == domain.name)
         except KeyError:
-            lname = objtype
-        category = self.escape_arg(string.capwords(lname))
+            name = objtype
+        category = self.escape_arg(string.capwords(name))
         self.body.append('\n%s {%s} ' % (self.at_deffnx, category))
         self.at_deffnx = '@deffnx'
     def depart_desc_signature(self, node):