Skip to content

Commit 1df8ab2

Browse files
committed
Catch up anomalyco#8660 new strings in translation.
1 parent 39562d8 commit 1df8ab2

File tree

4 files changed

+70
-22
lines changed

4 files changed

+70
-22
lines changed

packages/app/src/components/session/session-header.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ export function SessionHeader() {
238238
<Show when={shareEnabled() && currentSession()}>
239239
<div class="flex items-center">
240240
<Popover
241-
title="Publish on web"
241+
title={language.t("session.shareDialogTitle")}
242242
description={
243243
shareUrl()
244-
? "This session is public on the web. It is accessible to anyone with the link."
245-
: "Share session publicly on the web. It will be accessible to anyone with the link."
244+
? language.t("session.shareDialogDescriptionPublic")
245+
: language.t("session.shareDialogDescriptionPrivate")
246246
}
247247
trigger={
248248
<Tooltip class="shrink-0" value={language.t("session.share")}>
@@ -268,7 +268,7 @@ export function SessionHeader() {
268268
onClick={shareSession}
269269
disabled={state.share}
270270
>
271-
{state.share ? "Publishing..." : "Publish"}
271+
{state.share ? language.t("session.publishingAction") : language.t("session.publishAction")}
272272
</Button>
273273
</div>
274274
}
@@ -283,7 +283,7 @@ export function SessionHeader() {
283283
onClick={unshareSession}
284284
disabled={state.unshare}
285285
>
286-
{state.unshare ? "Unpublishing..." : "Unpublish"}
286+
{state.unshare ? language.t("session.unpublishingAction") : language.t("session.unpublishAction")}
287287
</Button>
288288
<Button
289289
size="large"
@@ -292,15 +292,15 @@ export function SessionHeader() {
292292
onClick={viewShare}
293293
disabled={state.unshare}
294294
>
295-
View
295+
{language.t("session.viewAction")}
296296
</Button>
297297
</div>
298298
</div>
299299
</Show>
300300
</div>
301301
</Popover>
302302
<Show when={shareUrl()} fallback={<div class="size-6" aria-hidden="true" />}>
303-
<Tooltip value={state.copied ? "Copied" : "Copy link"} placement="top" gutter={8}>
303+
<Tooltip value={state.copied ? language.t("session.copied") : language.t("session.copyLink")} placement="top" gutter={8}>
304304
<IconButton
305305
icon={state.copied ? "check" : "copy"}
306306
variant="secondary"

packages/app/src/locales/en.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,30 @@
5656
"tab": "Session",
5757
"reviewTab": "Review",
5858
"share": "Share session",
59+
"shareAction": "Share",
60+
"shareDialogTitle": "Publish on web",
61+
"shareDialogDescriptionPublic": "This session is public on the web. It is accessible to anyone with the link.",
62+
"shareDialogDescriptionPrivate": "Share session publicly on the web. It will be accessible to anyone with the link.",
63+
"publishAction": "Publish",
64+
"publishingAction": "Publishing...",
65+
"unpublishAction": "Unpublish",
66+
"unpublishingAction": "Unpublishing...",
67+
"viewAction": "View",
68+
"copyLink": "Copy link",
69+
"copied": "Copied",
70+
"shareCommandTitle": "Share session",
71+
"shareCommandDescription": "Share this session and copy the URL to clipboard",
72+
"unshareCommandTitle": "Unshare session",
73+
"unshareCommandDescription": "Stop sharing this session",
74+
"shareCopyFailedTitle": "Failed to copy URL to clipboard",
75+
"shareSuccessTitle": "Session shared",
76+
"shareSuccessDescription": "Share URL copied to clipboard!",
77+
"shareFailedTitle": "Failed to share session",
78+
"shareFailedDescription": "An error occurred while sharing the session",
79+
"unshareSuccessTitle": "Session unshared",
80+
"unshareSuccessDescription": "Session unshared successfully!",
81+
"unshareFailedTitle": "Failed to unshare session",
82+
"unshareFailedDescription": "An error occurred while unsharing the session",
5983
"mainBranch": "Main branch",
6084
"mainBranchWithName": "Main branch ({branch})",
6185
"createWorktree": "Create new worktree",

packages/app/src/locales/zh.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,30 @@
5656
"tab": "会话",
5757
"reviewTab": "审阅",
5858
"share": "分享会话",
59+
"shareAction": "分享",
60+
"shareDialogTitle": "发布到网页",
61+
"shareDialogDescriptionPublic": "此会话已在网页公开,任何拥有链接的人都可访问。",
62+
"shareDialogDescriptionPrivate": "在网页上公开分享此会话,任何拥有链接的人都可访问。",
63+
"publishAction": "发布",
64+
"publishingAction": "正在发布...",
65+
"unpublishAction": "取消发布",
66+
"unpublishingAction": "正在取消发布...",
67+
"viewAction": "查看",
68+
"copyLink": "复制链接",
69+
"copied": "已复制",
70+
"shareCommandTitle": "分享会话",
71+
"shareCommandDescription": "分享此会话并将链接复制到剪贴板",
72+
"unshareCommandTitle": "取消分享会话",
73+
"unshareCommandDescription": "停止分享此会话",
74+
"shareCopyFailedTitle": "复制链接到剪贴板失败",
75+
"shareSuccessTitle": "会话已分享",
76+
"shareSuccessDescription": "分享链接已复制到剪贴板!",
77+
"shareFailedTitle": "分享会话失败",
78+
"shareFailedDescription": "分享会话时发生错误",
79+
"unshareSuccessTitle": "会话已取消分享",
80+
"unshareSuccessDescription": "会话已成功取消分享!",
81+
"unshareFailedTitle": "取消分享会话失败",
82+
"unshareFailedDescription": "取消分享会话时发生错误",
5983
"mainBranch": "主分支",
6084
"mainBranchWithName": "主分支({branch})",
6185
"createWorktree": "创建新工作树",

packages/app/src/pages/session.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,9 @@ export default function Page() {
657657
? [
658658
{
659659
id: "session.share",
660-
title: "Share session",
661-
description: "Share this session and copy the URL to clipboard",
662-
category: "Session",
660+
title: language.t("session.shareCommandTitle"),
661+
description: language.t("session.shareCommandDescription"),
662+
category: language.t("command.category.session"),
663663
slash: "share",
664664
disabled: !params.id || !!info()?.share?.url,
665665
onSelect: async () => {
@@ -669,32 +669,32 @@ export default function Page() {
669669
.then((res) => {
670670
navigator.clipboard.writeText(res.data!.share!.url).catch(() =>
671671
showToast({
672-
title: "Failed to copy URL to clipboard",
672+
title: language.t("session.shareCopyFailedTitle"),
673673
variant: "error",
674674
}),
675675
)
676676
})
677677
.then(() =>
678678
showToast({
679-
title: "Session shared",
680-
description: "Share URL copied to clipboard!",
679+
title: language.t("session.shareSuccessTitle"),
680+
description: language.t("session.shareSuccessDescription"),
681681
variant: "success",
682682
}),
683683
)
684684
.catch(() =>
685685
showToast({
686-
title: "Failed to share session",
687-
description: "An error occurred while sharing the session",
686+
title: language.t("session.shareFailedTitle"),
687+
description: language.t("session.shareFailedDescription"),
688688
variant: "error",
689689
}),
690690
)
691691
},
692692
},
693693
{
694694
id: "session.unshare",
695-
title: "Unshare session",
696-
description: "Stop sharing this session",
697-
category: "Session",
695+
title: language.t("session.unshareCommandTitle"),
696+
description: language.t("session.unshareCommandDescription"),
697+
category: language.t("command.category.session"),
698698
slash: "unshare",
699699
disabled: !params.id || !info()?.share?.url,
700700
onSelect: async () => {
@@ -703,15 +703,15 @@ export default function Page() {
703703
.unshare({ sessionID: params.id })
704704
.then(() =>
705705
showToast({
706-
title: "Session unshared",
707-
description: "Session unshared successfully!",
706+
title: language.t("session.unshareSuccessTitle"),
707+
description: language.t("session.unshareSuccessDescription"),
708708
variant: "success",
709709
}),
710710
)
711711
.catch(() =>
712712
showToast({
713-
title: "Failed to unshare session",
714-
description: "An error occurred while unsharing the session",
713+
title: language.t("session.unshareFailedTitle"),
714+
description: language.t("session.unshareFailedDescription"),
715715
variant: "error",
716716
}),
717717
)

0 commit comments

Comments
 (0)