Open find/replace dialog and check ‘Regular expressions’
Find:
\{\% trans \%\}([^\{]*)\{\% endtrans \%\}
Replace with:
{{ gettext('$1') }}
Open find/replace dialog and check ‘Regular expressions’
Find:
\{\% trans \%\}([^\{]*)\{\% endtrans \%\}
Replace with:
{{ gettext('$1') }}