diff --git a/po/de.po b/po/de.po index 9269fb9e..207df2c7 100644 --- a/po/de.po +++ b/po/de.po @@ -336,3 +336,6 @@ msgstr[1] "Du bist kein Autor in diesem Blog." msgid "Login or use your Fediverse account to interact with this article" msgstr "" + +msgid "Optional" +msgstr "" diff --git a/po/en.po b/po/en.po index a53fb120..40764f17 100644 --- a/po/en.po +++ b/po/en.po @@ -329,3 +329,6 @@ msgstr[1] "" msgid "Login or use your Fediverse account to interact with this article" msgstr "" + +msgid "Optional" +msgstr "" diff --git a/po/fr.po b/po/fr.po index 5721c9fe..07e1fe9b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -329,4 +329,9 @@ msgstr[0] "{{ count }} aut⋅eur⋅rice dans ce blog : " msgstr[1] "{{ count }} aut⋅eur⋅rice⋅s dans ce blog : " msgid "Login or use your Fediverse account to interact with this article" -msgstr "Connectez-vous ou utilisez votre compte sur le Fediverse pour interagir avec cet article" +msgstr "" +"Connectez-vous ou utilisez votre compte sur le Fediverse pour interagir avec " +"cet article" + +msgid "Optional" +msgstr "Optionnel" diff --git a/po/pl.po b/po/pl.po index 937bb924..e57f447a 100644 --- a/po/pl.po +++ b/po/pl.po @@ -339,5 +339,8 @@ msgstr[2] "Nie jesteś autorem tego bloga." msgid "Login or use your Fediverse account to interact with this article" msgstr "" +msgid "Optional" +msgstr "" + #~ msgid "Logowanie" #~ msgstr "Zaloguj się" diff --git a/po/plume.pot b/po/plume.pot index c604ef14..0fdd5303 100644 --- a/po/plume.pot +++ b/po/plume.pot @@ -322,3 +322,6 @@ msgstr[1] "" msgid "Login or use your Fediverse account to interact with this article" msgstr "" + +msgid "Optional" +msgstr "" diff --git a/templates/macros.html.tera b/templates/macros.html.tera index c12a6799..d474a6be 100644 --- a/templates/macros.html.tera +++ b/templates/macros.html.tera @@ -21,8 +21,13 @@
{% endmacro post_card %} -{% macro input(name, label, errors, form, type="text", props="") %} - +{% macro input(name, label, errors, form, type="text", props="", optional=false) %} + {% if errors is defined and errors[name] %} {% for err in errors[name] %}{{ err.message | default(value="Unknown error") | _ }}
diff --git a/templates/posts/new.html.tera b/templates/posts/new.html.tera index e4298b53..6570ca5f 100644 --- a/templates/posts/new.html.tera +++ b/templates/posts/new.html.tera @@ -19,7 +19,7 @@ - {{ macros::input(name="license", label="License", errors=errors, form=form) }} + {{ macros::input(name="license", label="License", errors=errors, form=form, optional=true) }}