>
<FormSection title={ lang === 'zh' ? '账户信息' : 'Account Information' }>
- <TextField title='Alias' placeholder='Alias' fieldProps={alias} autoFocus={true} />
+ <TextField title={ lang === 'zh' ? '别名':'Alias'} placeholder={ lang === 'zh' ? '别名':'Alias'} fieldProps={alias} autoFocus={true} />
</FormSection>
<FormSection title={ lang === 'zh' ? '密钥和签名' : 'Keys and Signing' }>
{body}
<button className={`btn btn-${this.props.options.danger ? 'danger' : 'primary'} ${styles.accept}`} onClick={accept}>
- { lang === 'zh' ? '确定' : 'OK' }</button>
+ { lang === 'zh' ? '关闭' : 'OK' }</button>
{cancel && <button className={`btn btn-link ${styles.cancel}`} onClick={cancel}>Cancel</button>}
</div>
</div>
lang={lang}>
<FormSection title={ lang === 'zh' ? '资产信息' : 'Asset Information'}>
- <TextField title='Alias' placeholder='Alias' fieldProps={alias} autoFocus={true} />
+ <TextField title={ lang === 'zh' ? '别名' : 'Alias'} placeholder={ lang === 'zh' ? '别名' : 'Alias'} fieldProps={alias} autoFocus={true} />
<JsonField title={ lang === 'zh' ? '定义' : 'Definition' } fieldProps={definition} lang={lang}/>
</FormSection>
<FormSection title={ lang === 'zh' ? '密钥和签名' :'Keys and Signing' }>
<KeyConfiguration
+ lang={lang}
xpubs={xpubs}
quorum={quorum}
- quorumHint='Number of signatures required to issue' />
+ quorumHint={ lang === 'zh' ? '所需的签名数' : 'Number of signatures required to issue' } />
</FormSection>
</FormContainer>
class EmptyList extends React.Component {
render() {
+ const lang =this.props.lang
let emptyImage
try {
}
const quorumOptions = rangeOptions.slice(0, this.state.keys)
+ const lang = this.props.lang
return(
<div>
<SelectField options={rangeOptions}
- title='Keys'
+ title={ lang === 'zh' ? '密钥数' : 'Keys' }
skipEmpty={true}
fieldProps={{
value: this.state.keys,
}} />
<SelectField options={quorumOptions}
- title='Quorum'
+ title={ lang === 'zh' ? '签名数' : 'Quorum' }
skipEmpty={true}
hint={quorumHint}
fieldProps={{
index={index}
typeProps={xpub.type}
valueProps={xpub.value}
- lang={this.props.lang}
+ lang={lang}
/>)}
</div>
)
this.props.fieldProps.id.onChange('')
}
+ const lang = this.props.lang
+ const alias_title = ( lang === 'zh' ? '别名' : ALIAS_SELECTED )
+
const idProps = Object.assign({...this.props.fieldProps.id}, {onChange: idOnChange})
const aliasProps = Object.assign({...this.props.fieldProps.alias}, {onChange: aliasOnChange})
<DropdownButton
className={styles.dropdownButton}
id='input-dropdown-addon'
- title={this.state.selected}
+ title={(this.state.selected === ALIAS_SELECTED)? alias_title: this.state.selected}
onSelect={this.select}
>
- <MenuItem eventKey={ALIAS_SELECTED}>Alias</MenuItem>
+ <MenuItem eventKey={ALIAS_SELECTED}>{ lang === 'zh' ? '别名' : 'Alias'}</MenuItem>
<MenuItem eventKey={ID_SELECTED}>ID</MenuItem>
</DropdownButton>
</div>
{this.state.selected == ALIAS_SELECTED &&
<this.props.aliasField
className={styles.aliasFieldGroupItem}
- placeholder={`Start typing ${this.props.title.toLowerCase()} alias...`}
+ placeholder={ lang === 'zh' ? `输入${this.props.title.toLowerCase()}别名.` : `Start typing ${this.props.title.toLowerCase()} alias...`}
fieldProps={aliasProps} />}
</div>
class SelectField extends React.Component {
render() {
+ const lang = this.props.lang
const options = this.props.options
- const emptyLabel = this.props.emptyLabel || 'Select one...'
+ const emptyLabel = this.props.emptyLabel || ((lang === 'zh') ? '请选择...' : 'Select one...')
const valueKey = this.props.valueKey || 'value'
const labelKey = this.props.labelKey || 'label'
autoFocus={this.state.autofocusInput}
valueKey='xpub'
labelKey='label'
+ lang={lang}
fieldProps={{...valueProps, onChange: valueOnChange}} />,
'provide': <TextField
autoFocus={this.state.autofocusInput}
return (
<div className={styles.main}>
- <FieldLabel>Key {this.props.index + 1}</FieldLabel>
+ <FieldLabel>{ lang === 'zh' ? '密钥' :'Key '}{this.props.index + 1}</FieldLabel>
<table className={styles.options}>
<tbody>
this.props.remove(this.props.index)
}
+ const lang = this.props.lang
const btmAmounUnitVisible = (assetAlias.value === 'BTM' ||
assetId.value === 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' )
<div className={styles.header}>
<label className={styles.title}>{actionLabels[type.value]}</label>
- <a href='#' className='btn btn-sm btn-danger' onClick={remove}>Remove</a>
+ <a href='#' className='btn btn-sm btn-danger' onClick={remove}>{ lang === 'zh' ? '删除' : 'Remove' }</a>
</div>
{type.error && <ErrorBanner message={type.error} />}
{visible.account &&
<ObjectSelectorField
- title='Account'
+ lang={lang}
+ title={ lang === 'zh' ? '账户' : 'Account' }
aliasField={Autocomplete.AccountAlias}
fieldProps={{
id: accountId,
{visible.asset &&
<ObjectSelectorField
- title='Asset'
+ title={ lang === 'zh' ? '资产' :'Asset'}
+ lang={lang}
aliasField={Autocomplete.AssetAlias}
fieldProps={{
id: assetId,
/>}
{visible.amount && !btmAmounUnitVisible &&
- <TextField title='Amount' fieldProps={amount} />}
+ <TextField title={ lang === 'zh' ? '数量' :'Amount' } fieldProps={amount} />}
{visible.amount && btmAmounUnitVisible &&
- <AmountUnitField title='Amount' fieldProps={amount} />}
+ <AmountUnitField title={ lang === 'zh' ? '数量' :'Amount' } fieldProps={amount} />}
{visible.password && false &&
- <TextField title='Password' placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
+ <TextField title={lang === 'zh' ? '密码' :'Password'} placeholder={lang === 'zh' ? '密码' :'Password'} fieldProps={password} autoFocus={false} type={'password'} />
}
{false && this.state.referenceDataOpen &&
<label className={styles.title}>{ lang === 'zh' ? '从' : 'From' }</label>
<div className={styles.main}>
<ObjectSelectorField
+ key='account-selector-field'
+ lang={lang}
title={ lang === 'zh' ? '账户' :'Account' }
aliasField={Autocomplete.AccountAlias}
fieldProps={{
}}
/>
<ObjectSelectorField
+ key='asset-selector-field'
+ lang={lang}
title={ lang === 'zh' ? '资产' : 'Asset' }
aliasField={Autocomplete.AssetAlias}
fieldProps={{
accounts={this.props.accounts}
assets={this.props.assets}
remove={this.removeActionItem}
+ lang={lang}
/>)}
<div className={`btn-group ${styles.addActionContainer} ${this.state.showDropdown && 'open'}`}>
>
<MenuItem eventKey='issue'>Issue</MenuItem>
<MenuItem eventKey='spend_account'>Spend from account</MenuItem>
- <MenuItem eventKey='control_receiver'>Control with receiver</MenuItem>
<MenuItem eventKey='control_address'>Control with address</MenuItem>
<MenuItem eventKey='retire'>Retire</MenuItem>
</DropdownButton>