diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 96c08505..4c0c61a3 100755 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -235,7 +235,9 @@ "tailscale": { "address": "Address", "expires": "Expires", + "never": "Never", "last_seen": "Last Seen", + "now": "Now", "years": "{{number}}y", "weeks": "{{number}}w", "days": "{{number}}d", diff --git a/src/widgets/tailscale/component.jsx b/src/widgets/tailscale/component.jsx index d7942588..3929b2ed 100644 --- a/src/widgets/tailscale/component.jsx +++ b/src/widgets/tailscale/component.jsx @@ -53,11 +53,11 @@ export default function Component({ service }) { const getLastSeen = () => { const date = new Date(lastSeen); const diff = compareDifferenceInTwoDates(date, now); - return diff === "Now" ? diff : t("tailscale.ago", { value: diff }); + return diff === "Now" ? t("tailscale.now") : t("tailscale.ago", { value: diff }); }; const getExpiry = () => { - if (keyExpiryDisabled) return "Never"; + if (keyExpiryDisabled) return t("tailscale.never"); const date = new Date(expires); return compareDifferenceInTwoDates(now, date); };