-
-
Notifications
You must be signed in to change notification settings - Fork 714
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
[Translations] Errors and Success #2078
[Translations] Errors and Success #2078
Conversation
WalkthroughThis set of changes focuses on improving internationalization in the project by adding new success, error, and status messages in multiple languages (English, French, Spanish, Hindu, and Chinese). The messages are dynamically used in various components across the application to ensure they align with user-selected language preferences. This update helps address issues where messages were not properly translated. Changes
Sequence Diagram(s)N/A Assessment against linked issues
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
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 (15)
- public/locales/en/common.json (1 hunks)
- public/locales/en/errors.json (1 hunks)
- public/locales/en/translation.json (4 hunks)
- src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx (1 hunks)
- src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx (1 hunks)
- src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx (6 hunks)
- src/components/CheckIn/TableRow.tsx (3 hunks)
- src/components/EventRegistrantsModal/EventRegistrantsModal.tsx (5 hunks)
- src/components/UserPasswordUpdate/UserPasswordUpdate.tsx (2 hunks)
- src/components/UserPortal/PostCard/PostCard.tsx (2 hunks)
- src/components/UserPortal/StartPostModal/StartPostModal.tsx (1 hunks)
- src/components/UsersTableItem/UsersTableItem.tsx (1 hunks)
- src/screens/MemberDetail/MemberDetail.tsx (1 hunks)
- src/screens/OrganizationPeople/AddMember.tsx (2 hunks)
- src/screens/UserPortal/Settings/Settings.tsx (1 hunks)
Files skipped from review due to trivial changes (7)
- public/locales/en/common.json
- src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx
- src/components/UserPasswordUpdate/UserPasswordUpdate.tsx
- src/components/UserPortal/StartPostModal/StartPostModal.tsx
- src/components/UsersTableItem/UsersTableItem.tsx
- src/screens/MemberDetail/MemberDetail.tsx
- src/screens/UserPortal/Settings/Settings.tsx
Additional comments not posted (22)
public/locales/en/errors.json (1)
9-9
: The added error message looks good!The new error message
"errorOccurredCouldntCreate": "An error occurred. Couldn't create {{entity}}"
follows the same structure and conventions as the other messages.src/components/CheckIn/TableRow.tsx (3)
9-9
: Translation function imported correctly.The
useTranslation
hook fromreact-i18next
is correctly imported to handle translations.
19-19
: Translation function usage looks good.The
useTranslation
hook is correctly used with the key prefixcheckIn
.
30-34
: Success and error messages translated correctly.The success and error messages for check-in operations are now using translation keys. This ensures that the messages will be displayed in the user's preferred language.
src/components/EventRegistrantsModal/EventRegistrantsModal.tsx (6)
16-16
: Translation function imported correctly.The
useTranslation
hook fromreact-i18next
is correctly imported to handle translations.
38-41
: Translation function usage looks good.The
useTranslation
hook is correctly used with the key prefixeseventRegistrantsModal
andcommon
.
47-47
: Translation key used correctly for eventId.The translation key for
eventId
is correctly used in the query variables.
51-51
: Translation key used correctly for orgId.The translation key for
orgId
is correctly used in the query variables.
67-71
: Success and error messages translated correctly.The success and error messages for adding and removing attendees are now using translation keys. This ensures that the messages will be displayed in the user's preferred language.
85-89
: Success and error messages translated correctly.The success and error messages for adding and removing attendees are now using translation keys. This ensures that the messages will be displayed in the user's preferred language.
src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx (1)
55-55
: Success message translated correctly.The success message for plugin addition is now using a translation key. This ensures that the message will be displayed in the user's preferred language.
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx (4)
50-50
: LGTM!The introduction of
tErrors
to handle error messages is consistent with the PR objectives and follows best practices.
111-111
: LGTM!The error message for end date validation now uses a translation function, ensuring it is displayed in the chosen language.
126-126
: LGTM!The success message for advertisement creation now uses a translation function, ensuring it is displayed in the chosen language.
139-141
: LGTM!The error message for advertisement creation now uses a translation function from the
errors
namespace, ensuring it is displayed in the chosen language.src/components/UserPortal/PostCard/PostCard.tsx (2)
217-217
: LGTM!The success message for post update now uses a translation function, ensuring it is displayed in the chosen language.
232-232
: LGTM!The success message for post deletion now uses a translation function, ensuring it is displayed in the chosen language.
src/screens/OrganizationPeople/AddMember.tsx (1)
60-61
: LGTM!The introduction of
tCommon
and the use of the translation function for member addition success messages ensure that messages are displayed in the chosen language.Also applies to: 95-95
public/locales/en/translation.json (4)
592-594
: LGTM!The new translations related to user password updates ensure that the messages are displayed in the chosen language.
753-754
: LGTM!The new translations related to posts ensure that the messages are displayed in the chosen language.
863-866
: LGTM!The new translations related to advertisements ensure that the messages are displayed in the chosen language.
961-967
: LGTM!The new translations related to check-ins and event registrants ensure that the messages are displayed in the chosen language.
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 (12)
- public/locales/fr/common.json (1 hunks)
- public/locales/fr/errors.json (1 hunks)
- public/locales/fr/translation.json (4 hunks)
- public/locales/hi/common.json (1 hunks)
- public/locales/hi/errors.json (1 hunks)
- public/locales/hi/translation.json (4 hunks)
- public/locales/sp/common.json (1 hunks)
- public/locales/sp/errors.json (1 hunks)
- public/locales/sp/translation.json (4 hunks)
- public/locales/zh/common.json (1 hunks)
- public/locales/zh/errors.json (1 hunks)
- public/locales/zh/translation.json (4 hunks)
Files skipped from review due to trivial changes (3)
- public/locales/hi/common.json
- public/locales/hi/errors.json
- public/locales/sp/common.json
Additional comments not posted (29)
public/locales/zh/errors.json (1)
9-9
: Ensure translation consistency for error messages.The new translation for the error message "An error occurred. Couldn't create {{entity}}" appears to be correct and consistent with the existing translations.
public/locales/fr/errors.json (1)
9-9
: Ensure translation consistency for error messages.The new translation for the error message "An error occurred. Couldn't create {{entity}}" appears to be correct and consistent with the existing translations.
public/locales/sp/errors.json (1)
9-9
: Ensure translation consistency for error messages.The new translation for the error message "An error occurred. Couldn't create {{entity}}" appears to be correct and consistent with the existing translations.
public/locales/zh/common.json (1)
81-84
: Ensure translation consistency for success messages.The new translations for success messages ("{{item}} added successfully", "{{item}} updated successfully", "{{item}} removed successfully", and "Successfully updated") appear to be correct and consistent with the existing translations.
public/locales/fr/common.json (1)
81-84
: LGTM!The new translations for success messages are correct and consistent with the existing translations.
public/locales/zh/translation.json (4)
597-599
: LGTM!The new translations for password validation messages are correct and consistent with the existing translations.
758-758
: LGTM!The new translation for the post visibility message is correct and consistent with the existing translations.
871-873
: LGTM!The new translations for advertisement messages are correct and consistent with the existing translations.
969-974
: LGTM!The new translations for check-in and event registrant messages are correct and consistent with the existing translations.
public/locales/hi/translation.json (8)
597-597
: Translation approved.The translation for
confirmNewPassword
is accurate.
598-598
: Translation approved.The translation for
passCantBeEmpty
is accurate.
599-599
: Translation approved.The translation for
passNoMatch
is accurate.
758-758
: Translation approved.The translation for
postNowVisibleInFeed
is accurate.
870-870
: Translation approved.The translation for
editAdvertisement
is accurate.
871-871
: Translation approved.The translation for
advertisementDeleted
is accurate.
872-872
: Translation approved.The translation for
endDateGreaterOrEqual
is accurate.
873-873
: Translation approved.The translation for
advertisementCreated
is accurate.public/locales/fr/translation.json (7)
597-597
: Translation Approved: "confirmNewPassword"The translation "Confirmer le nouveau mot de passe" is correct.
598-598
: Translation Approved: "passCantBeEmpty"The translation "Le mot de passe ne peut pas être vide" is correct.
599-599
: Translation Approved: "passNoMatch"The translation "Le nouveau mot de passe et la confirmation du mot de passe ne correspondent pas." is correct.
758-758
: Translation Approved: "postNowVisibleInFeed"The translation "Le post est maintenant visible dans le fil d'actualité" is correct.
871-873
: Translations Approved: Advertisement Management and Check-In FunctionalityThe translations for:
- "advertisementDeleted": "Publicité supprimée avec succès."
- "endDateGreaterOrEqual": "La date de fin doit être supérieure ou égale à la date de début"
- "advertisementCreated": "Publicité créée avec succès."
are all correct.
969-970
: Translations Approved: Check-In FunctionalityThe translations for:
- "errorCheckingIn": "Erreur lors de l'enregistrement"
- "checkedInSuccessfully": "Enregistrement réussi"
are both correct.
973-974
: Translations Approved: Event Attendee ManagementThe translations for:
- "errorAddingAttendee": "Erreur lors de l'ajout du participant"
- "errorRemovingAttendee": "Erreur lors de la suppression du participant"
are both correct.
public/locales/sp/translation.json (5)
766-767
: Ensure translation accuracy.The translations for password-related messages appear correct:
- "passCantBeEmpty": "La contraseña no puede estar vacía"
- "passNoMatch": "La nueva contraseña y la confirmación no coinciden."
961-962
: Ensure translation accuracy.The translation for the post visibility message appears correct:
- "postNowVisibleInFeed": "La publicación ahora es visible en el feed"
1090-1092
: Ensure translation accuracy.The translations for advertisement-related messages appear correct:
- "advertisementDeleted": "Anuncio eliminado con éxito."
- "endDateGreaterOrEqual": "La fecha de finalización debe ser mayor o igual a la fecha de inicio"
- "advertisementCreated": "Anuncio creado con éxito."
1211-1212
: Ensure translation accuracy.The translations for check-in messages appear correct:
- "errorCheckingIn": "Error al registrarse"
- "checkedInSuccessfully": "Registrado con éxito"
1215-1216
: Ensure translation accuracy.The translations for event attendee management messages appear correct:
- "errorAddingAttendee": "Error al agregar asistente"
- "errorRemovingAttendee": "Error al eliminar asistente"
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: 2
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (8)
- src/components/AddOn/core/AddOnRegister/AddOnRegister.test.tsx (1 hunks)
- src/components/Advertisements/Advertisements.test.tsx (1 hunks)
- src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.test.tsx (5 hunks)
- src/components/CheckIn/TableRow.test.tsx (2 hunks)
- src/components/EventRegistrantsModal/EventRegistrantsModal.test.tsx (4 hunks)
- src/components/UserPasswordUpdate/UserPasswordUpdate.test.tsx (1 hunks)
- src/components/UserPortal/PostCard/PostCard.test.tsx (1 hunks)
- src/components/UserPortal/PostCard/PostCard.tsx (1 hunks)
Files skipped from review due to trivial changes (6)
- src/components/AddOn/core/AddOnRegister/AddOnRegister.test.tsx
- src/components/Advertisements/Advertisements.test.tsx
- src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.test.tsx
- src/components/EventRegistrantsModal/EventRegistrantsModal.test.tsx
- src/components/UserPasswordUpdate/UserPasswordUpdate.test.tsx
- src/components/UserPortal/PostCard/PostCard.test.tsx
Files skipped from review as they are similar to previous changes (1)
- src/components/UserPortal/PostCard/PostCard.tsx
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2078 +/- ##
========================================
Coverage 97.92% 97.92%
========================================
Files 232 232
Lines 6208 6214 +6
Branches 1791 1791
========================================
+ Hits 6079 6085 +6
Misses 118 118
Partials 11 11 ☔ View full report in Codecov by Sentry. |
Actions performedComments resolved and changes approved. |
What kind of change does this PR introduce?
Translations
Issue Number:
Fixes #1579
Did you add tests for your changes?
N/A
Snapshots/Videos:
N/A
Summary
Fixed translations for all errors and success messages.
Does this PR introduce a breaking change?
No
Other information
Have you read the contributing guide?
Yes
Summary by CodeRabbit
New Features
en
,fr
,hi
,sp
,zh
) with new message keys.Bug Fixes
Refactor
These updates significantly enhance the user experience by providing more informative and localized feedback across various actions and languages.