Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Language Localization #1

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
119 changes: 11 additions & 108 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,115 +1,18 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/

import React from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';

import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

const Section: React.FC<{
title: string;
}> = ({children, title}) => {
const isDarkMode = useColorScheme() === 'dark';
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
</View>
);
import React, {FC, useEffect, useRef} from 'react';
import {Provider} from 'react-redux';
import {PersistGate} from 'redux-persist/integration/react';
import MainStack from './src/navigation';
import {store} from './src/redux/store';
type IAppStates = {
isLoading: boolean;
};

const App = () => {
const isDarkMode = useColorScheme() === 'dark';

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};

const App: FC<IAppStates> = ({isLoading}) => {
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
<Provider store={store}>
<MainStack />
</Provider>
);
};

const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});

export default App;
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Inter-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Inter-Thin.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Karla-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Karla-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.th3rdwave.safeareacontext.SafeAreaContextPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0

org.gradle.jvmargs=-Xmx4096M
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rootProject.name = 'FeatureImplement'
include ':react-native-safe-area-context'
project(':react-native-safe-area-context').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-safe-area-context/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
File renamed without changes.
305 changes: 305 additions & 0 deletions ios/FeatureImplement.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

79 changes: 78 additions & 1 deletion ios/FeatureImplement/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -51,5 +51,82 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>Comfortaa-Bold.ttf</string>
<string>Comfortaa-Light.ttf</string>
<string>Comfortaa-Regular.ttf</string>
<string>Inter-Black.ttf</string>
<string>Inter-Bold.ttf</string>
<string>Inter-ExtraBold.ttf</string>
<string>Inter-ExtraLight.ttf</string>
<string>Inter-Light.ttf</string>
<string>Inter-Medium.ttf</string>
<string>Inter-Regular.ttf</string>
<string>Inter-SemiBold.ttf</string>
<string>Inter-Thin.ttf</string>
<string>Karla-Bold.ttf</string>
<string>Karla-BoldItalic.ttf</string>
<string>Karla-ExtraBold.ttf</string>
<string>Karla-ExtraBoldItalic.ttf</string>
<string>Karla-ExtraLight.ttf</string>
<string>Karla-ExtraLightItalic.ttf</string>
<string>Karla-Italic.ttf</string>
<string>Karla-Light.ttf</string>
<string>Karla-LightItalic.ttf</string>
<string>Karla-Medium.ttf</string>
<string>Karla-MediumItalic.ttf</string>
<string>Karla-Regular.ttf</string>
<string>Karla-SemiBold.ttf</string>
<string>Karla-SemiBoldItalic.ttf</string>
<string>Montserrat-Black.ttf</string>
<string>Montserrat-BlackItalic.ttf</string>
<string>Montserrat-Bold.ttf</string>
<string>Montserrat-BoldItalic.ttf</string>
<string>Montserrat-ExtraBold.ttf</string>
<string>Montserrat-ExtraBoldItalic.ttf</string>
<string>Montserrat-ExtraLight.ttf</string>
<string>Montserrat-ExtraLightItalic.ttf</string>
<string>Montserrat-Italic.ttf</string>
<string>Montserrat-Light.ttf</string>
<string>Montserrat-LightItalic.ttf</string>
<string>Montserrat-Medium.ttf</string>
<string>Montserrat-MediumItalic.ttf</string>
<string>Montserrat-Regular.ttf</string>
<string>Montserrat-SemiBold.ttf</string>
<string>Montserrat-SemiBoldItalic.ttf</string>
<string>Montserrat-Thin.ttf</string>
<string>Montserrat-ThinItalic.ttf</string>
<string>OpenSans-Bold.ttf</string>
<string>OpenSans-BoldItalic.ttf</string>
<string>OpenSans-ExtraBold.ttf</string>
<string>OpenSans-ExtraBoldItalic.ttf</string>
<string>OpenSans-Italic.ttf</string>
<string>OpenSans-Light.ttf</string>
<string>OpenSans-LightItalic.ttf</string>
<string>OpenSans-Medium.ttf</string>
<string>OpenSans-MediumItalic.ttf</string>
<string>OpenSans-Regular.ttf</string>
<string>OpenSans-SemiBold.ttf</string>
<string>OpenSans-SemiBoldItalic.ttf</string>
<string>Poppins-Black.ttf</string>
<string>Poppins-BlackItalic.ttf</string>
<string>Poppins-Bold.ttf</string>
<string>Poppins-BoldItalic.ttf</string>
<string>Poppins-ExtraBold.ttf</string>
<string>Poppins-ExtraBoldItalic.ttf</string>
<string>Poppins-ExtraLight.ttf</string>
<string>Poppins-ExtraLightItalic.ttf</string>
<string>Poppins-Italic.ttf</string>
<string>Poppins-Light.ttf</string>
<string>Poppins-LightItalic.ttf</string>
<string>Poppins-Medium.ttf</string>
<string>Poppins-MediumItalic.ttf</string>
<string>Poppins-Regular.ttf</string>
<string>Poppins-SemiBold.ttf</string>
<string>Poppins-SemiBoldItalic.ttf</string>
<string>Poppins-Thin.ttf</string>
<string>Poppins-ThinItalic.ttf</string>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ target 'FeatureImplement' do
:hermes_enabled => false
)

pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'

target 'FeatureImplementTests' do
inherit! :complete
# Pods for testing
Expand Down
Loading