Fix gettext function call with newline

We changed the `gettext` function sent to the templates by combining `format` and `gettext` into one function. In case this possibility is used & newlines are being used, the previous regex failed.