From ae29915343d0c7a336f09716ed1a0ce92ee8378e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 21 Nov 2019 22:20:38 -0500 Subject: [PATCH] modularize comment template --- cl-theme/messages.pot | 96 ++++++---- cl-theme/templates/article.html | 123 +------------ cl-theme/templates/comments.html | 169 ++++++++++++++++++ .../translations/de/LC_MESSAGES/messages.po | 96 ++++++---- .../translations/en/LC_MESSAGES/messages.po | 96 ++++++---- .../translations/eo/LC_MESSAGES/messages.po | 96 ++++++---- .../translations/fr/LC_MESSAGES/messages.po | 96 ++++++---- 7 files changed, 460 insertions(+), 312 deletions(-) create mode 100644 cl-theme/templates/comments.html diff --git a/cl-theme/messages.pot b/cl-theme/messages.pot index 0e0170e..4cc6ffe 100644 --- a/cl-theme/messages.pot +++ b/cl-theme/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-11-21 11:42-0500\n" +"POT-Creation-Date: 2019-11-21 22:00-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,43 +38,6 @@ msgid_plural "%(num)d artículos" msgstr[0] "" msgstr[1] "" -#: templates/article.html:138 -msgid "Comentarios" -msgstr "" - -#: templates/article.html:181 -msgid "Enlace Permanente" -msgstr "" - -#: templates/article.html:207 -msgid "Su nombre o nick" -msgstr "" - -#: templates/article.html:213 -msgid "E-mail (requerido, no será publicado)" -msgstr "" - -#: templates/article.html:220 -msgid "Su sitio web (opcional)" -msgstr "" - -#: templates/article.html:226 -msgid "Agrega un comentario..." -msgstr "" - -#: templates/article.html:231 -msgid "Puede formatear su comentario con" -msgstr "" - -#: templates/article.html:239 -msgid "Enviar comentario" -msgstr "" - -#: templates/article.html:242 templates/article.html:244 -#: templates/article.html:246 -msgid "Política de uso" -msgstr "" - #: templates/article_info.html:4 templates/authors.html:118 #: templates/page.html:99 msgid "Regresar al Inicio" @@ -218,6 +181,63 @@ msgstr "" msgid "Fecha de modificación" msgstr "" +#: templates/comments.html:4 +msgid "Comentarios" +msgstr "" + +#: templates/comments.html:48 +msgid "Enlace Permanente" +msgstr "" + +#: templates/comments.html:72 +msgid "Nombre" +msgstr "" + +#: templates/comments.html:81 +msgid "Su nombre o nick" +msgstr "" + +#: templates/comments.html:89 +msgid "Email" +msgstr "" + +#: templates/comments.html:98 +msgid "E-mail (requerido, no será publicado)" +msgstr "" + +#: templates/comments.html:106 +msgid "Sitio Web" +msgstr "" + +#: templates/comments.html:115 +msgid "Su sitio web (opcional)" +msgstr "" + +#: templates/comments.html:123 +msgid "Comentario" +msgstr "" + +#: templates/comments.html:131 +msgid "Agrega un comentario..." +msgstr "" + +#: templates/comments.html:133 +msgid "Puede formatear su comentario con" +msgstr "" + +#: templates/comments.html:136 +msgid "Avatar desde" +msgstr "" + +#: templates/comments.html:151 +msgid "Enviar comentario" +msgstr "" + +#: templates/comments.html:154 templates/comments.html:156 +#: templates/comments.html:158 +msgid "Política de uso" +msgstr "" + #: templates/index.html:5 msgid "Página" msgstr "" diff --git a/cl-theme/templates/article.html b/cl-theme/templates/article.html index 3f19079..fff03ef 100644 --- a/cl-theme/templates/article.html +++ b/cl-theme/templates/article.html @@ -132,128 +132,7 @@ -
- -
-

{{ _('Comentarios') }}

-
- -
- -
- - {% if article.comments %} - {% for comment in article.comments %} - -
- -
-

- {% if comment.avatar %} - {{ comment.author }} - {% else %} - {{ comment.author }} - {% endif %} -

-
- - - -
-
- {% if comment.web %} -

- - {{ comment.author }} - -

- {% else %} -

{{ comment.author }}

- {% endif %} - {{ comment.content }} - - {{ _('Enlace Permanente') }} - | {{ comment.date|strftime("%H:%M:%S") }} -
-
- -
- - {% endfor %} - {% endif %} - - -
- - {% if RELATIVE_URLS == False %} - - {% else %} - - {% endif %} -
-

- placeholder -

-
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-

- -

-
-
-
-

{{ _('Puede formatear su comentario con') }} - Markdown. -

-
-
-
-

- - - {% if DEFAULT_LANG == 'en' %} - {{ _('Política de uso') }} - {% elif DEFAULT_LANG == 'fr' %} - {{ _('Política de uso') }} - {% else %} - {{ _('Política de uso') }} - {% endif %} - -

-
-
-
- -
-
-
+ {% include 'comments.html' %} diff --git a/cl-theme/templates/comments.html b/cl-theme/templates/comments.html new file mode 100644 index 0000000..3c87ef3 --- /dev/null +++ b/cl-theme/templates/comments.html @@ -0,0 +1,169 @@ +
+ +
+

{{ _('Comentarios') }}

+
+ +
+ +
+ + {% if article.comments %} + {% for comment in article.comments %} + +
+ +
+

+ {% if comment.avatar %} + {{ comment.author }} + {% else %} + {{ comment.author }} + {% endif %} +

+
+ + + +
+
+ {% if comment.web %} +

+ + {{ comment.author }} + +

+ {% else %} +

{{ comment.author }}

+ {% endif %} + {{ comment.content }} + + + {{ _('Enlace Permanente') }} + | {{ comment.date|strftime("%H:%M:%S") }} +
+
+ +
+ + {% endfor %} + {% endif %} + +
+ +
+ + +
+ + {% if RELATIVE_URLS == False %} + + {% else %} + + {% endif %} +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+

{{ _('Puede formatear su comentario con') }} + Markdown. + {{ _('Avatar desde') }} + Libravatar +

+
+
+
+ +
+
+ +
+
+
+

+ + + {% if DEFAULT_LANG == 'en' %} + {{ _('Política de uso') }} + {% elif DEFAULT_LANG == 'fr' %} + {{ _('Política de uso') }} + {% else %} + {{ _('Política de uso') }} + {% endif %} +

+ +
+
+
+
+ +
+
+
diff --git a/cl-theme/translations/de/LC_MESSAGES/messages.po b/cl-theme/translations/de/LC_MESSAGES/messages.po index 16be8b3..68152e8 100644 --- a/cl-theme/translations/de/LC_MESSAGES/messages.po +++ b/cl-theme/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-11-21 11:42-0500\n" +"POT-Creation-Date: 2019-11-21 22:00-0500\n" "PO-Revision-Date: 2019-03-11 11:27-0500\n" "Last-Translator: \n" "Language: de\n" @@ -39,43 +39,6 @@ msgid_plural "%(num)d artículos" msgstr[0] "%(num)d artikel" msgstr[1] "%(num)d artikel" -#: templates/article.html:138 -msgid "Comentarios" -msgstr "Kommentare" - -#: templates/article.html:181 -msgid "Enlace Permanente" -msgstr "Permalink" - -#: templates/article.html:207 -msgid "Su nombre o nick" -msgstr "Name oder Nick" - -#: templates/article.html:213 -msgid "E-mail (requerido, no será publicado)" -msgstr "E-mail (erforderlich, wird nicht veröffentlicht)" - -#: templates/article.html:220 -msgid "Su sitio web (opcional)" -msgstr "Website (optional)" - -#: templates/article.html:226 -msgid "Agrega un comentario..." -msgstr "Kommentar hinzufügen..." - -#: templates/article.html:231 -msgid "Puede formatear su comentario con" -msgstr "Sie können Ihren Kommentar mit formatieren" - -#: templates/article.html:239 -msgid "Enviar comentario" -msgstr "Kommentar senden" - -#: templates/article.html:242 templates/article.html:244 -#: templates/article.html:246 -msgid "Política de uso" -msgstr "Nutzungsrichtlinien" - #: templates/article_info.html:4 templates/authors.html:118 #: templates/page.html:99 msgid "Regresar al Inicio" @@ -219,6 +182,63 @@ msgstr "JavaScript-Lizenzen" msgid "Fecha de modificación" msgstr "Datum der Änderung" +#: templates/comments.html:4 +msgid "Comentarios" +msgstr "Kommentare" + +#: templates/comments.html:48 +msgid "Enlace Permanente" +msgstr "Permalink" + +#: templates/comments.html:72 +msgid "Nombre" +msgstr "Vorname" + +#: templates/comments.html:81 +msgid "Su nombre o nick" +msgstr "Name oder Nick" + +#: templates/comments.html:89 +msgid "Email" +msgstr "Email" + +#: templates/comments.html:98 +msgid "E-mail (requerido, no será publicado)" +msgstr "E-mail (erforderlich, wird nicht veröffentlicht)" + +#: templates/comments.html:106 +msgid "Sitio Web" +msgstr "Website" + +#: templates/comments.html:115 +msgid "Su sitio web (opcional)" +msgstr "Website (optional)" + +#: templates/comments.html:123 +msgid "Comentario" +msgstr "Kommentar" + +#: templates/comments.html:131 +msgid "Agrega un comentario..." +msgstr "Kommentar hinzufügen..." + +#: templates/comments.html:133 +msgid "Puede formatear su comentario con" +msgstr "Sie können Ihren Kommentar mit formatieren" + +#: templates/comments.html:136 +msgid "Avatar desde" +msgstr "Avatar von" + +#: templates/comments.html:151 +msgid "Enviar comentario" +msgstr "Kommentar senden" + +#: templates/comments.html:154 templates/comments.html:156 +#: templates/comments.html:158 +msgid "Política de uso" +msgstr "Nutzungsrichtlinien" + #: templates/index.html:5 msgid "Página" msgstr "Seite" diff --git a/cl-theme/translations/en/LC_MESSAGES/messages.po b/cl-theme/translations/en/LC_MESSAGES/messages.po index 5084020..680f3b5 100644 --- a/cl-theme/translations/en/LC_MESSAGES/messages.po +++ b/cl-theme/translations/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Cybersy\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-11-21 11:42-0500\n" +"POT-Creation-Date: 2019-11-21 22:00-0500\n" "PO-Revision-Date: 2019-03-11 10:44-0500\n" "Last-Translator: Jesús E. \n" "Language: en\n" @@ -39,43 +39,6 @@ msgid_plural "%(num)d artículos" msgstr[0] "%(num)d article" msgstr[1] "%(num)d articles" -#: templates/article.html:138 -msgid "Comentarios" -msgstr "Comments" - -#: templates/article.html:181 -msgid "Enlace Permanente" -msgstr "Permalink" - -#: templates/article.html:207 -msgid "Su nombre o nick" -msgstr "Your name or nick" - -#: templates/article.html:213 -msgid "E-mail (requerido, no será publicado)" -msgstr "E-mail (required, will not be published)" - -#: templates/article.html:220 -msgid "Su sitio web (opcional)" -msgstr "Your website (optional)" - -#: templates/article.html:226 -msgid "Agrega un comentario..." -msgstr "Add a comment..." - -#: templates/article.html:231 -msgid "Puede formatear su comentario con" -msgstr "You can format your comment with" - -#: templates/article.html:239 -msgid "Enviar comentario" -msgstr "Send comment" - -#: templates/article.html:242 templates/article.html:244 -#: templates/article.html:246 -msgid "Política de uso" -msgstr "Usage Policy" - #: templates/article_info.html:4 templates/authors.html:118 #: templates/page.html:99 msgid "Regresar al Inicio" @@ -219,6 +182,63 @@ msgstr "JavaScript licenses" msgid "Fecha de modificación" msgstr "Modification date" +#: templates/comments.html:4 +msgid "Comentarios" +msgstr "Comments" + +#: templates/comments.html:48 +msgid "Enlace Permanente" +msgstr "Permalink" + +#: templates/comments.html:72 +msgid "Nombre" +msgstr "Name" + +#: templates/comments.html:81 +msgid "Su nombre o nick" +msgstr "Your name or nick" + +#: templates/comments.html:89 +msgid "Email" +msgstr "Email" + +#: templates/comments.html:98 +msgid "E-mail (requerido, no será publicado)" +msgstr "E-mail (required, will not be published)" + +#: templates/comments.html:106 +msgid "Sitio Web" +msgstr "Website" + +#: templates/comments.html:115 +msgid "Su sitio web (opcional)" +msgstr "Your website (optional)" + +#: templates/comments.html:123 +msgid "Comentario" +msgstr "Commentary" + +#: templates/comments.html:131 +msgid "Agrega un comentario..." +msgstr "Add a comment..." + +#: templates/comments.html:133 +msgid "Puede formatear su comentario con" +msgstr "You can format your comment with" + +#: templates/comments.html:136 +msgid "Avatar desde" +msgstr "Avatar from" + +#: templates/comments.html:151 +msgid "Enviar comentario" +msgstr "Send comment" + +#: templates/comments.html:154 templates/comments.html:156 +#: templates/comments.html:158 +msgid "Política de uso" +msgstr "Usage Policy" + #: templates/index.html:5 msgid "Página" msgstr "Page" diff --git a/cl-theme/translations/eo/LC_MESSAGES/messages.po b/cl-theme/translations/eo/LC_MESSAGES/messages.po index 4ddbdf1..6fd5355 100644 --- a/cl-theme/translations/eo/LC_MESSAGES/messages.po +++ b/cl-theme/translations/eo/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-11-21 11:42-0500\n" +"POT-Creation-Date: 2019-11-21 22:00-0500\n" "PO-Revision-Date: 2019-03-11 11:46-0500\n" "Last-Translator: \n" "Language: eo\n" @@ -39,43 +39,6 @@ msgid_plural "%(num)d artículos" msgstr[0] "%(num)d artikolo" msgstr[1] "%(num)d artikoloj" -#: templates/article.html:138 -msgid "Comentarios" -msgstr "Komentoj" - -#: templates/article.html:181 -msgid "Enlace Permanente" -msgstr "Konstanta Ligilo" - -#: templates/article.html:207 -msgid "Su nombre o nick" -msgstr "Nomo aŭ kromnomo" - -#: templates/article.html:213 -msgid "E-mail (requerido, no será publicado)" -msgstr "E-mail (bezonata, ne estos publikigita)" - -#: templates/article.html:220 -msgid "Su sitio web (opcional)" -msgstr "Retejo (laŭvola)" - -#: templates/article.html:226 -msgid "Agrega un comentario..." -msgstr "Aldonu komenton..." - -#: templates/article.html:231 -msgid "Puede formatear su comentario con" -msgstr "Vi povas formati vian komenton per" - -#: templates/article.html:239 -msgid "Enviar comentario" -msgstr "Sendu komenton" - -#: templates/article.html:242 templates/article.html:244 -#: templates/article.html:246 -msgid "Política de uso" -msgstr "Uzado-Politiko" - #: templates/article_info.html:4 templates/authors.html:118 #: templates/page.html:99 msgid "Regresar al Inicio" @@ -219,6 +182,63 @@ msgstr "JavaScript permesiloj" msgid "Fecha de modificación" msgstr "Dato de modifo" +#: templates/comments.html:4 +msgid "Comentarios" +msgstr "Komentoj" + +#: templates/comments.html:48 +msgid "Enlace Permanente" +msgstr "Konstanta Ligilo" + +#: templates/comments.html:72 +msgid "Nombre" +msgstr "Nomo" + +#: templates/comments.html:81 +msgid "Su nombre o nick" +msgstr "Nomo aŭ kromnomo" + +#: templates/comments.html:89 +msgid "Email" +msgstr "Email" + +#: templates/comments.html:98 +msgid "E-mail (requerido, no será publicado)" +msgstr "E-mail (bezonata, ne estos publikigita)" + +#: templates/comments.html:106 +msgid "Sitio Web" +msgstr "Retejo" + +#: templates/comments.html:115 +msgid "Su sitio web (opcional)" +msgstr "Retejo (laŭvola)" + +#: templates/comments.html:123 +msgid "Comentario" +msgstr "Komento" + +#: templates/comments.html:131 +msgid "Agrega un comentario..." +msgstr "Aldonu komenton..." + +#: templates/comments.html:133 +msgid "Puede formatear su comentario con" +msgstr "Vi povas formati vian komenton per" + +#: templates/comments.html:136 +msgid "Avatar desde" +msgstr "Avataro de" + +#: templates/comments.html:151 +msgid "Enviar comentario" +msgstr "Sendu komenton" + +#: templates/comments.html:154 templates/comments.html:156 +#: templates/comments.html:158 +msgid "Política de uso" +msgstr "Uzado-Politiko" + #: templates/index.html:5 msgid "Página" msgstr "Paĝo" diff --git a/cl-theme/translations/fr/LC_MESSAGES/messages.po b/cl-theme/translations/fr/LC_MESSAGES/messages.po index 41ab862..a20a6dd 100644 --- a/cl-theme/translations/fr/LC_MESSAGES/messages.po +++ b/cl-theme/translations/fr/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-11-21 11:42-0500\n" +"POT-Creation-Date: 2019-11-21 22:00-0500\n" "PO-Revision-Date: 2019-03-11 12:33-0500\n" "Last-Translator: \n" "Language: fr\n" @@ -39,43 +39,6 @@ msgid_plural "%(num)d artículos" msgstr[0] "%(num)d article" msgstr[1] "%(num)d articles" -#: templates/article.html:138 -msgid "Comentarios" -msgstr "Commentaires" - -#: templates/article.html:181 -msgid "Enlace Permanente" -msgstr "Lien permanent" - -#: templates/article.html:207 -msgid "Su nombre o nick" -msgstr "Votre nom ou pseudo" - -#: templates/article.html:213 -msgid "E-mail (requerido, no será publicado)" -msgstr "E-mail (obligatoire, ne sera pas publié)" - -#: templates/article.html:220 -msgid "Su sitio web (opcional)" -msgstr "Votre site web (optionnel)" - -#: templates/article.html:226 -msgid "Agrega un comentario..." -msgstr "Ajouter un commentaire..." - -#: templates/article.html:231 -msgid "Puede formatear su comentario con" -msgstr "Vous pouvez formater votre commentaire avec" - -#: templates/article.html:239 -msgid "Enviar comentario" -msgstr "Envoyer un commentaire" - -#: templates/article.html:242 templates/article.html:244 -#: templates/article.html:246 -msgid "Política de uso" -msgstr "Politique d'utilisation" - #: templates/article_info.html:4 templates/authors.html:118 #: templates/page.html:99 msgid "Regresar al Inicio" @@ -219,6 +182,63 @@ msgstr "Licences JavaScript" msgid "Fecha de modificación" msgstr "Date de modification" +#: templates/comments.html:4 +msgid "Comentarios" +msgstr "Commentaires" + +#: templates/comments.html:48 +msgid "Enlace Permanente" +msgstr "Lien permanent" + +#: templates/comments.html:72 +msgid "Nombre" +msgstr "Nom" + +#: templates/comments.html:81 +msgid "Su nombre o nick" +msgstr "Votre nom ou pseudo" + +#: templates/comments.html:89 +msgid "Email" +msgstr "Email" + +#: templates/comments.html:98 +msgid "E-mail (requerido, no será publicado)" +msgstr "E-mail (obligatoire, ne sera pas publié)" + +#: templates/comments.html:106 +msgid "Sitio Web" +msgstr "Site Web" + +#: templates/comments.html:115 +msgid "Su sitio web (opcional)" +msgstr "Votre site web (optionnel)" + +#: templates/comments.html:123 +msgid "Comentario" +msgstr "Commentaire" + +#: templates/comments.html:131 +msgid "Agrega un comentario..." +msgstr "Ajouter un commentaire..." + +#: templates/comments.html:133 +msgid "Puede formatear su comentario con" +msgstr "Vous pouvez formater votre commentaire avec" + +#: templates/comments.html:136 +msgid "Avatar desde" +msgstr "Avatar de" + +#: templates/comments.html:151 +msgid "Enviar comentario" +msgstr "Envoyer un commentaire" + +#: templates/comments.html:154 templates/comments.html:156 +#: templates/comments.html:158 +msgid "Política de uso" +msgstr "Politique d'utilisation" + #: templates/index.html:5 msgid "Página" msgstr "Page"