Commit a6b7d99c authored by BBeretta's avatar BBeretta

feat/language-translation (Change Language removed from Header component)...

feat/language-translation (Change Language removed from Header component) language added in the System Setting
parent 8b72ecb8
...@@ -190,9 +190,10 @@ ...@@ -190,9 +190,10 @@
"SelectOneCardAtTime": "Select one card at a time" "SelectOneCardAtTime": "Select one card at a time"
}, },
"SystemSettings": { "SystemSettings": {
"AudioSettings": "Audio settings", "AudioSettings": "Audio",
"TurnOnMusic": "Music", "TurnOnMusic": "Music",
"TurnOnSoundEffects": "Sound effects", "TurnOnSoundEffects": "Sound effects",
"SwitchMusicAccordingToTheEnvironment": "Switch music according to the environment" "SwitchMusicAccordingToTheEnvironment": "Switch music according to the environment",
"LanguageSettings": "Language"
} }
} }
\ No newline at end of file
...@@ -109,7 +109,6 @@ export const Component = () => { ...@@ -109,7 +109,6 @@ export const Component = () => {
{i18n("DeckBuilding")} {i18n("DeckBuilding")}
</HeaderBtn> </HeaderBtn>
<span style={{ flexGrow: 1 }} /> <span style={{ flexGrow: 1 }} />
{location.pathname === "/" && <I18NSelector />}
<span className={styles.profile}> <span className={styles.profile}>
<Dropdown <Dropdown
arrow arrow
......
...@@ -6,6 +6,7 @@ import { render, unmountComponentAtNode } from "react-dom"; ...@@ -6,6 +6,7 @@ import { render, unmountComponentAtNode } from "react-dom";
import { theme } from "../theme"; import { theme } from "../theme";
import { AudioSetting } from "./Audio"; import { AudioSetting } from "./Audio";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { I18NSelector } from "../I18N";
/** 设置面板属性 */ /** 设置面板属性 */
export interface SettingProps { export interface SettingProps {
...@@ -23,6 +24,11 @@ export const Setting = (props: SettingProps) => { ...@@ -23,6 +24,11 @@ export const Setting = (props: SettingProps) => {
label: i18n("AudioSettings"), label: i18n("AudioSettings"),
children: <AudioSetting />, children: <AudioSetting />,
}, },
{
key: "language",
label: i18n("LanguageSettings"),
children: <I18NSelector />,
},
]; ];
return <Tabs defaultActiveKey={defaultKey} items={items} />; return <Tabs defaultActiveKey={defaultKey} items={items} />;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment