Commit bd517c54 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

pemasangan translate di account dan menu selection

parent 5f3bc839
......@@ -27,6 +27,7 @@ import * as Device from 'expo-device';
import session from '../function/session';
import Constants from 'expo-constants';
import Toast from 'react-native-tiny-toast';
import i18n from 'i18n-js';
class Account extends React.Component {
constructor(props) {
......@@ -204,7 +205,7 @@ class Account extends React.Component {
return (
<View style={styles.container}>
<ScrollView>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<View style={{ flex: 1, height: 90 }}>
<View style={{ alignSelf: 'center' }}>
<Image
......@@ -217,11 +218,10 @@ class Account extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center' }}>
{this.state.full_name}
</Text>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#838383', fontSize: 12, textAlign: 'center', top: 2 }}>View Profile</Text>
</TouchableOpacity>
<Text style={{ fontFamily: 'Gotham-Light', color: '#838383', fontSize: 12, textAlign: 'center', top: 2 }}>{i18n.t('Viewprofil')}</Text>
</View>
</View>
</TouchableOpacity>
{
this.props.set_card === false ? (
......@@ -230,7 +230,7 @@ class Account extends React.Component {
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATE CARD</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}> {i18n.t('Acitvatecard')}</Text>
</View>
</TouchableOpacity>
</View>
......@@ -239,7 +239,7 @@ class Account extends React.Component {
<View style={{ flex: 1, height: 250 }}>
<TouchableOpacity style={{ top: 10, marginLeft: 15, marginRight: 15, justifyContent: 'center' }} onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>LOGOUT</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('logout')}</Text>
</View>
</TouchableOpacity>
<View style={styles.v_logo}>
......@@ -266,10 +266,10 @@ class Account extends React.Component {
<Card style={{ padding: 20, alignContent: 'center' }}>
<View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>Expired At {this.state.expire_date}</Text>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>{i18n.t('expired')} {this.state.expire_date}</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}>
......@@ -282,7 +282,7 @@ class Account extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{ flex: 0.3, justifyContent: 'center' }}>
{/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>BALANCE</Text>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>{i18n.t('balance')}</Text>
</View>
<View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.balance}</Text>
......@@ -293,7 +293,7 @@ class Account extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{ flex: 0.3, justifyContent: 'center' }}>
{/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>POINTS</Text>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>{i18n.t('point')}</Text>
</View>
<View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.points}</Text>
......@@ -306,7 +306,7 @@ class Account extends React.Component {
</View>
</View>
<TouchableOpacity style={styles.submitTopUp} activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>TOP UP BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('topup')}</Text>
</TouchableOpacity>
<View style={{ padding: 10, height: 200, top: 10, margin: 10 }}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}>
......@@ -326,7 +326,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/4.png')}
/>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}>TRANSFER BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}> {i18n.t('Transferbalance')}</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -338,7 +338,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/2.png')}
/>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}>USE BALANCE / POINT</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}> {i18n.t('Usebalancepoint')}</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -352,7 +352,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/1.png')}
/>
<Text style={{ fontFamily: 'Gotham-Black', flexDirection: 'row', textAlign: 'center', flexWrap: 'wrap', margin: 5, color: '#838383' }}>TRANSACTION HISTORY</Text>
<Text style={{ fontFamily: 'Gotham-Black', flexDirection: 'row', textAlign: 'center', flexWrap: 'wrap', margin: 5, color: '#838383' }}> {i18n.t('Transactionhistory')}</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -365,7 +365,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/3.png')}
/>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, margin: 5, color: '#838383' }}>RENEWAL</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, margin: 5, color: '#838383' }}> {i18n.t('Renewal')}</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -377,7 +377,7 @@ class Account extends React.Component {
<Card style={{ width: 200, paddingHorizontal: 10, paddingTop: 20, paddingBottom: 20 }}>
<View style={{ flex: 1, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ marginBottom: 10 }} />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', fontSize: 14, color: '#838383' }}>UPGRADE PREMIUM</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', fontSize: 14, color: '#838383' }}></Text>
</View>
</Card>
</TouchableOpacity>
......@@ -390,7 +390,7 @@ class Account extends React.Component {
<View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginLeft: 20, marginRight: 20, marginBottom: 20, padding: 5, bottom: 5, top: 1 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>LOGOUT</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('logout')}</Text>
</View>
</TouchableOpacity>
......@@ -523,7 +523,8 @@ const mapStateToProps = (state) => {
return {
session_id: state.session_id,
set_card: state.set_card,
in_payment: state.in_payment
in_payment: state.in_payment,
language: state.language,
}
}
......
......@@ -11,6 +11,7 @@ import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device';
import NumberFormat from 'react-number-format';
import i18n from 'i18n-js';
class MenuSelection extends React.Component {
constructor(props) {
......@@ -342,7 +343,7 @@ class MenuSelection extends React.Component {
<View>
<View style={{ height: 40, borderRadius: 10, width: '68%', backgroundColor: '#CFB368', marginRight: 20, marginLeft: 40, top: 15, flexDirection: 'row', marginBottom: 30 }}>
<Image source={(require('../assets/icon/icon-order.png'))} style={{ height: 40, width: 40, tintColor: 'white', }}></Image>
<Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 16, alignSelf: 'center', textAlign: 'center' }}>View Cart</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 16, alignSelf: 'center', textAlign: 'center' }}>{i18n.t('Viewcart')}</Text>
</View>
</View>
</TouchableOpacity>
......@@ -389,7 +390,8 @@ const mapStateToProps = (state) => {
order_total: state.order_total,
quantity: state.quantity,
address: state.address,
menu_item: state.menu_item
menu_item: state.menu_item,
language: state.language
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment