-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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] Translated error messages #20093
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@arosiclair Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@luacmartins This is ready for review. I have added two tests. Please let me know if there are any other scenarios we should include in the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Lemme know if I should do the checklist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @luacmartins +1 |
Ready for another review , I have included an extra test for secondary contact method. |
@luacmartins It looks that we should update all forms because we use translated errors in form validation as well. This will make the PR larger and have a broader scope, which may cause some delay . I suggest merging this PR for now, since the issue is already in production, and I will create another follow-up PR that covers all form validation methods. @luacmartins what do you think about this plan ? Here is an example
|
That plan seems fine to me. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromechrome.movMobile Web - Safarisafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
@fedirjh can you please create the follow up PR with the Form changes? |
@luacmartins Sure, I will create a follow-up PR shortly. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 1.3.24-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
@luacmartins @chiragsalian
Details
This PR builds upon the previous changes made in PR #19324 by refactoring the micro generated error and introducing key-based error storage. However, it has come to our attention that there are some components within the application that still handle errors using the old translation-based approach, resulting in inconsistencies. This follow-up PR aims to rectify this oversight by updating those components to utilize the new error handling mechanism.
Fixed Issues
$ #19324 (comment)
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Test 1 : Bank Account
Update this line in /src/pages/ReimbursementAccount/BankAccountManualStep.js to
021000021
231432
An unexpected error occurred while trying to add your bank account. Please try again.
Test 2 : Account Details Login Page
Add the line below to /src/libs/actions/Session/index.js
Update src/libs/API.js to include this line
Couldn't retrieve account details, please try to sign in again.
Test 3 : Add Contact Method
Please enter the magic code sent to new add email
Offline tests
QA Steps
Test 3 : Add Contact Method
Please enter the magic code sent to new add email
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android