Skip to content

Commit 17e993b

Browse files
author
sheepzh
committed
Jump to github issue if user language is not zh_CN (#194)
1 parent f189a92 commit 17e993b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/background/browser-action-menu-manager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
*/
77

88
import { OPTION_ROUTE } from "../app/router/constants"
9-
import { getAppPageUrl, getGuidePageUrl, SOURCE_CODE_PAGE, TU_CAO_PAGE } from "@util/constant/url"
9+
import { getAppPageUrl, getGuidePageUrl, GITHUB_ISSUE_ADD, SOURCE_CODE_PAGE, TU_CAO_PAGE } from "@util/constant/url"
1010
import { t2Chrome } from "@i18n/chrome/t"
1111
import { IS_MV3, IS_SAFARI } from "@util/constant/environment"
1212
import { createTab } from "@api/chrome/tab"
1313
import { createContextMenu } from "@api/chrome/context-menu"
1414
import { getRuntimeId } from "@api/chrome/runtime"
15+
import { locale } from "@i18n"
1516

1617
const APP_PAGE_URL = getAppPageUrl(true)
1718

@@ -56,7 +57,7 @@ const repoPageProps: ChromeContextMenuCreateProps = {
5657
const feedbackPageProps: ChromeContextMenuCreateProps = {
5758
id: getRuntimeId() + '_timer_menu_item_feedback_link',
5859
title: titleOf('😿', t2Chrome(msg => msg.contextMenus.feedbackPage)),
59-
onclick: () => createTab(TU_CAO_PAGE),
60+
onclick: () => createTab(locale === 'zh_CN' ? TU_CAO_PAGE : GITHUB_ISSUE_ADD),
6061
...baseProps
6162
}
6263

src/util/constant/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const SOURCE_CODE_PAGE = 'https://github.com/sheepzh/timer'
3434
/**
3535
* @since 0.0.6
3636
*/
37-
export const GITHUB_ISSUE_ADD = 'https://github.com/sheepzh/timer/issues/new'
37+
export const GITHUB_ISSUE_ADD = 'https://github.com/sheepzh/timer/issues/new/choose'
3838

3939
/**
4040
* Feedback powered by www.wjx.cn

0 commit comments

Comments
 (0)