diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b03e02..316afe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v1.1.4 +## 02/05/2016 + +1. [](#improved) + * Added german and polish + * Avoid listening on onTwigTemplatePaths if not enabled + # v1.1.3 ## 01/06/2016 diff --git a/blueprints.yaml b/blueprints.yaml index 2962541..bd800f5 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Comments -version: 1.1.3 +version: 1.1.4 description: Adds a commenting functionality to your site icon: comment author: @@ -21,11 +21,11 @@ form: fields: enabled: type: toggle - label: Plugin status + label: PLUGIN_ADMIN.PLUGIN_STATUS highlight: 1 default: 0 options: - 1: Enabled - 0: Disabled + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED validate: type: bool diff --git a/comments.php b/comments.php index 743971d..49be739 100644 --- a/comments.php +++ b/comments.php @@ -103,12 +103,13 @@ class CommentsPlugin extends Plugin $this->calculateEnable(); - $this->enable([ - 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], - ]); + if ($this->enable) { + $this->enable([ + 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], + ]); + } } else { - /** @var Uri $uri */ $uri = $this->grav['uri']; diff --git a/languages.yaml b/languages.yaml index ae3212c..086dd21 100644 --- a/languages.yaml +++ b/languages.yaml @@ -46,3 +46,27 @@ ru: EMAIL: Email: WRITTEN_ON: Написан в BY: от +pl: + PLUGIN_COMMENTS: + ADD_COMMENT: Dodaj komentarz + COMMENTS: Komentarzy + EMAIL_NOT_CONFIGURED: Email jest nie skofigurowany + NEW_COMMENT_EMAIL_SUBJECT: 'Nowy komentarz %1$s' + NEW_COMMENT_EMAIL_BODY: '

Pojawił się nowy komentarz, napisany %1$s przez %3$s (%4$s).

Strona: %2$s

Treść: %5$s

' + EMAIL_FOOTER: '' + NAME: Imię: + EMAIL: Email: + WRITTEN_ON: Napisany przez + BY: przez +de: + PLUGIN_COMMENTS: + ADD_COMMENT: Kommentar hinzufügen + COMMENTS: Kommentare + EMAIL_NOT_CONFIGURED: Email nicht konfiguriert + NEW_COMMENT_EMAIL_SUBJECT: 'Neuer Kommentar für %1$s' + NEW_COMMENT_EMAIL_BODY: '

Ein neuer Kommentar am %1$s von %3$s (%4$s).

Seite: %2$s

Text: %5$s

' + EMAIL_FOOTER: '' + NAME: Name: + EMAIL: Email: + WRITTEN_ON: geschrieben am + BY: von