diff --git a/web/src/components/product/ProductRegistrationAlert.tsx b/web/src/components/product/ProductRegistrationAlert.tsx index 41320b6116..6e186a4f89 100644 --- a/web/src/components/product/ProductRegistrationAlert.tsx +++ b/web/src/components/product/ProductRegistrationAlert.tsx @@ -30,14 +30,14 @@ import { _ } from "~/i18n"; import { sprintf } from "sprintf-js"; import { useIssues } from "~/queries/issues"; -const LinkToRegistration = () => { +const LinkToRegistration = ({ text }: { text: string }) => { const location = useLocation(); - if (location.pathname === REGISTRATION.root) return; + if (location.pathname === REGISTRATION.root) return text; return ( - - {_("Register it now")} + + {text} ); }; @@ -53,9 +53,20 @@ export default function ProductRegistrationAlert() { if (SUPPORTIVE_PATHS.includes(location.pathname)) return; if (!registrationRequired) return; + const [textStart, text, textEnd] = sprintf(_("%s [must be registered]."), product.name).split( + /[[\]]/, + ); + return ( - - - + + {textStart} + + {textEnd} + + } + /> ); }