Commit aa00452d by Giang Tran

fix bug language

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