Skip to content

[Task]: Migrate translation status constants to an enum #4531

Description

@hannaseithe

⚙️ Task

Task Description

What

Migrate the translation status string constants in integreat_cms/cms/constants/translation_status.py to a proper Python enum.

Why

Currently these are plain Final string constants ("stringly typed"). An enum would make states mutually exclusive by type, aid in catching errors when new states are added, and enable exhaustive matching. Raised during review of #4504.


Task Category

♻️ Tech Debt — Addressing accumulated shortcuts


Steps / Implementation Plan

  • Convert constants in translation_status.py to a StrEnum or similar
  • Update all references across the codebase
  • Ensure template usage still works (Django templates access enum values differently)

Acceptance Criteria

  • All translation status constants are defined as an enum
  • No plain string comparisons remain against these values
  • Existing tests pass

Parent / Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: lowShould be doable in <4hprio: lowNot urgent, can be resolved in the distant future.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions