fix some text

This commit is contained in:
Gabe Yuan
2023-08-29 13:14:12 +08:00
parent 56cb1cd30d
commit 687bd11fd1
3 changed files with 13 additions and 7 deletions

1
.env
View File

@@ -3,6 +3,7 @@ GENERATE_SOURCEMAP=false
REACT_APP_NAME=KISS Translator REACT_APP_NAME=KISS Translator
REACT_APP_NAME_CN=简约翻译 REACT_APP_NAME_CN=简约翻译
REACT_APP_VERSION=1.5.7 REACT_APP_VERSION=1.5.7
REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator
REACT_APP_OPTIONSPAGE=https://fishjar.github.io/kiss-translator/options.html REACT_APP_OPTIONSPAGE=https://fishjar.github.io/kiss-translator/options.html

View File

@@ -285,11 +285,11 @@ export const I18N = {
en: `Data Sync Error`, en: `Data Sync Error`,
}, },
error_got_some_wrong: { error_got_some_wrong: {
zh: "抱歉,出错了!", zh: `抱歉,出错了!`,
en: "Sorry, something went wrong!", en: `Sorry, something went wrong!`,
}, },
error_sync_setting: { error_sync_setting: {
zh: "您的同步设置未填写,无法在线分享。", zh: `您的同步设置未填写,无法在线分享。`,
en: "Your sync settings are missing and cannot be shared online.", en: `Your sync settings are missing and cannot be shared online.`,
}, },
}; };

View File

@@ -8,6 +8,7 @@ import { useDarkModeSwitch } from "../../hooks/ColorMode";
import { useDarkMode } from "../../hooks/ColorMode"; import { useDarkMode } from "../../hooks/ColorMode";
import LightModeIcon from "@mui/icons-material/LightMode"; import LightModeIcon from "@mui/icons-material/LightMode";
import DarkModeIcon from "@mui/icons-material/DarkMode"; import DarkModeIcon from "@mui/icons-material/DarkMode";
import Link from "@mui/material/Link";
import { useI18n } from "../../hooks/I18n"; import { useI18n } from "../../hooks/I18n";
function Header(props) { function Header(props) {
@@ -35,9 +36,13 @@ function Header(props) {
<MenuIcon /> <MenuIcon />
</IconButton> </IconButton>
</Box> </Box>
<Box sx={{ flexGrow: 1 }}>{`${i18n("app_name")} v${ <Box sx={{ flexGrow: 1 }}>
process.env.REACT_APP_VERSION <Link
}`}</Box> underline="none"
color="inherit"
href={process.env.REACT_APP_HOMEPAGE}
>{`${i18n("app_name")} v${process.env.REACT_APP_VERSION}`}</Link>
</Box>
<IconButton onClick={switchColorMode} color="inherit"> <IconButton onClick={switchColorMode} color="inherit">
{darkMode ? <LightModeIcon /> : <DarkModeIcon />} {darkMode ? <LightModeIcon /> : <DarkModeIcon />}
</IconButton> </IconButton>