Issues

Issue #1265 resolved

Crash when translating link to another link

Claude Paroz
created an issue

I'm getting a crash (see attached traceback) with 1.2b2 when translating documentation containing something like the following:

It's sometimes useful to pre-populate your database with hard-coded data when
you're first setting up an app. There's a couple of ways you can have Django
automatically create this data: you can provide `initial data via fixtures`_, or
you can provide `initial data as SQL`_.

In general, using a fixture is a cleaner method since it's database-agnostic,
but initial SQL is also quite a bit more flexible.

.. _initial data as sql: `providing initial sql data`_
.. _initial data via fixtures: `providing initial data with fixtures`_

Then later:

.. _initial-data-via-fixtures:

Providing initial data with fixtures
====================================
...

.. _initial-sql:

Providing initial SQL data
==========================
...

I'm suspecting there is an issue when links point to other links. The same content seems to compile fine with 1.2b1.

Comments (19)

  1. Claude Paroz reporter

    Many thanks, I've verified that the crash is indeed fixed. However, I'm afraid we are facing a similar bug as #1193. Could you complete the test with two links in the same paragraph and checking that both links are indeed different in the resulting translation?

  2. Claude Paroz reporter

    Takayuki, the example is exactly in the original ticket description (two links in the same paragraph, both links are then identical (but should not) in translated output).

  3. Claude Paroz reporter

    Takayuki, many thanks for your help. However, I'm still wondering if translating the label names is a good idea. Is it right that your are counting on the translator doing the same translation in the paragraph referencing the label and the label name? If yes, isn't this a bit fragile? I'm not saying I have a better proposal. In any case, we might move this discussion in another ticket probably.

  4. Log in to comment