diff --git a/apps/remix-ide/src/app/tabs/locales/en-US.js b/apps/remix-ide/src/app/tabs/locales/en-US.js index 2672873f71..4993aa339a 100644 --- a/apps/remix-ide/src/app/tabs/locales/en-US.js +++ b/apps/remix-ide/src/app/tabs/locales/en-US.js @@ -45,11 +45,46 @@ export default { 'filePanel.uploadFile': 'Load a local file into current workspace', 'filePanel.updateGist': 'Update the current [gist] explorer', + 'home.scamAlert': 'Scam Alert: Beware of online videos promoting "liquidity front runner bots".', + 'home.learnMore': 'Learn more', + 'home.featuredPlugins': 'Featured Plugins', + 'home.file': 'File', + 'home.newFile': 'New File', + 'home.openFiles': 'Open Files', + 'home.connectToLocalhost': 'Connect to Localhost', + 'home.loadFrom': 'LOAD FROM', + 'home.resources': 'Resources', + + 'terminal.listen': 'listen on all transactions', + 'terminal.search': 'Search with transaction hash or address', + 'terminal.welcomeText1': 'Welcome to', + 'terminal.welcomeText2': 'Your files are stored in', + 'terminal.used': 'used', + 'terminal.welcomeText3': 'You can use this terminal to', + 'terminal.welcomeText4': 'Check transactions details and start debugging', + 'terminal.welcomeText5': 'Execute JavaScript scripts', + 'terminal.welcomeText6': 'Input a script directly in the command line interface', + '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', + 'debugger.displayName': 'Debugger', 'udapp.displayName': 'Deploy & run transactions', 'search.displayName': 'Search in files', + 'search.replace': 'Replace', + 'search.replaceAll': 'Replace All', + 'search.placeholder1': 'Search ( Enter to search )', + 'search.placeholder2': 'Include ie *.sol ( Enter to include )', + 'search.placeholder3': 'Exclude ie .git/**/* ( Enter to exclude )', + 'search.matchCase': 'Match Case', + 'search.matchWholeWord': 'Match Whole Word', + 'search.useRegularExpression': 'Use Regular Expression', + 'search.replaceWithoutConfirmation': 'replace without confirmation', + 'search.filesToInclude': 'Files to include', + 'search.filesToExclude': 'Files to exclude', 'solidity.displayName': 'Solidity compiler', diff --git a/apps/remix-ide/src/app/tabs/locales/zh-CN.js b/apps/remix-ide/src/app/tabs/locales/zh-CN.js index 87c7c622a1..b23ae779ff 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh-CN.js +++ b/apps/remix-ide/src/app/tabs/locales/zh-CN.js @@ -45,11 +45,46 @@ export default { 'filePanel.uploadFile': '加载本地文件到当前工作空间', 'filePanel.updateGist': '更新当前 [gist] 浏览', + 'home.scamAlert': '诈骗警告: 当心在线视频推广“流动性领先者机器人”.', + 'home.learnMore': '了解更多', + 'home.featuredPlugins': '精选插件', + 'home.file': '文件', + 'home.newFile': '新建文件', + 'home.openFiles': '上传本地文件', + 'home.connectToLocalhost': '连接本地主机', + 'home.loadFrom': '从以下来源导入', + 'home.resources': '资源', + + 'terminal.listen': '监听所有交易', + 'terminal.search': '按交易哈希或地址搜索', + 'terminal.welcomeText1': '欢迎使用', + 'terminal.welcomeText2': '您的文件储存在', + 'terminal.used': '已使用', + 'terminal.welcomeText3': '您可使用此终端', + 'terminal.welcomeText4': '查看交易详情并启动调试', + 'terminal.welcomeText5': '执行 JavaScript 脚本', + 'terminal.welcomeText6': '直接在命令行界面输入脚本', + 'terminal.welcomeText7': '在文件浏览器中选择一个 Javascript 文件,然后在命令行界面运行 `remix.execute()` 或 `remix.exeCurrent()` ', + 'terminal.welcomeText8': '在文件浏览器中右键点击一个 JavaScript 文件,然后点击 `Run`', + 'terminal.welcomeText9': '可以访问以下库', + 'terminal.welcomeText10': '输入库名查看可用的指令', + 'debugger.displayName': '调试器', 'udapp.displayName': '部署 & 发交易', 'search.displayName': '全文搜索', + 'search.replace': '替换', + 'search.replaceAll': '替换所有', + 'search.placeholder1': '搜索 ( 回车搜索 )', + 'search.placeholder2': '包含 ie *.sol ( 回车包含 )', + 'search.placeholder3': '排除 ie .git/**/* ( 回车排除 )', + 'search.matchCase': '大小写匹配', + 'search.matchWholeWord': '全字匹配', + 'search.useRegularExpression': '使用正则表达式', + 'search.replaceWithoutConfirmation': '替换无需确认', + 'search.filesToInclude': '文件包含', + 'search.filesToExclude': '文件排除', 'solidity.displayName': '合约编译', diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index 2690dfc840..4846710fe2 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line - +import { FormattedMessage } from 'react-intl' import './remix-ui-home-tab.css' import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line @@ -63,7 +63,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { else { workspace.addExternal(type + '/' + cleanUrl, content, url) plugin.call('menuicons', 'select', 'filePanel') - } + } } catch (e) { toast(e.message) } @@ -237,15 +237,15 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
- Scam Alert: Beware of online videos promoting "liquidity front runner bots". + - Learn more +
-

Featured Plugins

+

startSolidity()} /> @@ -259,15 +259,15 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
-

File

+

- +

{ event.stopPropagation() @@ -277,9 +277,9 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {

- +

-

+

@@ -288,7 +288,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
-

Resources

+

Documentation diff --git a/libs/remix-ui/search/src/lib/components/Exclude.tsx b/libs/remix-ui/search/src/lib/components/Exclude.tsx index ef1e41b18d..5a7eceb159 100644 --- a/libs/remix-ui/search/src/lib/components/Exclude.tsx +++ b/libs/remix-ui/search/src/lib/components/Exclude.tsx @@ -1,10 +1,13 @@ import React, { useContext, useEffect, useRef, useState } from 'react' +import { FormattedMessage, useIntl } from 'react-intl' import { SearchContext } from '../context/context' export const Exclude = props => { const { setExclude, cancelSearch, startSearch } = useContext(SearchContext) const [excludeInput, setExcludeInput] = useState('.*/**/*') + const intl = useIntl() + const change = async e => { setExcludeInput(e.target.value) await cancelSearch() @@ -24,10 +27,10 @@ export const Exclude = props => { return ( <>

- + change(e)} diff --git a/libs/remix-ui/search/src/lib/components/Find.tsx b/libs/remix-ui/search/src/lib/components/Find.tsx index 284a2d07ba..79f6f752c0 100644 --- a/libs/remix-ui/search/src/lib/components/Find.tsx +++ b/libs/remix-ui/search/src/lib/components/Find.tsx @@ -1,4 +1,5 @@ import React, { useContext, useEffect, useRef, useState } from 'react' +import { useIntl } from 'react-intl' import { SearchContext } from '../context/context' export const Find = () => { @@ -12,6 +13,8 @@ export const Find = () => { toggleUseRegex } = useContext(SearchContext) + const intl = useIntl() + const [inputValue, setInputValue] = useState('') const change = async e => { setInputValue(e.target.value) @@ -35,7 +38,7 @@ export const Find = () => {
await change(e)} @@ -44,7 +47,7 @@ export const Find = () => {
{ >
{ >
{ const { setInclude, cancelSearch, startSearch } = useContext(SearchContext) const [includeInput, setIncludeInput] = useState('*.sol, *.js') + + const intl = useIntl() + const change = async e => { setIncludeInput(e.target.value) await cancelSearch() @@ -22,10 +26,10 @@ export const Include = props => { return ( <>
- + change(e)} onKeyUp={handleKeypress} diff --git a/libs/remix-ui/search/src/lib/components/OverWriteCheck.tsx b/libs/remix-ui/search/src/lib/components/OverWriteCheck.tsx index fba80c5005..b6e33480f1 100644 --- a/libs/remix-ui/search/src/lib/components/OverWriteCheck.tsx +++ b/libs/remix-ui/search/src/lib/components/OverWriteCheck.tsx @@ -1,4 +1,5 @@ import React, { useContext } from 'react' +import { FormattedMessage } from 'react-intl' import { SearchContext } from '../context/context' export const OverWriteCheck = props => { @@ -24,7 +25,7 @@ export const OverWriteCheck = props => { data-id="confirm_replace_label" className="form-check-label custom-control-label" > - replace without confirmation +
diff --git a/libs/remix-ui/search/src/lib/components/Replace.tsx b/libs/remix-ui/search/src/lib/components/Replace.tsx index a8bd50177f..05598910af 100644 --- a/libs/remix-ui/search/src/lib/components/Replace.tsx +++ b/libs/remix-ui/search/src/lib/components/Replace.tsx @@ -1,4 +1,5 @@ import React, { useContext, useRef } from 'react' +import { useIntl } from 'react-intl' import { SearchContext } from '../context/context' export const Replace = props => { @@ -9,13 +10,15 @@ export const Replace = props => { timeOutId.current = setTimeout(() => setReplace(e.target.value), 500) } + const intl = useIntl() + return ( <>
diff --git a/libs/remix-ui/search/src/lib/components/results/ResultItem.tsx b/libs/remix-ui/search/src/lib/components/results/ResultItem.tsx index eb12ac26b9..ebe82fafc5 100644 --- a/libs/remix-ui/search/src/lib/components/results/ResultItem.tsx +++ b/libs/remix-ui/search/src/lib/components/results/ResultItem.tsx @@ -1,5 +1,6 @@ import { useDialogDispatchers } from '@remix-ui/app' import React, { useContext, useEffect, useRef, useState } from 'react' +import { FormattedMessage } from 'react-intl' import { SearchContext } from '../../context/context' import { SearchResult, SearchResultLine } from '../../types' import { ResultFileName } from './ResultFileName' @@ -123,12 +124,14 @@ export const ResultItem = (props: ResultItemProps) => { {loading ?
Loading...
: null} {!toggleExpander && !loading ? (
- {state.replaceEnabled? + {state.replaceEnabled?
-
replace()} className='btn btn-secondary mb-2 btn-sm'>Replace all
+
replace()} className='btn btn-secondary mb-2 btn-sm'> + +
:null} - {lines.map((line, index) => ( + {lines.map((line, index) => ( { const panelRef = useRef(null) const terminalMenu = useRef(null) + const intl = useIntl () + const scrollToBottom = () => { messagesEndRef.current.scrollIntoView({ behavior: 'smooth' }) } @@ -430,7 +433,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { setIsOpen(!panels.terminal.minimized) }) - + return () => { props.plugin.off('layout', 'change') @@ -462,7 +465,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you" htmlFor="listenNetworkCheck" > - listen on all transactions +
@@ -475,7 +478,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { type="text" className="remix_ui_terminal_filter border form-control" id="searchInput" - placeholder="Search with transaction hash or address" + placeholder={intl.formatMessage({id: 'terminal.search', defaultMessage: "Search with transaction hash or address"})} data-id="terminalInputSearch" />
diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx index 6f80f555d4..75b61c0b08 100644 --- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx +++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx @@ -1,30 +1,31 @@ import React, { useEffect } from 'react' // eslint-disable-line +import { FormattedMessage } from 'react-intl' const TerminalWelcomeMessage = ({ packageJson, storage }) => { return (
-
Welcome to Remix {packageJson}

-
Your files are stored in {(window as any).remixFileSystem.name}, {storage} used

-
You can use this terminal to:
+
Remix {packageJson}

+
{(window as any).remixFileSystem.name}, {storage}

+
:
    -
  • Check transactions details and start debugging.
  • -
  • Execute JavaScript scripts: +
  • .
  • +
  • :
    - - Input a script directly in the command line interface + -
    - - Select a Javascript file in the file explorer and then run \`remix.execute()\` or \`remix.exeCurrent()\` in the command line interface + -
    - - Right click on a JavaScript file in the file explorer and then click \`Run\` + -
-
The following libraries are accessible:
+
:
-
Type the library name to see available commands.
+
.
) }