Commit 9feec8f2 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

translate pickup name

parent fc2f9039
...@@ -12,6 +12,7 @@ import { connect } from 'react-redux'; ...@@ -12,6 +12,7 @@ import { connect } from 'react-redux';
import * as Permissions from 'expo-permissions'; import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device'; import * as Device from 'expo-device';
import MyStatusBar from './MyStatusBar'; import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
class PickupName extends React.Component { class PickupName extends React.Component {
constructor(props) { constructor(props) {
...@@ -215,11 +216,11 @@ class PickupName extends React.Component { ...@@ -215,11 +216,11 @@ class PickupName extends React.Component {
<View style={{ margin: 5 }}> <View style={{ margin: 5 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text>
<View style={{ flexDirection: 'row' }}> <View style={{ flexDirection: 'row' }}>
{item.can_accept_order == true ? (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", top: 5 }}>OPEN </Text>) {item.can_accept_order == true ? (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", top: 5 }}>{i18n.t('open')} </Text>)
: (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c" }}>CLOSED </Text>)} : (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c" }}>{i18n.t('closed')} </Text>)}
</View> </View>
</View> </View>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368' }}> Opening Hours : {item.open_time} - {item.close_time}</Text> <Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368' }}>{i18n.t('openinghours')} : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, color: '#b1b1b2', fontFamily: 'Gotham-Light' }}> <Text style={{ margin: 5, color: '#b1b1b2', fontFamily: 'Gotham-Light' }}>
{item.full_address} {item.full_address}
</Text> </Text>
...@@ -249,11 +250,11 @@ class PickupName extends React.Component { ...@@ -249,11 +250,11 @@ class PickupName extends React.Component {
<View style={{ margin: 5 }}> <View style={{ margin: 5 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text>
<View style={{ flexDirection: 'row' }}> <View style={{ flexDirection: 'row' }}>
{item.can_accept_order == true ? (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", top: 5 }}>OPEN </Text>) {item.can_accept_order == true ? (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", top: 5 }}>{i18n.t('open')} </Text>)
: (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c" }}>CLOSED </Text>)} : (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c" }}>{i18n.t('closed')} </Text>)}
</View> </View>
</View> </View>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368' }}> Opening Hours : {item.open_time} - {item.close_time}</Text> <Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368' }}> {i18n.t('openinghours')} : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, color: '#b1b1b2', fontFamily: 'Gotham-Light' }}> <Text style={{ margin: 5, color: '#b1b1b2', fontFamily: 'Gotham-Light' }}>
{item.full_address} {item.full_address}
</Text> </Text>
...@@ -299,7 +300,7 @@ class PickupName extends React.Component { ...@@ -299,7 +300,7 @@ class PickupName extends React.Component {
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" /> <MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View> </View>
<View style={{ flex: 6 }}> <View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder="Cari lokasi Pickup Store" <TextInput style={{ height: 45 }} placeholder={i18n.t('searchpickups')}
onChangeText={text => this.filterData(text)} onChangeText={text => this.filterData(text)}
onClear={text => this.filterData('')} onClear={text => this.filterData('')}
value={this.state.search}></TextInput> value={this.state.search}></TextInput>
...@@ -396,7 +397,8 @@ const mapStateToProps = (state) => { ...@@ -396,7 +397,8 @@ const mapStateToProps = (state) => {
session_id: state.session_id, session_id: state.session_id,
outlet_id: state.outlet_id, outlet_id: state.outlet_id,
name_outlet: state.name_outlet, name_outlet: state.name_outlet,
outlet_detailadress: state.outlet_detailadress outlet_detailadress: state.outlet_detailadress,
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