From 8ad0abd921be076e62e34a8869cae99cba643c65 Mon Sep 17 00:00:00 2001
From: Bat
Date: Thu, 19 Jul 2018 11:14:44 +0200
Subject: [PATCH] Mark optional fields as optionals
Fix #121
---
po/de.po | 3 +++
po/en.po | 3 +++
po/fr.po | 7 ++++++-
po/pl.po | 3 +++
po/plume.pot | 3 +++
templates/macros.html.tera | 9 +++++++--
templates/posts/new.html.tera | 2 +-
7 files changed, 26 insertions(+), 4 deletions(-)
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] %}