Skip to content

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

@nadavosa

Description

@nadavosa

Bug

The opportunity search cards (dashboard Möglichkeiten list view) display raw translation keys instead of human-readable labels:

  • dashboard.opportunities.matchStatus.opp-vol-no-matches
  • dashboard.opportunities.status.opp-inactive

Screenshot: confirmed in production.

Root cause

Two separate mismatches in OpportunityCard.tsx / OpportunityCard.helpers.tsx:

1. matchStatus key prefix mismatch

The API returns statusMatch as OpportunityMatchStatusType values (e.g. opp-vol-no-matches), but:

  • Translation keys in both de/translations.json and en/translations.json are keyed without the opp- prefix: vol-no-matches
  • matchStatusColorMap and matchStatusIconMap in OpportunityCard.helpers.tsx also use the vol- prefix

So t(dashboard.opportunities.matchStatus.${statusMatch}) always misses — the key opp-vol-no-matches doesn't exist in the translations.

2. Missing opp-inactive status translation

OpportunityStatusType.INACTIVE = "opp-inactive" is a valid status returned by the API but is absent from both de and en dashboard.opportunities.status translation objects.

Fix

  • Rename matchStatus translation keys from vol-*opp-vol-* in both locale files
  • Update matchStatusColorMap and matchStatusIconMap keys to opp-vol-*
  • Add opp-inactive entry to both locale files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions