-
Notifications
You must be signed in to change notification settings - Fork 61
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(native-app): add missing error messages for updating profile information #15898
Conversation
WalkthroughThe changes involve renaming keys in the localization files for error messages, specifically removing the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- apps/native/app/src/messages/en.ts (3 hunks)
- apps/native/app/src/messages/is.ts (3 hunks)
- apps/native/app/src/screens/settings/edit-bank-info.tsx (2 hunks)
- apps/native/app/src/screens/settings/edit-confirm.tsx (1 hunks)
- apps/native/app/src/screens/settings/edit-email.tsx (1 hunks)
Files skipped from review due to trivial changes (2)
- apps/native/app/src/screens/settings/edit-bank-info.tsx
- apps/native/app/src/screens/settings/edit-email.tsx
Additional context used
Path-based instructions (3)
apps/native/app/src/screens/settings/edit-confirm.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/native/app/src/messages/en.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/native/app/src/messages/is.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
Additional comments not posted (11)
apps/native/app/src/screens/settings/edit-confirm.tsx (2)
56-56
: LGTM!The change from a generic error message to a more descriptive one enhances clarity about the nature of the failure.
59-62
: Great work on adding i18n support!Using
intl.formatMessage
with specific message IDs for the error title and message improves the user experience by providing localized feedback.Verify that the message IDs
edit.confirm.error
andedit.confirm.errorMessage
are defined correctly in the localization files.Run the following script to search for the message IDs in the localization files:
Verification successful
Message IDs are correctly defined and localized
The message IDs
edit.confirm.error
andedit.confirm.errorMessage
are properly defined in the localization files with translations available in both English and Icelandic. This confirms that the internationalization setup is correctly implemented for these messages.
apps/native/app/src/messages/en.ts
apps/native/app/src/messages/is.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the message IDs are defined in the localization files. # Test: Search for the message IDs in TypeScript files. Expect: Matches in the localization files. rg --type ts $'edit\.confirm\.error|edit\.confirm\.errorMessage'Length of output: 628
apps/native/app/src/messages/en.ts (5)
493-494
: LGTM!The changes to the error message keys for the edit phone section are approved. Removing the redundant
button
segment improves clarity and consistency.
502-503
: LGTM!The changes to the error message keys for the edit email section are approved. Removing the redundant
button
segment improves clarity and consistency.
513-514
: LGTM!The changes to the error message keys for the edit bank info section are approved. Removing the redundant
button
segment improves clarity and consistency.
528-529
: LGTM!The changes to the error message keys for the edit confirmation section are approved. Removing the redundant
button
segment improves clarity and consistency.
Line range hint
1-1
: Verify the usage of the renamed keys in the codebase.Ensure that all usages of the error message keys have been updated to match the new key format without the
button
segment.Run the following script to verify the key usage:
Verification successful
Verification Successful: Key Usage Updated Correctly
The error message keys have been successfully updated to the new format without the
button
segment. The old key format is not present in the codebase, and the new key format is used consistently across relevant files.
- Files with updated key usage:
apps/native/app/src/messages/en.ts
apps/native/app/src/messages/is.ts
apps/native/app/src/screens/settings/edit-phone.tsx
apps/native/app/src/screens/settings/edit-bank-info.tsx
apps/native/app/src/screens/settings/edit-email.tsx
apps/native/app/src/screens/settings/edit-confirm.tsx
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of the error message keys have been updated to match the new key format. # Test: Search for the old key format. Expect: No results. rg --type tsx --type ts $'\'edit\.(phone|email|bankinfo|confirm)\.button\.(error|errorMessage)\'' # Test: Search for the new key format. Expect: At least one result for each key. rg --type tsx --type ts $'\'edit\.(phone|email|bankinfo|confirm)\.(error|errorMessage)\''Length of output: 253
Script:
#!/bin/bash # Description: Verify all usages of the error message keys have been updated to match the new key format. # Test: Search for the old key format. Expect: No results. rg $'\'edit\.(phone|email|bankinfo|confirm)\.button\.(error|errorMessage)\'' # Test: Search for the new key format. Expect: At least one result for each key. rg $'\'edit\.(phone|email|bankinfo|confirm)\.(error|errorMessage)\''Length of output: 2463
apps/native/app/src/messages/is.ts (4)
493-494
: LGTM!The code changes are approved.
502-503
: LGTM!The code changes are approved.
513-514
: LGTM!The code changes are approved.
528-529
: LGTM!The code changes are approved.
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.
Awesome!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15898 +/- ##
=======================================
Coverage 36.85% 36.85%
=======================================
Files 6684 6684
Lines 136781 136781
Branches 38885 38885
=======================================
Hits 50415 50415
Misses 86366 86366
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 3 Total Test Services: 0 Failed, 2 Passed Test Services
|
…rmation (#15898) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
I noticed translations were missing for errors when updating some profile information fails.
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Chores