#100 Need node source/line information for sphinx translation

closed-fixed
nobody
None
5
2013-01-21
2013-01-04
Anonymous
No

Sphinx's i18n feature needs "node.source" and "node.line" value for translation process.

(see also: Add source info to term node - ID: 3548418)

Sphinx extract translation target message from parsed doctree. Sphinx uses nodes that are instance of nodes.TextElement and have source information as translation target messages:
https://bitbucket.org/birkenfeld/sphinx/src/348224ae1fd5/sphinx/util/nodes.py#cl-46

Docutils parses figure directive as nodes.figure. nodes.figure has child node as nodes.caption but it doesn't have source/line information.

Could you set source information to term node? I attach a patch to do it.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-01-04

    set source information to nodes.caption node

     
    Last edit: Anonymous 2014-07-03
  • Günter Milde

    Günter Milde - 2013-01-21

    Applied. Thanks for the patch.

     
  • Günter Milde

    Günter Milde - 2013-01-21
    • status: open --> closed-fixed
     

Log in to post a comment.