-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Fix] Translated error messages #20093
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
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. |
arosiclair
left a comment
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
luacmartins
left a comment
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
021000021231432An 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 emailOffline tests
QA Steps
Test 3 : Add Contact Method
Please enter the magic code sent to new add emailPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android