From 735c8ca3a6f7eb4f8a0f5efc4ef76cf74e9c1b1a Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Wed, 6 Nov 2024 09:34:21 +1100 Subject: [PATCH] fix: localize not found strings --- apps/staking/app/register/[nodeId]/NodeRegistrationForm.tsx | 2 +- apps/staking/app/stake/[contract]/NodeStaking.tsx | 3 ++- apps/staking/locales/en.json | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/staking/app/register/[nodeId]/NodeRegistrationForm.tsx b/apps/staking/app/register/[nodeId]/NodeRegistrationForm.tsx index b4810275..727a909e 100644 --- a/apps/staking/app/register/[nodeId]/NodeRegistrationForm.tsx +++ b/apps/staking/app/register/[nodeId]/NodeRegistrationForm.tsx @@ -231,7 +231,7 @@ export function NodeRegistrationForm({
{!isRemoteFlagLoading && isRegistrationPausedFlagEnabled ? ( - Registrations are disabled + {dictionary('disabled')} ) : null} {stakedNode ? ( <> diff --git a/apps/staking/app/stake/[contract]/NodeStaking.tsx b/apps/staking/app/stake/[contract]/NodeStaking.tsx index 9425826a..0e0e70ed 100644 --- a/apps/staking/app/stake/[contract]/NodeStaking.tsx +++ b/apps/staking/app/stake/[contract]/NodeStaking.tsx @@ -45,6 +45,7 @@ import { getContributionRangeFromContributors } from '@/lib/maths'; export default function NodeStaking({ contract }: { contract: string }) { const { data, isLoading } = useStakingBackendSuspenseQuery(getOpenNodes); + const dictionary = useTranslations('general'); const node = useMemo(() => { return data?.nodes?.find((node) => areHexesEqual(node.contract, contract)); @@ -55,7 +56,7 @@ export default function NodeStaking({ contract }: { contract: string }) { ) : node ? ( ) : ( - Node not found + {dictionary('nodeNotFound')} ); } diff --git a/apps/staking/locales/en.json b/apps/staking/locales/en.json index a690586b..6f5cfec6 100644 --- a/apps/staking/locales/en.json +++ b/apps/staking/locales/en.json @@ -10,6 +10,7 @@ "you": "You", "emptySlot": "Empty Contributor Slot", "notFound": "Not Found", + "nodeNotFound": "Node Not Found", "soon": "Soon", "now": "now" }, @@ -334,6 +335,7 @@ "maxContribution": "Max: {max}", "feeNA": "N/A", "feeNADescription": "Single contributor nodes cannot have an operator fee, as the operator already receives all rewards.", + "disabled": "Registrations are disabled", "advancedOptions": { "title": "Advanced Options", "autoRegister": "Auto-Register",