Skip to content

Commit

Permalink
🌐 国际化复制按钮中的报错信息
Browse files Browse the repository at this point in the history
  • Loading branch information
neila-a committed Apr 25, 2024
1 parent f00586c commit 5cee9ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/core/src/app/components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function CopyButton(props: {
await navigator.clipboard.writeText(props.children);
setShowCopyDoneDialog(true);
} catch (error) {
setCopyError(`复制结果时出现错误,请报告给开发人员:${error}`);
setCopyError(get("copy.errorInfo", {
error: error
}));
setShowCopyErrorDialog(true);
};
},
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/app/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"复制": "复制",
"复制出现错误": "复制出现错误",
"复制完毕": "复制完毕",
"已把结果复制至剪贴板。": "已把结果复制至剪贴板。"
"已把结果复制至剪贴板。": "已把结果复制至剪贴板。",
"errorInfo": "复制结果时出现错误,请报告给开发人员:{error}"
},
"download": {
"下载本应用": "下载本应用",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/app/setting/about/reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import {
import {
Button,
Divider,
Stack,
Typography
Stack
} from "@mui/material";
import {
useState,
useEffect,
FC,
ReactNode,
use
Expand Down

0 comments on commit 5cee9ad

Please sign in to comment.