Commit 0f249e58 by Giang Tran

fix language

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