Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
e24da0e4
Commit
e24da0e4
authored
Jun 17, 2024
by
BBeretta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat/language-translation (System Settings)
parent
7bd44047
Pipeline
#27827
failed with stages
in 8 minutes and 40 seconds
Changes
11
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
73 additions
and
14 deletions
+73
-14
src/ui/I18N/Source/Brazilian/translation.json
src/ui/I18N/Source/Brazilian/translation.json
+8
-1
src/ui/I18N/Source/Chinese/translation.json
src/ui/I18N/Source/Chinese/translation.json
+8
-1
src/ui/I18N/Source/English/translation.json
src/ui/I18N/Source/English/translation.json
+8
-1
src/ui/I18N/Source/French/translation.json
src/ui/I18N/Source/French/translation.json
+8
-1
src/ui/I18N/Source/Japanese/translation.json
src/ui/I18N/Source/Japanese/translation.json
+8
-1
src/ui/I18N/Source/Portuguese/translation.json
src/ui/I18N/Source/Portuguese/translation.json
+8
-1
src/ui/I18N/Source/Spanish/translation.json
src/ui/I18N/Source/Spanish/translation.json
+8
-1
src/ui/I18N/index.ts
src/ui/I18N/index.ts
+7
-0
src/ui/Layout/index.tsx
src/ui/Layout/index.tsx
+1
-1
src/ui/Setting/Audio.tsx
src/ui/Setting/Audio.tsx
+5
-4
src/ui/Setting/index.tsx
src/ui/Setting/index.tsx
+4
-2
No files found.
src/ui/I18N/Source/Brazilian/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"Base de dados de duelos"
,
"DuelDatabase"
:
"Base de dados de duelos"
,
"LogOut"
:
"Sair"
,
"LogOut"
:
"Sair"
,
"Login"
:
"Entrar no MyCard"
,
"Login"
:
"Entrar no MyCard"
,
"Fullscreen"
:
"Tela cheia"
"Fullscreen"
:
"Tela cheia"
,
"SystemSettings"
:
"Configurações do sistema"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"Plataforma de batalha online de Yu-Gi-Oh!"
,
"Title"
:
"Plataforma de batalha online de Yu-Gi-Oh!"
,
...
@@ -36,5 +37,11 @@
...
@@ -36,5 +37,11 @@
"ReplayDesc"
:
"Assista livremente aos duelos passados e reviva aqueles momentos emocionantes de reversão."
,
"ReplayDesc"
:
"Assista livremente aos duelos passados e reviva aqueles momentos emocionantes de reversão."
,
"WIPTitle"
:
"Em desenvolvimento..."
,
"WIPTitle"
:
"Em desenvolvimento..."
,
"WIPDesc"
:
"Aguarde por outras funcionalidades."
"WIPDesc"
:
"Aguarde por outras funcionalidades."
},
"SystemSettings"
:
{
"AudioSettings"
:
"Configurações de áudio"
,
"TurnOnMusic"
:
"Música"
,
"TurnOnSoundEffects"
:
"Efeitos sonoros"
,
"SwitchMusicAccordingToTheEnvironment"
:
"Trocar música conforme o ambiente"
}
}
}
}
src/ui/I18N/Source/Chinese/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"决斗数据库"
,
"DuelDatabase"
:
"决斗数据库"
,
"LogOut"
:
"退出登录"
,
"LogOut"
:
"退出登录"
,
"Login"
:
"登录萌卡"
,
"Login"
:
"登录萌卡"
,
"Fullscreen"
:
"全屏"
"Fullscreen"
:
"全屏"
,
"SystemSettings"
:
"系统设置"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"游戏王网页端对战平台"
,
"Title"
:
"游戏王网页端对战平台"
,
...
@@ -187,5 +188,11 @@
...
@@ -187,5 +188,11 @@
"PleaseSelect"
:
"请选择"
,
"PleaseSelect"
:
"请选择"
,
"Cards"
:
"张卡"
,
"Cards"
:
"张卡"
,
"SelectOneCardAtTime"
:
"每次选择一张"
"SelectOneCardAtTime"
:
"每次选择一张"
},
"SystemSettings"
:
{
"AudioSettings"
:
"音频设置"
,
"TurnOnMusic"
:
"开启音乐"
,
"TurnOnSoundEffects"
:
"开启音效"
,
"SwitchMusicAccordingToTheEnvironment"
:
"根据环境切换音乐"
}
}
}
}
\ No newline at end of file
src/ui/I18N/Source/English/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"Duel Database"
,
"DuelDatabase"
:
"Duel Database"
,
"LogOut"
:
"Log out"
,
"LogOut"
:
"Log out"
,
"Login"
:
"Login to MyCard"
,
"Login"
:
"Login to MyCard"
,
"Fullscreen"
:
"Fullscreen"
"Fullscreen"
:
"Fullscreen"
,
"SystemSettings"
:
"System Settings"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"Yu-Gi-Oh! Web Based Battle Platform"
,
"Title"
:
"Yu-Gi-Oh! Web Based Battle Platform"
,
...
@@ -187,5 +188,11 @@
...
@@ -187,5 +188,11 @@
"PleaseSelect"
:
"Please select"
,
"PleaseSelect"
:
"Please select"
,
"Cards"
:
"Cards"
,
"Cards"
:
"Cards"
,
"SelectOneCardAtTime"
:
"Select one card at a time"
"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
src/ui/I18N/Source/French/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"Base de données de duels"
,
"DuelDatabase"
:
"Base de données de duels"
,
"LogOut"
:
"Déconnexion"
,
"LogOut"
:
"Déconnexion"
,
"Login"
:
"Connexion à MyCard"
,
"Login"
:
"Connexion à MyCard"
,
"Fullscreen"
:
"Plein écran"
"Fullscreen"
:
"Plein écran"
,
"SystemSettings"
:
"Paramètres du système"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"Plateforme de combat Yu-gi-oh basée sur le Web"
,
"Title"
:
"Plateforme de combat Yu-gi-oh basée sur le Web"
,
...
@@ -36,5 +37,11 @@
...
@@ -36,5 +37,11 @@
"ReplayDesc"
:
"Regardez librement les duels passés et revivez ces moments passionnants de retournement."
,
"ReplayDesc"
:
"Regardez librement les duels passés et revivez ces moments passionnants de retournement."
,
"WIPTitle"
:
"En développement..."
,
"WIPTitle"
:
"En développement..."
,
"WIPDesc"
:
"D'autres fonctionnalités à venir."
"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"
}
}
}
}
src/ui/I18N/Source/Japanese/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"デュエルデータベース"
,
"DuelDatabase"
:
"デュエルデータベース"
,
"LogOut"
:
"ログアウト"
,
"LogOut"
:
"ログアウト"
,
"Login"
:
"萌卡にログインする"
,
"Login"
:
"萌卡にログインする"
,
"Fullscreen"
:
"フルスクリーン"
"Fullscreen"
:
"フルスクリーン"
,
"SystemSettings"
:
"システム設定"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"遊戯王ウェブベースのバトルプラットフォーム"
,
"Title"
:
"遊戯王ウェブベースのバトルプラットフォーム"
,
...
@@ -36,5 +37,11 @@
...
@@ -36,5 +37,11 @@
"ReplayDesc"
:
"過去のデュエルを自由に見て、それらのエキサイティングな逆転の瞬間を振り返りましょう。"
,
"ReplayDesc"
:
"過去のデュエルを自由に見て、それらのエキサイティングな逆転の瞬間を振り返りましょう。"
,
"WIPTitle"
:
"開発中..."
,
"WIPTitle"
:
"開発中..."
,
"WIPDesc"
:
"他の機能をお楽しみに。"
"WIPDesc"
:
"他の機能をお楽しみに。"
},
"SystemSettings"
:
{
"AudioSettings"
:
"オーディオ設定"
,
"TurnOnMusic"
:
"音楽をオンにする"
,
"TurnOnSoundEffects"
:
"効果音をオンにする"
,
"SwitchMusicAccordingToTheEnvironment"
:
"環境に応じて音楽を切り替える"
}
}
}
}
src/ui/I18N/Source/Portuguese/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"Base de dados de duelos"
,
"DuelDatabase"
:
"Base de dados de duelos"
,
"LogOut"
:
"Terminar sessão"
,
"LogOut"
:
"Terminar sessão"
,
"Login"
:
"Iniciar sessão no MyCard"
,
"Login"
:
"Iniciar sessão no MyCard"
,
"Fullscreen"
:
"Ecrã completo"
"Fullscreen"
:
"Ecrã completo"
,
"SystemSettings"
:
"Configurações do sistema"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"Plataforma de batalha online de Yu-Gi-Oh!"
,
"Title"
:
"Plataforma de batalha online de Yu-Gi-Oh!"
,
...
@@ -36,5 +37,11 @@
...
@@ -36,5 +37,11 @@
"ReplayDesc"
:
"Assiste livremente aos duelos passados e revive aqueles momentos emocionantes de reversão."
,
"ReplayDesc"
:
"Assiste livremente aos duelos passados e revive aqueles momentos emocionantes de reversão."
,
"WIPTitle"
:
"Em desenvolvimento..."
,
"WIPTitle"
:
"Em desenvolvimento..."
,
"WIPDesc"
:
"Aguarde por outras funcionalidades."
"WIPDesc"
:
"Aguarde por outras funcionalidades."
},
"SystemSettings"
:
{
"AudioSettings"
:
"Configurações de áudio"
,
"TurnOnMusic"
:
"Música"
,
"TurnOnSoundEffects"
:
"Efeitos sonoros"
,
"SwitchMusicAccordingToTheEnvironment"
:
"Trocar música conforme o ambiente"
}
}
}
}
src/ui/I18N/Source/Spanish/translation.json
View file @
e24da0e4
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"DuelDatabase"
:
"Base de datos de duelos"
,
"DuelDatabase"
:
"Base de datos de duelos"
,
"LogOut"
:
"Cerrar sesión"
,
"LogOut"
:
"Cerrar sesión"
,
"Login"
:
"Iniciar sesión en MyCard"
,
"Login"
:
"Iniciar sesión en MyCard"
,
"Fullscreen"
:
"Pantalla completa"
"Fullscreen"
:
"Pantalla completa"
,
"SystemSettings"
:
"Configuración del sistema"
},
},
"Start"
:
{
"Start"
:
{
"Title"
:
"Plataforma de batalla basada en la web de Yu-gi-oh"
,
"Title"
:
"Plataforma de batalla basada en la web de Yu-gi-oh"
,
...
@@ -36,5 +37,11 @@
...
@@ -36,5 +37,11 @@
"ReplayDesc"
:
"Mira libremente duelos pasados y revive esos emocionantes momentos de reversión."
,
"ReplayDesc"
:
"Mira libremente duelos pasados y revive esos emocionantes momentos de reversión."
,
"WIPTitle"
:
"En desarrollo..."
,
"WIPTitle"
:
"En desarrollo..."
,
"WIPDesc"
:
"Espere por otras funciones."
"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"
}
}
}
}
src/ui/I18N/index.ts
View file @
e24da0e4
...
@@ -31,6 +31,7 @@ const resources = {
...
@@ -31,6 +31,7 @@ const resources = {
Popover
:
translationChinese
.
Popover
,
Popover
:
translationChinese
.
Popover
,
Menu
:
translationChinese
.
Menu
,
Menu
:
translationChinese
.
Menu
,
SelectCardModal
:
translationChinese
.
SelectCardModal
,
SelectCardModal
:
translationChinese
.
SelectCardModal
,
SystemSettings
:
translationChinese
.
SystemSettings
,
},
},
en
:
{
en
:
{
Header
:
translationEnglish
.
Header
,
Header
:
translationEnglish
.
Header
,
...
@@ -49,31 +50,37 @@ const resources = {
...
@@ -49,31 +50,37 @@ const resources = {
Popover
:
translationEnglish
.
Popover
,
Popover
:
translationEnglish
.
Popover
,
Menu
:
translationEnglish
.
Menu
,
Menu
:
translationEnglish
.
Menu
,
SelectCardModal
:
translationEnglish
.
SelectCardModal
,
SelectCardModal
:
translationEnglish
.
SelectCardModal
,
SystemSettings
:
translationEnglish
.
SystemSettings
,
},
},
es
:
{
es
:
{
Header
:
translationSpanish
.
Header
,
Header
:
translationSpanish
.
Header
,
Start
:
translationSpanish
.
Start
,
Start
:
translationSpanish
.
Start
,
Match
:
translationSpanish
.
Match
,
Match
:
translationSpanish
.
Match
,
SystemSettings
:
translationSpanish
.
SystemSettings
,
},
},
fr
:
{
fr
:
{
Header
:
translationFrench
.
Header
,
Header
:
translationFrench
.
Header
,
Start
:
translationFrench
.
Start
,
Start
:
translationFrench
.
Start
,
Match
:
translationFrench
.
Match
,
Match
:
translationFrench
.
Match
,
SystemSettings
:
translationFrench
.
SystemSettings
,
},
},
ja
:
{
ja
:
{
Header
:
translationJapanese
.
Header
,
Header
:
translationJapanese
.
Header
,
Start
:
translationJapanese
.
Start
,
Start
:
translationJapanese
.
Start
,
Match
:
translationJapanese
.
Match
,
Match
:
translationJapanese
.
Match
,
SystemSettings
:
translationJapanese
.
SystemSettings
,
},
},
br
:
{
br
:
{
Header
:
translationBrazilian
.
Header
,
Header
:
translationBrazilian
.
Header
,
Start
:
translationBrazilian
.
Start
,
Start
:
translationBrazilian
.
Start
,
Match
:
translationBrazilian
.
Match
,
Match
:
translationBrazilian
.
Match
,
SystemSettings
:
translationBrazilian
.
SystemSettings
,
},
},
pt
:
{
pt
:
{
Header
:
translationPortuguese
.
Header
,
Header
:
translationPortuguese
.
Header
,
Start
:
translationPortuguese
.
Start
,
Start
:
translationPortuguese
.
Start
,
Match
:
translationPortuguese
.
Match
,
Match
:
translationPortuguese
.
Match
,
SystemSettings
:
translationPortuguese
.
SystemSettings
,
},
},
};
};
...
...
src/ui/Layout/index.tsx
View file @
e24da0e4
...
@@ -140,7 +140,7 @@ export const Component = () => {
...
@@ -140,7 +140,7 @@ export const Component = () => {
),
),
},
},
{
{
label
:
"
系统设置
"
,
label
:
i18n
(
"
SystemSettings
"
)
,
onClick
:
()
=>
{
onClick
:
()
=>
{
modal
.
info
({
modal
.
info
({
content
:
<
Setting
/>,
content
:
<
Setting
/>,
...
...
src/ui/Setting/Audio.tsx
View file @
e24da0e4
...
@@ -3,10 +3,11 @@ import React from "react";
...
@@ -3,10 +3,11 @@ import React from "react";
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
settingStore
}
from
"
@/stores/settingStore
"
;
import
{
settingStore
}
from
"
@/stores/settingStore
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
export
const
AudioSetting
:
React
.
FC
=
()
=>
{
export
const
AudioSetting
:
React
.
FC
=
()
=>
{
const
{
audio
}
=
useSnapshot
(
settingStore
);
const
{
audio
}
=
useSnapshot
(
settingStore
);
const
{
t
:
i18n
}
=
useTranslation
(
"
SystemSettings
"
);
return
(
return
(
<
Form
<
Form
initialValues=
{
audio
}
initialValues=
{
audio
}
...
@@ -15,7 +16,7 @@ export const AudioSetting: React.FC = () => {
...
@@ -15,7 +16,7 @@ export const AudioSetting: React.FC = () => {
}
}
}
}
labelAlign=
"left"
labelAlign=
"left"
>
>
<
Form
.
Item
label=
"开启音乐"
>
<
Form
.
Item
label=
{
i18n
(
"
TurnOnMusic
"
)
}
>
<
Space
size=
{
16
}
>
<
Space
size=
{
16
}
>
<
Form
.
Item
name=
"enableMusic"
noStyle
valuePropName=
"checked"
>
<
Form
.
Item
name=
"enableMusic"
noStyle
valuePropName=
"checked"
>
<
Checkbox
/>
<
Checkbox
/>
...
@@ -33,7 +34,7 @@ export const AudioSetting: React.FC = () => {
...
@@ -33,7 +34,7 @@ export const AudioSetting: React.FC = () => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Space
>
</
Space
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"开启音效"
>
<
Form
.
Item
label=
{
i18n
(
"
TurnOnSoundEffects
"
)
}
>
<
Space
size=
{
16
}
>
<
Space
size=
{
16
}
>
<
Form
.
Item
name=
"enableSoundEffects"
noStyle
valuePropName=
"checked"
>
<
Form
.
Item
name=
"enableSoundEffects"
noStyle
valuePropName=
"checked"
>
<
Checkbox
/>
<
Checkbox
/>
...
@@ -53,7 +54,7 @@ export const AudioSetting: React.FC = () => {
...
@@ -53,7 +54,7 @@ export const AudioSetting: React.FC = () => {
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
name=
"enableMusicSwitchByEnv"
name=
"enableMusicSwitchByEnv"
label=
"根据环境切换音乐"
label=
{
i18n
(
"
SwitchMusicAccordingToTheEnvironment
"
)
}
valuePropName=
"checked"
valuePropName=
"checked"
>
>
<
Switch
/>
<
Switch
/>
...
...
src/ui/Setting/index.tsx
View file @
e24da0e4
...
@@ -5,6 +5,7 @@ import { render, unmountComponentAtNode } from "react-dom";
...
@@ -5,6 +5,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
"
;
/** 设置面板属性 */
/** 设置面板属性 */
export
interface
SettingProps
{
export
interface
SettingProps
{
...
@@ -14,11 +15,12 @@ export interface SettingProps {
...
@@ -14,11 +15,12 @@ export interface SettingProps {
export
const
Setting
=
(
props
:
SettingProps
)
=>
{
export
const
Setting
=
(
props
:
SettingProps
)
=>
{
const
{
defaultKey
=
"
audio
"
}
=
props
;
const
{
defaultKey
=
"
audio
"
}
=
props
;
const
{
t
:
i18n
}
=
useTranslation
(
"
SystemSettings
"
);
const
items
:
TabsProps
[
"
items
"
]
=
[
const
items
:
TabsProps
[
"
items
"
]
=
[
{
{
key
:
"
audio
"
,
key
:
"
audio
"
,
label
:
"
音频设置
"
,
label
:
i18n
(
"
AudioSettings
"
)
,
children
:
<
AudioSetting
/>,
children
:
<
AudioSetting
/>,
},
},
];
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment