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:
Debian
2026-05-24 12:20:03 +02:00
parent 8c1963cac5
commit e37e472960
7 changed files with 20 additions and 12 deletions

View File

@@ -970,7 +970,11 @@
"confirmClearHint": "System fällt auf Trial-Modus zurück, sobald der Schlüssel gelöscht wird.",
"lastVerifyFailed": "Letzte Server-Verifizierung fehlgeschlagen",
"trialExpiring": "Trial läuft in {{days}} Tag(en) ab",
"trialExpiringHint": "Lizenz aktivieren, bevor die Trial-Periode endet."
"trialExpiringHint": "Lizenz aktivieren, bevor die Trial-Periode endet.",
"tagActive": "Aktiv",
"tagTrial": "Trial",
"tagExpired": "Abgelaufen",
"tagInvalid": "Ungültig"
},
"licenseBanner": {
"expired": "Lizenz abgelaufen oder ungültig.",

View File

@@ -970,7 +970,11 @@
"confirmClearHint": "The system will fall back to trial-mode once the key is deleted.",
"lastVerifyFailed": "Last server verify failed",
"trialExpiring": "Trial expires in {{days}} day(s)",
"trialExpiringHint": "Activate a license before the trial period ends."
"trialExpiringHint": "Activate a license before the trial period ends.",
"tagActive": "Active",
"tagTrial": "Trial",
"tagExpired": "Expired",
"tagInvalid": "Invalid"
},
"licenseBanner": {
"expired": "License expired or invalid.",

View File

@@ -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' : '-')}