Django i18n weird heisenbug with multiline strings

software development

#1

So, I’m writing a website and I need to internationalise it. On the Django templates there is a multi-line message that I’ve decided to do as a single gettext string, with the {% blocktrans %} template tag. Well, after trying it on my local computer, and seeing it worked, I tried it on the live site, and that string is untranslated.

All the other strings translate fine. The makemessages and compilemessages tools issue no warnings. Setting DEBUG to True has not been illuminating.

Any ideas of what may be going on?

Here’s the string from the .po file, but I’m quite sure it is correct given I’ve seen it work on the local dev server:

#: templates/base.html:15
msgid “”
"

  • Read
    • \n"
      "
    • <a href="/recommend">Get personalised recommendations from your friends and our engine
    • \n"
      "
    • <a href="/slush">Discover new authors and works from the general slushpile
    • \n"
      "
    • <a href="/review">Write reviews and recommend manuscripts to your friends
    \n"
    "
  • Write
    • \n"
      "
    • <a href="/post">Post a manuscript
    • \n"
      "
    • <a href="/self">View your work and editorial comments
    • \n"
      "
    • <a href="/revise">Revise your own work
    \n"
    "
  • Edit
    • \n"
      "
    • <a href="/slush">Discover new authors and works from the general slushpile
    • \n"
      "
    • <a href="/edit">Edit manuscripts on your personal slushpile
    • \n"
      "
    • <a href="/review">Write reviews and recommend manuscripts to your friends
    \n"
    "
  • Handle your identity
    • \n"
      "
    • <a href="/profile">View or modify your personal profile
    • \n"
      "
    • <a href="/friends">Keep in touch with your friends and meet new people with like interests
    • \n"
      "
    • <a href="/logout">Log out of Bookslush
    \n"
    msgstr “”
    "
  • Leer
    • \n"
      "
    • <a href="/recommend">Obtener recomendaciones personalizadas de tus amigos y nuestro motor
    • \n"
      "
    • <a href="/slush">Descubrir nuevos autores y obras de la pila general
    • \n"
      "
    • <a href="/review">Escribir críticas y recomendar libros a tus amigos
    \n"
    "
  • Escribir
    • \n"
      "
    • <a href="/post">Subir un libro
    • \n"
      "
    • <a href="/self">Ver tu trabajo y comentarios de los editores
    • \n"
      "
    • <a href="/revise">Corregir tu propio trabajo
    \n"
    "
  • Editar
    • \n"
      "
    • <a href="/slush">Descubrir nuevos autores y obras de la pila general
    • \n"
      "
    • <a href="/edit">Editar libros en tu pila personal
    • \n"
      "
    • <a href="/review">Escribir críticas y recomendar libros a tus amigos
    \n"
    "
  • Gestionar tu identidad
    • \n"
      "
    • <a href="/profile">Ver o modificar tu perfil personal
    • \n"
      "
    • <a href="/friends">Contactar con tus amigos y conocer otras personas con intereses comunes
    • \n"
      "
    • <a href="/logout">Cerrar sesión en Bookslush
    \n"

    Any help would be appreciated, this is driving me crazy. I guess in the end I may just do each list item as a separate string, but that would be a lot more verbose.