From daca02a8909d82d8bf6d7dc4fa35a1d507d0bf31 Mon Sep 17 00:00:00 2001 From: fzk <458813868@qq.com> Date: Fri, 1 Nov 2024 17:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=A4=8D=E5=88=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contents/copycode.tsx | 8 ++++++-- locales/en/messages.json | 6 ++++++ locales/zh_CN/messages.json | 6 ++++++ package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/contents/copycode.tsx b/contents/copycode.tsx index 9650050..15fb582 100644 --- a/contents/copycode.tsx +++ b/contents/copycode.tsx @@ -13,11 +13,15 @@ import type { FC } from "react" import { useStorage } from "@plasmohq/storage/dist/hook" +import { i18n } from "~tools" + export const config: PlasmoCSConfig = { matches: [ "https://*.npmjs.com/*", "https://*.medium.com/*", - "https://mp.weixin.qq.com/*" + "https://mp.weixin.qq.com/*", + "https://day.js.org/*", + "https://stackoverflow.com/*" ] } @@ -101,7 +105,7 @@ const PlasmoOverlay: FC = ({ anchor }) => { variant="filled" onClick={onCopy} className="codebox-copyCodeBtn"> - {isCopy ? "复制成功" : "复制"} + {isCopy ? i18n("copied") : i18n("copy")} ) : ( diff --git a/locales/en/messages.json b/locales/en/messages.json index a6984a4..c96aa9c 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -146,6 +146,12 @@ "copyCode": { "message": "Copy Code" }, + "copy": { + "message": "copy" + }, + "copied": { + "message": "copied" + }, "showTag": { "message": "Show Tag" }, diff --git a/locales/zh_CN/messages.json b/locales/zh_CN/messages.json index 50165ee..99b00da 100644 --- a/locales/zh_CN/messages.json +++ b/locales/zh_CN/messages.json @@ -146,6 +146,12 @@ "copyCode": { "message": "一键复制代码" }, + "copy": { + "message": "复制" + }, + "copied": { + "message": "复制成功" + }, "showTag": { "message": "显示标签" }, diff --git a/package.json b/package.json index 1bc31f8..ca11ae8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-box", "displayName": "__MSG_extensionName__", - "version": "0.9.8", + "version": "0.9.9", "description": "__MSG_extensionDescription__", "author": "027xiguapi. <458813868@qq.com>", "scripts": {