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:
@@ -60,7 +60,7 @@ import (
|
||||
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
|
||||
)
|
||||
|
||||
var version = "1.1.78"
|
||||
var version = "1.1.79"
|
||||
|
||||
func main() {
|
||||
addr := os.Getenv("EDGEGUARD_API_ADDR")
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
|
||||
)
|
||||
|
||||
var version = "1.1.78"
|
||||
var version = "1.1.79"
|
||||
|
||||
const usage = `edgeguard-ctl — EdgeGuard CLI
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
|
||||
)
|
||||
|
||||
var version = "1.1.78"
|
||||
var version = "1.1.79"
|
||||
|
||||
const (
|
||||
// renewTickInterval — how often we re-evaluate expiring certs.
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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