diff --git a/ui/src/i18n/locales/en-US.ts b/ui/src/i18n/locales/en-US.ts
index c4fe54000..3d400f27e 100644
--- a/ui/src/i18n/locales/en-US.ts
+++ b/ui/src/i18n/locales/en-US.ts
@@ -211,13 +211,24 @@ export const enUS = {
// Telegram
telegram: {
title: "Telegram",
- desc: "Telegram bot(s) via Grammy.",
+ desc: "Bot status and channel configuration.",
+ mode: "Mode",
+ lastStart: "Last start",
+ lastProbe: "Last probe",
+ probe: "Probe",
+ probeOk: "ok",
+ probeFailed: "failed",
},
// Discord
discord: {
title: "Discord",
- desc: "Discord bot via discord.js.",
+ desc: "Bot status and channel configuration.",
+ lastStart: "Last start",
+ lastProbe: "Last probe",
+ probe: "Probe",
+ probeOk: "ok",
+ probeFailed: "failed",
},
// Slack
diff --git a/ui/src/i18n/locales/zh-TW.ts b/ui/src/i18n/locales/zh-TW.ts
index d741e2055..0296d5629 100644
--- a/ui/src/i18n/locales/zh-TW.ts
+++ b/ui/src/i18n/locales/zh-TW.ts
@@ -218,13 +218,24 @@ export const zhTW = {
// Telegram
telegram: {
title: "Telegram",
- desc: "透過 Grammy 連接 Telegram 機器人。",
+ desc: "機器人狀態與頻道設定。",
+ mode: "模式",
+ lastStart: "上次啟動",
+ lastProbe: "上次探測",
+ probe: "探測",
+ probeOk: "正常",
+ probeFailed: "失敗",
},
// Discord
discord: {
title: "Discord",
- desc: "透過 discord.js 連接 Discord 機器人。",
+ desc: "機器人狀態與頻道設定。",
+ lastStart: "上次啟動",
+ lastProbe: "上次探測",
+ probe: "探測",
+ probeOk: "正常",
+ probeFailed: "失敗",
},
// Slack
diff --git a/ui/src/ui/views/channels.discord.ts b/ui/src/ui/views/channels.discord.ts
index 07890e969..1732223ec 100644
--- a/ui/src/ui/views/channels.discord.ts
+++ b/ui/src/ui/views/channels.discord.ts
@@ -1,5 +1,6 @@
import { html, nothing } from "lit";
+import { t } from "../../i18n";
import { formatAgo } from "../format";
import type { DiscordStatus } from "../types";
import type { ChannelsProps } from "./channels.types";
@@ -15,25 +16,25 @@ export function renderDiscordCard(params: {
return html`
Discord
-
Bot status and channel configuration.
+
${t("channels.discord.desc")}
${accountCountLabel}
- Configured
- ${discord?.configured ? "Yes" : "No"}
+ ${t("channels.labels.configured")}
+ ${discord?.configured ? t("common.yes") : t("common.no")}
- Running
- ${discord?.running ? "Yes" : "No"}
+ ${t("channels.labels.running")}
+ ${discord?.running ? t("common.yes") : t("common.no")}
- Last start
- ${discord?.lastStartAt ? formatAgo(discord.lastStartAt) : "n/a"}
+ ${t("channels.discord.lastStart")}
+ ${discord?.lastStartAt ? formatAgo(discord.lastStartAt) : t("common.na")}
- Last probe
- ${discord?.lastProbeAt ? formatAgo(discord.lastProbeAt) : "n/a"}
+ ${t("channels.discord.lastProbe")}
+ ${discord?.lastProbeAt ? formatAgo(discord.lastProbeAt) : t("common.na")}
@@ -45,7 +46,7 @@ export function renderDiscordCard(params: {
${discord?.probe
? html`
- Probe ${discord.probe.ok ? "ok" : "failed"} ·
+ ${t("channels.discord.probe")} ${discord.probe.ok ? t("channels.discord.probeOk") : t("channels.discord.probeFailed")} ·
${discord.probe.status ?? ""} ${discord.probe.error ?? ""}
`
: nothing}
@@ -54,7 +55,7 @@ export function renderDiscordCard(params: {
diff --git a/ui/src/ui/views/channels.telegram.ts b/ui/src/ui/views/channels.telegram.ts
index 498d98f87..09ae58e79 100644
--- a/ui/src/ui/views/channels.telegram.ts
+++ b/ui/src/ui/views/channels.telegram.ts
@@ -1,5 +1,6 @@
import { html, nothing } from "lit";
+import { t } from "../../i18n";
import { formatAgo } from "../format";
import type { ChannelAccountSnapshot, TelegramStatus } from "../types";
import type { ChannelsProps } from "./channels.types";
@@ -28,16 +29,16 @@ export function renderTelegramCard(params: {
- Running
- ${account.running ? "Yes" : "No"}
+ ${t("channels.labels.running")}
+ ${account.running ? t("common.yes") : t("common.no")}
- Configured
- ${account.configured ? "Yes" : "No"}
+ ${t("channels.labels.configured")}
+ ${account.configured ? t("common.yes") : t("common.no")}
- Last inbound
- ${account.lastInboundAt ? formatAgo(account.lastInboundAt) : "n/a"}
+ ${t("channels.lastInbound")}
+ ${account.lastInboundAt ? formatAgo(account.lastInboundAt) : t("common.na")}
${account.lastError
? html`
@@ -54,7 +55,7 @@ export function renderTelegramCard(params: {
return html`
Telegram
-
Bot status and channel configuration.
+
${t("channels.telegram.desc")}
${accountCountLabel}
${hasMultipleAccounts
@@ -66,24 +67,24 @@ export function renderTelegramCard(params: {
: html`
- Configured
- ${telegram?.configured ? "Yes" : "No"}
+ ${t("channels.labels.configured")}
+ ${telegram?.configured ? t("common.yes") : t("common.no")}
- Running
- ${telegram?.running ? "Yes" : "No"}
+ ${t("channels.labels.running")}
+ ${telegram?.running ? t("common.yes") : t("common.no")}
- Mode
- ${telegram?.mode ?? "n/a"}
+ ${t("channels.telegram.mode")}
+ ${telegram?.mode ?? t("common.na")}
- Last start
- ${telegram?.lastStartAt ? formatAgo(telegram.lastStartAt) : "n/a"}
+ ${t("channels.telegram.lastStart")}
+ ${telegram?.lastStartAt ? formatAgo(telegram.lastStartAt) : t("common.na")}
- Last probe
- ${telegram?.lastProbeAt ? formatAgo(telegram.lastProbeAt) : "n/a"}
+ ${t("channels.telegram.lastProbe")}
+ ${telegram?.lastProbeAt ? formatAgo(telegram.lastProbeAt) : t("common.na")}
`}
@@ -96,7 +97,7 @@ export function renderTelegramCard(params: {
${telegram?.probe
? html`
- Probe ${telegram.probe.ok ? "ok" : "failed"} ·
+ ${t("channels.telegram.probe")} ${telegram.probe.ok ? t("channels.telegram.probeOk") : t("channels.telegram.probeFailed")} ·
${telegram.probe.status ?? ""} ${telegram.probe.error ?? ""}
`
: nothing}
@@ -105,7 +106,7 @@ export function renderTelegramCard(params: {