mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-01 01:21:30 +00:00
Incorporate translations
This commit is contained in:
parent
cbee588484
commit
e542aa872d
|
@ -1,6 +1,8 @@
|
||||||
import { Component } from "inferno";
|
import { Component } from "inferno";
|
||||||
|
import { T } from "inferno-i18next-dess";
|
||||||
import { Link } from "inferno-router";
|
import { Link } from "inferno-router";
|
||||||
import { IsoDataOptionalSite } from "shared/interfaces";
|
import { i18n } from "../../i18next";
|
||||||
|
import { IsoDataOptionalSite } from "../../interfaces";
|
||||||
import { setIsoData } from "../../utils";
|
import { setIsoData } from "../../utils";
|
||||||
|
|
||||||
export class ErrorPage extends Component<any, any> {
|
export class ErrorPage extends Component<any, any> {
|
||||||
|
@ -15,38 +17,35 @@ export class ErrorPage extends Component<any, any> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg text-center">
|
<div className="container-lg text-center">
|
||||||
<h1>{errorPageData ? "Error!" : "Page Not Found"}</h1>
|
<h1>
|
||||||
|
{errorPageData
|
||||||
|
? i18n.t("error_page_title")
|
||||||
|
: i18n.t("not_found_page_title")}
|
||||||
|
</h1>
|
||||||
<p className="p-4">
|
<p className="p-4">
|
||||||
{errorPageData ? (
|
{errorPageData ? (
|
||||||
<>
|
<T i18nKey="error_page_paragraph" class="d-inline">
|
||||||
There was an error on the server. Try refreshing your browser. If
|
#<a href="https://lemmy.ml/c/lemmy_support">#</a>#
|
||||||
that doesn't work, come back at a later time. If the problem
|
<a href="https://matrix.to/#/#lemmy-space:matrix.org">#</a>#
|
||||||
persists, you can seek help in the{" "}
|
</T>
|
||||||
<a href="https://lemmy.ml/c/lemmy_support">
|
|
||||||
Lemmy support community
|
|
||||||
</a>{" "}
|
|
||||||
or the{" "}
|
|
||||||
<a href="https://matrix.to/#/#lemmy-space:matrix.org">
|
|
||||||
Lemmy Matrix room
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
"The page you are looking for does not exist."
|
"The page you are looking for does not exist."
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
{!errorPageData && (
|
{!errorPageData && (
|
||||||
<Link to="/" replace>
|
<Link to="/" replace>
|
||||||
Click here to return to your home page.
|
{i18n.t("not_found_return_home_button")}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
{errorPageData?.adminMatrixIds &&
|
{errorPageData?.adminMatrixIds &&
|
||||||
errorPageData.adminMatrixIds.length > 0 && (
|
errorPageData.adminMatrixIds.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
If you would like to reach out to one of{" "}
|
{i18n.t("error_page_admin_matrix", {
|
||||||
{this.isoData.site_res?.site_view.site.name ?? "this instance"}
|
instance:
|
||||||
's admins for support, try the following Matrix addresses:
|
this.isoData.site_res?.site_view.site.name ??
|
||||||
|
"this instance",
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
<ul className="mx-auto mt-2" style={{ width: "fit-content" }}>
|
<ul className="mx-auto mt-2" style={{ width: "fit-content" }}>
|
||||||
{errorPageData.adminMatrixIds.map(matrixId => (
|
{errorPageData.adminMatrixIds.map(matrixId => (
|
||||||
|
|
Loading…
Reference in a new issue