Commit 0f249e58 by Giang Tran

fix language

parent 31629030
......@@ -132,8 +132,8 @@ android {
applicationId "com.dcv.invest"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 9
versionName "1.3"
versionCode 2
versionName "1.4"
vectorDrawables.useSupportLibrary = true
}
splits {
......
......@@ -4,6 +4,7 @@ import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.reactnativecommunity.netinfo.NetInfoPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
......
rootProject.name = 'Invest'
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':@react-native-community_netinfo'
project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android')
include ':react-native-bootsplash'
......
......@@ -89,6 +89,8 @@ target 'Invest' do
pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
target 'InvestTests' do
inherit! :complete
# Pods for testing
......
......@@ -18,6 +18,7 @@ import Registor from './Registor';
import {ScrollView} from 'react-native-gesture-handler';
import R from '../../assets/R';
import I18n from '../../helper/i18/i18n';
import {connect} from 'react-redux';
const {width, height} = Dimensions.get('window');
......@@ -51,12 +52,18 @@ const Authen = (props) => {
<Tab.Screen
name="LOGIN"
component={Login}
options={{tabBarLabel: I18n.t('Login')}}
options={{
tabBarLabel:
props.language.language == 'vi' ? 'Đăng nhập' : 'Login',
}}
/>
<Tab.Screen
name="REGISTOR"
component={Registor}
options={{tabBarLabel: I18n.t('Register')}}
options={{
tabBarLabel:
props.language.language == 'vi' ? 'Đăng ký' : 'Register',
}}
/>
</Tab.Navigator>
</ImageBackground>
......@@ -66,4 +73,10 @@ const Authen = (props) => {
);
};
export default Authen;
const mapStateToProps = (state) => {
return {
language: state.languageReducer,
};
};
export default connect(mapStateToProps, {})(Authen);
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