Skip to content

Commit

Permalink
convert "error" template to Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed May 31, 2024
1 parent a14e11f commit 32b168e
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 62 deletions.
21 changes: 0 additions & 21 deletions modules/material/dictionaries/error.definition.json

This file was deleted.

9 changes: 9 additions & 0 deletions modules/material/locales/en/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ msgstr "Yes"
msgid "{about2expire:button_continue}"
msgstr "Later"

msgid "{error:title}"
msgstr "Error"

msgid "{error:header}"
msgstr "Error"

msgid "{error:message}"
msgstr "An error occurred, please contact your help desk for further assistance."

msgid "{expired:title}"
msgstr "Expired password"

Expand Down
9 changes: 9 additions & 0 deletions modules/material/locales/es/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ msgstr "Sí"
msgid "{about2expire:button_continue}"
msgstr "Después"

msgid "{error:title}"
msgstr "Error"

msgid "{error:header}"
msgstr "Error"

msgid "{error:message}"
msgstr "Se ha producido un error, póngase en contacto con su asistencia técnica para obtener más ayuda."

msgid "{expired:title}"
msgstr "Contraseña caducada"

Expand Down
9 changes: 9 additions & 0 deletions modules/material/locales/fr/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ msgstr "Oui"
msgid "{about2expire:button_continue}"
msgstr "Plus tard"

msgid "{error:title}"
msgstr "Erreur"

msgid "{error:header}"
msgstr "Erreur"

msgid "{error:message}"
msgstr "Une erreur s'est produite, s'il vous plaît contacter votre service d'assistance pour plus d'assistance."

msgid "{expired:title}"
msgstr "Mot de passe expiré"

Expand Down
9 changes: 9 additions & 0 deletions modules/material/locales/ko/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ msgstr "예"
msgid "{about2expire:button_continue}"
msgstr "후에"

msgid "{error:title}"
msgstr "오류"

msgid "{error:header}"
msgstr "오류"

msgid "{error:message}"
msgstr "오류가 발생했습니다. 도움을 받으려면 헬프 데스크에 문의하십시오."

msgid "{expired:title}"
msgstr "만료 된 암호"

Expand Down
41 changes: 0 additions & 41 deletions modules/material/themes/material/default/error.php

This file was deleted.

37 changes: 37 additions & 0 deletions modules/material/themes/material/default/error.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="{{ currentLanguage }}">
<head>
<title>{{ '{material:error:title}'|trans }}</title>

{% include 'header.twig' %}
</head>
<body>
<div class="mdl-layout mdl-layout--fixed-header fill-viewport">
<header class="mdl-layout__header mdl-color--red">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">
{{ '{material:error:header}'|trans }}
</span>
</div>
</header>

<main class="mdl-layout__content margin" layout-children="column">
<p>
{{ '{material:error:message}'|trans }}
</p>

{% if showerrors ?? false %}
<p class="mdl-typography--body-2">
{{ error.exceptionMsg|e }}
</p>

<pre class="mdl-typography--caption">
{{ error.exceptionTrace|e }}
</pre>
{% endif %}
</main>

{% include 'footer.twig' %}
</div>
</body>
</html>

0 comments on commit 32b168e

Please sign in to comment.