From e542aa872d0d73d5a2b54764181c2b9b63bb727f Mon Sep 17 00:00:00 2001 From: abias Date: Sun, 21 May 2023 14:13:06 -0400 Subject: [PATCH] Incorporate translations --- src/shared/components/app/error-page.tsx | 37 ++++++++++++------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/shared/components/app/error-page.tsx b/src/shared/components/app/error-page.tsx index 1b18a9c1..b90698ed 100644 --- a/src/shared/components/app/error-page.tsx +++ b/src/shared/components/app/error-page.tsx @@ -1,6 +1,8 @@ import { Component } from "inferno"; +import { T } from "inferno-i18next-dess"; import { Link } from "inferno-router"; -import { IsoDataOptionalSite } from "shared/interfaces"; +import { i18n } from "../../i18next"; +import { IsoDataOptionalSite } from "../../interfaces"; import { setIsoData } from "../../utils"; export class ErrorPage extends Component { @@ -15,38 +17,35 @@ export class ErrorPage extends Component { return (
-

{errorPageData ? "Error!" : "Page Not Found"}

+

+ {errorPageData + ? i18n.t("error_page_title") + : i18n.t("not_found_page_title")} +

{errorPageData ? ( - <> - There was an error on the server. Try refreshing your browser. If - that doesn't work, come back at a later time. If the problem - persists, you can seek help in the{" "} - - Lemmy support community - {" "} - or the{" "} - - Lemmy Matrix room - - . - + + ### + ## + ) : ( "The page you are looking for does not exist." )}

{!errorPageData && ( - Click here to return to your home page. + {i18n.t("not_found_return_home_button")} )} {errorPageData?.adminMatrixIds && errorPageData.adminMatrixIds.length > 0 && ( <>
- If you would like to reach out to one of{" "} - {this.isoData.site_res?.site_view.site.name ?? "this instance"} - 's admins for support, try the following Matrix addresses: + {i18n.t("error_page_admin_matrix", { + instance: + this.isoData.site_res?.site_view.site.name ?? + "this instance", + })}
    {errorPageData.adminMatrixIds.map(matrixId => (