Commit aa00452d by Giang Tran

fix bug language

parent 3352b9ca
...@@ -903,7 +903,7 @@ ...@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements; CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -937,7 +937,7 @@ ...@@ -937,7 +937,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements; CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
import I18n from '../helper/i18/i18n';
export const RadioBuySale = [ export const RadioBuySale = [
{label: I18n.t('Buy'), value: 'BUY_IN'}, {label: 'Mua', value: 'BUY_IN'},
{label: I18n.t('Sale'), value: 'SELL_OUT'}, {label: 'Bán', value: 'SELL_OUT'},
];
export const RadioBuySaleEN = [
{label: 'Buy', value: 'BUY_IN'},
{label: 'Sell', value: 'SELL_OUT'},
]; ];
...@@ -52,7 +52,7 @@ const styles = StyleSheet.create({ ...@@ -52,7 +52,7 @@ const styles = StyleSheet.create({
marginRight: 15, marginRight: 15,
}, },
img: { img: {
width: 250, width: 250,
height: 200, height: 200,
borderRadius: 5, borderRadius: 5,
justifyContent: 'center', justifyContent: 'center',
......
...@@ -18,12 +18,14 @@ import I18n from '../../../helper/i18/i18n'; ...@@ -18,12 +18,14 @@ import I18n from '../../../helper/i18/i18n';
import PickerItem from '../../../components/Picker/PickerItem'; import PickerItem from '../../../components/Picker/PickerItem';
import R from '../../../assets/R'; import R from '../../../assets/R';
import RadioForm from 'react-native-simple-radio-button'; import RadioForm from 'react-native-simple-radio-button';
import {RadioBuySale} from '../../../Config/constants'; import {RadioBuySale, RadioBuySaleEN} from '../../../Config/constants';
import TextMoney from '../../../components/Input/InputMoney'; import TextMoney from '../../../components/Input/InputMoney';
import ItemCalculator from './ItemCalculator'; import ItemCalculator from './ItemCalculator';
import AppText from '../../../components/AppText'; import AppText from '../../../components/AppText';
import {connect} from 'react-redux';
const CalculatorProfitLossView = (props) => { const CalculatorProfitLossView = (props) => {
console.log(props.language.language);
return ( return (
<View style={{flex: 1, flexDirection: 'column', backgroundColor: 'white'}}> <View style={{flex: 1, flexDirection: 'column', backgroundColor: 'white'}}>
<HeaderBack title={'CalculatorProfitLoss'} isWhite={true} /> <HeaderBack title={'CalculatorProfitLoss'} isWhite={true} />
...@@ -48,7 +50,9 @@ const CalculatorProfitLossView = (props) => { ...@@ -48,7 +50,9 @@ const CalculatorProfitLossView = (props) => {
</AppText> </AppText>
<View style={{width: WIDTHXD(600), height: HEIGHTXD(85)}}> <View style={{width: WIDTHXD(600), height: HEIGHTXD(85)}}>
<RadioForm <RadioForm
radio_props={RadioBuySale} radio_props={
props.language.language == 'vi' ? RadioBuySale : RadioBuySaleEN
}
labelStyle={{fontSize: getFontXD(42)}} labelStyle={{fontSize: getFontXD(42)}}
formHorizontal={true} formHorizontal={true}
style={styles.row} style={styles.row}
...@@ -158,4 +162,11 @@ const styles = StyleSheet.create({ ...@@ -158,4 +162,11 @@ const styles = StyleSheet.create({
fontSize: getFontXD(48), fontSize: getFontXD(48),
}, },
}); });
export default CalculatorProfitLossView;
const mapStateToProps = (state) => {
return {
language: state.languageReducer,
};
};
export default connect(mapStateToProps, {})(CalculatorProfitLossView);
...@@ -68,6 +68,7 @@ const styles = StyleSheet.create({ ...@@ -68,6 +68,7 @@ const styles = StyleSheet.create({
borderColor: '#707070', borderColor: '#707070',
paddingHorizontal: WIDTHXD(24), paddingHorizontal: WIDTHXD(24),
paddingVertical: WIDTHXD(24), paddingVertical: WIDTHXD(24),
}, },
textTitle: { textTitle: {
fontSize: getFontXD(39), fontSize: getFontXD(39),
......
...@@ -6,6 +6,7 @@ import Escrow from './Escrow/Escrow'; ...@@ -6,6 +6,7 @@ import Escrow from './Escrow/Escrow';
import PriceList from './PriceList/PriceList'; import PriceList from './PriceList/PriceList';
import TimeTransaction from './TimeTransaction/TimeTransaction'; import TimeTransaction from './TimeTransaction/TimeTransaction';
import I18n from '../../helper/i18/i18n'; import I18n from '../../helper/i18/i18n';
import {connect} from 'react-redux';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
const Tab = createMaterialTopTabNavigator(); const Tab = createMaterialTopTabNavigator();
...@@ -29,22 +30,36 @@ const NewFeed = (props) => { ...@@ -29,22 +30,36 @@ const NewFeed = (props) => {
<Tab.Screen <Tab.Screen
name="PriceList" name="PriceList"
component={PriceList} component={PriceList}
options={{tabBarLabel: 'Bảng phí'}} options={{
tabBarLabel:
props.language.language == 'vi' ? 'Bảng phí' : 'PriceList',
}}
/> />
<Tab.Screen <Tab.Screen
name="TimeTransaction" name="TimeTransaction"
component={TimeTransaction} component={TimeTransaction}
options={{tabBarLabel: 'Thời gian GD'}} options={{
tabBarLabel:
props.language.language == 'vi'
? 'Thời gian GD'
: 'Time transace',
}}
/> />
<Tab.Screen <Tab.Screen
name="Escrow" name="Escrow"
component={Escrow} component={Escrow}
options={{tabBarLabel: 'Ký quỹ'}} options={{
tabBarLabel:
props.language.language == 'vi' ? 'Ký quỹ' : 'Escrow',
}}
/> />
<Tab.Screen <Tab.Screen
name="DueDate" name="DueDate"
component={DueDate} component={DueDate}
options={{tabBarLabel: 'Lịch đáo hạn'}} options={{
tabBarLabel:
props.language.language == 'vi' ? 'Lịch đáo hạn' : 'Due date',
}}
/> />
</Tab.Navigator> </Tab.Navigator>
</View> </View>
...@@ -52,4 +67,10 @@ const NewFeed = (props) => { ...@@ -52,4 +67,10 @@ const NewFeed = (props) => {
); );
}; };
export default NewFeed; const mapStateToProps = (state) => {
return {
language: state.languageReducer,
};
};
export default connect(mapStateToProps, {})(NewFeed);
...@@ -36,6 +36,7 @@ import { ...@@ -36,6 +36,7 @@ import {
ROSE, ROSE,
HISTORY, HISTORY,
CHOOSEMETHOD, CHOOSEMETHOD,
WALLETWITHDRAW,
} from '../../routers/ScreenNames'; } from '../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
...@@ -100,7 +101,7 @@ const menus = [ ...@@ -100,7 +101,7 @@ const menus = [
id: '62', id: '62',
title: 'Withdraw', title: 'Withdraw',
icon: R.images.iconWithdrawMenu, icon: R.images.iconWithdrawMenu,
screen: WITHDRAW, screen: WALLETWITHDRAW,
}, },
{ {
id: '63', id: '63',
......
...@@ -18,7 +18,6 @@ const FirebaseNotification = (props) => { ...@@ -18,7 +18,6 @@ const FirebaseNotification = (props) => {
id: props.user.uid, id: props.user.uid,
platform: Platform.OS, platform: Platform.OS,
}); });
console.log('res', res.data.data);
if (res.data.code == 200 && res.data.data) { if (res.data.code == 200 && res.data.data) {
props.saveUserToRedux(res.data.data); props.saveUserToRedux(res.data.data);
} }
......
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
FirstEscrowTotal: 'First escrow total (VNĐ)', FirstEscrowTotal: 'First escrow total (VNĐ)',
Calculator: 'Calculator', Calculator: 'Calculator',
Tool: 'Tool', Tool: 'Tool',
_Sell: 'Sell',
CaculatedDeposit: 'Caculated deposit', CaculatedDeposit: 'Caculated deposit',
CaculatedProfitLoss: 'Caculated profit loss', CaculatedProfitLoss: 'Caculated profit loss',
CaculatedStopLoss: 'Caculated stop loss', CaculatedStopLoss: 'Caculated stop loss',
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
Sunday: 'Sunday', Sunday: 'Sunday',
CalculatorProfitLoss: 'Calculator profit and loss', CalculatorProfitLoss: 'Calculator profit and loss',
Buy: 'Buy', Buy: 'Buy',
Sale: 'Sale', Sale: 'Sell',
OpenPrice: 'Open price', OpenPrice: 'Open price',
CloseStatusPrice: 'Close stauts price', CloseStatusPrice: 'Close stauts price',
SlotNumber: 'Slot number', SlotNumber: 'Slot number',
......
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
BUY_IN: 'Mua vào', BUY_IN: 'Mua vào',
SELL_OUT: 'Bán ra', SELL_OUT: 'Bán ra',
EscrowCalculator: 'Tính ký quỹ', EscrowCalculator: 'Tính ký quỹ',
FirstEscrowTotal: 'Tổng ký quỹ ban đầu', FirstEscrowTotal: 'Tổng ký quỹ ban đầu (VNĐ)',
YouCanNotTransaction: YouCanNotTransaction:
'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại', 'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại',
YouCanTransaction: YouCanTransaction:
...@@ -283,6 +283,8 @@ export default { ...@@ -283,6 +283,8 @@ export default {
FirstPriceRange: 'Giới hạn giá ban đầu', FirstPriceRange: 'Giới hạn giá ban đầu',
ExpandPriceRange: 'Giới hạn giá mở rộng', ExpandPriceRange: 'Giới hạn giá mở rộng',
code: 'Mã', code: 'Mã',
AvailableMargin: 'Ký quỹ khả dụng', AvailableMargin: 'Ký quỹ khả dụng (VNĐ) ',
Calculator: 'Tính', Calculator: 'Tính',
_Sell: 'Bán',
FirstEscrow: 'Ký quỹ ban đầu (VNĐ) ',
}; };
...@@ -113,7 +113,8 @@ const TabNavigator = (props) => { ...@@ -113,7 +113,8 @@ const TabNavigator = (props) => {
name="Screen2" name="Screen2"
component={Transaction} component={Transaction}
options={{ options={{
tabBarLabel: I18n.t('Tradding'), tabBarLabel:
props.language.language == 'vi' ? 'Giao dịch' : 'Tradding',
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Image <Image
source={R.images.iconTransaction2} source={R.images.iconTransaction2}
...@@ -135,7 +136,8 @@ const TabNavigator = (props) => { ...@@ -135,7 +136,8 @@ const TabNavigator = (props) => {
name="Screen3" name="Screen3"
component={Notification} component={Notification}
options={{ options={{
tabBarLabel: I18n.t('Notification'), tabBarLabel:
props.language.language == 'vi' ? 'Thông báo' : 'Notification',
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Ionicons <Ionicons
name="ios-notifications-outline" name="ios-notifications-outline"
...@@ -149,7 +151,7 @@ const TabNavigator = (props) => { ...@@ -149,7 +151,7 @@ const TabNavigator = (props) => {
name="Screen4" name="Screen4"
component={NewFeed} component={NewFeed}
options={{ options={{
tabBarLabel: I18n.t('News'), tabBarLabel: props.language.language == 'vi' ? 'Tin tức' : 'News',
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Ionicons name="newspaper-outline" size={size} color={color} /> <Ionicons name="newspaper-outline" size={size} color={color} />
), ),
...@@ -165,6 +167,7 @@ const mapStateToProps = (state) => { ...@@ -165,6 +167,7 @@ const mapStateToProps = (state) => {
user: state.userReducer, user: state.userReducer,
notifi: state.CountNotificationReducer, notifi: state.CountNotificationReducer,
screenInit: state.ScreenInitReducer, screenInit: state.ScreenInitReducer,
language: state.languageReducer,
}; };
}; };
......
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