This feature is supported in Ultimate edition only.
The following is only valid when Python Plugin is installed and enabled!
IntelliJ IDEA provides a dedicated intention action to wrap strings in Django templates in
{%trans%}, or {%blocktrans%} tags.
The lines with i18n tags are marked with
icon in the gutter.
- Open the desired Django template for editing, and select strings to be marked for translation.
- Press ⌥⏎ or ⌥⏎⌥⏎ or ⌥⏎⌘1 or ⌘1⌥ Enter, ⌥⏎ or ⌥⏎⌥ Enter, ⌥⏎ or ⌥⏎, or click the light bulb to reveal the list of available
intention actions:

- Select intention action Wrap with 'trans' tag, and press
⏎ or ⏎⏎ or ⏎⏎ or ⏎Enter, ⏎ or ⏎Enter, ^ M, ⏎, ⌃M, ⏎ or ⌃M. IntelliJ IDEA wraps selected text in translation tags, and adds
{%
load i18n%}, if extracting text is performed for the first time.
