From d46d2c4e4004e64dbd61aa2b0a5923159609848b Mon Sep 17 00:00:00 2001 From: drafish Date: Wed, 9 Aug 2023 15:03:55 +0800 Subject: [PATCH 01/69] patch en locale messages for filePanel --- apps/remix-ide/src/app/tabs/locales/en/filePanel.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index ab7222713f..6724180c22 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -45,6 +45,13 @@ "filePanel.publishFolderToGist": "Publish folder to gist", "filePanel.publishFileToGist": "Publish file to gist", "filePanel.copy": "Copy", + "filePanel.copyFileName": "Copy name", + "filePanel.copyFilePath": "Copy path", + "filePanel.contractflattener": "Flatten", + "filePanel.nahmii-compiler": "Compile for Nahmii", + "filePanel.solidityumlgen": "Generate UML", + "filePanel.doc-gen": "Generate Docs", + "filePanel.solidity": "Compile", "filePanel.paste": "Paste", "filePanel.compile": "Compile", "filePanel.compileForNahmii": "Compile for Nahmii", From 887367260087971ce5c80de10d6f6bb6ebd05188 Mon Sep 17 00:00:00 2001 From: drafish Date: Wed, 9 Aug 2023 19:12:29 +0800 Subject: [PATCH 02/69] patch en locale messages for contract-selection --- .../src/app/tabs/locales/en/solidity.json | 13 ++++++++++ .../src/lib/contract-selection.tsx | 24 ++++++++++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/solidity.json b/apps/remix-ide/src/app/tabs/locales/en/solidity.json index 947bfeae94..6e7a6e45ac 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/solidity.json +++ b/apps/remix-ide/src/app/tabs/locales/en/solidity.json @@ -26,6 +26,15 @@ "solidity.generateUML": "Generate a UML diagram of your contract.", "solidity.flattenLabel": "Flatten", "solidity.generateUMLLabel": "Generate UML Diagram", + "solidity.copy": "Copy", + "solidity.copyABI": "Copy ABI to clipboard", + "solidity.copyBytecode": "Copy Bytecode to clipboard", + "solidity.unableToDisplay": "Unable to display", + "solidity.download": "Download", + "solidity.close": "Close", + "solidity.contract": "Contract", + "solidity.displayContractDetails": "Display Contract Details", + "solidity.noContractCompiled": "No Contract Compiled Yet", "solidity.Assembly": "Assembly opcodes describing the contract including corresponding solidity source code", "solidity.Opcodes": "Assembly opcodes describing the contract", "solidity.name": "Name of the compiled contract", @@ -37,5 +46,9 @@ "solidity.functionHashes": "List of declared function and their corresponding hash", "solidity.gasEstimates": "Gas estimation for each function call", "solidity.Runtime Bytecode": "Bytecode storing the state and being executed during normal contract call", + "solidity.storageLayout": "See the Storage Layout documentation.", + "solidity.devdoc": "Developer documentation (natspec)", + "solidity.userdoc": "User documentation (natspec)", + "solidity.compilerInput": "Input to the Solidity compiler", "solidity.swarmLocation": "Swarm url where all metadata information can be found (contract needs to be published first)" } diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index 9b7edb66f1..eb2fb58495 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -143,7 +143,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { } catch (e) { node = (
- Unable to display "${propertyName}": ${e.message} + "${propertyName}": ${e.message}
) } @@ -173,6 +173,9 @@ export const ContractSelection = (props: ContractSelectionProps) => { 'abi': 'ABI: describing all the functions (input/output params, scope, ...)', 'name': 'Name of the compiled contract', 'swarmLocation': 'Swarm url where all metadata information can be found (contract needs to be published first)', + 'storageLayout': 'See the Storage Layout documentation.', + 'devdoc': 'Developer documentation (natspec)', + 'userdoc': 'User documentation (natspec)', 'web3Deploy': 'Copy/paste this code to any JavaScript/Web3 console to deploy this contract' } let contractProperties: any = {} @@ -185,7 +188,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { {Object.keys(contractProperties).map((propertyName, index) => { const copyDetails = ( - + ) const questionMark = ( @@ -222,7 +225,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { _paq.push(['trackEvent', 'compiler', 'compilerDetails', 'download']) saveAs(new Blob([JSON.stringify(contractProperties, null, '\t')]), `${selectedContract}_compData.json`) } - modal(selectedContract, log, 'Download', downloadFn, true, 'Close', null) + modal(selectedContract, log, intl.formatMessage({id: 'solidity.download'}), downloadFn, true, intl.formatMessage({id: 'solidity.close'}), null) } const copyBytecode = () => { @@ -238,7 +241,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { {/* Select Compiler Version */}
{ placement="right" tooltipId="compilerLabelTooltip" tooltipClasses="text-nowrap" - tooltipText={{'Language specification available from Compiler >= v0.5.7'}} + tooltipText={ + + + + } >
{ :{' '} - Sourcify docs + {' '} &{' '} diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx index ab30f62eb4..96c194e93f 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx @@ -1,4 +1,5 @@ import React, {useState, useRef, useEffect, useReducer} from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import {initialState, reducer} from '../../reducers/assembly-items' import './styles/assembly-items.css' @@ -145,7 +146,11 @@ export const AssemblyItems = ({registerEvent}) => {
- {assemblyItems.display.length == 0 &&
No data available
} + {assemblyItems.display.length == 0 && ( +
+ +
+ )}
{assemblyItems.display.map((item, i) => { return ( diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx index 82f441adc8..e5afecc66d 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx @@ -1,4 +1,5 @@ import React, {useState, useEffect, useReducer} from 'react' // eslint-disable-line +import {useIntl} from 'react-intl' import {TreeView, TreeViewItem} from '@remix-ui/tree-view' // eslint-disable-line import {DropdownPanelProps, ExtractData, ExtractFunc} from '../../types' // eslint-disable-line import {CopyToClipboard} from '@remix-ui/clipboard' // eslint-disable-line @@ -6,6 +7,7 @@ import {initialState, reducer} from '../../reducers/calldata' import './styles/dropdown-panel.css' export const DropdownPanel = (props: DropdownPanelProps) => { + const intl = useIntl() const [calldataObj, dispatch] = useReducer(reducer, initialState) const { dropdownName, @@ -84,7 +86,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { header: '', toggleDropdown: true, message: { - innerText: 'No data available.', + innerText: intl.formatMessage({id: 'debugger.noDataAvailable'}), display: 'block' }, dropdownContent: { @@ -189,7 +191,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { // replace 0xNaN with 0x0 copiableContent: JSON.stringify(calldata, null, '\t').replace(/0xNaN/g, '0x0'), message: { - innerText: isEmpty ? 'No data available' : '', + innerText: isEmpty ? intl.formatMessage({id: 'debugger.noDataAvailable'}) : '', display: isEmpty ? 'block' : 'none' }, updating: false, @@ -221,7 +223,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { id={'treeViewLoadMore'} data-id={'treeViewLoadMore'} className="cursor_pointer" - label="Load more" + label={intl.formatMessage({id: 'debugger.loadMore'})} onClick={() => { triggerEvent(loadMoreEvent, [data.cursor]) }} @@ -255,7 +257,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { {header} - +
From aed60b6bf4ce7f62887d791200c51a143a371c75 Mon Sep 17 00:00:00 2001 From: drafish Date: Thu, 10 Aug 2023 16:05:30 +0800 Subject: [PATCH 05/69] patch en locale messages for home-tab --- apps/remix-ide/src/app/tabs/locales/en/home.json | 9 ++++++--- .../remix-ui/home-tab/src/lib/components/homeTabFile.tsx | 4 ++-- .../home-tab/src/lib/components/homeTabLearn.tsx | 2 +- .../home-tab/src/lib/components/homeTabTitle.tsx | 2 +- .../home-tab/src/lib/components/pluginButton.tsx | 3 ++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/home.json b/apps/remix-ide/src/app/tabs/locales/en/home.json index bd6389cb30..dc76b8d547 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/home.json +++ b/apps/remix-ide/src/app/tabs/locales/en/home.json @@ -47,7 +47,7 @@ "home.remixTwitterProfile": "Remix Twitter Profile", "home.remixLinkedinProfile": "Remix Linkedin Profile", "home.remixMediumPosts": "Remix Medium Posts", - "home.remixGitterChannel": "Join us on Discord", + "home.joinUsOnDiscord": "Join us on Discord", "home.nativeIDE": "The Native IDE for Web3 Development.", "home.website": "Website", "home.documentation": "Documentation", @@ -57,7 +57,10 @@ "home.files": "Files", "home.newFile": "New File", "home.openFile": "Open File", - "home.connectToLocalhost": "Access File System", + "home.accessFileSystem": "Access File System", "home.loadFrom": "Load from", - "home.resources": "Resources" + "home.resources": "Resources", + "home.connectToLocalhost": "Connect to Localhost", + "home.seeAllTutorials": "See all tutorials", + "home.maintainedByRemix": "Maintained by Remix" } diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx index 3f406667c7..3f187e57d5 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx @@ -203,11 +203,11 @@ function HomeTabFile({plugin}: HomeTabFileProps) { placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" - tooltipText={'Connect to Localhost'} + tooltipText={} tooltipTextClasses="border bg-light text-dark p-1 pr-3" >
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx index ee851f164f..6bda55afb3 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx @@ -56,7 +56,7 @@ function HomeTabLearn({plugin}: HomeTabLearnProps) { placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" - tooltipText={'See all tutorials'} + tooltipText={} tooltipTextClasses="border bg-light text-dark p-1 pr-3" >