public function getLocalizedSlug(ModelHistory $historyEntry): string
    {
        $slug = $historyEntry->context_slug;
        if (!empty($historyEntry->context) && !empty($historyEntry->context['namespace'])) {
            $class = new $historyEntry->context['namespace'];
            if (method_exists($class, 'typeDescriptions')) {
                $typeDescriptions = $class::typeDescriptions();
                if (isset($typeDescriptions[$slug])) {
                    $slug = $typeDescriptions[$slug];
                }
            }
        }

        return $slug;
    }