summaryrefslogtreecommitdiff
path: root/src/jwebmail/render_mail.py
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-12-04 23:15:38 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2023-12-04 23:15:38 +0100
commit4a954eb8e70bda5819f63da9cd841f1579573413 (patch)
tree913d796501ab93fb3c6f81a23b2703a76f520f71 /src/jwebmail/render_mail.py
parentf5283a7bb0b215b8a426219f9be8f2d4f9d5b59f (diff)
add multi language urls
update translations use redis as session store add requirements.txt file to pin dependencies add proper subfolder support improve compatibility with python 3.9 correct js for login focus
Diffstat (limited to 'src/jwebmail/render_mail.py')
-rw-r--r--src/jwebmail/render_mail.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py
index 0e5406c..804b200 100644
--- a/src/jwebmail/render_mail.py
+++ b/src/jwebmail/render_mail.py
@@ -143,7 +143,9 @@ def mime_render(maintype, subtype, content, path):
renderer = MIMERenderSubs.get((maintype, subtype)) or MIMERenderSubs.get(maintype)
if not renderer:
- return f'<p class="jwm-body-unsupported">Unsupported MIME type of <code>{maintype}/{subtype}</code>.</p>\n'
+ typ = f"<code>{maintype}/{subtype}</code>"
+ msg = gettext("Unsupported MIME type of {mime_type}.").format(mime_type=typ)
+ return f'<p class="jwm-body-unsupported">{msg}</p>\n'
return renderer(subtype, content, path)