From d8e1e2dfe2de1d3e37ca8fada4e5a84d8d83297e Mon Sep 17 00:00:00 2001 From: tidiview Date: Tue, 7 Feb 2017 13:59:35 +0100 Subject: [PATCH 1/7] =?UTF-8?q?created=20a=20japanese=20translation=20?= =?UTF-8?q?=E2=99=AA=20(#43)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- languages.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/languages.yaml b/languages.yaml index 61cc568..812f22d 100644 --- a/languages.yaml +++ b/languages.yaml @@ -130,6 +130,28 @@ it: EMAIL_NEW_COMMENT_SUBJECT: "[Nuovo commento] da {{ form.value.name|e }}" THANK_YOU_MESSAGE: "Grazie per il tuo commento!" +ja: + PLUGIN_COMMENTS: + ADD_COMMENT: コメントを追加する + COMMENTS: コメント + EMAIL_NOT_CONFIGURED: メールアドレスは設定さていません + NEW_COMMENT_EMAIL_SUBJECT: '%1$sについて新しいコメント' + NEW_COMMENT_EMAIL_BODY: '

新しいコメントが%1$sについて%3$sから(%4$s)書かれた.

ページー : %2$s

文書 : %5$s

' + EMAIL_FOOTER: '' + NAME: 名前 : + EMAIL: メールアドレス : + WRITTEN_ON: に書かれた + BY: に + NAME_LABEL: "名前" + NAME_PLACEHOLDER: "お名前を" + EMAIL_LABEL: "メールアドレスを" + EMAIL_PLACEHOLDER: "ご自分のメールアドレスをここに..." + MESSAGE_LABEL: "コメント" + MESSAGE_PLACEHOLDER: "コメントをここに" + SUBMIT_COMMENT_BUTTON_TEXT: "送信する" + EMAIL_NEW_COMMENT_SUBJECT: "[新しいコメント]、 {{ form.value.name|e }}から" + THANK_YOU_MESSAGE: "コメントを書いてくださいましてありがとうございました!" + pl: PLUGIN_COMMENTS: ADD_COMMENT: Dodaj komentarz From b3da8123a9b8ce55d271e370a00e58752ec0d377 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Tue, 7 Feb 2017 14:01:07 +0100 Subject: [PATCH 2/7] Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f72cf4e..97be244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.2.7 +## xx/xx/2017 + +1. [](#improved) + Added Japanese translation + # v1.2.6 ## 01/09/2017 From fac87e9bb5b9a32d9e9d099197bcde9860984ba1 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Sun, 26 Feb 2017 22:05:26 +0100 Subject: [PATCH 3/7] Move captcha over email, fix #45 --- CHANGELOG.md | 5 +++-- comments.yaml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97be244..f4670b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,14 @@ ## xx/xx/2017 1. [](#improved) - Added Japanese translation + * Added Japanese translation + * Move captcha over email [#45](https://github.com/getgrav/grav-plugin-comments/issues/45) # v1.2.6 ## 01/09/2017 1. [](#improved) - Use existing `Utils::startsWith()` method + * Use existing `Utils::startsWith()` method 1. [](#bugfix) * Fix [#41](https://github.com/getgrav/grav-plugin-comments/issues/41) using Comments in a Gantry-powered theme did not escape the comment form token correctly diff --git a/comments.yaml b/comments.yaml index 05a16eb..c96565b 100644 --- a/comments.yaml +++ b/comments.yaml @@ -65,11 +65,11 @@ form: value: PLUGIN_COMMENTS.SUBMIT_COMMENT_BUTTON_TEXT process: +# - captcha: +# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je - email: subject: PLUGIN_COMMENTS.EMAIL_NEW_COMMENT_SUBJECT body: "{% include 'forms/data.html.twig' %}" -# - captcha: -# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je - addComment: - message: PLUGIN_COMMENTS.THANK_YOU_MESSAGE - reset: true From f1b1f74348671d3c37f037ce3c86a68219d116f0 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 14 Apr 2017 16:19:33 +0200 Subject: [PATCH 4/7] Fix type in example config --- comments.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comments.yaml b/comments.yaml index c96565b..5c09966 100644 --- a/comments.yaml +++ b/comments.yaml @@ -53,7 +53,7 @@ form: # - name: g-recaptcha-response # label: Captcha # type: captcha -# recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3 +# recaptcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3 # recaptcha_not_validated: 'Captcha not valid!' # validate: # required: true @@ -66,7 +66,7 @@ form: process: # - captcha: -# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je +# recaptcha_secret: ej32oiej23oiej32oijeoi32jeio32je - email: subject: PLUGIN_COMMENTS.EMAIL_NEW_COMMENT_SUBJECT body: "{% include 'forms/data.html.twig' %}" From 228ac73ba8024bc85a72e3587c28b83f65049b0e Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 11 May 2017 19:42:43 +0200 Subject: [PATCH 5/7] Fix comment form processing --- CHANGELOG.md | 2 ++ comments.php | 2 +- templates/partials/comments.html.twig | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4670b1..3415666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ 1. [](#improved) * Added Japanese translation * Move captcha over email [#45](https://github.com/getgrav/grav-plugin-comments/issues/45) +1. [](#bugfix) + * Fix comment form processing # v1.2.6 ## 01/09/2017 diff --git a/comments.php b/comments.php index c6ee298..7a59543 100644 --- a/comments.php +++ b/comments.php @@ -187,7 +187,7 @@ class CommentsPlugin extends Plugin switch ($action) { case 'addComment': - $post = !empty($_POST) ? $_POST : []; + $post = isset($_POST['data']) ? $_POST['data'] : []; $lang = filter_var(urldecode($post['lang']), FILTER_SANITIZE_STRING); $path = filter_var(urldecode($post['path']), FILTER_SANITIZE_STRING); diff --git a/templates/partials/comments.html.twig b/templates/partials/comments.html.twig index 7528223..e44edef 100644 --- a/templates/partials/comments.html.twig +++ b/templates/partials/comments.html.twig @@ -1,4 +1,5 @@ {% if grav.twig.enable_comments_plugin %} + {% set scope = scope ?: 'data.' %}

{{'PLUGIN_COMMENTS.ADD_COMMENT'|t}}

From 42ff5564207bcb6983c7f352e1b91940750f0864 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 12 May 2017 14:40:51 +0200 Subject: [PATCH 6/7] Fix issue with scope for autofilled values --- CHANGELOG.md | 1 + templates/partials/comments.html.twig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3415666..f263b69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Move captcha over email [#45](https://github.com/getgrav/grav-plugin-comments/issues/45) 1. [](#bugfix) * Fix comment form processing + * Fix issue with scope for autofilled values # v1.2.6 ## 01/09/2017 diff --git a/templates/partials/comments.html.twig b/templates/partials/comments.html.twig index e44edef..29d79b9 100644 --- a/templates/partials/comments.html.twig +++ b/templates/partials/comments.html.twig @@ -14,9 +14,9 @@ {% endif %} {% if config.plugins.login.enabled and grav.user.authenticated %} {% if field.name == 'name' %} - + {% elseif field.name == 'email' %} - + {% else %}
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %} From 0a5a7a2e9ca23c2c7b687afbd797891c086cbeda Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 12 May 2017 14:55:49 +0200 Subject: [PATCH 7/7] Prepare release --- CHANGELOG.md | 2 +- blueprints.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f263b69..f2d5015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # v1.2.7 -## xx/xx/2017 +## 05/12/2017 1. [](#improved) * Added Japanese translation diff --git a/blueprints.yaml b/blueprints.yaml index 4de7704..1daf30b 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Comments -version: 1.2.6 +version: 1.2.7 description: Adds a commenting functionality to your site icon: comment author: