Takayuki Shimizukawa committed 91c12af

remove unusable 'SEVERE: Duplicate ID' message for footnote that the translation node has been recognized as a duplicate.

  • Participants
  • Parent commits 6fc25e0

Comments (0)

Files changed (2)

File sphinx/

                               'translated message', node)
             for old, new in zip(old_foot_refs, new_foot_refs):
                 new['ids'] = old['ids']
+                for id in new['ids']:
+                    self.document.ids[id] = new

File tests/

     # expect no error by build
-@with_intl_app(buildername='text', cleanenv=True)
+@with_intl_app(buildername='text', warning=warnfile)
 def test_i18n_footnote_regression(app):
     """regression test for fix #955"""
+    app.builddir.rmtree(True)['footnote'])
     result = (app.outdir / 'footnote.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH FOOTNOTE"
               u"\n[100] THIS IS A NUMBERED FOOTNOTE.\n")
     assert result == expect
+    warnings = warnfile.getvalue().replace(os.sep, '/')
+    warning_expr = u'.*/footnote.txt:\\d*: SEVERE: Duplicate ID: ".*".\n'
+    assert not, warnings)
 @with_intl_app(buildername='html', cleanenv=True)
 def test_i18n_footnote_backlink(app):