Skip to content

Commit

Permalink
imp: Customize the errors pages
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Aug 31, 2023
1 parent 353fe63 commit 276501e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
31 changes: 31 additions & 0 deletions templates/bundles/TwigBundle/Exception/error.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{#
# This file is part of Bileto.
# Copyright 2022-2023 Probesys
# SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% extends 'base.html.twig' %}

{% block title %}{{ 'errors.generic.title' | trans }}{% endblock %}

{% block body %}
<main class="layout__body wrapper wrapper--small wrapper--center flow flow--large">
<h1>{{ 'errors.generic.title' | trans }}</h1>

<div class="text--center flow flow--large">
<p class="text--big">
{{ 'errors.generic.description' | trans }}
</p>

<p>
{{ 'errors.generic.sorry' | trans }}
</p>

<p>
<a class="anchor--action" href="{{ path('home') }}">
{{ 'errors.back_home' | trans }}
</a>
</p>
</div>
</main>
{% endblock %}
27 changes: 27 additions & 0 deletions templates/bundles/TwigBundle/Exception/error404.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{#
# This file is part of Bileto.
# Copyright 2022-2023 Probesys
# SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% extends 'base.html.twig' %}

{% block title %}{{ 'errors.404.title' | trans }}{% endblock %}

{% block body %}
<main class="layout__body wrapper wrapper--small wrapper--center flow flow--large">
<h1>{{ 'errors.404.title' | trans }}</h1>

<div class="text--center flow flow--large">
<p class="text--big">
{{ 'errors.404.description' | trans }}
</p>

<p>
<a class="anchor--action" href="{{ path('home') }}">
{{ 'errors.back_home' | trans }}
</a>
</p>
</div>
</main>
{% endblock %}
6 changes: 6 additions & 0 deletions translations/messages+intl-icu.en_GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ advanced_search_syntax.qualifiers.type.example1: 'Tickets of type “incident”
advanced_search_syntax.qualifiers.type.title: Type
advanced_search_syntax.qualifiers.type.values: 'The possible values for “type“ are: <code>incident</code> and <code>request</code>.'
advanced_search_syntax.title: 'Quick reference for the advanced syntax'
errors.404.description: 'The requested page couldn’t be located. Checkout for any URL misspelling.'
errors.404.title: 'Page not found!'
errors.back_home: 'Back to the homepage'
errors.generic.description: 'Please tell your administrator what you were doing when the error occurred. This will be fixed as soon as possible.'
errors.generic.sorry: 'Sorry for any inconvenience caused.'
errors.generic.title: 'An error has occured!'
forms.error: Error
forms.max_chars: '(max. {number} characters)'
forms.optional: (optional)
Expand Down
6 changes: 6 additions & 0 deletions translations/messages+intl-icu.fr_FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ advanced_search_syntax.qualifiers.type.example1: "Les tickets de type «\_incide
advanced_search_syntax.qualifiers.type.title: Type
advanced_search_syntax.qualifiers.type.values: "Les valeurs possibles pour «\_type\_» sont\_: <code>incident</code> et <code>request</code>."
advanced_search_syntax.title: 'Aide-mémoire de la syntaxe avancée'
errors.404.description: 'La page demandée n’a pas été trouvée. Vérifiez qu’il n’y a pas de faute dans l’URL.'
errors.404.title: "Page non trouvée\_!"
errors.back_home: 'Retour à la page d’accueil'
errors.generic.description: 'Veuillez indiquer à votre administrateur ce que vous faisiez lorsque l’erreur s’est produite. Le problème sera résolu dès que possible.'
errors.generic.sorry: 'Désolé pour la gêne occasionnée.'
errors.generic.title: "Une erreur est survenue\_!"
forms.error: Erreur
forms.max_chars: '(max. {number} caractères)'
forms.optional: (optionnel)
Expand Down

0 comments on commit 276501e

Please sign in to comment.