From 06d590ff3b1c1087da93df94fbd0400a819af540 Mon Sep 17 00:00:00 2001 From: Bat Date: Sat, 7 Jul 2018 22:57:53 +0200 Subject: [PATCH] Make form errors i18nalizable --- po/plume.pot | 34 ++++++++++++++++++++++++++++++++++ templates/macros.html.tera | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/po/plume.pot b/po/plume.pot index e1599c75..ccb727e3 100644 --- a/po/plume.pot +++ b/po/plume.pot @@ -281,3 +281,37 @@ msgstr "" msgid "Your comment" msgstr "" + +msgid "Unknown error" +msgstr "" + +msgid "Invalid name" +msgstr "" + +msgid "A blog with the same name already exists." +msgstr "" + +msgid "Your comment can't be empty" +msgstr "" + +msgid "A post with the same title already exists." +msgstr "" + +msgid "We need an email or a username to identify you" +msgstr "" + +msgid "Your password should be at least 8 characters long" +msgstr "" + +msgid "Passwords are not matching" +msgstr "" + +msgid "Username can't be empty" +msgstr "" + +msgid "Invalid email" +msgstr "" + +msgid "Password should be at least 8 characters long" +msgstr "" + diff --git a/templates/macros.html.tera b/templates/macros.html.tera index 868ee781..c12a6799 100644 --- a/templates/macros.html.tera +++ b/templates/macros.html.tera @@ -25,7 +25,7 @@ {% if errors is defined and errors[name] %} {% for err in errors[name] %} -

{{ err.message | default(value="Unknown error") }}

+

{{ err.message | default(value="Unknown error") | _ }}

{% endfor %} {% endif %}