fix some tailscale translation strings

This commit is contained in:
shamoon 2023-05-06 21:08:31 -07:00
parent f520629298
commit d683dbafbc
2 changed files with 4 additions and 2 deletions

View File

@ -235,7 +235,9 @@
"tailscale": { "tailscale": {
"address": "Address", "address": "Address",
"expires": "Expires", "expires": "Expires",
"never": "Never",
"last_seen": "Last Seen", "last_seen": "Last Seen",
"now": "Now",
"years": "{{number}}y", "years": "{{number}}y",
"weeks": "{{number}}w", "weeks": "{{number}}w",
"days": "{{number}}d", "days": "{{number}}d",

View File

@ -53,11 +53,11 @@ export default function Component({ service }) {
const getLastSeen = () => { const getLastSeen = () => {
const date = new Date(lastSeen); const date = new Date(lastSeen);
const diff = compareDifferenceInTwoDates(date, now); 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 = () => { const getExpiry = () => {
if (keyExpiryDisabled) return "Never"; if (keyExpiryDisabled) return t("tailscale.never");
const date = new Date(expires); const date = new Date(expires);
return compareDifferenceInTwoDates(now, date); return compareDifferenceInTwoDates(now, date);
}; };