Skip to content

fix: remove em dashes, fix mojibake, fix claim toast UUID, fix notifi…#92

Merged
Destroyer795 merged 2 commits into
mainfrom
fix/remove-em-dashes
Mar 11, 2026
Merged

fix: remove em dashes, fix mojibake, fix claim toast UUID, fix notifi…#92
Destroyer795 merged 2 commits into
mainfrom
fix/remove-em-dashes

Conversation

@keshav1604
Copy link
Copy Markdown
Collaborator

…cation read persistence, fix unread count template

Copilot AI review requested due to automatic review settings March 11, 2026 06:06
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surplussync-web Ready Ready Preview, Comment Mar 11, 2026 6:36am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes punctuation/encoding across the app (removing em dashes and fixing mojibake), adjusts notification/unread labeling, and refines donation-claim UX (skip “claimed” toasts for self-claims and add a success toast on claim). It also aligns the notifications backend controller with the JWT strategy’s req.user.userId shape.

Changes:

  • Replace em dashes / mojibake characters across frontend/backend strings and comments.
  • Update donation-claimed toast behavior (skip self-claim alerts; add claim success toast).
  • Fix notifications controller to use req.user.userId and adjust unread label template across locales.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/services/translationService.ts Normalize comment punctuation in cache write error handling.
frontend/src/services/socket.ts Normalize comment punctuation for connection reuse.
frontend/src/services/api.ts Normalize comment punctuation near auth interceptor + notifications types.
frontend/src/pages/dashboard/Profile.tsx Normalize comment punctuation in badge guide note.
frontend/src/pages/dashboard/NGODashboard.tsx Skip claim-alert toast for own claims; add claim success toast; normalize punctuation in a verification message.
frontend/src/pages/dashboard/Impact.tsx Normalize comment punctuation in section headers.
frontend/src/pages/dashboard/History.tsx Normalize comment punctuation for tab toggle note.
frontend/src/pages/dashboard/FeedbackRatings.tsx Replace em dash separator in option label.
frontend/src/pages/dashboard/DiscoveryMap.tsx Skip claim-alert toast for own claims; add claim success toast; normalize punctuation in verification message.
frontend/src/pages/dashboard/AdminDashboard.tsx Normalize toast strings to use hyphen instead of em dash.
frontend/src/pages/LandingPage.tsx Normalize comment punctuation near role config data note.
frontend/src/locales/ta.ts Normalize punctuation in Tamil strings; adjust unread label template.
frontend/src/locales/hi.ts Normalize punctuation in Hindi strings; adjust unread label template (and introduce a Hindi typo that should be fixed).
frontend/src/i18n.ts Fix mojibake in English source strings; adjust unread label template and normalize punctuation.
frontend/src/tests/pages/dashboard/AdminDashboard.test.tsx Update test expectation to match updated toast string.
frontend/src/App.css Normalize comment punctuation.
frontend/playwright.config.ts Normalize comment punctuation regarding test parallelism.
frontend/e2e/donation-lifecycle.spec.ts Normalize comment punctuation in E2E flow.
backend/test/realtime-events.e2e-spec.ts Normalize comment punctuation in latency/skip notes.
backend/src/scripts/backup_db.sh Normalize comment punctuation in backup rotation note.
backend/src/notifications/notifications.controller.ts Switch from req.user.sub to req.user.userId to match JWT strategy.
backend/src/common/email.service.ts Normalize log message/comment punctuation.
backend/src/common/cloudinary.service.ts Normalize log message punctuation for mock mode.
backend/src/auth/tests/jwt-security.spec.ts Normalize comment punctuation in JWT security tests.
backend/src/auth/entities/user.entity.ts Normalize comment punctuation for timestamps note.
backend/src/auth/auth.service.ts Normalize comment punctuation for shared badge catalog note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

try {
await claimDonation(donationId)
toast.success(`✅ ${t('foodClaimedAlert')}`, {
description: `${donationName} has been claimed successfully`,
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new success toast description ("has been claimed successfully") is hardcoded in English. Please localize it (e.g., add an i18n key and pass donationName via interpolation) to keep the UI consistently translated.

Suggested change
description: `${donationName} has been claimed successfully`,
description: t('donationClaimedSuccessDescription', { donationName }),

Copilot uses AI. Check for mistakes.
if (data.claimedBy !== user.id) {
const name = claimedDonation ? claimedDonation.name : 'A donation';
toast.info(`🔔 ${t('foodClaimedAlert')}`, {
description: `${name} has been claimed`,
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toast description string here is hardcoded in English ("has been claimed"). Since the title uses t('foodClaimedAlert'), consider localizing the description as well (i18n key + {{name}} interpolation) for full translation coverage.

Suggested change
description: `${name} has been claimed`,
description: t('foodClaimedDescription', { name }),

Copilot uses AI. Check for mistakes.
try {
await claimDonation(donationId)
toast.success(`✅ ${t('foodClaimedAlert')}`, {
description: `${donationName} has been claimed successfully`,
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new success toast description ("has been claimed successfully") is hardcoded in English. Please localize it (new i18n key with {{name}} interpolation) so the confirmation message is translated.

Suggested change
description: `${donationName} has been claimed successfully`,
description: t('donationClaimedDescription', { name: donationName }),

Copilot uses AI. Check for mistakes.
pointsToGo: '{{points}} पॉइंट्स बाकी',
allBadgesUnlocked: 'सभी बैज अनलॉक हो गए! आप सुपरहीरो हैं!',
communityImpact: 'सामुदायिक प्रभाव — प्लेटफ़ॉर्म व्यापी',
communityImpact: 'सामुदायिक प्रभाव - प्लेटृफ़ॉर्म व्यापी',
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be a typo in this Hindi string: "प्लेटृफ़ॉर्म" is inconsistent with other occurrences in this file (e.g. platformDirector: 'प्लेटफ़ॉर्म निदेशक'). It likely should be "प्लेटफ़ॉर्म".

Suggested change
communityImpact: 'सामुदायिक प्रभाव - प्लेटृफ़ॉर्म व्यापी',
communityImpact: 'सामुदायिक प्रभाव - प्लेटफ़ॉर्म व्यापी',

Copilot uses AI. Check for mistakes.
if (data.claimedBy !== user.id) {
const name = claimedDonation ? claimedDonation.name : 'A donation';
toast.info(`🔔 ${t('foodClaimedAlert')}`, {
description: `${name} has been claimed`,
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toast description string here is hardcoded in English ("has been claimed"). Since the title is localized via t('foodClaimedAlert'), consider localizing the description too (e.g., via an i18n key with {{name}} interpolation) so non-English users get a fully translated notification.

Suggested change
description: `${name} has been claimed`,
description: t('foodClaimedDescription', { name }),

Copilot uses AI. Check for mistakes.
@keshav1604 keshav1604 force-pushed the fix/remove-em-dashes branch from e7fda21 to 67403d2 Compare March 11, 2026 06:35
@Destroyer795 Destroyer795 merged commit 7f6efc7 into main Mar 11, 2026
9 checks passed
@Destroyer795 Destroyer795 deleted the fix/remove-em-dashes branch March 11, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants