Extract text from error pages and sync text variable to all lang (#1008)

* feat: extract text from error pages

* feat: sync text variables to langs.properties

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
This commit is contained in:
CocoMaster-AI
2024-04-01 18:04:56 +08:00
committed by GitHub
parent 664dd62d8b
commit 989491b903
31 changed files with 651 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}" th:dir="#{language.direction}" th:data-language="${#locale.toString()}" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:insert="~{fragments/common :: head(title='404 - Page Not Found | Oops, we tripped in the code!')}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{error.404.head})}"></th:block>
</head>
<body>
@@ -11,25 +11,17 @@
<div th:insert="~{fragments/errorBanner.html :: errorBanner}"></div>
<div class="container">
<div id="support-section">
<h1 class="display-2">Oops!</h1>
<p class="lead" th:if="${param.status == '404'}">
We can't seem to find the page you're looking for.
</p>
<p class="lead" th:unless="${param.status == '404'}">
Something went wrong
</p>
<h1 class="display-2" th:text="#{oops}"></h1>
<p class="lead" th:if="${param.status == '404'}" th:text="#{error.404.1}"></p>
<p class="lead" th:unless="${param.status == '404'}" th:text="#{error.404.2}"></p>
<br>
<h2>Need help / Found a issue?</h2>
<p>
If you're still having trouble, don't hesitate to reach out to us
for help. You can submit a ticket on our GitHub page or contact us
through Discord:
</p>
<h2 th:text="#{error.needHelp}"></h2>
<p th:text="#{error.contactTip}"></p>
<div id="button-group">
<a href="https://github.com/Stirling-Tools/Stirling-PDF/issues" id="github-button" target="_blank">Submit a ticket on GitHub</a>
<a href="https://discord.gg/Cn8pWhQRxZ" id="discord-button" target="_blank">Join our Discord server</a>
<a href="https://github.com/Stirling-Tools/Stirling-PDF/issues" id="github-button" target="_blank" th:text="#{error.github}"></a>
<a href="https://discord.gg/Cn8pWhQRxZ" id="discord-button" target="_blank" th:text="#{joinDiscord}"></a>
</div>
<a href="/" class="home-button">Go back to homepage</a>
<a href="/" class="home-button" th:text="#{goHomepage}"></a>
</div>
</div>
</div>