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

Fix: Link has been sent text dynamic translation on login screens #17351

Merged
merged 3 commits into from
Apr 14, 2023
Merged
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
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
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