Skip to content

Commit

Permalink
Merge pull request #17351 from Pujan92/fix/17216
Browse files Browse the repository at this point in the history
Fix: Link has been sent text dynamic translation on login screens
  • Loading branch information
tgolen authored Apr 14, 2023
2 parents 1138093 + 532ad39 commit ea3d656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/libs/actions/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function resendValidationLink(login = credentials.login) {
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: Localize.translateLocal('resendValidationForm.linkHasBeenResent'),
message: 'resendValidationForm.linkHasBeenResent',
},
}];
const failureData = [{
Expand Down Expand Up @@ -127,7 +127,7 @@ function resendValidateCode(login = credentials.login) {
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: Localize.translateLocal('validateCodeForm.codeSent'),
message: 'validateCodeForm.codeSent',
},
}];
const failureData = [{
Expand Down Expand Up @@ -473,7 +473,7 @@ function resendResetPassword() {
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: Localize.translateLocal('resendValidationForm.linkHasBeenResent'),
message: 'resendValidationForm.linkHasBeenResent',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signin/ResendValidationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const ResendValidationForm = (props) => {
{!_.isEmpty(props.account.message) && (

// DotIndicatorMessage mostly expects onyxData errors so we need to mock an object so that the messages looks similar to prop.account.errors
<DotIndicatorMessage style={[styles.mb5, styles.flex0]} type="success" messages={{0: props.account.message}} />
<DotIndicatorMessage style={[styles.mb5, styles.flex0]} type="success" messages={{0: props.translate(props.account.message)}} />
)}
{!_.isEmpty(props.account.errors) && (
<DotIndicatorMessage style={[styles.mb5]} type="error" messages={props.account.errors} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class BaseValidateCodeForm extends React.Component {
<View style={[styles.changeExpensifyLoginLinkContainer]}>
{this.state.linkSent ? (
<Text style={[styles.mt2]}>
{this.props.account.message}
{this.props.account.message ? this.props.translate(this.props.account.message) : ''}
</Text>
) : (
<TouchableOpacity
Expand Down

0 comments on commit ea3d656

Please sign in to comment.