Commit e24da0e4 authored by BBeretta's avatar BBeretta

feat/language-translation (System Settings)

parent 7bd44047
Pipeline #27827 failed with stages
in 8 minutes and 40 seconds
......@@ -8,7 +8,8 @@
"DuelDatabase": "Base de dados de duelos",
"LogOut": "Sair",
"Login": "Entrar no MyCard",
"Fullscreen": "Tela cheia"
"Fullscreen": "Tela cheia",
"SystemSettings": "Configurações do sistema"
},
"Start": {
"Title": "Plataforma de batalha online de Yu-Gi-Oh!",
......@@ -36,5 +37,11 @@
"ReplayDesc": "Assista livremente aos duelos passados e reviva aqueles momentos emocionantes de reversão.",
"WIPTitle": "Em desenvolvimento...",
"WIPDesc": "Aguarde por outras funcionalidades."
},
"SystemSettings": {
"AudioSettings": "Configurações de áudio",
"TurnOnMusic": "Música",
"TurnOnSoundEffects": "Efeitos sonoros",
"SwitchMusicAccordingToTheEnvironment": "Trocar música conforme o ambiente"
}
}
......@@ -8,7 +8,8 @@
"DuelDatabase": "决斗数据库",
"LogOut": "退出登录",
"Login": "登录萌卡",
"Fullscreen": "全屏"
"Fullscreen": "全屏",
"SystemSettings": "系统设置"
},
"Start": {
"Title": "游戏王网页端对战平台",
......@@ -187,5 +188,11 @@
"PleaseSelect": "请选择",
"Cards": "张卡",
"SelectOneCardAtTime": "每次选择一张"
},
"SystemSettings": {
"AudioSettings": "音频设置",
"TurnOnMusic": "开启音乐",
"TurnOnSoundEffects": "开启音效",
"SwitchMusicAccordingToTheEnvironment": "根据环境切换音乐"
}
}
\ No newline at end of file
......@@ -8,7 +8,8 @@
"DuelDatabase": "Duel Database",
"LogOut": "Log out",
"Login": "Login to MyCard",
"Fullscreen": "Fullscreen"
"Fullscreen": "Fullscreen",
"SystemSettings": "System Settings"
},
"Start": {
"Title": "Yu-Gi-Oh! Web Based Battle Platform",
......@@ -187,5 +188,11 @@
"PleaseSelect": "Please select",
"Cards": "Cards",
"SelectOneCardAtTime": "Select one card at a time"
},
"SystemSettings": {
"AudioSettings": "Audio settings",
"TurnOnMusic": "Music",
"TurnOnSoundEffects": "Sound effects",
"SwitchMusicAccordingToTheEnvironment": "Switch music according to the environment"
}
}
\ No newline at end of file
......@@ -8,7 +8,8 @@
"DuelDatabase": "Base de données de duels",
"LogOut": "Déconnexion",
"Login": "Connexion à MyCard",
"Fullscreen": "Plein écran"
"Fullscreen": "Plein écran",
"SystemSettings": "Paramètres du système"
},
"Start": {
"Title": "Plateforme de combat Yu-gi-oh basée sur le Web",
......@@ -36,5 +37,11 @@
"ReplayDesc": "Regardez librement les duels passés et revivez ces moments passionnants de retournement.",
"WIPTitle": "En développement...",
"WIPDesc": "D'autres fonctionnalités à venir."
},
"SystemSettings": {
"AudioSettings": "Paramètres audio",
"TurnOnMusic": "Activer la musique",
"TurnOnSoundEffects": "Effets sonores",
"SwitchMusicAccordingToTheEnvironment": "Changer la musique en fonction de l'environnement"
}
}
......@@ -8,7 +8,8 @@
"DuelDatabase": "デュエルデータベース",
"LogOut": "ログアウト",
"Login": "萌卡にログインする",
"Fullscreen": "フルスクリーン"
"Fullscreen": "フルスクリーン",
"SystemSettings": "システム設定"
},
"Start": {
"Title": "遊戯王ウェブベースのバトルプラットフォーム",
......@@ -36,5 +37,11 @@
"ReplayDesc": "過去のデュエルを自由に見て、それらのエキサイティングな逆転の瞬間を振り返りましょう。",
"WIPTitle": "開発中...",
"WIPDesc": "他の機能をお楽しみに。"
},
"SystemSettings": {
"AudioSettings": "オーディオ設定",
"TurnOnMusic": "音楽をオンにする",
"TurnOnSoundEffects": "効果音をオンにする",
"SwitchMusicAccordingToTheEnvironment": "環境に応じて音楽を切り替える"
}
}
......@@ -8,7 +8,8 @@
"DuelDatabase": "Base de dados de duelos",
"LogOut": "Terminar sessão",
"Login": "Iniciar sessão no MyCard",
"Fullscreen": "Ecrã completo"
"Fullscreen": "Ecrã completo",
"SystemSettings": "Configurações do sistema"
},
"Start": {
"Title": "Plataforma de batalha online de Yu-Gi-Oh!",
......@@ -36,5 +37,11 @@
"ReplayDesc": "Assiste livremente aos duelos passados e revive aqueles momentos emocionantes de reversão.",
"WIPTitle": "Em desenvolvimento...",
"WIPDesc": "Aguarde por outras funcionalidades."
},
"SystemSettings": {
"AudioSettings": "Configurações de áudio",
"TurnOnMusic": "Música",
"TurnOnSoundEffects": "Efeitos sonoros",
"SwitchMusicAccordingToTheEnvironment": "Trocar música conforme o ambiente"
}
}
......@@ -8,7 +8,8 @@
"DuelDatabase": "Base de datos de duelos",
"LogOut": "Cerrar sesión",
"Login": "Iniciar sesión en MyCard",
"Fullscreen": "Pantalla completa"
"Fullscreen": "Pantalla completa",
"SystemSettings": "Configuración del sistema"
},
"Start": {
"Title": "Plataforma de batalla basada en la web de Yu-gi-oh",
......@@ -36,5 +37,11 @@
"ReplayDesc": "Mira libremente duelos pasados y revive esos emocionantes momentos de reversión.",
"WIPTitle": "En desarrollo...",
"WIPDesc": "Espere por otras funciones."
},
"SystemSettings": {
"AudioSettings": "Configuración de audio",
"TurnOnMusic": "Activar música",
"TurnOnSoundEffects": "Efectos de sonido",
"SwitchMusicAccordingToTheEnvironment": "Cambiar la música según el entorno"
}
}
......@@ -31,6 +31,7 @@ const resources = {
Popover: translationChinese.Popover,
Menu: translationChinese.Menu,
SelectCardModal: translationChinese.SelectCardModal,
SystemSettings: translationChinese.SystemSettings,
},
en: {
Header: translationEnglish.Header,
......@@ -49,31 +50,37 @@ const resources = {
Popover: translationEnglish.Popover,
Menu: translationEnglish.Menu,
SelectCardModal: translationEnglish.SelectCardModal,
SystemSettings: translationEnglish.SystemSettings,
},
es: {
Header: translationSpanish.Header,
Start: translationSpanish.Start,
Match: translationSpanish.Match,
SystemSettings: translationSpanish.SystemSettings,
},
fr: {
Header: translationFrench.Header,
Start: translationFrench.Start,
Match: translationFrench.Match,
SystemSettings: translationFrench.SystemSettings,
},
ja: {
Header: translationJapanese.Header,
Start: translationJapanese.Start,
Match: translationJapanese.Match,
SystemSettings: translationJapanese.SystemSettings,
},
br: {
Header: translationBrazilian.Header,
Start: translationBrazilian.Start,
Match: translationBrazilian.Match,
SystemSettings: translationBrazilian.SystemSettings,
},
pt: {
Header: translationPortuguese.Header,
Start: translationPortuguese.Start,
Match: translationPortuguese.Match,
SystemSettings: translationPortuguese.SystemSettings,
},
};
......
......@@ -140,7 +140,7 @@ export const Component = () => {
),
},
{
label: "系统设置",
label: i18n("SystemSettings"),
onClick: () => {
modal.info({
content: <Setting />,
......
......@@ -3,10 +3,11 @@ import React from "react";
import { useSnapshot } from "valtio";
import { settingStore } from "@/stores/settingStore";
import { useTranslation } from "react-i18next";
export const AudioSetting: React.FC = () => {
const { audio } = useSnapshot(settingStore);
const { t: i18n } = useTranslation("SystemSettings");
return (
<Form
initialValues={audio}
......@@ -15,7 +16,7 @@ export const AudioSetting: React.FC = () => {
}}
labelAlign="left"
>
<Form.Item label="开启音乐">
<Form.Item label={i18n("TurnOnMusic")}>
<Space size={16}>
<Form.Item name="enableMusic" noStyle valuePropName="checked">
<Checkbox />
......@@ -33,7 +34,7 @@ export const AudioSetting: React.FC = () => {
</Form.Item>
</Space>
</Form.Item>
<Form.Item label="开启音效">
<Form.Item label={i18n("TurnOnSoundEffects")}>
<Space size={16}>
<Form.Item name="enableSoundEffects" noStyle valuePropName="checked">
<Checkbox />
......@@ -53,7 +54,7 @@ export const AudioSetting: React.FC = () => {
</Form.Item>
<Form.Item
name="enableMusicSwitchByEnv"
label="根据环境切换音乐"
label={i18n("SwitchMusicAccordingToTheEnvironment")}
valuePropName="checked"
>
<Switch />
......
......@@ -5,6 +5,7 @@ import { render, unmountComponentAtNode } from "react-dom";
import { theme } from "../theme";
import { AudioSetting } from "./Audio";
import { useTranslation } from "react-i18next";
/** 设置面板属性 */
export interface SettingProps {
......@@ -14,11 +15,12 @@ export interface SettingProps {
export const Setting = (props: SettingProps) => {
const { defaultKey = "audio" } = props;
const { t: i18n } = useTranslation("SystemSettings");
const items: TabsProps["items"] = [
{
key: "audio",
label: "音频设置",
label: i18n("AudioSettings"),
children: <AudioSetting />,
},
];
......
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