Fix error message for duplicate waypoint#30548
Conversation
|
@dukenv0307, please check this #29803 (comment), I think we want to change the error message content. |
|
@ntdiary I updated the code and the test step. |
|
|
||
| if (_.size(validatedWaypoints) < 2) { | ||
| const isDuplicatedWaypoints = numberOfNoneEmptyWaypoints > _.size(validatedWaypoints) && _.size(validatedWaypoints) === 1; | ||
| if (_.size(validatedWaypoints) < 2 || isDuplicatedWaypoints) { |
There was a problem hiding this comment.
I meant that we don't need isDuplicatedWaypoints and numberOfNoneEmptyWaypoints. Also, we can delete iou.error.duplicateWaypointsErrorMessage and its translation
| if (_.size(validatedWaypoints) < 2) { | ||
| const isDuplicatedWaypoints = numberOfNoneEmptyWaypoints > _.size(validatedWaypoints) && _.size(validatedWaypoints) === 1; | ||
| if (_.size(validatedWaypoints) < 2 || isDuplicatedWaypoints) { | ||
| return {0: translate('iou.error.emptyWaypointsErrorMessage')}; |
There was a problem hiding this comment.
we can replace iou.error.emptyWaypointsErrorMessage with iou.error.atLeastTwoDifferentWaypoints, its content: Please enter at least two different waypoints
|
@ntdiary I updated. |
ntdiary
left a comment
There was a problem hiding this comment.
need to confirm translation
Co-authored-by: wentao <ntdiary@163.com>
Co-authored-by: wentao <ntdiary@163.com>
Co-authored-by: wentao <ntdiary@163.com>
|
Updated. |
Reviewer Checklist
Screenshots/VideosAndroid: Native30548-mobile-android.mp4Android: mWeb Chrome30548-mobile-chrome.mp4iOS: Native30548-mobile-ios.mp4iOS: mWeb Safari30548-mobile-safari.mp4MacOS: Chrome / Safari30548-web.mp4MacOS: Desktop30548-desktop.mp4 |
|
I'll wait to merge until I hear word that the translations are approved. |
I just noticed the label was added. |
|
@tgolen The translation is confirmed. I think we can merge now. |
ntdiary
left a comment
There was a problem hiding this comment.
It seems the latest code doesn't use confirmed translations
| genericSmartscanFailureMessage: 'Transaction is missing fields', | ||
| duplicateWaypointsErrorMessage: 'Please remove duplicate waypoints', | ||
| emptyWaypointsErrorMessage: 'Please enter at least two waypoints', | ||
| atLeastTwoDifferentWaypoints: 'Please enter at least two different waypoints', |
There was a problem hiding this comment.
en: Please enter at least two different addresses.
| genericSmartscanFailureMessage: 'La transacción tiene campos vacíos', | ||
| duplicateWaypointsErrorMessage: 'Por favor elimina los puntos de ruta duplicados', | ||
| emptyWaypointsErrorMessage: 'Por favor introduce al menos dos puntos de ruta', | ||
| atLeastTwoDifferentWaypoints: 'Por favor introduce al menos dos puntos de ruta diferentes', |
There was a problem hiding this comment.
es: Por favor introduce al menos dos direcciones diferentes.
|
@ntdiary I updated. |
|
Just finished the checklist, if the reviewer check job can be run again, it should pass. : ) |
|
All right, it's passing now. @ntdiary did you want to approve the PR? It sounds like you approve, but there isn't an officially approved review, so I wanted to check. |
@tgolen, ah, yeah, I have approved it already, I think we can merge it now. (not sure why it didn't show up, might be related to the change request above not being manually marked as resolved?) |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
|
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.98-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
Details
Fix error message for duplicate waypoint
Fixed Issues
$ #29803
PROPOSAL: #29803 (comment)
Tests
Please enter at least two waypointsappearsPlease enter at least two waypointsappearsOffline tests
Same as above
QA Steps
Please enter at least two waypointsappearsPlease enter at least two waypointsappearsPR 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
Android: Native
Screen.Recording.2023-10-28.at.16.01.22.mov
Android: mWeb Chrome
Screen.Recording.2023-10-28.at.15.56.33.mov
iOS: Native
Screen.Recording.2023-10-28.at.16.03.16.mov
iOS: mWeb Safari
Screen.Recording.2023-10-28.at.15.54.10.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-28.at.16.17.13.mov
MacOS: Desktop
Screen.Recording.2023-10-28.at.16.15.39.mov