From bdb44e0be17aa1403bf2694b3008e1e04c1f5f7e Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 8 Jan 2025 21:32:10 +0100 Subject: [PATCH] added translations in some missed elements --- .../src/app/components/ConfigInput.tsx | 8 +++----- .../src/app/components/ConstructorArguments.tsx | 11 +++++++++-- .../src/app/components/ContractDropdown.tsx | 3 ++- .../src/app/components/SearchableChainDropdown.tsx | 4 +++- .../src/app/tabs/locales/en/contractverification.json | 5 ++++- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/apps/contract-verification/src/app/components/ConfigInput.tsx b/apps/contract-verification/src/app/components/ConfigInput.tsx index c6ec27974e4..b190c18ffd2 100644 --- a/apps/contract-verification/src/app/components/ConfigInput.tsx +++ b/apps/contract-verification/src/app/components/ConfigInput.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react' import { CustomTooltip } from '@remix-ui/helper' -import { FormattedMessage } from 'react-intl' +import { FormattedMessage, useIntl } from 'react-intl' interface ConfigInputProps { label: string @@ -14,6 +14,7 @@ interface ConfigInputProps { export const ConfigInput: React.FC = ({ label, id, secret, initialValue, saveResult }) => { const [value, setValue] = useState(initialValue) const [enabled, setEnabled] = useState(false) + const intl = useIntl() // Reset state when initialValue changes useEffect(() => { @@ -43,10 +44,7 @@ export const ConfigInput: React.FC = ({ label, id, secret, ini type={secret ? 'password' : 'text'} className={`form-control small w-100 ${!enabled ? 'bg-transparent pl-0 border-0' : ''}`} id={id} - placeholder={`${}`} + placeholder={intl.formatMessage({ id: "contract-verification.configInputPlaceholder", defaultMessage: "Enter API Key" }, { label })} value={value} onChange={(e) => setValue(e.target.value)} disabled={!enabled} diff --git a/apps/contract-verification/src/app/components/ConstructorArguments.tsx b/apps/contract-verification/src/app/components/ConstructorArguments.tsx index e2a4239eaae..b75fc343173 100644 --- a/apps/contract-verification/src/app/components/ConstructorArguments.tsx +++ b/apps/contract-verification/src/app/components/ConstructorArguments.tsx @@ -3,6 +3,7 @@ import { ethers } from 'ethers' import { AppContext } from '../AppContext' import { ContractDropdownSelection } from './ContractDropdown' +import { FormattedMessage } from 'react-intl' interface ConstructorArgumentsProps { abiEncodedConstructorArgs: string @@ -102,7 +103,10 @@ export const ConstructorArguments: React.FC = ({ abiE
setToggleRawInput(!toggleRawInput)} />
{toggleRawInput ? ( @@ -122,7 +126,10 @@ export const ConstructorArguments: React.FC = ({ abiE {abiEncodedConstructorArgs && (