Skip to content

Commit

Permalink
Merge branch 'release/1.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 19, 2016
2 parents 987551b + df2c64b commit bdab65f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v1.6.0
## 10/19/2016

1. [](#improved)
* Added Croatian translation
* Improved `autoescape: true` support
1. [](#bugfix)
* Fixed issue where template file for `error` page type is only available if page was not found

# v1.5.1
## 07/18/2016

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Error
version: 1.5.1
version: 1.6.0
description: Displays the error page.
icon: warning
author:
Expand Down
5 changes: 1 addition & 4 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static function getSubscribedEvents()
return [
'onPageNotFound' => ['onPageNotFound', 0],
'onGetPageTemplates' => ['onGetPageTemplates', 0],
'onTwigTemplatePaths' => ['onTwigTemplatePaths', -10]
];
}

Expand All @@ -28,10 +29,6 @@ public static function getSubscribedEvents()
*/
public function onPageNotFound(Event $event)
{
$this->enable([
'onTwigTemplatePaths' => ['onTwigTemplatePaths', -10]
]);

/** @var Pages $pages */
$pages = $this->grav['pages'];

Expand Down
7 changes: 6 additions & 1 deletion languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ de:
PLUGIN_ERROR:
ERROR: "Fehler"
ERROR_MESSAGE: "Uuups. Sieht aus als ob diese Seite nicht existiert."
hr:
PLUGIN_ERROR:
ERROR: "Greška"
ERROR_MESSAGE: "Uups. Izgleda da ova stranica ne postoji."

ro:
PLUGIN_ERROR:
ERROR: "Eroare"
Expand All @@ -21,7 +26,7 @@ it:
ru:
PLUGIN_ERROR:
ERROR: "Ошибка"
ERROR_MESSAGE: "Упс. Похоже, эта страница не существует."
ERROR_MESSAGE: "Упс. Похоже, этой страницы не существует."
da:
PLUGIN_ERROR:
ERROR: "Fejl"
Expand Down
2 changes: 1 addition & 1 deletion pages/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ routable: false
http_response_code: 404
twig_first: true
process:
twig: true
twig: true
---

{{ 'PLUGIN_ERROR.ERROR_MESSAGE'|t }}
Expand Down
2 changes: 1 addition & 1 deletion templates/error.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1>{{ 'PLUGIN_ERROR.ERROR'|t }} {{ header.http_response_code }}</h1>

<p>{{ page.content }}</p>
<p>{{ page.content|raw }}</p>
2 changes: 1 addition & 1 deletion templates/error.json.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ page.content|json_encode() }}
{{ page.content|json_encode()|raw }}

0 comments on commit bdab65f

Please sign in to comment.