diff --git a/apps/remix-ide/src/app/tabs/locales/en/udapp.json b/apps/remix-ide/src/app/tabs/locales/en/udapp.json index f9ac3e8248..c2a864e32b 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/udapp.json @@ -49,5 +49,15 @@ "udapp.ok": "OK", "udapp.alert": "Alert", "udapp.proceed": "Proceed", - "udapp.cancel": "Cancel" + "udapp.cancel": "Cancel", + "udapp.parameters": "Parameters", + "udapp.copyParameters": "Copy encoded input parameters to clipboard", + "udapp.copyCalldata": "Copy calldata to clipboard", + "udapp.deployWithProxy": "Deploy with Proxy", + "udapp.upgradeWithProxy": "Upgrade with Proxy", + "udapp.useLastDeployedERC1967Contract": "Use last deployed ERC1967 contract", + "udapp.proxyAddressLabel": "Proxy Address", + "udapp.proxyAddressPlaceholder": "proxy address", + "udapp.proxyAddressInputTooltip": "Enter previously deployed proxy address on the selected network", + "udapp.proxyAddressTooltip": "Select this option to use the last deployed ERC1967 contract on the current network." } diff --git a/apps/remix-ide/src/app/tabs/locales/zh/udapp.json b/apps/remix-ide/src/app/tabs/locales/zh/udapp.json index 86bc6c5d50..e60a8303c3 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/zh/udapp.json @@ -49,5 +49,15 @@ "udapp.ok": "确认", "udapp.alert": "警告", "udapp.proceed": "继续", - "udapp.cancel": "取消" + "udapp.cancel": "取消", + "udapp.parameters": "参数", + "udapp.copyParameters": "复制已编码的输入参数到粘贴板", + "udapp.copyCalldata": "复制 calldata 到粘贴板", + "udapp.deployWithProxy": "使用代理部署", + "udapp.upgradeWithProxy": "使用代理升级", + "udapp.useLastDeployedERC1967Contract": "使用最新的已部署的 ERC1967 合约", + "udapp.proxyAddressLabel": "代理地址", + "udapp.proxyAddressPlaceholder": "代理地址", + "udapp.proxyAddressInputTooltip": "输入先前在所选网络上部署的代理地址", + "udapp.proxyAddressTooltip": "选择此选项可使用当前网络上最后部署的 ERC1967 合约。" } diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 480eebc0e8..137ce28add 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -1,5 +1,6 @@ // eslint-disable-next-line no-use-before-define import React, { useEffect, useRef, useState } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import * as remixLib from '@remix-project/remix-lib' import { ContractGUIProps } from '../types' import { CopyToClipboard } from '@remix-ui/clipboard' @@ -26,6 +27,7 @@ export function ContractGUI (props: ContractGUIProps) { const multiFields = useRef>([]) const initializeFields = useRef>([]) const basicInputRef = useRef() + const intl = useIntl() useEffect(() => { if (props.deployOption && Array.isArray(props.deployOption)) { @@ -238,7 +240,7 @@ export function ContractGUI (props: ContractGUIProps) { const handleSetProxyAddress = (e) => { const value = e.target.value - + setProxyAddress(value) } @@ -367,7 +369,7 @@ export function ContractGUI (props: ContractGUIProps) {
- Deploy with Proxy +
@@ -497,7 +499,7 @@ export function ContractGUI (props: ContractGUIProps) { data-id="contractGUIUpgradeImplementationLabel" className="m-0 form-check-label custom-control-label udapp_checkboxAlign" > - Upgrade with Proxy +
@@ -527,7 +529,7 @@ export function ContractGUI (props: ContractGUIProps) { checked={useLastProxy} /> } tooltipId="proxyAddressTooltip" placement="auto" tooltipClasses="text-wrap" @@ -538,7 +540,7 @@ export function ContractGUI (props: ContractGUIProps) { className="m-0 form-check-label custom-control-label udapp_checkboxAlign" style={{ fontSize: 12 }} > - Use last deployed ERC1967 contract + @@ -546,10 +548,10 @@ export function ContractGUI (props: ContractGUIProps) { !useLastProxy ?
- - validateProxyAddress(proxyAddress) } /> + }> + validateProxyAddress(proxyAddress) } /> { proxyAddressError && { proxyAddressError } }
: