Skip to content

Commit

Permalink
Merge pull request #4390 from Expensify/cherry-pick-staging-4366
Browse files Browse the repository at this point in the history
  • Loading branch information
OSBotify authored Aug 3, 2021
2 parents 8793ed2 + 2fd926a commit 7c13efd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001008202
versionName "1.0.82-2"
versionCode 1001008203
versionName "1.0.82-3"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.82.2</string>
<string>1.0.82.3</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.82.2</string>
<string>1.0.82.3</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.82-2",
"version": "1.0.82-3",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
16 changes: 9 additions & 7 deletions src/components/withLocalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,19 @@ const localeProviderDefaultProps = {
};

class LocaleContextProvider extends React.Component {
constructor(props) {
super(props);

/* The context this component exposes to consumers */
this.translateUtils = {
/**
* The context this component exposes to child components
* @returns {object} translation util functions and locale
*/
getContextValue() {
return {
translate: this.translate.bind(this),
numberFormat: this.numberFormat.bind(this),
timestampToRelative: this.timestampToRelative.bind(this),
timestampToDateTime: this.timestampToDateTime.bind(this),
fromLocalPhone: this.fromLocalPhone.bind(this),
toLocalPhone: this.toLocalPhone.bind(this),
locale: this.props.preferredLocale,
};
}

Expand Down Expand Up @@ -115,7 +117,7 @@ class LocaleContextProvider extends React.Component {

render() {
return (
<LocaleContext.Provider value={this.translateUtils}>
<LocaleContext.Provider value={this.getContextValue()}>
{this.props.children}
</LocaleContext.Provider>
);
Expand All @@ -137,7 +139,7 @@ export default function withLocalize(WrappedComponent) {
const WithLocalize = forwardRef((props, ref) => (
<LocaleContext.Consumer>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
{ translateUtils => <WrappedComponent {...translateUtils} {...props} ref={ref} />}
{translateUtils => <WrappedComponent {...translateUtils} {...props} ref={ref} />}
</LocaleContext.Consumer>
));

Expand Down

0 comments on commit 7c13efd

Please sign in to comment.