-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixing text translation for vouched users #4882
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes in this pull request involve updates to localization files for Catalan, English, and Spanish, specifically adding and modifying translation entries related to the GIVbacks program. A new description entry was introduced for verified project owners with incomplete GIVbacks applications, providing clearer guidance on completing their eligibility applications. Additionally, modifications were made to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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
CodeRabbit Configuration File (
|
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
🧹 Outside diff range and nitpick comments (3)
src/components/views/project/projectActionCard/AdminActions.tsx (1)
183-183
: Consider unifying notification placement.To maintain consistent behavior across viewports, consider either:
- Moving both notifications inside their respective wrappers, or
- Moving both notifications outside their respective wrappers
This would ensure that opacity and pointer-events are handled uniformly.
const AdminActions = () => { // ... existing code ... return !isMobile ? ( <> {!isAdminEmailVerified && ( <VerifyNotification> {formatMessage({ id: 'label.email_actions_text', })} </VerifyNotification> )} + <ProjectCardNotification /> <Wrapper $verified={isAdminEmailVerified}> <Dropdown style={dropdownStyle} label='Project Actions' options={options} /> {/* ... modals ... */} - <ProjectCardNotification /> </Wrapper> </> ) : ( <> {/* ... mobile view ... */} </> ); };Also applies to: 246-246
src/components/views/project/ProjectGIVbackToast.tsx (1)
Line range hint
52-57
: Improve condition naming and documentationThe condition correctly identifies verified owners with incomplete GIVbacks forms, but could be more explicit:
Consider these improvements:
-// When project is VOUCHED (verified=true), not givbacks eligible AND has incomplete givbacks form we should show this notification -const isOwnerVerifiedNotEligible = +// When a verified project owner hasn't completed their GIVbacks eligibility form +const isOwnerVerifiedWithIncompleteGivbacksForm = isVerified && isAdmin && !isGivbackEligible && projectData.verificationFormStatus !== EVerificationStatus.VERIFIED;This makes the condition's purpose clearer and aligns better with the new translation key.
lang/en.json (1)
1685-1685
: Text could be more concise and consistentThe translation text is functional but could be improved for clarity and consistency.
Consider this revision:
- "project.givback_toast.description.verified_owner_not_eligible_not_form": "Boost your project to increase its GIVbacks percentage and help it appear higher on the projects page! Additionally, your GIVbacks application form is incomplete. Please complete your GIVbacks Eligibility application for the Giveth team to review.", + "project.givback_toast.description.verified_owner_not_eligible_not_form": "Boost your project to increase its GIVbacks percentage and visibility on the projects page. Your GIVbacks Eligibility application is incomplete - please complete it for review by the Giveth team.",The suggested revision:
- Removes redundant wording ("help it appear" vs just "visibility")
- Makes the incomplete form notice more direct
- Maintains consistent terminology with other toast messages
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (5)
lang/ca.json
(1 hunks)lang/en.json
(1 hunks)lang/es.json
(1 hunks)src/components/views/project/ProjectGIVbackToast.tsx
(1 hunks)src/components/views/project/projectActionCard/AdminActions.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- lang/ca.json
🔇 Additional comments (3)
src/components/views/project/projectActionCard/AdminActions.tsx (1)
183-183
: Verify notification behavior consistency.
The notification component is placed differently in desktop (inside Wrapper
) vs mobile (outside MobileWrapper
) views. This might lead to inconsistent behavior when the admin email is not verified, as the desktop notification inherits opacity and pointer-events from the wrapper while the mobile one doesn't.
src/components/views/project/ProjectGIVbackToast.tsx (1)
198-198
: LGTM! Verify translation key exists
The translation key change better reflects the specific case where a verified owner hasn't completed their GIVbacks form. This aligns with the PR's objective of fixing text translations for vouched users.
Let's verify the translation key exists in all language files:
✅ Verification successful
Translation key verified in all language files
The new translation key verified_owner_not_eligible_not_form
exists with appropriate translations in all language files (en.json, es.json, and ca.json). The translations correctly convey the message about boosting the project and completing the GIVbacks eligibility form.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the new translation key exists in all language files
# Expected: The key should exist in en.json, es.json, and ca.json
for lang in en es ca; do
echo "Checking ${lang}.json:"
rg "verified_owner_not_eligible_not_form" "lang/${lang}.json"
done
Length of output: 1432
lang/es.json (1)
1685-1685
: LGTM! Translation addition is consistent and clear.
The new translation key project.givback_toast.description.verified_owner_not_eligible_not_form
is well-formatted and provides clear guidance in Spanish about boosting projects and completing GIVbacks eligibility forms.
Let's verify the translation key exists in other language files:
✅ Verification successful
Translation key is consistent across language files
The new Spanish translation key project.givback_toast.description.verified_owner_not_eligible_not_form
exists in both English (en.json) and Catalan (ca.json) files with equivalent messaging and proper formatting. The translations maintain consistent meaning across all three languages while preserving language-specific grammar and vocabulary.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the new translation key exists in other language files
# Expected: The key should exist in en.json and ca.json
rg "project\.givback_toast\.description\.verified_owner_not_eligible_not_form" "lang/en.json" "lang/ca.json"
Length of output: 831
Summary by CodeRabbit
New Features
<ProjectCardNotification />
component for consistent notifications across mobile and desktop views.Bug Fixes
Documentation