Skip to content

🐛 fix(#558): align opportunity card status/matchStatus i18n keys with API values#559

Merged
need4deed merged 2 commits into
developfrom
558-fix-opportunity-card-status-i18n-keys
May 29, 2026
Merged

🐛 fix(#558): align opportunity card status/matchStatus i18n keys with API values#559
need4deed merged 2 commits into
developfrom
558-fix-opportunity-card-status-i18n-keys

Conversation

@nadavosa
Copy link
Copy Markdown
Collaborator

Fixes #558

What

The opportunity cards in the dashboard list view were showing raw i18n keys instead of translated labels (e.g. dashboard.opportunities.matchStatus.opp-vol-no-matches).

Why

Two mismatches between what the API returns and what the translations/maps expected:

  1. matchStatus key prefix — The API returns OpportunityMatchStatusType values like opp-vol-no-matches, but translation keys and the matchStatusColorMap/matchStatusIconMap in OpportunityCard.helpers.tsx were keyed as vol-no-matches (missing opp- prefix). So t(dashboard.opportunities.matchStatus.opp-vol-no-matches) always fell back to the raw key.

  2. Missing opp-inactiveOpportunityStatusType.INACTIVE = "opp-inactive" had no translation entry in either locale, so inactive opportunities showed the raw key.

Changes

  • public/locales/de/translations.json — rename matchStatus keys vol-*opp-vol-*, add opp-inactive
  • public/locales/en/translations.json — same
  • OpportunityCard.helpers.tsx — rename matchStatusColorMap/matchStatusIconMap keys vol-*opp-vol-*

🤖 Generated with Claude Code

nadavosa and others added 2 commits May 27, 2026 10:38
… API values

- Add missing 'opp-inactive' to dashboard.opportunities.status in DE and EN
- Rename matchStatus translation keys from 'vol-*' to 'opp-vol-*' to match
  OpportunityMatchStatusType values returned by the API
- Update matchStatusColorMap and matchStatusIconMap keys accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pe, ...>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ivannissimrch ivannissimrch self-requested a review May 27, 2026 16:20
Copy link
Copy Markdown
Collaborator

@ivannissimrch ivannissimrch left a comment

Choose a reason for hiding this comment

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

I tested locally, and labels display correctly now instead of the raw keys.

Image

@need4deed need4deed merged commit e75cf37 into develop May 29, 2026
1 check passed
@need4deed need4deed deleted the 558-fix-opportunity-card-status-i18n-keys branch May 29, 2026 15:55
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.

fix: opportunity card shows raw i18n keys for status and matchStatus

3 participants