Moved inline text to language file

This commit is contained in:
Mustafa Buyukcelebi 2019-07-03 11:45:23 +03:00
parent 3758a8036b
commit 050f547274
4 changed files with 23 additions and 9 deletions

View File

@ -292,6 +292,13 @@
"withdraw_steem": "Withdraw Steem", "withdraw_steem": "Withdraw Steem",
"withdraw_sbd": "Withdraw Steem Dollar", "withdraw_sbd": "Withdraw Steem Dollar",
"delegate": "Delegate", "delegate": "Delegate",
"power_down": "Power Down" "power_down": "Power Down",
"account": "Account",
"destination_accounts": "Destination Account(s)",
"amount_information": "Drag the sliderto adjust to amount",
"save": "Save",
"percent": "Percentage",
"percent_information": "Percentage of power down to this account",
"auto_vests": "Automatically power up to the target account"
} }
} }

View File

@ -198,11 +198,11 @@ class PowerDownView extends Component {
<ScrollView> <ScrollView>
<View style={styles.middleContent}> <View style={styles.middleContent}>
<TransferFormItem <TransferFormItem
label={intl.formatMessage({ id: 'transfer.from' })} label={intl.formatMessage({ id: 'transfer.account' })}
rightComponent={() => this._renderDropdown(accounts, currentAccountName)} rightComponent={() => this._renderDropdown(accounts, currentAccountName)}
/> />
<TransferFormItem <TransferFormItem
label={intl.formatMessage({ id: 'transfer.from' })} label={intl.formatMessage({ id: 'transfer.destination_accounts' })}
rightComponent={this._renderDestinationAccountItems} rightComponent={this._renderDestinationAccountItems}
/> />
<TransferFormItem <TransferFormItem
@ -221,7 +221,9 @@ class PowerDownView extends Component {
this.setState({ amount: value }); this.setState({ amount: value });
}} }}
/> />
<Text style={styles.informationText}>Drag the sliderto adjust to amount</Text> <Text style={styles.informationText}>
{intl.formatMessage({ id: 'transfer.amount_information' })}
</Text>
</View> </View>
<View style={styles.bottomContent}> <View style={styles.bottomContent}>
<View style={styles.informationView}> <View style={styles.informationView}>

View File

@ -119,6 +119,7 @@ export default EStyleSheet.create({
informationText: { informationText: {
alignSelf: 'center', alignSelf: 'center',
color: '$iconColor', color: '$iconColor',
marginLeft: 5,
}, },
spInformation: { spInformation: {
backgroundColor: 'red', backgroundColor: 'red',

View File

@ -71,7 +71,7 @@ class WithdrawAccountModal extends Component {
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<UserAvatar username={account} size="xl" style={styles.avatar} noAction /> <UserAvatar username={account} size="xl" style={styles.avatar} noAction />
<TransferFormItem <TransferFormItem
label={intl.formatMessage({ id: 'transfer.to' })} label={intl.formatMessage({ id: 'transfer.account' })}
rightComponent={() => rightComponent={() =>
this._renderInput( this._renderInput(
intl.formatMessage({ id: 'transfer.to_placeholder' }), intl.formatMessage({ id: 'transfer.to_placeholder' }),
@ -81,7 +81,7 @@ class WithdrawAccountModal extends Component {
} }
/> />
<TransferFormItem <TransferFormItem
label={intl.formatMessage({ id: 'transfer.amount' })} label={intl.formatMessage({ id: 'transfer.percent' })}
rightComponent={() => this._renderInformationText(`${percent.toFixed(0)} %`)} rightComponent={() => this._renderInformationText(`${percent.toFixed(0)} %`)}
/> />
<View style={styles.informationView}> <View style={styles.informationView}>
@ -98,11 +98,15 @@ class WithdrawAccountModal extends Component {
}} }}
/> />
</View> </View>
<Text style={styles.informationText}>Drag the sliderto adjust to amount</Text> <Text style={styles.informationText}>
{intl.formatMessage({ id: 'transfer.percent_information' })}
</Text>
<TouchableOpacity onPress={() => this.setState({ autoPowerUp: !autoPowerUp })}> <TouchableOpacity onPress={() => this.setState({ autoPowerUp: !autoPowerUp })}>
<View style={styles.checkView}> <View style={styles.checkView}>
<CheckBox locked isChecked={autoPowerUp} /> <CheckBox locked isChecked={autoPowerUp} />
<Text style={styles.informationText}>Drag the sliderto adjust to amount</Text> <Text style={styles.informationText}>
{intl.formatMessage({ id: 'transfer.auto_vests' })}
</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<MainButton <MainButton
@ -110,7 +114,7 @@ class WithdrawAccountModal extends Component {
style={styles.button} style={styles.button}
onPress={() => handleOnSubmit(account, percent, autoPowerUp)} onPress={() => handleOnSubmit(account, percent, autoPowerUp)}
> >
<Text style={styles.buttonText}>{intl.formatMessage({ id: 'transfer.next' })}</Text> <Text style={styles.buttonText}>{intl.formatMessage({ id: 'transfer.save' })}</Text>
</MainButton> </MainButton>
</View> </View>
); );