Skip to content

i18n: Problem templates rendered with render_to_string bypass the block catalog #340

Open

Description

@irfanuddinahmad

Follow-up to #332. The drag-and-drop JS and the Matlab "still being run" message, first listed here, are now fixed in #336. One gap remains, and it already exists on master.

Gap

Problem templates are rendered with Django's render_to_string (block.py).

  • So their {% trans %} strings are looked up in Django's global catalog, not the Problem catalog.
  • The global catalog only has them when the same msgid happens to appear in openedx-platform's own source.
  • Affected templates: capa/templates/codeinput.html, problem.html, problem_notifications.html and matlabinput.html.

Fix: render these templates through the block's i18n service, or translate their strings in Python and pass them in through the context, as #336 does for MatlabInput.

Done when

In a language such as ar, the {% trans %} strings in these templates show up translated from the Problem catalog.

Generated using Claude Code

Activity

  1. changed the title [-]i18n: Problem strings that still bypass the block catalog (drag_and_drop JS, matlabinput, render_to_string templates)[/-] [+]i18n: Problem templates rendered with render_to_string bypass the block catalog[/+] on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions