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

pemasangan translate di home, login, outlets, reward history, reward list , welcome logs

parent bebc926c
......@@ -13,6 +13,7 @@ import session from '../function/session';
import CheckVersion from '../function/CheckVersion';
import ActionType from '../redux/globalActionType';
import Toast from 'react-native-tiny-toast';
import i18n from 'i18n-js';
let version = info.expo.version
let buildNumber = info.expo.android.versionCode
......@@ -239,7 +240,7 @@ class Home extends React.Component {
{/* <StatusBar barStyle='dark-content' /> */}
{/* <Text style={styles.titleText}>{i18n.t('register')}</Text> */}
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={styles.titleText}>TODAY PROMOTIONS</Text>
<Text style={styles.titleText}>{i18n.t('promotion')}</Text>
</View>
<View style={{ margin: 15, flex: 0.15, alignItems: 'flex-end' }}>
<TouchableOpacity>
......@@ -305,17 +306,17 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */}
<TouchableOpacity style={styles.buttonDeliveryFalse} onPress={() => this._delivery()}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black' }}>DELIVERY</Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black' }}>{i18n.t('delivery')}</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonPickupTrue} onPress={() => this._pickup()}>
<Text style={{ textAlign: 'center', color: '#fff', fontFamily: 'Gotham-Black' }}>PICK UP</Text>
<Text style={{ textAlign: 'center', color: '#fff', fontFamily: 'Gotham-Black' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity>
</View>
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
{i18n.t('orderInfo')}
</Text> */}
<Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black', color: '#838383' }}>
YOU WILL PICKUP YOUR ORDER AT
{i18n.t('orderInfo')}
</Text>
{this.state.indicator == true ? (
<ActivityIndicator size="small" color="#c9af6d" />
......@@ -328,7 +329,7 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>{i18n.t('orderNow')}</Text>
</TouchableOpacity> */}
<TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>ORDER NOW</Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>{i18n.t('orderNow')}</Text>
</TouchableOpacity>
</Card>
) : (
......@@ -341,10 +342,10 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */}
<TouchableOpacity style={styles.buttonDeliveryTrue} onPress={() => this._delivery()}>
<Text style={{ textAlign: 'center', color: '#354175', fontFamily: 'Gotham-Black' }}>DELIVERY</Text>
<Text style={{ textAlign: 'center', color: '#354175', fontFamily: 'Gotham-Black' }}>{i18n.t('_deliver')}</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonPickupFalse} onPress={() => this._pickup()}>
<Text style={{ textAlign: 'center', color: '#fff', fontFamily: 'Gotham-Black' }}>PICK UP</Text>
<Text style={{ textAlign: 'center', color: '#fff', fontFamily: 'Gotham-Black' }}>{i18n.t('_pickup')}</Text>
</TouchableOpacity>
</View>
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
......@@ -413,10 +414,10 @@ class Home extends React.Component {
</Text> */}
<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 }}>
......@@ -434,7 +435,7 @@ class Home 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>
......@@ -449,7 +450,7 @@ class Home 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.point}</Text>
......@@ -477,7 +478,7 @@ class Home extends React.Component {
borderRadius: 10,
backgroundColor: '#CFB368',
}}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>TOP UP BALANCE</Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('topup')}</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
......@@ -494,7 +495,7 @@ class Home extends React.Component {
borderRadius: 10,
backgroundColor: '#CFB368',
}}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>USE BALANCE</Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
</View>
</TouchableOpacity>
</View>
......
......@@ -12,6 +12,7 @@ import { Notifications } from 'expo';
import Spinner from 'react-native-loading-spinner-overlay';
import Toast from 'react-native-tiny-toast';
import CheckVersion from '../function/CheckVersion';
import i18n from 'i18n-js';
class Login extends React.Component {
constructor(props) {
......@@ -243,7 +244,7 @@ d } else {
</View>
<View style={styles.v_form}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, justifyContent: 'center' }} removeClippedSubviews={false} >
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Email</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('email')}</Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 10, borderRadius: 10, textAlign: 'center', fontFamily: 'Gotham-Black', color: 'white', fontSize: 13, fontWeight: 'bold' }}
onChangeText={(email) => this.setState({ email })}
......@@ -254,7 +255,7 @@ d } else {
/>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Password</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('password')}</Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 10, textAlign: 'center', fontFamily: 'Gotham-Black', color: 'white', fontSize: 13, fontWeight: 'bold' }}
onChangeText={password => this.setState({ password })}
......@@ -266,7 +267,7 @@ d } else {
<View style={{ flex: 1, height: 40, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleLoggin()}>
<View style={{ height: 50, borderRadius: 10, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 15 }}>LOGIN</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 15 }}>{i18n.t('login')}</Text>
</View>
</TouchableOpacity>
</View>
......@@ -274,17 +275,17 @@ d } else {
<View style={styles.v_policy}>
<View style={{ flex: 1, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('New Register')}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 16, textAlign: 'center', marginBottom: 5 }}>REGISTER</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 16, textAlign: 'center', marginBottom: 5 }}>{i18n.t('register')}</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Reset Password')}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 16, textAlign: 'center', marginTop: 5 }}>FORGOT PASSWORD</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 16, textAlign: 'center', marginTop: 5 }}>{i18n.t('forgotPassword')}</Text>
</TouchableOpacity>
</View>
<View style={{ flex: 1, justifyContent: 'center', marginRight: 60, marginLeft: 60 }}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 13, textAlign: 'center', marginBottom: 5 }}>
Dengan Login atau Register, Kamu menyetujui aturan <Text style={{ fontWeight: 'bold' }}> Panduan Layanan</Text> dan <Text style={{ fontWeight: 'bold' }}>Kebijakan Privasi kami</Text>
{i18n.t('policy')} <Text style={{ fontWeight: 'bold' }}>{i18n.t('privacy')}</Text>
</Text>
</View>
</View>
......
......@@ -13,7 +13,9 @@ import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device';
import RNPickerSelect from 'react-native-picker-select';
import MapView, { PROVIDER_GOOGLE, Marker } from 'react-native-maps';
import { Icon } from 'react-native-elements'
import { Icon } from 'react-native-elements';
import i18n from 'i18n-js';
class Outlets extends React.Component {
constructor(props) {
......@@ -320,7 +322,7 @@ class Outlets extends React.Component {
<View style={{ flex: 1 }}></View>
<View style={{ flex: 1, justifyContent: 'center' }}>
<RNPickerSelect
placeholder={{ label: 'All City' }}
placeholder={{ label: i18n.t('allcity')}}
onValueChange={(label) => this.filterData(label)}
items={this.state.data_outlet}
style={{ inputIOSContainer: { paddingVertical: 10, alignItems: 'center' } }}
......
......@@ -109,6 +109,7 @@ const mapStateToProps = (state) => {
return {
session_id: state.session_id,
languange: state.language
}
}
......
......@@ -4,6 +4,7 @@ import { Card } from 'react-native-shadow-cards'
import { connect } from 'react-redux';
import Axios from 'axios';
import moment from 'moment'
import i18n from 'i18n-js';
class RewardsList extends React.Component {
constructor(props) {
......@@ -56,7 +57,7 @@ class RewardsList extends React.Component {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={{ color: 'white', textAlign: 'center', fontSize: 20, fontFamily: 'Gotham-Black' }}>REWARDS E-VOUCHER</Text>
<Text style={{ color: 'white', textAlign: 'center', fontSize: 20, fontFamily: 'Gotham-Black' }}>{i18n.t('titlerewardhistory')}</Text>
</View>
<ScrollView style={styles.body}>
{
......@@ -93,7 +94,7 @@ class RewardsList extends React.Component {
))
}
<TouchableOpacity style={{ marginVertical: 20 }} onPress={() => this.props.navigation.navigate('Reward History')}>
<Text style={{ textAlign: 'center', color: '#CFB368', fontSize: 12, fontFamily: 'Gotham-Black' }}>REDEEM E-VOUCHER HISTORY</Text>
<Text style={{ textAlign: 'center', color: '#CFB368', fontSize: 12, fontFamily: 'Gotham-Black' }}>{i18n.t('rewardhistory')}</Text>
</TouchableOpacity>
<View style={{ height: 15 }} />
</ScrollView>
......@@ -128,6 +129,7 @@ const mapStateToProps = (state) => {
return {
session_id: state.session_id,
language: state.language
}
}
......
......@@ -2,8 +2,10 @@ import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground, ScrollView } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
import CheckVersion from '../function/CheckVersion';
import { connect } from 'react-redux';
import i18n from 'i18n-js';
export default class WelcomeLog extends React.Component {
class WelcomeLog extends React.Component {
constructor(props) {
super(props);
this.state = ({
......@@ -50,7 +52,7 @@ export default class WelcomeLog extends React.Component {
],
})}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin:11}}>NEXT</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin:11}}>{i18n.t('welcome')}</Text>
</View>
</TouchableOpacity>
</View>
......@@ -86,3 +88,11 @@ const styles = StyleSheet.create({
flex: 2,
}
})
const mapStateToProps = (state) => {
return {
language: state.language,
}
}
export default connect(mapStateToProps)(WelcomeLog)
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