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"
|
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "1.1.78"
|
var version = "1.1.79"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
addr := os.Getenv("EDGEGUARD_API_ADDR")
|
addr := os.Getenv("EDGEGUARD_API_ADDR")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
|
"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
|
const usage = `edgeguard-ctl — EdgeGuard CLI
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import (
|
|||||||
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
|
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "1.1.78"
|
var version = "1.1.79"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// renewTickInterval — how often we re-evaluate expiring certs.
|
// 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.",
|
"confirmClearHint": "System fällt auf Trial-Modus zurück, sobald der Schlüssel gelöscht wird.",
|
||||||
"lastVerifyFailed": "Letzte Server-Verifizierung fehlgeschlagen",
|
"lastVerifyFailed": "Letzte Server-Verifizierung fehlgeschlagen",
|
||||||
"trialExpiring": "Trial läuft in {{days}} Tag(en) ab",
|
"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": {
|
"licenseBanner": {
|
||||||
"expired": "Lizenz abgelaufen oder ungültig.",
|
"expired": "Lizenz abgelaufen oder ungültig.",
|
||||||
|
|||||||
@@ -970,7 +970,11 @@
|
|||||||
"confirmClearHint": "The system will fall back to trial-mode once the key is deleted.",
|
"confirmClearHint": "The system will fall back to trial-mode once the key is deleted.",
|
||||||
"lastVerifyFailed": "Last server verify failed",
|
"lastVerifyFailed": "Last server verify failed",
|
||||||
"trialExpiring": "Trial expires in {{days}} day(s)",
|
"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": {
|
"licenseBanner": {
|
||||||
"expired": "License expired or invalid.",
|
"expired": "License expired or invalid.",
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ function daysUntil(iso?: string): number | null {
|
|||||||
return Math.ceil(ms / 86_400_000)
|
return Math.ceil(ms / 86_400_000)
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusTag(s: LicenseStatus) {
|
function statusTag(s: LicenseStatus, t: (k: string) => string) {
|
||||||
if (s.status === 'active' && s.type === 'trial') return <Tag color="orange">Trial</Tag>
|
if (s.status === 'active' && s.type === 'trial') return <Tag color="orange">{t('license.tagTrial')}</Tag>
|
||||||
if (s.status === 'active') return <Tag color="green">Aktiv</Tag>
|
if (s.status === 'active') return <Tag color="green">{t('license.tagActive')}</Tag>
|
||||||
if (s.status === 'expired') return <Tag color="red">Abgelaufen</Tag>
|
if (s.status === 'expired') return <Tag color="red">{t('license.tagExpired')}</Tag>
|
||||||
if (s.status === 'invalid') return <Tag color="red">Ungültig</Tag>
|
if (s.status === 'invalid') return <Tag color="red">{t('license.tagInvalid')}</Tag>
|
||||||
return <Tag>{s.status}</Tag>
|
return <Tag>{s.status}</Tag>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ export default function LicensePage() {
|
|||||||
<Card>
|
<Card>
|
||||||
<Descriptions column={1} bordered size="small">
|
<Descriptions column={1} bordered size="small">
|
||||||
<Descriptions.Item label={t('license.status')}>
|
<Descriptions.Item label={t('license.status')}>
|
||||||
{status ? statusTag(status) : '-'}
|
{status ? statusTag(status, t) : '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t('license.product')}>
|
<Descriptions.Item label={t('license.product')}>
|
||||||
{status?.payload?.product || (isTrial ? 'Trial' : '-')}
|
{status?.payload?.product || (isTrial ? 'Trial' : '-')}
|
||||||
|
|||||||
Reference in New Issue
Block a user