Skip to content
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
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ android {
}

dependencies {
implementation project(':react-native-localize')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation project(':react-native-login-with-amazon')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.reactcommunity.rnlocalize.RNLocalizePackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.reactlibrary.RNLoginWithAmazonPackage;
import com.oblador.vectoricons.VectorIconsPackage;
Expand Down Expand Up @@ -49,6 +50,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new RNLocalizePackage(),
new RNGestureHandlerPackage(),
new RNLoginWithAmazonPackage(),
new VectorIconsPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'AmazonHandmadeRN'
include ':react-native-localize'
project(':react-native-localize').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-localize/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-vector-icons'
Expand Down
166 changes: 106 additions & 60 deletions ios/AmazonHandmadeRN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
13B2DDDF229E64D700903596 /* libRNLocalize.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13B2DDDB229E648400903596 /* libRNLocalize.a */; };
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2107522A99AE4FC6825D560C /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46FB1083A2894CB8A86E57F7 /* Octicons.ttf */; };
Expand Down Expand Up @@ -152,6 +153,48 @@
remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
remoteInfo = RCTWebSocket;
};
13B2DDCF229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
remoteInfo = jsi;
};
13B2DDD1229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
remoteInfo = jsiexecutor;
};
13B2DDD3229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
remoteInfo = "jsi-tvOS";
};
13B2DDD5229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
remoteInfo = "jsiexecutor-tvOS";
};
13B2DDDA229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 13B2DDA7229E648400903596 /* RNLocalize.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNLocalize;
};
13B2DDDC229E648400903596 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 13B2DDA7229E648400903596 /* RNLocalize.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
remoteInfo = "RNLocalize-tvOS";
};
146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
Expand Down Expand Up @@ -257,20 +300,6 @@
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
remoteInfo = jschelpers;
};
3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
Expand Down Expand Up @@ -341,20 +370,6 @@
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
remoteInfo = "double-conversion-tvOS";
};
83B7621B1FE42BDD00F21A7A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
remoteInfo = privatedata;
};
83B7621D1FE42BDD00F21A7A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
remoteInfo = "privatedata-tvOS";
};
8E7D4B011F8AFD6F00699FE4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
Expand Down Expand Up @@ -403,6 +418,7 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AmazonHandmadeRN/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = AmazonHandmadeRN/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AmazonHandmadeRN/main.m; sourceTree = "<group>"; };
13B2DDA7229E648400903596 /* RNLocalize.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNLocalize.xcodeproj; path = "../node_modules/react-native-localize/ios/RNLocalize.xcodeproj"; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
1C347B193AC84C1392129B44 /* HandmadeLogo@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "HandmadeLogo@2x.png"; path = "../assets/images/2x/HandmadeLogo@2x.png"; sourceTree = "<group>"; };
1C71F371E58D444E80827434 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -481,6 +497,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
13B2DDDF229E64D700903596 /* libRNLocalize.a in Frameworks */,
130A3DAA21ED97270020C367 /* SafariServices.framework in Frameworks */,
130A3DA821ED97130020C367 /* Security.framework in Frameworks */,
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
Expand Down Expand Up @@ -628,6 +645,15 @@
name = AmazonHandmadeRN;
sourceTree = "<group>";
};
13B2DDA8229E648400903596 /* Products */ = {
isa = PBXGroup;
children = (
13B2DDDB229E648400903596 /* libRNLocalize.a */,
13B2DDDD229E648400903596 /* libRNLocalize-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
146834001AC3E56700842450 /* Products */ = {
isa = PBXGroup;
children = (
Expand All @@ -637,16 +663,16 @@
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
21BD0A8E216B7CEC00CE6C8C /* libjsinspector.a */,
21BD0A90216B7CEC00CE6C8C /* libjsinspector-tvOS.a */,
836AA8EA1FACD2AC0010E64B /* libthird-party.a */,
836AA8EC1FACD2AC0010E64B /* libthird-party.a */,
836AA8EE1FACD2AC0010E64B /* libdouble-conversion.a */,
836AA8F01FACD2AC0010E64B /* libdouble-conversion.a */,
83B7621C1FE42BDD00F21A7A /* libprivatedata.a */,
83B7621E1FE42BDD00F21A7A /* libprivatedata-tvOS.a */,
13B2DDD0229E648400903596 /* libjsi.a */,
13B2DDD2229E648400903596 /* libjsiexecutor.a */,
13B2DDD4229E648400903596 /* libjsi-tvOS.a */,
13B2DDD6229E648400903596 /* libjsiexecutor-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -681,6 +707,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
13B2DDA7229E648400903596 /* RNLocalize.xcodeproj */,
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
Expand Down Expand Up @@ -939,6 +966,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -998,6 +1026,10 @@
ProductGroup = 8E7D4B111F8AFD6F00699FE4 /* Products */;
ProjectRef = ADF4CB3C3BF44D3EBA8B78C4 /* RNFirebase.xcodeproj */;
},
{
ProductGroup = 13B2DDA8229E648400903596 /* Products */;
ProjectRef = 13B2DDA7229E648400903596 /* RNLocalize.xcodeproj */;
},
{
ProductGroup = 130A3F7F21F019170020C367 /* Products */;
ProjectRef = FCAB855C8303479185DDE00C /* RNLoginWithAmazon.xcodeproj */;
Expand Down Expand Up @@ -1070,6 +1102,48 @@
remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDD0229E648400903596 /* libjsi.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsi.a;
remoteRef = 13B2DDCF229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDD2229E648400903596 /* libjsiexecutor.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsiexecutor.a;
remoteRef = 13B2DDD1229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDD4229E648400903596 /* libjsi-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsi-tvOS.a";
remoteRef = 13B2DDD3229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDD6229E648400903596 /* libjsiexecutor-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsiexecutor-tvOS.a";
remoteRef = 13B2DDD5229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDDB229E648400903596 /* libRNLocalize.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNLocalize.a;
remoteRef = 13B2DDDA229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
13B2DDDD229E648400903596 /* libRNLocalize-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRNLocalize-tvOS.a";
remoteRef = 13B2DDDC229E648400903596 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
146834041AC3E56700842450 /* libReact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -1168,20 +1242,6 @@
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -1252,20 +1312,6 @@
remoteRef = 836AA8EF1FACD2AC0010E64B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83B7621C1FE42BDD00F21A7A /* libprivatedata.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libprivatedata.a;
remoteRef = 83B7621B1FE42BDD00F21A7A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83B7621E1FE42BDD00F21A7A /* libprivatedata-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libprivatedata-tvOS.a";
remoteRef = 83B7621D1FE42BDD00F21A7A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
8E7D4B021F8AFD6F00699FE4 /* libRCTBlob-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down
2 changes: 2 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ target 'AmazonHandmadeRN' do
pod 'RNLoginWithAmazon', :path => '../node_modules/react-native-login-with-amazon'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

pod 'RNLocalize', :path => '../node_modules/react-native-localize'

end

post_install do |installer|
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
}
},
"dependencies": {
"i18n-js": "^3.2.1",
"native-base": "^2.12.1",
"react": "16.8.4",
"react-native": "0.59.4",
Expand All @@ -73,6 +74,7 @@
"react-native-keyboard-aware-scrollview": "^2.0.0",
"react-native-linear-gradient": "^2.5.4",
"react-native-login-with-amazon": "^1.1.8",
"react-native-localize": "^1.1.2",
"react-native-motion": "^1.0.2",
"react-native-side-drawer": "^1.0.9",
"react-native-simple-radio-button": "^2.7.3",
Expand Down
4 changes: 3 additions & 1 deletion src/components/AddImage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class AddImage extends Component {
/>
:
<View style={[styles.default, styles.addImage, this.props.style]}>
<Text style={styles.text}>Add Image</Text>
<Text style={styles.text}>{this.props.text? this.props.text: "Add Image"}</Text>
<Icon
name="plus"
size={20}
Expand Down Expand Up @@ -48,8 +48,10 @@ const styles = StyleSheet.create({
backgroundColor: '#DDDDDD'
},
text: {
textAlign: 'center',
fontSize: 16,
fontWeight: 'bold',
color: 'darkgrey'

}
})
37 changes: 37 additions & 0 deletions src/components/Translate/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Text } from 'react-native'
import I18n, {setLocale} from "../../utils/i18n"

class Translate extends Component {
constructor(props) {
super(props)

this.getTranslation = this.getTranslation.bind(this)
}

getTranslation(string){
const lang = this.props.Settings.language

return I18n.t(string, {locale: lang})
}

render() {
return (
<Text style={[styles.containerStyle, this.props.style]}> {this.getTranslation(this.props.transString)} </Text>
)
}
}

function mapStateToProps(state) {
return {
Errors: state.Errors,
Settings: state.Settings
}
}

const styles = {
containerStyle: {}
}

export default connect(mapStateToProps)(Translate)
Loading