'make gettext' fails when the '.. todolist::' directive is present.

tveastman avatartveastman created an issue

There's some kind of incompatibility/regression in 1.2.1 with the 'todo' extension and the internationalisation functionality. I get the following stack trace when attempting to build the .po files when the output generator hits a '.. todolist::' directive. This bug doesn't seem to affect 1.1.3.

vagrant@precise64:/vagrant/fresh$ cat /tmp/sphinx-err-PyS6A7.log 
# Sphinx version: 1.2.1
# Python version: 2.7.3
# Docutils version: 0.11 release
# Jinja2 version: 2.7.2
# Loaded extensions:
#   sphinx.ext.todo from /vagrant/env/local/lib/python2.7/site-packages/sphinx/ext/todo.pyc
#   sphinx.ext.oldcmarkup from /vagrant/env/local/lib/python2.7/site-packages/sphinx/ext/oldcmarkup.pyc
Traceback (most recent call last):
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 254, in main
    app.build(force_all, filenames)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/application.py", line 212, in build
    self.builder.build_update()
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 214, in build_update
    'out of date' % len(to_build))
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/gettext.py", line 174, in build
    I18nBuilder.build(self, docnames, summary, method)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 276, in build
    self.write(docnames, list(updated_docnames), method)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 320, in write
    self._write_serial(sorted(docnames), warnings)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 333, in _write_serial
    self.write_doc(docname, doctree)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/gettext.py", line 101, in write_doc
    catalog.add(msg, node)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/gettext.py", line 62, in add
    self.metadata[msg].append((origin.source, origin.line, origin.uid))
AttributeError: 'title' object has no attribute 'uid'

Comments (4)

  1. Takayuki Shimizukawa

    Fix 'make gettext' fails when the '.. todolist::' directive is present. Closes #1364

    Nodes that are replicated like todo don't have a uid, however i18n also unnecessary. If extensions need to choose i18n for the extended nodes or not, we need another approach.

    → <<cset 4124412bef4a>>

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.