Commit 844aff97 authored by Trisno's avatar Trisno

update string table

parent b508b908
......@@ -149,5 +149,25 @@
"tax":"Tax",
"sendtoken":"Send Token",
"itemnotfound":"There are no menu for this category",
"copyToClipboard":"Copied To Clipboard"
"copyToClipboard":"Copied To Clipboard",
"accessNotPermitted":"Access Not Permitted!",
"tryItRealDevice":"Please try it on a real Device",
"makeSureClaimCredit":"Are you sure want to claim credit ?",
"notPremiumYet":"Account Not Premium yet",
"wantUpgradePremium":"Do you want a Premium Upgrade ?",
"alertCancel":"Cancel",
"alertAddressNotFound":"Address not found!",
"alertSuccessAddAddressTitle":"Success",
"alertSuccessAddAddressContent":"Successfully added address",
"findAddress":"Find Address",
"yourLocation":"Your Location",
"alertCamera":"Sorry, we need camera permissions to make this work",
"inputPhoneNumber":"Input phone number",
"alertSendOTP":"We have sent an OTP to your number!",
"alertCardActivated":"Your card has been successfully activated",
"alertCheckEmail":"Please check your email",
"newEmail":"New Email",
"alertChangePasswordSuccess":"Change Password Successfully",
"alertSuccessTitle":"Success",
"alertEmailSended":"Email was sent"
}
\ No newline at end of file
......@@ -151,5 +151,25 @@
"tax":"Pajak",
"sendtoken":"Kirim Token",
"itemnotfound":"Tidak ada menu untuk kategori ini !",
"copyToClipboard":"Disalin"
"copyToClipboard":"Disalin",
"accessNotPermitted":"Akses tidak dizinkan!",
"tryItRealDevice":"Silahkan anda coba di real Device",
"makeSureClaimCredit":"Anda yakin ingin mengklaim kredit ?",
"notPremiumYet":"Akun Belum Premium",
"wantUpgradePremium":"Apakah anda ingin Upgrade Premium ?",
"alertCancel":"Batal",
"alertAddressNotFound":"Alamat tidak di temukan!",
"alertSuccessAddAddressTitle":"Berhasil",
"alertSuccessAddAddressContent":"Berhasil menambahkan Alamat !",
"findAddress":"Cari Alamat",
"yourLocation":"Lokasi Kamu",
"alertCamera":"Maaf, kami membutuhkan izin kamera untuk membuatnya bekerja",
"inputPhoneNumber":"Masukan No telp",
"alertSendOTP":"Kami telah mengirimkan sms OTP ke nomor anda!",
"alertCardActivated":"Kartu anda berhasil di aktifkan",
"alertCheckEmail":"Email terkirim, mohon dicek",
"newEmail":"Email Baru",
"alertChangePasswordSuccess":"Ganti Password Berhasil",
"alertSuccessTitle":"Berhasil",
"alertEmailSended":"Email Terkirim"
}
\ No newline at end of file
import React from 'react';
import {
View,
StyleSheet,
Text,
StatusBar,
Image,
ScrollView,
TouchableOpacity,
Alert,
Button,
ImageBackground,
ActivityIndicator
} from 'react-native';
import { StackActions } from '@react-navigation/native';
import { Icon } from 'react-native-elements'
import { connect } from 'react-redux';
import { Card } from 'react-native-shadow-cards';
import ActionType from '../redux/globalActionType';
import { CommonActions } from '@react-navigation/native';
import { Ionicons, MaterialIcons, AntDesign, FontAwesome } from '@expo/vector-icons';
import { MaterialIcons } from '@expo/vector-icons';
import Axios from 'axios';
import Constants from 'expo-constants';
import * as Device from 'expo-device';
import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions';
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';
import React from 'react';
import { ActivityIndicator, Alert, Image, ImageBackground, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Card } from 'react-native-shadow-cards';
import Toast from 'react-native-tiny-toast';
import NumberFormat from 'react-number-format';
import { connect } from 'react-redux';
import requestParams from '../helper/requestParams';
import ActionType from '../redux/globalActionType';
class Account extends React.Component {
constructor(props) {
......@@ -85,10 +69,10 @@ class Account extends React.Component {
try {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
Alert.alert('Akses tidak dizinkan!')
Alert.alert(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
Alert.alert('Silahkan anda coba di real Device')
Alert.alert(i18n.t('tryItRealDevice'))
} else {
this._getCurrentPosisition()
}
......@@ -139,15 +123,15 @@ class Account extends React.Component {
Alert.alert(
"",
"Are you sure want to claim credit ?",
i18n.t('makeSureClaimCredit'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
text: i18n.t('alertyes'), onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
......@@ -187,7 +171,7 @@ class Account extends React.Component {
})
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
console.log("INI DATANYA : " + JSON.stringify(res))
// console.log("INI DATANYA : " + JSON.stringify(res))
const dataCard = res.data
console.log(dataCard)
let email = dataCard.email
......@@ -264,10 +248,10 @@ class Account extends React.Component {
try {
if (this.state.premium === false) {
Alert.alert(
'Akun Belum Premium',
'Apakah anda ingin Upgrade Premium ?',
i18n.t('notPremiumYet'),
i18n.t('wantUpgradePremium'),
[{ text: 'Cancel' },
[{ text: i18n.t('alertCancel') },
{ text: 'OK', onPress: () => this.props.navigation.navigate('Upgrade Premium') }
]
)
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Platform, Dimensions, Alert, Image, ActivityIndicator } from 'react-native';
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import Axios from 'axios';
import * as Device from 'expo-device';
import * as Permissions from 'expo-permissions';
import * as Location from 'expo-location';
import MapView, { PROVIDER_GOOGLE, Marker } from 'react-native-maps';
import * as Permissions from 'expo-permissions';
import i18n from 'i18n-js';
import React from 'react';
import { ActivityIndicator, Alert, Platform, StyleSheet, Text, TextInput, View } from 'react-native';
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps';
import { connect } from 'react-redux';
import Axios from 'axios';
import Spinner from 'react-native-loading-spinner-overlay';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
import ActionType from '../redux/globalActionType';
import i18n from 'i18n-js';
import session from '../function/session';
class AddreesDetail extends React.Component {
......@@ -49,10 +47,10 @@ class AddreesDetail extends React.Component {
_getPermissions = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
Alert.alert('Akses tidak dizinkan!')
Alert.alert(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
Alert.alert('Silahkan anda coba di real Device')
Alert.alert(i18n.t('tryItRealDevice'))
} else {
this._getLocationAsync()
}
......@@ -156,7 +154,7 @@ class AddreesDetail extends React.Component {
let search_location = await Location.geocodeAsync(this.state.address, Location.Accuracy.Balanced)
if (search_location.length === 0) {
Alert.alert('Alamat tidak di temukan!');
Alert.alert(i18n.t('alertAddressNotFound'));
} else {
let detail = await Location.reverseGeocodeAsync(search_location[0])
......@@ -194,8 +192,8 @@ class AddreesDetail extends React.Component {
Axios.post(this.props.BASE_URL + 'crm/v2/member/set_address', params).then(res => {
Alert.alert(
'Berhasil',
'Berhasil menambahkan Alamat !'
i18n.t('alertSuccessAddAddressTitle'),
i18n.t('alertSuccessAddAddressContent')
)
this.setState({
......@@ -229,7 +227,7 @@ class AddreesDetail extends React.Component {
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder="Cari Alamat"
<TextInput style={{ height: 45 }} placeholder={i18n.t('findAddress')}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
onChangeText={(address) => this.setState({ address })}>
......@@ -263,7 +261,7 @@ class AddreesDetail extends React.Component {
latitude: this.state.latitude,
longitude: this.state.longitude
}}
title={"Lokasi Kamu "}
title={i18n.t('yourLocation')}
description={this.state.street}
/>
</MapView>
......
import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Platform, } from 'react-native';
import { Camera } from 'expo-camera';
import * as Permissions from 'expo-permissions';
import { FontAwesome, Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import { Camera } from 'expo-camera';
import * as ImagePicker from 'expo-image-picker';
import * as Permissions from 'expo-permissions';
import React from 'react';
import { Platform, Text, TouchableOpacity, View } from 'react-native';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
......@@ -24,7 +24,7 @@ class Cameras extends React.Component {
if (Platform.OS === 'ios') {
const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
if (status !== 'granted') {
alert('Sorry, we need camera roll permissions to make this work!');
alert(i18n.t('alertCamera'));
}
}
// Camera Permission
......
import Axios from 'axios';
import i18n from 'i18n-js';
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, ScrollView, Alert, TouchableOpacity } from 'react-native';
import { Alert, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
import session from '../function/session';
import i18n from 'i18n-js';
class CardActivation extends React.Component {
constructor(props) {
......@@ -26,7 +25,7 @@ class CardActivation extends React.Component {
}
componentDidMount() {
console.log("INI CARD NUMBER : "+this.props.card_number)
// console.log("INI CARD NUMBER : "+this.props.card_number)
}
componentDidUpdate(prevProps) {
......@@ -51,7 +50,7 @@ class CardActivation extends React.Component {
}
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
console.log("INI DATANYA : " + JSON.stringify(res))
// console.log("INI DATANYA : " + JSON.stringify(res))
const dataCard = res.data
console.log(dataCard)
let email = dataCard.email
......@@ -100,7 +99,7 @@ class CardActivation extends React.Component {
spinner: true,
})
if (this.state.mobile_phone == '') {
Alert.alert('', 'Masukan No telp ');
Alert.alert('',i18n.t('inputPhoneNumber'));
} else {
let params = {
session_id: this.props.session_id,
......@@ -110,7 +109,7 @@ class CardActivation extends React.Component {
this.setState({
onclick: true
})
Alert.alert('Kami telah mengirimkan sms otp ke nomor anda!');
Alert.alert(i18n.t('alertSendOTP'));
this.interval = setInterval(
() => this.setState((prevState) => ({ timer: prevState.timer - 1 })),
1000
......@@ -143,7 +142,7 @@ class CardActivation extends React.Component {
spinner: false,
})
Alert.alert('Kami telah kembali mengirimkan sms otp ke nomor anda!');
Alert.alert(i18n.t('alertSendOTP'));
this.setState({
timer: 80
})
......@@ -168,7 +167,7 @@ class CardActivation extends React.Component {
token: this.state.token
}
console.log("INI PARAMS " + JSON.stringify(params))
// console.log("INI PARAMS " + JSON.stringify(params))
Axios.post(this.props.BASE_URL + 'crm/v2/card/activate', params).then(res => {
let setCardNumberProps = {
......@@ -177,7 +176,7 @@ class CardActivation extends React.Component {
this.props.setCardNumber(setCardNumberProps)
Alert.alert(
"",
"Kartu anda berhasil di aktifkan",
i18n.t('alertCardActivated'),
[
{
text: "OK", onPress: () => {
......@@ -210,9 +209,9 @@ class CardActivation extends React.Component {
token: this.state.token
}
console.log("INI STATENYA " + this.state.card_nums)
// console.log("INI STATENYA " + this.state.card_nums)
console.log("INI PARAMS " + JSON.stringify(params))
// console.log("INI PARAMS " + JSON.stringify(params))
Axios.post(this.props.BASE_URL + 'crm/v2/card/activate', params).then(res => {
let setCardNumberProps = {
......@@ -221,7 +220,7 @@ class CardActivation extends React.Component {
this.props.setCardNumber(setCardNumberProps)
Alert.alert(
"",
"Kartu anda berhasil di aktifkan",
i18n.t('alertCardActivated'),
[
{
text: "OK", onPress: () => {
......
......@@ -5,6 +5,7 @@ import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
class ChangeEmail extends React.Component {
......@@ -36,7 +37,7 @@ class ChangeEmail extends React.Component {
this.props.setEmailConfirm(emailConfirmProps)
Alert.alert(
'',
'Email terkirim, mohon dicek'
i18n.t('alertCheckEmail')
,
)
this.props.navigation.navigate("Email Confirmation");
......@@ -58,7 +59,7 @@ class ChangeEmail extends React.Component {
/>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 50 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>New Email</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('newEmail')}</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(email) => this.setState({ email })}
value={this.state.email}
......@@ -69,7 +70,7 @@ class ChangeEmail extends React.Component {
onFocus={() => this.setState({caretHidden: false})}/>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.changeEmail()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>{i18n.t('submit')}</Text>
</View>
</TouchableOpacity>
</View>
......
import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, TextInput, View, Button, Alert, TouchableOpacity } from 'react-native';
import Axios from 'axios';
import { BASE_URL_CHANGE_PASSWORD } from '../model/Base_Model';
import { connect } from 'react-redux';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
import React from 'react';
import { Alert, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import Toast from 'react-native-tiny-toast';
import { connect } from 'react-redux';
import MyStatusBar from './MyStatusBar';
class ChangePassword extends React.Component {
constructor(props) {
......@@ -32,7 +31,7 @@ class ChangePassword extends React.Component {
}
Axios.post(this.props.BASE_URL + 'crm/v2/auth/change_password', params).then(res => {
this.props.navigation.navigate('Profile');
Toast.show('Ganti Password Berhasil')
Toast.show(i18n.t('alertChangePasswordSuccess'))
}).catch(error => {
console.log(error)
let response = error.response.data;
......
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity,Image,ScrollView,TouchableHighlight } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import React from 'react';
import { Image, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import RNPickerSelect from 'react-native-picker-select';
import { connect } from 'react-redux';
import { BASE_URL_GET_ENUM } from '../model/Base_Model';
import ActionType from '../redux/globalActionType';
......
import { EvilIcons, Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import Axios from 'axios';
import i18n from 'i18n-js';
import React from 'react';
import { View, Text, StyleSheet, Button, FlatList, Alert, TextInput, Image, ScrollView, ActivityIndicator } from 'react-native';
import { ActivityIndicator, Alert, FlatList, ScrollView, StyleSheet, Text, TextInput, View } from 'react-native';
import { CheckBox } from 'react-native-elements';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { connect } from 'react-redux';
import { CheckBox } from 'react-native-elements';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import { MaterialCommunityIcons, Ionicons, EvilIcons } from '@expo/vector-icons';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
// import ravLog from '../helper/debug';
......@@ -54,7 +54,7 @@ class DeliveryAddrees extends React.Component {
}
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_address', params).then(res => {
const dataAlamat = res.data.data;
console.log("INI DATA :" + JSON.stringify(dataAlamat))
// console.log("INI DATA :" + JSON.stringify(dataAlamat))
let address = []
for (let i = 0; i < dataAlamat.length; i++) {
const element = dataAlamat[i];
......
import Axios from 'axios';
import i18n from 'i18n-js';
import * as React from 'react';
import { Button, View, Text, StyleSheet, TextInput, Alert, Image } from 'react-native';
import { Alert, Image, StyleSheet, Text, TextInput, View } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import Axios from 'axios';
import Spinner from 'react-native-loading-spinner-overlay';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model';
import Spinner from 'react-native-loading-spinner-overlay';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
class EmailConfirmation extends React.Component {
......@@ -21,8 +20,8 @@ class EmailConfirmation extends React.Component {
}
componentDidMount() {
console.log("EMAIL KONFIRMATISI" + this.props.pageEmailConfirmation)
console.log("EMAIL proses" + this.props.proses)
// console.log("EMAIL KONFIRMATISI" + this.props.pageEmailConfirmation)
// console.log("EMAIL proses" + this.props.proses)
}
handleSubmit() {
......@@ -99,7 +98,7 @@ class EmailConfirmation extends React.Component {
this.setState({
spinner: false,
})
console.log('masuk pak eko')
// console.log('masuk pak eko')
// this.props.navigation.reset("Login");
this.props.navigation.reset({
index: 0,
......@@ -164,7 +163,7 @@ class EmailConfirmation extends React.Component {
}).catch(error => {
let response = error.response.data;
Alert.alert('', 'Silahkan Cek Email Kembali');
Alert.alert('', i18n.t('alertCheckEmail'));
this.setState({
spinner: false,
})
......@@ -185,8 +184,8 @@ class EmailConfirmation extends React.Component {
spinner: false,
})
Alert.alert(
'Sukses',
'Email berhasil di kirimkan! '
i18n.t('alertSuccessTitle'),
i18n.t('alertEmailSended')
)
}).catch(error => {
......
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