From d683dbafbc9e140224a59b7e1aec875930f331fe Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 6 May 2023 21:08:31 -0700 Subject: [PATCH] fix some tailscale translation strings --- public/locales/en/common.json | 2 ++ src/widgets/tailscale/component.jsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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); };