fix(i18n): License-Status-Tags + letzte hardkodierte Strings entfernt
- statusTag() akzeptiert jetzt t als Parameter — Aktiv/Trial/ Abgelaufen/Ungültig gehen durch license.tag* Keys - en+de common.json: license.tagActive/tagTrial/tagExpired/tagInvalid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,11 +36,11 @@ function daysUntil(iso?: string): number | null {
|
||||
return Math.ceil(ms / 86_400_000)
|
||||
}
|
||||
|
||||
function statusTag(s: LicenseStatus) {
|
||||
if (s.status === 'active' && s.type === 'trial') return <Tag color="orange">Trial</Tag>
|
||||
if (s.status === 'active') return <Tag color="green">Aktiv</Tag>
|
||||
if (s.status === 'expired') return <Tag color="red">Abgelaufen</Tag>
|
||||
if (s.status === 'invalid') return <Tag color="red">Ungültig</Tag>
|
||||
function statusTag(s: LicenseStatus, t: (k: string) => string) {
|
||||
if (s.status === 'active' && s.type === 'trial') return <Tag color="orange">{t('license.tagTrial')}</Tag>
|
||||
if (s.status === 'active') return <Tag color="green">{t('license.tagActive')}</Tag>
|
||||
if (s.status === 'expired') return <Tag color="red">{t('license.tagExpired')}</Tag>
|
||||
if (s.status === 'invalid') return <Tag color="red">{t('license.tagInvalid')}</Tag>
|
||||
return <Tag>{s.status}</Tag>
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ export default function LicensePage() {
|
||||
<Card>
|
||||
<Descriptions column={1} bordered size="small">
|
||||
<Descriptions.Item label={t('license.status')}>
|
||||
{status ? statusTag(status) : '-'}
|
||||
{status ? statusTag(status, t) : '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('license.product')}>
|
||||
{status?.payload?.product || (isTrial ? 'Trial' : '-')}
|
||||
|
||||
Reference in New Issue
Block a user