1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-11-04 04:11:42 +03:00

Wrap intl in span identifying translation

This commit is contained in:
Jamie Curnow
2025-10-02 23:06:51 +10:00
parent fcb08d3003
commit 227e818040
68 changed files with 1076 additions and 510 deletions

View File

@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
import Alert from "react-bootstrap/Alert";
import { Loading, LoadingPage } from "src/components";
import { useUser } from "src/hooks";
import { intl } from "src/locale";
import { T } from "src/locale";
interface Props {
permission: string;
@@ -64,7 +64,11 @@ function HasPermission({
return <>{children}</>;
}
return !hideError ? <Alert variant="danger">{intl.formatMessage({ id: "no-permission-error" })}</Alert> : null;
return !hideError ? (
<Alert variant="danger">
<T id="no-permission-error" />
</Alert>
) : null;
}
export { HasPermission };