diff --git a/.circleci/config.yml b/.circleci/config.yml index d5717a7e1c..7f101ed684 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -169,6 +169,11 @@ jobs: - run: ls -la ./dist/apps/remix-ide/assets/js - run: yarn run selenium-install || yarn run selenium-install + - when: + condition: + equal: [ "chrome", << parameters.browser >> ] + steps: + - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium command: yarn run selenium @@ -215,6 +220,7 @@ jobs: - run: unzip ./persist/plugin-<< parameters.plugin >>.zip - run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules - run: yarn run selenium-install || yarn run selenium-install + - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium command: yarn run selenium @@ -376,7 +382,10 @@ commands: - run: name: install-chromedriver-custom-linux command: | - CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') + google-chrome --version > version.txt + VERSION=$(grep -Eo '[0-9]+\.' < version.txt | head -1) + # CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') + CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' | jq --arg v "$VERSION" '.versions[] | select(.version | startswith($v)) | .downloads.chromedriver[] | select(.platform == "linux64") | .url' | tail -n1 | tr -d '"') echo $CHROMEDRIVER_URL ZIPFILEPATH="/tmp/chromedriver.zip" echo "Downloading from $CHROMEDRIVER_URL" @@ -394,6 +403,7 @@ commands: echo Removing ZIP file rm "$ZIPFILEPATH" + rm version.txt echo Done chromedriver -v diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 841935f703..be04f3359d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,3 +93,21 @@ But in some cases, the `id` prop may not be static. For example, ``` You can't be sure there is a match key in locale file or not. So it will be better to provide a `defaultMessage` prop. + +### Should I update the non-english locale json files? +You probably will have this question when you are updating the english locale json files. + +Well, that depends. + +If you update an old json file, then you don't need to update it in other languages, because crowdin will do it for you. + +But if you add a new json file, then you have to add it in other languages, and import it in `index.js` of all languages. Because crowdin will not update `index.js`, you have to do it manually. + +### How to contribute on translations? +Remix is using crowdin to manage translations. If you want to contribute on that, you can do it on crowdin. Check the link below. + +https://crowdin.com/project/remix-translation + +There are many languages, just get into your language, and you will see a folder named `Remix UI`, where you can do the translations. + +Not only can you do the translations, you can also review it. If you agree or disagree with some translations, you can vote yes or no. If you vote no, you can comment to explain why you vote no, and give your translation. diff --git a/apps/circuit-compiler/src/profile.json b/apps/circuit-compiler/src/profile.json index 2bda2ccadb..e8395e2574 100644 --- a/apps/circuit-compiler/src/profile.json +++ b/apps/circuit-compiler/src/profile.json @@ -9,7 +9,7 @@ "url": "", "description": "Enables circuit compilation and computing a witness for ZK proofs", "icon": "https://docs.circom.io/assets/images/favicon.png", - "location": "sidePanel", + "location": "hiddenPanel", "documentation": "", "repo": "https://github.com/ethereum/remix-project/tree/master/apps/circuit-compiler", "maintainedBy": "Remix", diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 0e64b513da..38dbb553af 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -562,7 +562,7 @@ describe("Storage", function () { contractName: 'StorageWithLib', sourceName: 'contracts/StorageWithLib.sol', abi: metadata.abi, - bytecode: '0x' + metadata.data.bytecode.object, + bytecode: metadata.data.bytecode.object, deployedBytecode: '0x' + metadata.data.deployedBytecode.object, linkReferences: metadata.data.bytecode.linkReferences, deployedLinkReferences: metadata.data.deployedBytecode.linkReferences, @@ -700,7 +700,7 @@ const scriptAutoExec = { contractName: 'Lib', sourceName: 'contracts/1_Storage.sol', abi: metadataLib.abi, - bytecode: '0x' + metadataLib.data.bytecode.object, + bytecode: metadataLib.data.bytecode.object, deployedBytecode: '0x' + metadataLib.data.deployedBytecode.object, linkReferences: metadataLib.data.bytecode.linkReferences, deployedLinkReferences: metadataLib.data.deployedBytecode.linkReferences, @@ -720,7 +720,7 @@ const scriptAutoExec = { contractName: 'Storage', sourceName: 'contracts/1_Storage.sol', abi: metadata.abi, - bytecode: '0x' + metadata.data.bytecode.object, + bytecode: metadata.data.bytecode.object, deployedBytecode: '0x' + metadata.data.deployedBytecode.object, linkReferences: metadata.data.bytecode.linkReferences, deployedLinkReferences: metadata.data.deployedBytecode.linkReferences, diff --git a/apps/remix-ide/src/app/providers/abstract-provider.tsx b/apps/remix-ide/src/app/providers/abstract-provider.tsx index 97682642a3..a5185b6129 100644 --- a/apps/remix-ide/src/app/providers/abstract-provider.tsx +++ b/apps/remix-ide/src/app/providers/abstract-provider.tsx @@ -15,6 +15,7 @@ export type JsonDataResult = { jsonrpc: string // version result?: any error?: any + errorData?: any } export type RejectRequest = (error: Error) => void diff --git a/apps/remix-ide/src/app/providers/custom-vm-fork-provider.tsx b/apps/remix-ide/src/app/providers/custom-vm-fork-provider.tsx index 700456f2ba..d25208bbb9 100644 --- a/apps/remix-ide/src/app/providers/custom-vm-fork-provider.tsx +++ b/apps/remix-ide/src/app/providers/custom-vm-fork-provider.tsx @@ -1,4 +1,5 @@ import React, {useRef} from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import * as packageJson from '../../../../../package.json' import {AppModal, ModalTypes} from '@remix-ui/app' import {BasicVMProvider} from './vm-provider' @@ -32,13 +33,19 @@ export class CustomForkVMProvider extends BasicVMProvider { const body = () => { return (
- Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state. + + +
- +
- +
- Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see{' '} - - Geth Docs on rpc server - - )
geth --http --http.corsdomain https://remix.ethereum.org
+ ( + + {chunks} + + ) + }} + /> +
geth --http --http.corsdomain https://remix.ethereum.org

- To run Remix & a local Geth test node, use this command: (see{' '} - - Geth Docs on Dev mode - - ) + ( + + {chunks} + + ) + }} + />
geth --http --http.corsdomain="{window.origin}" --http.api web3,eth,debug,personal,net --vmdebug --datadir {thePath} --dev console


- WARNING: It is not safe to use the --http.corsdomain flag with a wildcard: --http.corsdomain * + {chunks}}} />

- For more info:{' '} - - Remix Docs on External HTTP Provider - + ( + + {chunks} + + ) + }} + />

External HTTP Provider Endpoint diff --git a/apps/remix-ide/src/app/providers/foundry-provider.tsx b/apps/remix-ide/src/app/providers/foundry-provider.tsx index 3ec4ee70ec..47a3c2849f 100644 --- a/apps/remix-ide/src/app/providers/foundry-provider.tsx +++ b/apps/remix-ide/src/app/providers/foundry-provider.tsx @@ -1,5 +1,6 @@ import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import {AbstractProvider} from './abstract-provider' const profile = { @@ -20,7 +21,7 @@ export class FoundryProvider extends AbstractProvider { return (
{' '} - Note: To run Anvil on your system, run: +
curl -L https://foundry.paradigm.xyz | bash
@@ -28,10 +29,16 @@ export class FoundryProvider extends AbstractProvider { anvil
- For more info, visit:{' '} - - Foundry Documentation - + ( + + {chunks} + + ) + }} + />
Anvil JSON-RPC Endpoint:
diff --git a/apps/remix-ide/src/app/providers/ganache-provider.tsx b/apps/remix-ide/src/app/providers/ganache-provider.tsx index b8cb1488b5..79bac4b853 100644 --- a/apps/remix-ide/src/app/providers/ganache-provider.tsx +++ b/apps/remix-ide/src/app/providers/ganache-provider.tsx @@ -1,5 +1,6 @@ import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import {AbstractProvider} from './abstract-provider' const profile = { @@ -20,7 +21,7 @@ export class GanacheProvider extends AbstractProvider { return (
{' '} - Note: To run Ganache on your system, run: +
yarn global add ganache
@@ -28,10 +29,16 @@ export class GanacheProvider extends AbstractProvider { ganache
- For more info, visit:{' '} - - Ganache Documentation - + ( + + {chunks} + + ) + }} + />
Ganache JSON-RPC Endpoint:
diff --git a/apps/remix-ide/src/app/providers/hardhat-provider.tsx b/apps/remix-ide/src/app/providers/hardhat-provider.tsx index 79b02a120f..0dfe1c70af 100644 --- a/apps/remix-ide/src/app/providers/hardhat-provider.tsx +++ b/apps/remix-ide/src/app/providers/hardhat-provider.tsx @@ -1,5 +1,6 @@ import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' import {AbstractProvider} from './abstract-provider' const profile = { @@ -20,15 +21,21 @@ export class HardhatProvider extends AbstractProvider { return (
{' '} - Note: To run Hardhat network node on your system, go to hardhat project folder and run command: +
npx hardhat node
- For more info, visit:{' '} - - Hardhat Documentation - + ( + + {chunks} + + ) + }} + />
Hardhat JSON-RPC Endpoint:
diff --git a/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx b/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx index 9c7e2918bb..879c468b6a 100644 --- a/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx @@ -1,5 +1,6 @@ import * as packageJson from '../../../../../package.json' import {InjectedCustomProvider} from './injected-custom-provider' +import Web3 from 'web3' const profile = { name: 'injected-ephemery-testnet-provider', @@ -27,4 +28,13 @@ export class InjectedEphemeryTestnetProvider extends InjectedCustomProvider { ] ) } + + async init() { + const chainId = await new Web3(this.rpcUrls[0]).eth.getChainId() + this.chainId = `0x${chainId.toString(16)}` + this.chainName = `Ephemery Testnet ${chainId}` + await super.init() + return {} + } + } diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index d88d9e4376..1e2482fd6c 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -101,11 +101,19 @@ export abstract class InjectedProvider extends Plugin implements IProvider { resolve({jsonrpc: '2.0', error: 'no return data provided', id: data.id}) } } catch (error) { - resolve({ - jsonrpc: '2.0', - error: error.data && error.data.message ? error.data.message : error.message, - id: data.id - }) + if (error.data && error.data.originalError && error.data.originalError.data) { + resolve({ + jsonrpc: '2.0', + error: error.data.originalError.message, + errorData: error.data.originalError.data, + id: data.id + }) + } else + resolve({ + jsonrpc: '2.0', + error: error.data && error.data.message ? error.data.message : error.message, + id: data.id + }) } } } diff --git a/apps/remix-ide/src/app/tabs/locales/en/debugger.json b/apps/remix-ide/src/app/tabs/locales/en/debugger.json index 87c22efd60..035d160461 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/debugger.json +++ b/apps/remix-ide/src/app/tabs/locales/en/debugger.json @@ -7,5 +7,19 @@ "debugger.debugLocaNodeLabel": "Force using local node", "debugger.useGeneratedSources": "Use generated sources", "debugger.debugWithGeneratedSources": "When checked, debugger will also step through the compiled .yul file if it exists.", - "debugger.introduction": "When Debugging with a transaction hash, if the contract is verified, Remix will try to fetch the source code from Sourcify or Etherscan. Put in your Etherscan API key in the Remix settings. For supported networks, please see" + "debugger.introduction": "When Debugging with a transaction hash, if the contract is verified, Remix will try to fetch the source code from Sourcify or Etherscan. Put in your Etherscan API key in the Remix settings. For supported networks, please see", + "debugger.forceToUseCurrentLocalNode": "Force the debugger to use the current local node", + "debugger.sourceLocationStatus1": "Locating breakpoint, this might take a while...", + "debugger.sourceLocationStatus2": "Source location not available, neither in Sourcify nor in Etherscan. Please make sure the Etherscan api key is provided in the settings.", + "debugger.sourcifyDocs": "Sourcify docs", + "debugger.noDataAvailable": "No data available", + "debugger.loadMore": "Load more", + "debugger.copy": "Copy", + "debugger.stepOverBack": "Step over back", + "debugger.stepBack": "Step back", + "debugger.stepInto": "Step into", + "debugger.stepOverForward": "Step over forward", + "debugger.jumpPreviousBreakpoint": "Jump to the previous breakpoint", + "debugger.jumpOut": "Jump out", + "debugger.jumpNextBreakpoint": "Jump to the next breakpoint" } 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..cdc270f480 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", @@ -66,5 +73,51 @@ "filePanel.features": "Features", "filePanel.upgradeability": "Upgradeability", "filePanel.ok": "OK", - "filePanel.cancel": "Cancel" + "filePanel.cancel": "Cancel", + "filePanel.createNewWorkspace": "create a new workspace", + "filePanel.connectToLocalhost": "connect to localhost", + "filePanel.copiedToClipboard": "Copied to clipboard {path}", + "filePanel.downloadFailed": "Download Failed", + "filePanel.downloadFailedMsg": "Unexpected error while downloading: {error}", + "filePanel.close": "Close", + "filePanel.copyFileFailed": "Copy File Failed", + "filePanel.copyFileFailedMsg": "Unexpected error while copying file: {src}", + "filePanel.copyFolderFailed": "Copy Folder Failed", + "filePanel.copyFolderFailedMsg": "Unexpected error while copying folder: {src}", + "filePanel.runScriptFailed": "Run script failed", + "filePanel.createPublicGist": "Create a public gist", + "filePanel.createPublicGistMsg1": "Are you sure you want to push changes to remote gist file on github.com?", + "filePanel.createPublicGistMsg2": "Are you sure you want to anonymously publish all your files in the {path} folder as a public gist on github.com?", + "filePanel.createPublicGistMsg3": "Are you sure you want to anonymously publish {path} file as a public gist on github.com?", + "filePanel.createPublicGistMsg4": "Are you sure you want to anonymously publish all your files in the {name} workspace as a public gist on github.com?", + "filePanel.deleteMsg": "Are you sure you want to delete", + "filePanel.theseItems": "these items", + "filePanel.thisItem": "this item", + "filePanel.deleteItems": "Delete items", + "filePanel.deleteItem": "Delete item", + "filePanel.globalToast": "Cannot write/modify file system in read only mode.", + "filePanel.basic": "Basic", + "filePanel.blank": "Blank", + "filePanel.multiSigWallet": "MultiSig Wallet", + "filePanel.mintable": "Mintable", + "filePanel.burnable": "Burnable", + "filePanel.pausable": "Pausable", + "filePanel.transparent": "Transparent", + "filePanel.initGitRepoTitle": "Check option to initialize workspace as a new git repository", + "filePanel.switchToBranchTitle1": "Checkout new branch from remote branch", + "filePanel.switchToBranchTitle2": "Checkout to local branch", + "filePanel.readOnly": "read-only", + "filePanel.renameFileFailed": "Rename File Failed", + "filePanel.renameFileFailedMsg": "Unexpected error while renaming: {error}", + "filePanel.fileCreationFailed": "File Creation Failed", + "filePanel.folderCreationFailed": "Folder Creation Failed", + "filePanel.validationError": "Validation Error", + "filePanel.validationErrorMsg": "Special characters are not allowed", + "filePanel.reservedKeyword": "Reserved Keyword", + "filePanel.reservedKeywordMsg": "File name contains Remix reserved keywords. \"{content}\"", + "filePanel.movingFileFailed": "Moving File Failed", + "filePanel.movingFileFailedMsg": "Unexpected error while moving file: {src}", + "filePanel.movingFolderFailed": "Moving Folder Failed", + "filePanel.movingFolderFailedMsg": "Unexpected error while moving folder: {src}", + "filePanel.workspaceActions": "Workspace actions" } 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/apps/remix-ide/src/app/tabs/locales/en/index.js b/apps/remix-ide/src/app/tabs/locales/en/index.js index a5b807a902..4d56affa4f 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/index.js +++ b/apps/remix-ide/src/app/tabs/locales/en/index.js @@ -10,6 +10,9 @@ import terminalJson from './terminal.json'; import udappJson from './udapp.json'; import solidityUnitTestingJson from './solidityUnitTesting.json'; import permissionHandlerJson from './permissionHandler.json'; +import solUmlGenJson from './solUmlGen.json' +import remixAppJson from './remixApp.json' +import remixUiTabsJson from './remixUiTabs.json' export default { ...debuggerJson, @@ -24,4 +27,7 @@ export default { ...udappJson, ...solidityUnitTestingJson, ...permissionHandlerJson, + ...solUmlGenJson, + ...remixAppJson, + ...remixUiTabsJson, } diff --git a/apps/remix-ide/src/app/tabs/locales/en/panel.json b/apps/remix-ide/src/app/tabs/locales/en/panel.json index 070dbbd57f..c9ad7d8d05 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/panel.json @@ -2,5 +2,9 @@ "panel.author": "Author", "panel.maintainedBy": "Maintained By", "panel.documentation": "Documentation", - "panel.description": "Description" + "panel.description": "Description", + "panel.maintainedByRemix": "Maintained by Remix", + "panel.pluginInfo": "Plugin info", + "panel.linkToDoc": "Link to documentation", + "panel.makeAnissue": "Make an issue" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json b/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json index 01287713d6..de15f35427 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json +++ b/apps/remix-ide/src/app/tabs/locales/en/pluginManager.json @@ -19,6 +19,10 @@ "pluginManager.localForm.sidePanel": "Side Panel", "pluginManager.localForm.mainPanel": "Main Panel", "pluginManager.localForm.none": "None", + "pluginManager.localForm.methods": "Methods", + "pluginManager.localForm.pluginNames": "Plugin names", + "pluginManager.localForm.ok": "OK", + "pluginManager.localForm.cancel": "Cancel", "pluginManager.Permissions": "Permissions", "pluginManager.permissions": "permissions", "pluginManager.pluginManagerPermissions": "Plugin Manager Permissions", @@ -27,5 +31,13 @@ "pluginManager.allow": "Allow", "pluginManager.toCall": "to call", "pluginManager.ok": "OK", - "pluginManager.cancel": "Cancel" + "pluginManager.cancel": "Cancel", + "pluginManager.maintainedByRemix": "Maintained by Remix", + "pluginManager.linkToDoc": "Link to documentation", + "pluginManager.versionAlpha": "Version Alpha", + "pluginManager.versionBeta": "Version Beta", + "pluginManager.deactivatePlugin": "Deactivate {pluginName}", + "pluginManager.activatePlugin": "Activate {pluginName}", + "pluginManager.search": "Search", + "pluginManager.managePluginsPermissions": "Manage plugins Permissions" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixApp.json b/apps/remix-ide/src/app/tabs/locales/en/remixApp.json new file mode 100644 index 0000000000..a67504f413 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/remixApp.json @@ -0,0 +1,3 @@ +{ + "remixApp.scrollToSeeAllTabs": "Scroll to see all tabs" +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json new file mode 100644 index 0000000000..1c60e9592d --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json @@ -0,0 +1,7 @@ +{ + "remixUiTabs.tooltipText1": "Run script (CTRL + SHIFT + S)", + "remixUiTabs.tooltipText2": "Compile CTRL + S", + "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile or a .ts or .js file and run it", + "remixUiTabs.zoomOut": "Zoom out", + "remixUiTabs.zoomIn": "Zoom in" +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/search.json b/apps/remix-ide/src/app/tabs/locales/en/search.json index 5bb29ab8d2..9eff38fb36 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/search.json +++ b/apps/remix-ide/src/app/tabs/locales/en/search.json @@ -10,5 +10,15 @@ "search.useRegularExpression": "Use Regular Expression", "search.replaceWithoutConfirmation": "replace without confirmation", "search.filesToInclude": "Files to include", - "search.filesToExclude": "Files to exclude" + "search.filesToExclude": "Files to exclude", + "search.toggleReplace": "Toggle Replace", + "search.replaceInFiles": "replace in files", + "search.stop": "stop", + "search.undoChanges": "Undo changes to {path}", + "search.confirmreplaceMsg": "Are you sure you want to replace \"{find}\" by \"{replace}\" in {filename}?", + "search.yes": "Yes", + "search.no": "No", + "search.loading": "Loading", + "search.text1": "showing {count} results in {fileCount} files", + "search.text2": "Too many resuls to display...{br}Please narrow down your search." } diff --git a/apps/remix-ide/src/app/tabs/locales/en/settings.json b/apps/remix-ide/src/app/tabs/locales/en/settings.json index 753a6b67e6..2752f19f75 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/settings.json +++ b/apps/remix-ide/src/app/tabs/locales/en/settings.json @@ -22,5 +22,19 @@ "settings.themes": "Themes", "settings.locales": "Language", "settings.swarm": "Swarm Settings", - "settings.ipfs": "IPFS Settings" + "settings.ipfs": "IPFS Settings", + "settings.token": "TOKEN", + "settings.copy": "Copy", + "settings.deleteEtherscanToken": "Delete Etherscan token", + "settings.username": "USERNAME", + "settings.email": "EMAIL", + "settings.deleteGithubCredentials": "Delete Github Credentials", + "settings.privateBeeAddress": "PRIVATE BEE ADDRESS", + "settings.postageStampID": "POSTAGE STAMP ID", + "settings.host": "HOST", + "settings.protocol": "PROTOCOL", + "settings.port": "PORT", + "settings.projectID": "PROJECT ID", + "settings.projectSecret": "PROJECT SECRET", + "settings.analyticsInRemix": "Analytics in Remix IDE" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/solUmlGen.json b/apps/remix-ide/src/app/tabs/locales/en/solUmlGen.json new file mode 100644 index 0000000000..5816659c8b --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/en/solUmlGen.json @@ -0,0 +1,10 @@ +{ + "solUmlGen.pngDownload": "Download as PNG", + "solUmlGen.pdfDownload": "Download as PDF", + "solUmlGen.pngDownloadTooltip": "Download UML diagram as a PNG file", + "solUmlGen.pdfDownloadTooltip": "Download UML diagram as a PDF file", + "solUmlGen.text1": "To view your contract as a UML Diagram", + "solUmlGen.text2": "Right click on your contract file", + "solUmlGen.clickOn": "Click on", + "solUmlGen.generateUML": "Generate UML" +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/solUmlgen.json b/apps/remix-ide/src/app/tabs/locales/en/solUmlgen.json deleted file mode 100644 index ca63867e93..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/en/solUmlgen.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "solUml.pngDownload": "Download as PNG", - "solUml.pdfDownload": "Download as PDF" -} \ No newline at end of file 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..ad83ce89bb 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/solidity.json +++ b/apps/remix-ide/src/app/tabs/locales/en/solidity.json @@ -1,5 +1,7 @@ { "solidity.displayName": "Solidity compiler", + + "solidity._comment_compiler-container.tsx": "libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx", "solidity.compiler": "Compiler", "solidity.addACustomCompiler": "Add a custom compiler", "solidity.addACustomCompilerWithURL": "Add a custom compiler with URL", @@ -21,11 +23,46 @@ "solidity.compile": "Compile", "solidity.noFileSelected": "no file selected", "solidity.compileAndRunScript": "Compile and Run script", + "solidity.newConfigFileTitle": "New configuration file", + "solidity.newConfigFileMessage": "The file \"{configFilePathInput}\" you entered does not exist. Do you want to create a new one?", + "solidity.create": "Create", + "solidity.ok": "OK", + "solidity.cancel": "Cancel", + "solidity.noFileSelected1": "No file selected.", + "solidity.toCompile": "to compile", + "solidity.noConfigFileSelected": "No config file selected", + "solidity.copyNatSpecTag": "Click to copy the custom NatSpec tag", + "solidity.inputTitle1": "If the file you entered does not exist you will be able to create one in the next step.", + "solidity.inputTitle2": "Estimated number of times each opcode of the deployed code will be executed across the life-time of the contract.", + "solidity.tooltipText1": "Choose the script to execute right after compilation by adding the `dev-run-script` natspec tag, as in:", + "solidity.tooltipText2": "Click the \"i\" icon to learn more", + "solidity.tooltipText3": "for compiling and script execution", + "solidity.tooltipText4": "Click to open the config file", + "solidity.tooltipText5": "Cannot load compiler version list. It might have been blocked by an advertisement blocker. Please try deactivating any of them from this page and reload. Error: ", + "solidity.tooltipText6": "Language specification available from Compiler >= v0.5.7", + "solidity.toastMessage": "Updating compiler version to match current contract file pragma i.e {version}", + "solidity.compileIconAttribute": "compiler is loading, please wait a few moments.", + "solidity.compilerLicense": "Compiler License", + "solidity.compilerLicenseMsg1": "Compiler is loading. License will be displayed once compiler is loaded", + "solidity.compilerLicenseMsg2": "Could not retreive license for selected compiler version", + "solidity.compilerLicenseMsg3": "License not available", + "solidity.seeCompilerLicense": "See compiler license", + + "solidity._comment_contract-selection.tsx": "libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx", "solidity.publishOn": "Publish on", "solidity.flatten": "Flatten contracts before UML generation.", "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 +74,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/apps/remix-ide/src/app/tabs/locales/en/solidityUnitTesting.json b/apps/remix-ide/src/app/tabs/locales/en/solidityUnitTesting.json index f1080804b6..108883dfe9 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/solidityUnitTesting.json +++ b/apps/remix-ide/src/app/tabs/locales/en/solidityUnitTesting.json @@ -31,5 +31,11 @@ "solidityUnitTesting.assertion": "Assertion", "solidityUnitTesting.expectedValueShouldBe": "Expected value should be", "solidityUnitTesting.receivedValue": "Received value", - "solidityUnitTesting.skippingTheRemainingTests": "Skipping the remaining tests of the function." + "solidityUnitTesting.skippingTheRemainingTests": "Skipping the remaining tests of the function.", + "solidityUnitTesting.toasterMsg": "Folder created successfully", + "solidityUnitTesting.tooltipText1": "At least one contract test failed", + "solidityUnitTesting.tooltipText2": "All contract tests passed", + "solidityUnitTesting.tooltipText3": "Start debugging", + "solidityUnitTesting.fail": "FAIL", + "solidityUnitTesting.pass": "PASS" } diff --git a/apps/remix-ide/src/app/tabs/locales/en/terminal.json b/apps/remix-ide/src/app/tabs/locales/en/terminal.json index a175436686..64a2ac2cab 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/terminal.json +++ b/apps/remix-ide/src/app/tabs/locales/en/terminal.json @@ -13,5 +13,31 @@ "terminal.welcomeText7": "Select a Javascript file in the file explorer and then run `remix.execute()` or `remix.exeCurrent()` in the command line interface", "terminal.welcomeText8": "Right click on a JavaScript file in the file explorer and then click `Run`", "terminal.welcomeText9": "The following libraries are accessible", - "terminal.welcomeText10": "Type the library name to see available commands" + "terminal.welcomeText10": "Type the library name to see available commands", + "terminal.text1": "This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.", + "terminal.hideTerminal": "Hide Terminal", + "terminal.showTerminal": "Show Terminal", + "terminal.clearConsole": "Clear console", + "terminal.pendingTransactions": "Pending Transactions", + "terminal.toasterMsg1": "no content to execute", + "terminal.toasterMsg2": "provider for path {fileName} not found", + "terminal.vmMode": "VM mode", + "terminal.vmModeMsg": "Cannot debug this call. Debugging calls is only possible in Remix VM mode.", + "terminal.ok": "Ok", + "terminal.cancel": "Cancel", + "terminal.callWarning": "(Cost only applies when called by a contract)", + "terminal.msg1": "Transaction mined but execution failed", + "terminal.msg2": "Transaction mined and execution succeed", + "terminal.msg3": "Status not available at the moment", + "terminal.status": "status", + "terminal.transactionHash": "transaction hash", + "terminal.blockHash": "block hash", + "terminal.blockNumber": "block number", + "terminal.contractAddress": "contract address", + "terminal.transactionCost": "transaction cost", + "terminal.executionCost": "execution cost", + "terminal.input": "input", + "terminal.decodedInput": "decoded input", + "terminal.decodedOutput": "decoded output", + "terminal.logs": "logs" } 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 55932a00fb..d2e2af9193 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/udapp.json @@ -1,23 +1,22 @@ { "udapp.displayName": "Deploy & run transactions", + + "udapp._comment_gasPrice.tsx": "libs/remix-ui/run-tab/src/lib/components/gasPrice.tsx", "udapp.gasLimit": "Gas limit", - "udapp.account": "Account", + "udapp.tooltipText4": "The default gas limit is 3M. Adjust as needed.", + + "udapp._comment_value.tsx": "libs/remix-ui/run-tab/src/lib/components/value.tsx", "udapp.value": "Value", + "udapp.tooltipText5": "Enter an amount and choose its unit", + + "udapp._comment_contractDropdownUI.tsx": "libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx", "udapp.contract": "Contract", "udapp.compiledBy": "compiled by {compilerName}", "udapp.warningEvmVersion": "Please make sure that the current network is compatible with this evm version: {evmVersion}. Otherwise any deployment will fail.", "udapp.infoSyncCompiledContractTooltip": "Click here to import contracts compiled from an external framework.This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.", "udapp.remixIpfsUdappTooltip": "Publishing the source code and metadata to IPFS facilitates source code verification using Sourcify and will greatly foster contract adoption (auditing, debugging, calling it, etc...)", - "udapp.signAMessage": "Sign a message", - "udapp.enterAMessageToSign": "Enter a message to sign", - "udapp.hash": "hash", - "udapp.signature": "signature", - "udapp.signedMessage": "Signed Message", - "udapp.environment": "Environment", - "udapp.environmentDocs": "Click for docs about Environment", "udapp.deploy": "Deploy", "udapp.publishTo": "Publish to", - "udapp.or": "or", "udapp.atAddress": "At Address", "udapp.atAddressOptionsTitle1": "address of contract", "udapp.atAddressOptionsTitle2": "Interact with the deployed contract - requires the .abi file or compiled .sol file to be selected in the editor (with the same compiler configuration)", @@ -34,9 +33,44 @@ "udapp.noCompiledContracts": "No compiled contracts", "udapp.addressOfContract": "Address of contract", "udapp.loadContractFromAddress": "Load contract from Address", + "udapp.ok": "OK", + "udapp.alert": "Alert", + "udapp.proceed": "Proceed", + "udapp.cancel": "Cancel", + "udapp.abiFileSelected": "ABI file selected", + "udapp.evmVersion": "evm version", + "udapp.addressNotValid": "The address is not valid", + + "udapp._comment_account.tsx": "libs/remix-ui/run-tab/src/lib/components/account.tsx", + "udapp.account": "Account", + "udapp.signAMessage": "Sign a message", + "udapp.enterAMessageToSign": "Enter a message to sign", + "udapp.hash": "hash", + "udapp.signature": "signature", + "udapp.injectedTitle": "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type).", + "udapp.createNewAccount": "Create a new account", + "udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.", + "udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).", + "udapp.text1": "Please provide a Passphrase for the account creation", + "udapp.tooltipText1": "Account list is empty, please make sure the current provider is properly connected to remix", + "udapp.modalTitle1": "Passphrase to sign a message", + "udapp.modalMessage1": "Enter your passphrase for this account to sign the message", + "udapp.copyAccount": "Copy account to clipboard", + "udapp.signMsgUsingAccount": "Sign a message using this account", + + "udapp._comment_environment.tsx": "libs/remix-ui/run-tab/src/lib/components/environment.tsx", + "udapp.environment": "Environment", + "udapp.environmentDocs": "Click for docs about Environment", + "udapp.tooltipText2": "Open chainlist.org and get the connection specs of the chain you want to interact with.", + "udapp.tooltipText3": "Click to open a bridge for converting L1 mainnet ETH to the selected network currency.", + + "udapp._comment_instanceContainerUI.tsx": "libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx", "udapp.deployedContracts": "Deployed Contracts", "udapp.deployAndRunClearInstances": "Clear instances list and reset recorder", "udapp.deployAndRunNoInstanceText": "Currently you have no contract instances to interact with.", + "udapp.tooltipText6": "Autogenerated generic user interfaces for interaction with deployed contracts", + + "udapp._comment_recorderCardUI.tsx": "libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx", "udapp.transactionsRecorded": "Transactions recorded", "udapp.transactionsCountTooltip": "The number of recorded transactions", "udapp.transactionSaveTooltip1": "No transactions to save", @@ -48,18 +82,70 @@ "udapp.runRecorderTooltip": "Run transaction(s) from the current scenario file", "udapp.save": "Save", "udapp.run": "Run", - "udapp.ok": "OK", - "udapp.alert": "Alert", - "udapp.proceed": "Proceed", - "udapp.cancel": "Cancel", + + "udapp._comment_contractGUI.tsx": "libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx", "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." + "udapp.getEncodedCallError": "cannot encode empty arguments", + "udapp.proxyAddressError1": "proxy address cannot be empty", + "udapp.proxyAddressError2": "not a valid contract address", + "udapp.tooltipText11": "Proxy address cannot be empty", + "udapp.tooltipText12": "Input required", + "udapp.tooltipText13": "Deployed {date}", + + "udapp._comment_universalDappUI.tsx": "libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx", + "udapp.tooltipText7": "Remove from the list", + "udapp.tooltipText8": "Click for docs about using 'receive'/'fallback'", + "udapp.tooltipText9": "The Calldata to send to fallback function of the contract.", + "udapp.tooltipText10": "Send data to contract.", + "udapp.balance": "Balance", + "udapp.lowLevelInteractions": "Low level interactions", + "udapp.llIError1": "Value to send should be a number", + "udapp.llIError2": "In order to receive Ether transfer the contract should have either 'receive' or payable 'fallback' function", + "udapp.llIError3": "The calldata should be a valid hexadecimal value with size of at least one byte.", + "udapp.llIError4": "The calldata should be a valid hexadecimal value.", + "udapp.llIError5": "'Fallback' function is not defined", + "udapp.llIError6": "Both 'receive' and 'fallback' functions are not defined", + "udapp.llIError7": "Please define a 'Fallback' function to send calldata and a either 'Receive' or payable 'Fallback' to send ethers", + "udapp.copy": "Copy", + + "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", + "udapp.mainnetText1": "You are about to create a transaction on {name} Network. Confirm the details to send the info to your provider.", + "udapp.mainnetText2": "The provider for many users is MetaMask. The provider will ask you to sign the transaction before it is sent to {name} Network.", + "udapp.amount": "Amount", + "udapp.gasEstimation": "Gas estimation", + "udapp.maxPriorityFee": "Max Priority fee", + "udapp.maxFee": "Max fee (Not less than base fee {baseFeePerGas} Gwei)", + "udapp.contractCreation": "Contract Creation", + "udapp.transactionFee": "Transaction is invalid. Max fee should not be less than Base fee", + "udapp.title1": "Represents the part of the tx fee that goes to the miner.", + "udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimun needs to be set to base fee.", + "udapp.gasPrice": "Gas price", + "udapp.gweiText": "visit {a} for current gas price info.", + "udapp.maxTransactionFee": "Max transaction fee", + "udapp.mainnetText3": "Do not show this warning again.", + + "udapp._comment_run-tab.tsx": "libs/remix-ui/run-tab/src/lib/run-tab.tsx", + "udapp.gasEstimationPromptText": "Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?", + + "udapp._comment_custom-dropdown.tsx": "libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx", + "udapp.enterProxyAddress": "Enter Proxy Address", + + "udapp._comment_provider": "apps/remix-ide/src/app/providers", + "udapp.customVmForkProviderText": "Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state.", + "udapp.nodeUrl": "Node URL", + "udapp.blockNumber": "Block number (or \"latest\")", + "udapp.externalHttpProviderText1": "Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see Geth Docs on rpc server)", + "udapp.externalHttpProviderText2": "To run Remix & a local Geth test node, use this command: (see Geth Docs on Dev mode)", + "udapp.externalHttpProviderText3": "WARNING: It is not safe to use the --http.corsdomain flag with a wildcard: --http.corsdomain *", + "udapp.externalHttpProviderText4": "For more info: Remix Docs on External HTTP Provider", + "udapp.foundryProviderText1": "Note: To run Anvil on your system, run:", + "udapp.foundryProviderText2": "For more info, visit: Foundry Documentation", + "udapp.ganacheProviderText1": "Note: To run Ganache on your system, run:", + "udapp.ganacheProviderText2": "For more info, visit: Ganache Documentation", + "udapp.hardhatProviderText1": "Note: To run Hardhat network node on your system, go to hardhat project folder and run command:", + "udapp.hardhatProviderText2": "For more info, visit: Hardhat Documentation" } diff --git a/apps/remix-ide/src/app/tabs/locales/es/index.js b/apps/remix-ide/src/app/tabs/locales/es/index.js new file mode 100644 index 0000000000..ded9c45b14 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/es/index.js @@ -0,0 +1,36 @@ +import debuggerJson from './debugger.json'; +import filePanelJson from './filePanel.json'; +import homeJson from './home.json'; +import panelJson from './panel.json'; +import pluginManagerJson from './pluginManager.json'; +import searchJson from './search.json'; +import settingsJson from './settings.json'; +import solidityJson from './solidity.json'; +import terminalJson from './terminal.json'; +import udappJson from './udapp.json'; +import solidityUnitTestingJson from './solidityUnitTesting.json'; +import permissionHandlerJson from './permissionHandler.json'; +import solUmlGenJson from './solUmlGen.json' +import remixAppJson from './remixApp.json' +import remixUiTabsJson from './remixUiTabs.json' +import enJson from '../en'; + +// There may have some un-translated content. Always fill in the gaps with EN JSON. +// No need for a defaultMessage prop when render a FormattedMessage component. +export default Object.assign({}, enJson, { + ...debuggerJson, + ...filePanelJson, + ...homeJson, + ...panelJson, + ...pluginManagerJson, + ...searchJson, + ...settingsJson, + ...solidityJson, + ...terminalJson, + ...udappJson, + ...solidityUnitTestingJson, + ...permissionHandlerJson, + ...solUmlGenJson, + ...remixAppJson, + ...remixUiTabsJson, +}) diff --git a/apps/remix-ide/src/app/tabs/locales/es/remixApp.json b/apps/remix-ide/src/app/tabs/locales/es/remixApp.json new file mode 100644 index 0000000000..a67504f413 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/es/remixApp.json @@ -0,0 +1,3 @@ +{ + "remixApp.scrollToSeeAllTabs": "Scroll to see all tabs" +} diff --git a/apps/remix-ide/src/app/tabs/locales/es/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/es/remixUiTabs.json new file mode 100644 index 0000000000..1c60e9592d --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/es/remixUiTabs.json @@ -0,0 +1,7 @@ +{ + "remixUiTabs.tooltipText1": "Run script (CTRL + SHIFT + S)", + "remixUiTabs.tooltipText2": "Compile CTRL + S", + "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile or a .ts or .js file and run it", + "remixUiTabs.zoomOut": "Zoom out", + "remixUiTabs.zoomIn": "Zoom in" +} diff --git a/apps/remix-ide/src/app/tabs/locales/es/solUmlGen.json b/apps/remix-ide/src/app/tabs/locales/es/solUmlGen.json new file mode 100644 index 0000000000..5816659c8b --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/es/solUmlGen.json @@ -0,0 +1,10 @@ +{ + "solUmlGen.pngDownload": "Download as PNG", + "solUmlGen.pdfDownload": "Download as PDF", + "solUmlGen.pngDownloadTooltip": "Download UML diagram as a PNG file", + "solUmlGen.pdfDownloadTooltip": "Download UML diagram as a PDF file", + "solUmlGen.text1": "To view your contract as a UML Diagram", + "solUmlGen.text2": "Right click on your contract file", + "solUmlGen.clickOn": "Click on", + "solUmlGen.generateUML": "Generate UML" +} diff --git a/apps/remix-ide/src/app/tabs/locales/es/solUmlgen.json b/apps/remix-ide/src/app/tabs/locales/es/solUmlgen.json deleted file mode 100644 index ca63867e93..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/es/solUmlgen.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "solUml.pngDownload": "Download as PNG", - "solUml.pdfDownload": "Download as PDF" -} \ No newline at end of file diff --git a/apps/remix-ide/src/app/tabs/locales/fr/index.js b/apps/remix-ide/src/app/tabs/locales/fr/index.js new file mode 100644 index 0000000000..ded9c45b14 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/fr/index.js @@ -0,0 +1,36 @@ +import debuggerJson from './debugger.json'; +import filePanelJson from './filePanel.json'; +import homeJson from './home.json'; +import panelJson from './panel.json'; +import pluginManagerJson from './pluginManager.json'; +import searchJson from './search.json'; +import settingsJson from './settings.json'; +import solidityJson from './solidity.json'; +import terminalJson from './terminal.json'; +import udappJson from './udapp.json'; +import solidityUnitTestingJson from './solidityUnitTesting.json'; +import permissionHandlerJson from './permissionHandler.json'; +import solUmlGenJson from './solUmlGen.json' +import remixAppJson from './remixApp.json' +import remixUiTabsJson from './remixUiTabs.json' +import enJson from '../en'; + +// There may have some un-translated content. Always fill in the gaps with EN JSON. +// No need for a defaultMessage prop when render a FormattedMessage component. +export default Object.assign({}, enJson, { + ...debuggerJson, + ...filePanelJson, + ...homeJson, + ...panelJson, + ...pluginManagerJson, + ...searchJson, + ...settingsJson, + ...solidityJson, + ...terminalJson, + ...udappJson, + ...solidityUnitTestingJson, + ...permissionHandlerJson, + ...solUmlGenJson, + ...remixAppJson, + ...remixUiTabsJson, +}) diff --git a/apps/remix-ide/src/app/tabs/locales/fr/remixApp.json b/apps/remix-ide/src/app/tabs/locales/fr/remixApp.json new file mode 100644 index 0000000000..a67504f413 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/fr/remixApp.json @@ -0,0 +1,3 @@ +{ + "remixApp.scrollToSeeAllTabs": "Scroll to see all tabs" +} diff --git a/apps/remix-ide/src/app/tabs/locales/fr/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/fr/remixUiTabs.json new file mode 100644 index 0000000000..1c60e9592d --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/fr/remixUiTabs.json @@ -0,0 +1,7 @@ +{ + "remixUiTabs.tooltipText1": "Run script (CTRL + SHIFT + S)", + "remixUiTabs.tooltipText2": "Compile CTRL + S", + "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile or a .ts or .js file and run it", + "remixUiTabs.zoomOut": "Zoom out", + "remixUiTabs.zoomIn": "Zoom in" +} diff --git a/apps/remix-ide/src/app/tabs/locales/fr/solUmlGen.json b/apps/remix-ide/src/app/tabs/locales/fr/solUmlGen.json new file mode 100644 index 0000000000..5816659c8b --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/fr/solUmlGen.json @@ -0,0 +1,10 @@ +{ + "solUmlGen.pngDownload": "Download as PNG", + "solUmlGen.pdfDownload": "Download as PDF", + "solUmlGen.pngDownloadTooltip": "Download UML diagram as a PNG file", + "solUmlGen.pdfDownloadTooltip": "Download UML diagram as a PDF file", + "solUmlGen.text1": "To view your contract as a UML Diagram", + "solUmlGen.text2": "Right click on your contract file", + "solUmlGen.clickOn": "Click on", + "solUmlGen.generateUML": "Generate UML" +} diff --git a/apps/remix-ide/src/app/tabs/locales/fr/solUmlgen.json b/apps/remix-ide/src/app/tabs/locales/fr/solUmlgen.json deleted file mode 100644 index ca63867e93..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/fr/solUmlgen.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "solUml.pngDownload": "Download as PNG", - "solUml.pdfDownload": "Download as PDF" -} \ No newline at end of file diff --git a/apps/remix-ide/src/app/tabs/locales/zh/index.js b/apps/remix-ide/src/app/tabs/locales/zh/index.js index 6b77c72871..ded9c45b14 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/index.js +++ b/apps/remix-ide/src/app/tabs/locales/zh/index.js @@ -10,6 +10,9 @@ import terminalJson from './terminal.json'; import udappJson from './udapp.json'; import solidityUnitTestingJson from './solidityUnitTesting.json'; import permissionHandlerJson from './permissionHandler.json'; +import solUmlGenJson from './solUmlGen.json' +import remixAppJson from './remixApp.json' +import remixUiTabsJson from './remixUiTabs.json' import enJson from '../en'; // There may have some un-translated content. Always fill in the gaps with EN JSON. @@ -27,4 +30,7 @@ export default Object.assign({}, enJson, { ...udappJson, ...solidityUnitTestingJson, ...permissionHandlerJson, + ...solUmlGenJson, + ...remixAppJson, + ...remixUiTabsJson, }) diff --git a/apps/remix-ide/src/app/tabs/locales/zh/remixApp.json b/apps/remix-ide/src/app/tabs/locales/zh/remixApp.json new file mode 100644 index 0000000000..f573c11f1e --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/zh/remixApp.json @@ -0,0 +1,3 @@ +{ + "remixApp.scrollToSeeAllTabs": "滚动查看所有标签页" +} diff --git a/apps/remix-ide/src/app/tabs/locales/zh/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/zh/remixUiTabs.json new file mode 100644 index 0000000000..f82e072207 --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/zh/remixUiTabs.json @@ -0,0 +1,7 @@ +{ + "remixUiTabs.tooltipText1": "执行脚本 (CTRL + SHIFT + S)", + "remixUiTabs.tooltipText2": "编译 CTRL + S", + "remixUiTabs.tooltipText3": "选择 .sol 或 .yul 文件进行编译,或选择 .ts 或 .js 文件并运行它", + "remixUiTabs.zoomOut": "缩小", + "remixUiTabs.zoomIn": "放大" +} diff --git a/apps/remix-ide/src/app/tabs/locales/zh/solUmlGen.json b/apps/remix-ide/src/app/tabs/locales/zh/solUmlGen.json new file mode 100644 index 0000000000..aa58e68fec --- /dev/null +++ b/apps/remix-ide/src/app/tabs/locales/zh/solUmlGen.json @@ -0,0 +1,10 @@ +{ + "solUmlGen.pngDownload": "下载 PNG", + "solUmlGen.pdfDownload": "下载 PDF", + "solUmlGen.pngDownloadTooltip": "将 UML 图下载为 PNG 文件", + "solUmlGen.pdfDownloadTooltip": "将 UML 图下载为 PDF 文件", + "solUmlGen.text1": "以 UML 图查看您的合约", + "solUmlGen.text2": "右键单击您的合约文件", + "solUmlGen.clickOn": "点击", + "solUmlGen.generateUML": "生成 UML" +} diff --git a/apps/remix-ide/src/app/tabs/locales/zh/solUmlgen.json b/apps/remix-ide/src/app/tabs/locales/zh/solUmlgen.json deleted file mode 100644 index ca63867e93..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/zh/solUmlgen.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "solUml.pngDownload": "Download as PNG", - "solUml.pdfDownload": "Download as PDF" -} \ No newline at end of file diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index bd1ebaedd0..7d8b71f0bf 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -945,13 +945,12 @@ export class Blockchain extends Plugin { ? toBuffer(execResult.returnValue) : toBuffer(addHexPrefix(txResult.result) || '0x0000000000000000000000000000000000000000000000000000000000000000') const compiledContracts = await this.call('compilerArtefacts', 'getAllContractDatas') - const vmError = txExecution.checkVMError(execResult, compiledContracts) + const vmError = txExecution.checkError({ errorMessage: execResult.exceptionError ? execResult.exceptionError.error : '', errorData: execResult.returnValue }, compiledContracts) if (vmError.error) { return cb(vmError.message) } } } - if (!isVM && tx && tx.useCall) { returnValue = toBuffer(addHexPrefix(txResult.result)) } @@ -963,7 +962,17 @@ export class Blockchain extends Plugin { cb(null, txResult, address, returnValue) } catch (error) { - cb(error) + if (this.isInjectedWeb3()) { + let errorObj = error.replace('Returned error: ', '') + errorObj = JSON.parse(errorObj) + if (errorObj.errorData) { + const compiledContracts = await this.call('compilerArtefacts', 'getAllContractDatas') + const injectedError = txExecution.checkError({ errorMessage: errorObj.error, errorData: errorObj.errorData }, compiledContracts) + cb(injectedError.message) + } else + cb(error) + } else + cb(error) } } } diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 3db6ed2a5e..8f31a868bc 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -72,7 +72,8 @@ const requiredModules = [ 'codeFormatter', 'solidityumlgen', 'contractflattener', - 'solidity-script' + 'solidity-script', + 'openaigpt' ] // dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd) diff --git a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts index 1592663c38..5cc8460d72 100644 --- a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts +++ b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts @@ -1,10 +1,8 @@ -export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, shouldSetFile = true, key?) => { +export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, shouldSetFile = true, etherscanKey?) => { let data const compilationTargets = {} - let etherscanKey - - if (!key) etherscanKey = await plugin.call('config', 'getAppParameter', 'etherscan-access-token') - else etherscanKey = key + if (!etherscanKey) etherscanKey = await plugin.call('config', 'getAppParameter', 'etherscan-access-token') + if (!etherscanKey) etherscanKey = '2HKUX5ZVASZIKWJM8MIQVCRUVZ6JAWT531' if (etherscanKey) { const endpoint = network.id == 1 ? 'api.etherscan.io' : 'api-' + network.name + '.etherscan.io' @@ -63,4 +61,4 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres settings, compilationTargets } -} \ No newline at end of file +} diff --git a/libs/remix-lib/src/execution/txExecution.ts b/libs/remix-lib/src/execution/txExecution.ts index 781d9733ce..267eb4de47 100644 --- a/libs/remix-lib/src/execution/txExecution.ts +++ b/libs/remix-lib/src/execution/txExecution.ts @@ -54,10 +54,11 @@ export function callFunction (from, to, data, value, gasLimit, funAbi, txRunner, /** * check if the vm has errored * - * @param {Object} execResult - execution result given by the VM + * @param {Object} execResult - execution result given by the VM, contain errorMessage and errorDate + * @param {Object} compiledContracts - Object containing contract compilation details * @return {Object} - { error: true/false, message: DOMNode } */ -export function checkVMError (execResult, compiledContracts) { +export function checkError (execResult, compiledContracts) { const errorCode = { OUT_OF_GAS: 'out of gas', STACK_UNDERFLOW: 'stack underflow', @@ -75,11 +76,11 @@ export function checkVMError (execResult, compiledContracts) { error: false, message: '' } - if (!execResult.exceptionError) { + if (!execResult.errorMessage) { return ret } - const exceptionError = execResult.exceptionError.error || '' - const error = `VM error: ${exceptionError}.\n` + const exceptionError = execResult.errorMessage || '' + const error = `Error occured: ${execResult.errorMessage}.\n` let msg if (exceptionError === errorCode.INVALID_OPCODE) { msg = '\t\n\tThe execution might have thrown.\n' @@ -87,8 +88,8 @@ export function checkVMError (execResult, compiledContracts) { } else if (exceptionError === errorCode.OUT_OF_GAS) { msg = '\tThe transaction ran out of gas. Please increase the Gas Limit.\n' ret.error = true - } else if (exceptionError === errorCode.REVERT) { - const returnData = execResult.returnValue + } else if (exceptionError === errorCode.REVERT || exceptionError === 'execution reverted') { + const returnData = execResult.errorData const returnDataHex = returnData.slice(2, 10) let customError if (compiledContracts) { @@ -172,4 +173,4 @@ export function checkVMError (execResult, compiledContracts) { } ret.message = `${error}\n${exceptionError}\n${msg}\nDebug the transaction to get more information.` return ret -} +} \ No newline at end of file diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 55e09ccfe6..89960cdc56 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -8,7 +8,7 @@ import {AppProvider} from './context/provider' import AppDialogs from './components/modals/dialogs' import DialogViewPlugin from './components/modals/dialogViewPlugin' import {AppContext} from './context/context' -import {IntlProvider} from 'react-intl' +import {IntlProvider, FormattedMessage} from 'react-intl' import {CustomTooltip} from '@remix-ui/helper' interface IRemixAppUi { @@ -104,7 +104,7 @@ const RemixApp = (props: IRemixAppUi) => { >
- + }>
diff --git a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx index a3b81f2d4a..a050280d2f 100644 --- a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx @@ -1,5 +1,6 @@ import {CustomTooltip} from '@remix-ui/helper' import React, {useState, useEffect} from 'react' // eslint-disable-line +import {useIntl} from 'react-intl' import './button-navigator.css' export const ButtonNavigation = ({ @@ -15,6 +16,7 @@ export const ButtonNavigation = ({ stepState, jumpOutDisabled }) => { + const intl = useIntl() const [state, setState] = useState({ intoBackDisabled: true, overBackDisabled: true, @@ -90,7 +92,7 @@ export const ButtonNavigation = ({ ), placement: 'top-start', tagId: 'overbackTooltip', - tooltipMsg: 'Step over back' + tooltipMsg: intl.formatMessage({id: 'debugger.stepOverBack'}) }, stepBackJSX: { markup: ( @@ -118,7 +120,7 @@ export const ButtonNavigation = ({ ), placement: 'top-start', tagId: 'intobackTooltip', - tooltipMsg: 'Step back' + tooltipMsg: intl.formatMessage({id: 'debugger.stepBack'}) }, stepIntoJSX: { @@ -147,7 +149,7 @@ export const ButtonNavigation = ({ ), placement: 'top-start', tagId: 'intoforwardTooltip', - tooltipMsg: 'Step into' + tooltipMsg: intl.formatMessage({id: 'debugger.stepInto'}) }, stepOverForwardJSX: { markup: ( @@ -174,7 +176,7 @@ export const ButtonNavigation = ({ ), placement: 'top-end', tagId: 'overbackTooltip', - tooltipMsg: 'Step over forward' + tooltipMsg: intl.formatMessage({id: 'debugger.stepOverForward'}) } } const jumpMarkupStructure = { @@ -208,7 +210,7 @@ export const ButtonNavigation = ({ ), placement: 'bottom-start', tagId: 'jumppreviousbreakpointTooltip', - tooltipMsg: 'Jump to the previous breakpoint' + tooltipMsg: intl.formatMessage({id: 'debugger.jumpPreviousBreakpoint'}) }, jumpOutJSX: { markup: ( @@ -240,7 +242,7 @@ export const ButtonNavigation = ({ ), placement: 'bottom-end', tagId: 'jumpoutTooltip', - tooltipMsg: 'Jump out' + tooltipMsg: intl.formatMessage({id: 'debugger.jumpOut'}) }, jumpNextBreakpointJSX: { markup: ( @@ -268,7 +270,7 @@ export const ButtonNavigation = ({ ), placement: 'bottom-end', tagId: 'jumpnextbreakpointTooltip', - tooltipMsg: 'Jump to the next breakpoint' + tooltipMsg: intl.formatMessage({id: 'debugger.jumpNextBreakpoint'}) } } diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index 3d0dc4258d..1cb002cf2c 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -1,5 +1,5 @@ import React, {useState, useEffect, useRef} from 'react' // eslint-disable-line -import {FormattedMessage} from 'react-intl' +import {FormattedMessage, useIntl} from 'react-intl' import TxBrowser from './tx-browser/tx-browser' // eslint-disable-line import StepManager from './step-manager/step-manager' // eslint-disable-line import VmDebugger from './vm-debugger/vm-debugger' // eslint-disable-line @@ -13,6 +13,7 @@ import './debugger-ui.css' const _paq = ((window as any)._paq = (window as any)._paq || []) export const DebuggerUI = (props: DebuggerUIProps) => { + const intl = useIntl() const debuggerModule = props.debuggerAPI const [state, setState] = useState({ isActive: false, @@ -128,7 +129,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { setState((prevState) => { return { ...prevState, - sourceLocationStatus: 'Locating breakpoint, this might take a while...' + sourceLocationStatus: intl.formatMessage({id: 'debugger.sourceLocationStatus1'}) } }) }) @@ -145,7 +146,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { setState((prevState) => { return { ...prevState, - sourceLocationStatus: 'Source location not available, neither in Sourcify nor in Etherscan. Please make sure the Etherscan api key is provided in the settings.' + sourceLocationStatus: intl.formatMessage({id: 'debugger.sourceLocationStatus2'}) } }) return @@ -408,7 +409,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
{state.isLocalNodeUsed && (
- + } placement="right"> { :{' '} - 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} - +
diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index c3b1db62a3..27066b9237 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -293,6 +293,14 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco label: 'encodeWithSignature', range }, + { + label: 'decode', + kind: monaco.languages.CompletionItemKind.Method, + insertText: 'decode(${1:arg}, ${2:arg});', + insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, + detail: 'decode(bytes encodedData, (...)) returns (...): ABI-decodes the given arguments from the given encodedData', + range + } ]; } diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index 691c8955e9..652e6b3992 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -539,6 +539,14 @@ export const EditorUI = (props: EditorUIProps) => { } } + props.editorAPI.getPositionAt = (offset: number) => { + if (!monacoRef.current) return + const model = editorModelsState[currentFileRef.current]?.model + if (model) { + return model.getPositionAt(offset) + } + } + props.editorAPI.getHoverPosition = (position: monacoTypes.Position) => { if (!monacoRef.current) return const model = editorModelsState[currentFileRef.current]?.model diff --git a/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx b/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx index c2d08a345d..2fa0ed37c8 100644 --- a/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx +++ b/libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx @@ -1,6 +1,7 @@ // The forwardRef is important!! import React, {Ref} from 'react' +import {FormattedMessage, useIntl} from 'react-intl' import {CustomTooltip} from '@remix-ui/helper' // Dropdown needs access to the DOM node in order to position the Menu @@ -66,7 +67,12 @@ export const CustomIconsToggle = React.forwardRef( data-id="workspaceMenuDropdown" > {icon && ( - + } + > )} @@ -118,29 +124,32 @@ export const ProxyAddressToggle = React.forwardRef( onChange: (e: React.ChangeEvent) => void }, ref: Ref - ) => ( -
{ - e.preventDefault() - onClick(e) - }} - className={'d-flex ' + className.replace('dropdown-toggle', '')} - data-id="toggleProxyAddressDropdown" - > - { + ) => { + const intl = useIntl() + return ( +
{ e.preventDefault() - onChange(e) + onClick(e) }} - className="udapp_input form-control" - value={address} - placeholder="Enter Proxy Address" - style={{width: '100%'}} - data-id="ERC1967AddressInput" - /> -
- ) + className={'d-flex ' + className.replace('dropdown-toggle', '')} + data-id="toggleProxyAddressDropdown" + > + { + e.preventDefault() + onChange(e) + }} + className="udapp_input form-control" + value={address} + placeholder={intl.formatMessage({id: 'udapp.enterProxyAddress'})} + style={{width: '100%'}} + data-id="ERC1967AddressInput" + /> +
+ ) + } ) export const ProxyDropdownMenu = React.forwardRef( 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" >