add some locale message

pull/2581/head
drafish 2 years ago
parent d0573a149c
commit 20f1fd4914
  1. 8
      apps/remix-ide/src/app/tabs/locales/en-US.js
  2. 8
      apps/remix-ide/src/app/tabs/locales/zh-CN.js
  3. 8
      libs/remix-ui/panel/src/lib/plugins/panel-header.tsx
  4. 12
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  5. 18
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -1,4 +1,9 @@
export default {
'panel.author': 'Author',
'panel.maintainedBy': 'Maintained By',
'panel.documentation': 'Documentation',
'panel.description': 'Description',
'settings.displayName': 'Settings',
'settings.reset': 'Reset to Default settings',
'settings.general': 'General settings',
@ -31,6 +36,8 @@ export default {
'filePanel.workspace.chooseTemplate': 'Choose a template',
'filePanel.workspace.download': 'Download Workspaces',
'filePanel.workspace.restore': 'Restore Workspaces Backup',
'filePanel.workspace.clone': 'Clone Git Repository',
'filePanel.workspace.enterGitUrl': 'Enter git repository url',
'filePanel.newFile': 'New File',
'filePanel.newFolder': 'New Folder',
'filePanel.rename': 'Rename',
@ -139,6 +146,7 @@ export default {
'solidity.useConfigurationFile': 'Use configuration file',
'solidity.change': 'Change',
'solidity.compile': 'Compile',
'solidity.noFileSelected': 'no file selected',
'solidity.compileAndRunScript': 'Compile and Run script',
'solidity.publishOn': 'Publish on',
'solidity.Assembly': 'Assembly opcodes describing the contract including corresponding solidity source code',

@ -1,4 +1,9 @@
export default {
'panel.author': '作者',
'panel.maintainedBy': '维护者',
'panel.documentation': '文档',
'panel.description': '描述',
'settings.displayName': '设置',
'settings.reset': '恢复默认设置',
'settings.general': '常规设置',
@ -31,6 +36,8 @@ export default {
'filePanel.workspace.chooseTemplate': '选择一个工作空间模板',
'filePanel.workspace.download': '下载工作空间',
'filePanel.workspace.restore': '恢复工作空间',
'filePanel.workspace.clone': '克隆 Git 仓库',
'filePanel.workspace.enterGitUrl': '输入 Git 仓库地址',
'filePanel.newFile': '新建文件',
'filePanel.newFolder': '新建文件夹',
'filePanel.rename': '重命名',
@ -139,6 +146,7 @@ export default {
'solidity.useConfigurationFile': '使用配置文件',
'solidity.change': '修改',
'solidity.compile': '编译',
'solidity.noFileSelected': '未选中文件',
'solidity.compileAndRunScript': '编译且执行脚本',
'solidity.publishOn': '发布到',
'solidity.Assembly': '合约的汇编操作码,包含对应的solidity源程序',

@ -43,21 +43,21 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
</div>
<div className={`bg-light mx-3 mb-2 p-3 pt-1 border-bottom flex-column ${toggleExpander ? "d-flex" : "d-none"}`}>
{plugin?.profile?.author && <span className="d-flex flex-row align-items-center">
<label className="mb-0 pr-2">Author:</label>
<label className="mb-0 pr-2"><FormattedMessage id='panel.author' defaultMessage='Author' />:</label>
<span> { plugin?.profile.author } </span>
</span>}
{plugin?.profile?.maintainedBy && <span className="d-flex flex-row align-items-center">
<label className="mb-0 pr-2">Maintained by:</label>
<label className="mb-0 pr-2"><FormattedMessage id='panel.maintainedBy' defaultMessage='Maintained by' />:</label>
<span> { plugin?.profile.maintainedBy } </span>
</span>}
{plugin?.profile?.documentation && <span className="d-flex flex-row align-items-center">
<label className="mb-0 pr-2">Documentation:</label>
<label className="mb-0 pr-2"><FormattedMessage id='panel.documentation' defaultMessage='Documentation' />:</label>
<span>
<a href={plugin?.profile?.documentation} className="titleInfo p-0 mb-2" title="link to documentation" target="_blank" rel="noreferrer"><i aria-hidden="true" className="fas fa-book"></i></a>
</span>
</span>}
{plugin?.profile?.description && <span className="d-flex flex-row align-items-baseline">
<label className="mb-0 pr-2">Description:</label>
<label className="mb-0 pr-2"><FormattedMessage id='panel.description' defaultMessage='Description' />:</label>
<span> { plugin?.profile.description } </span>
</span>}
{plugin?.profile?.repo && <span className="d-flex flex-row align-items-center">

@ -886,7 +886,17 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}>
<span>
{ <i ref={compileIcon} className="fas fa-sync remixui_iconbtn" aria-hidden="true"></i> }
<FormattedMessage id='solidity.compile' defaultMessage='Compile' /> { typeof state.compiledFileName === 'string' ? extractNameFromKey(state.compiledFileName) || '<no file selected>' : '<no file selected>' }
<FormattedMessage id='solidity.compile' defaultMessage='Compile' />
{typeof state.compiledFileName === 'string'
? extractNameFromKey(state.compiledFileName) ||
`<${intl.formatMessage({
id: 'solidity.noFileSelected',
defaultMessage: 'no file selected',
})}>`
: `<${intl.formatMessage({
id: 'solidity.noFileSelected',
defaultMessage: 'no file selected',
})}>`}
</span>
</OverlayTrigger>
</button>

@ -72,7 +72,13 @@ export function Workspace () {
}
const cloneGitRepository = () => {
global.modal('Clone Git Repository', cloneModalMessage(), 'OK', handleTypingUrl, '')
global.modal(
intl.formatMessage({id: 'filePanel.workspace.clone', defaultMessage: 'Clone Git Repository'}),
cloneModalMessage(),
'OK',
handleTypingUrl,
''
)
}
const downloadWorkspaces = async () => {
@ -190,7 +196,13 @@ export function Workspace () {
const cloneModalMessage = () => {
return (
<>
<input type="text" data-id="modalDialogCustomPromptTextClone" placeholder='Enter git repository url' ref={cloneUrlRef} className="form-control" />
<input
type="text"
data-id="modalDialogCustomPromptTextClone"
placeholder={intl.formatMessage({id: 'filePanel.workspace.enterGitUrl', defaultMessage: 'Enter git repository url'})}
ref={cloneUrlRef}
className="form-control"
/>
</>
)
}
@ -269,7 +281,7 @@ export function Workspace () {
cloneGitRepository()
}}
className='far fa-clone remixui_menuicon'
title='Clone Git Repository'>
title={intl.formatMessage({id: 'filePanel.workspace.clone', defaultMessage: 'Clone Git Repository'})}>
</span>
</span>
<Dropdown id="workspacesSelect" data-id="workspacesSelect" onToggle={toggleDropdown} show={showDropdown}>

Loading…
Cancel
Save