-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Revert "fix: issue 4539, qf shown in donation success page for estimated matching amount" #4799
Revert "fix: issue 4539, qf shown in donation success page for estimated matching amount" #4799
Conversation
…ted matching amount"
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes involve updates to localization files for the Giveth platform, enhancing translations for user interface elements in Catalan, English, and Spanish. The modifications include refining messages related to donations, eligibility for matching funds, and project descriptions. Additionally, adjustments were made to the GraphQL query structure and the Changes
Possibly related PRs
Suggested reviewers
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: 1
🧹 Outside diff range and nitpick comments (2)
src/components/views/donate/QFToast.tsx (1)
Line range hint
78-90
: LGTM: Well-implemented conditional button renderingThe conditional rendering of the eligibility check button for non-eligible users is well-implemented. The button's functionality and styling are appropriate for its purpose.
For consistency with the rest of the codebase, consider using object property shorthand for the
onClick
prop:onClick={() => setShowModal(true)}This minor change would align with modern JavaScript conventions and potentially with your project's style guide.
lang/ca.json (1)
Line range hint
1-3215
: Overall, the translations appear to be comprehensive and well-structured.The file contains a large number of translations for various UI elements, messages, and descriptions in Catalan. The structure of the JSON is correct, and there are no apparent syntax errors.
However, I have a few observations and suggestions:
Consistency: The use of terminology seems consistent throughout the file. For example, "GIVbacks", "GIVstream", and "GIVpower" are consistently used without translation, which is good for maintaining brand identity.
Placeholders: The use of placeholders (e.g.,
{count}
,{percent}
,{value}
) is consistent and appears to be correct. This is important for dynamic content.HTML Tags: There are some HTML tags used in the translations (e.g.,
<strong>
,<!--
,-->
). Ensure that these are intentional and properly handled in the application.Long Translations: Some translations are quite long. Consider breaking them into smaller, more manageable pieces if possible, to make maintenance easier.
Untranslated Terms: Some technical terms are left in English (e.g., "Mainnet", "Gnosis Chain"). This is often acceptable for technical terms, but ensure it's intentional.
Quotation Marks: There's inconsistent use of quotation marks. Some use straight quotes (
"
) while others use curly quotes ("
). It would be better to standardize this throughout the file.Capitalization: There's some inconsistency in capitalization, especially in titles. For example, "Què és Giveth?" vs "Què És Ethereum?". Consider standardizing the capitalization rules for titles.
Consider standardizing the use of quotation marks and capitalization rules throughout the file for better consistency.
📜 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/apollo/gql/gqlQF.ts (0 hunks)
- src/components/views/donate/QFToast.tsx (2 hunks)
💤 Files with no reviewable changes (1)
- src/apollo/gql/gqlQF.ts
🔇 Additional comments (12)
src/components/views/donate/QFToast.tsx (2)
63-65
: LGTM: Clean implementation of non-eligible descriptionThe changes in this segment are well-implemented. The use of JSX fragments to combine the formatted message with the date span is appropriate and follows React best practices. The spacing is handled correctly, ensuring good readability of the final rendered text.
Line range hint
1-138
: Summary: Changes align with PR objectives and improve user experienceThe modifications to the
QFToast
component successfully revert the changes related to the display of QF information on the donation success page, as per the PR objectives. The updates improve the clarity of messaging for both eligible and non-eligible users, enhancing the overall user experience.Key improvements include:
- More contextual information for eligible users, including the current round's name.
- Simplified date formatting for better readability.
- Appropriate conditional rendering of the eligibility check button for non-eligible users.
These changes are well-implemented and consistent with React and TypeScript best practices. The code is clean, readable, and maintainable.
This pull request appears ready for merging, pending any additional team-specific review processes or testing requirements.
lang/en.json (4)
1351-1352
: Improved clarity on donation matching eligibilityThe updated text provides more specific information about donation matching eligibility, which is helpful for users. This change improves the clarity of the message.
1353-1353
: Clear call-to-action for non-eligible usersThe updated text provides a clear instruction for users who are not currently eligible for donation matching. It encourages them to check their QF Eligibility, which is a good way to guide users towards becoming eligible.
1356-1356
: Effective call-to-action for non-eligible usersThe new title for non-eligible users creates a sense of urgency and encourages them to take action. This change is likely to increase user engagement with the donation matching feature.
1351-1356
: Overall improvement in donation matching messagingThe changes in this file collectively enhance the messaging around donation matching eligibility. The new text provides clearer information, stronger calls-to-action, and creates a sense of urgency for users to engage with the feature. These improvements are consistent with the style and tone of the rest of the localization strings and should positively impact user engagement.
lang/es.json (4)
1351-1353
: Improved clarity in donation eligibility descriptionsThe changes in these lines enhance the clarity and accuracy of the passport toast descriptions for donation eligibility. The new wording provides more specific information about the donation matching process, including details about fraud protection review and the timing of complementary funds distribution.
1356-1356
: More engaging title for non-eligible passport toastThe change in this line transforms the title of the non-eligible passport toast from a statement to a call-to-action. The new wording "¡No te pierdas la oportunidad!" (Don't miss the opportunity!) is more engaging and motivational, which could encourage users to take steps to become eligible for donation matching.
Line range hint
1357-1369
: Enhanced clarity on donation processes and eligibilityThese changes provide more detailed and specific information about donation processes and eligibility criteria. Key improvements include:
- Clear thresholds for donation amounts that make users eligible for GIVbacks or unlock matching funds.
- Explicit statements about project and network eligibility for quadratic funding and GIVbacks.
- New translations that clarify when donations will be matched.
These additions and modifications significantly improve the user's understanding of how their donations interact with various platform features.
Line range hint
1370-2037
: Comprehensive update to Spanish translationsThis extensive update to the Spanish translations significantly enhances the clarity and completeness of the language used throughout the platform. Key improvements include:
- More detailed explanations of project verification processes and statuses.
- Clearer descriptions of donor eligibility criteria and benefits.
- Updated terminology for various platform features and processes.
- New translations covering a wide range of topics, ensuring a more comprehensive Spanish language experience.
These changes will greatly improve the user experience for Spanish-speaking users, providing them with more accurate and detailed information about the platform's features and processes.
lang/ca.json (2)
Line range hint
3216-3216
: The file ends properly with no trailing commas or characters.The JSON file is properly closed, which is good practice.
Line range hint
1-3216
: Overall, the Catalan translation file is well-structured and comprehensive.The translations appear to cover a wide range of UI elements and messages, which is commendable. The use of placeholders for dynamic content is consistent, and brand-specific terms are maintained across translations.
However, there are some areas for improvement:
- Standardize the use of quotation marks (straight vs. curly).
- Ensure consistent capitalization rules, especially in titles.
- Consider breaking down very long translations into smaller, more manageable pieces.
- Review the intentional use of HTML tags within translations.
These improvements would enhance the overall quality and consistency of the translations. Great job on providing such a comprehensive Catalan language support!
' ' + | ||
currentRound?.name + | ||
' ' + | ||
formatMessage({ | ||
id: 'page.donate.passport_toast.description.eligible_2', | ||
id: 'label.ends_on', | ||
}) + | ||
' ' + | ||
currentRound?.name + | ||
'.'; | ||
endDate + | ||
formatMessage({ | ||
id: 'page.donate.passport_toast.description.eligible_2', | ||
}); |
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.
🛠️ Refactor suggestion
Consider using template literals for improved readability
The current string concatenation could be made more readable and maintainable by using template literals. This would also help to avoid potential spacing issues.
Consider refactoring the description generation as follows:
description = `${formatMessage({
id: 'page.donate.passport_toast.description.eligible',
})} ${currentRound?.name} ${formatMessage({
id: 'label.ends_on',
})} ${endDate}${formatMessage({
id: 'page.donate.passport_toast.description.eligible_2',
})}`;
This change would make the code more concise and easier to read while maintaining the same functionality.
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.
Thanks @HrithikSampson
Reverts #4775
Summary by CodeRabbit
New Features
Bug Fixes
Documentation