mirror of
https://github.com/027xiguapi/code-box.git
synced 2026-05-12 13:17:45 +00:00
一键复制代码国际化
This commit is contained in:
@@ -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<PlasmoCSUIProps> = ({ anchor }) => {
|
||||
variant="filled"
|
||||
onClick={onCopy}
|
||||
className="codebox-copyCodeBtn">
|
||||
{isCopy ? "复制成功" : "复制"}
|
||||
{isCopy ? i18n("copied") : i18n("copy")}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -146,6 +146,12 @@
|
||||
"copyCode": {
|
||||
"message": "Copy Code"
|
||||
},
|
||||
"copy": {
|
||||
"message": "copy"
|
||||
},
|
||||
"copied": {
|
||||
"message": "copied"
|
||||
},
|
||||
"showTag": {
|
||||
"message": "Show Tag"
|
||||
},
|
||||
|
||||
@@ -146,6 +146,12 @@
|
||||
"copyCode": {
|
||||
"message": "一键复制代码"
|
||||
},
|
||||
"copy": {
|
||||
"message": "复制"
|
||||
},
|
||||
"copied": {
|
||||
"message": "复制成功"
|
||||
},
|
||||
"showTag": {
|
||||
"message": "显示标签"
|
||||
},
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user