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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
baichixing
Neos
Commits
2aac735f
Commit
2aac735f
authored
Jun 17, 2024
by
BBeretta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat/language-translation (MD Pro Page translation)
parent
e6670a75
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
9 deletions
+19
-9
src/ui/BuildDeck/DeckDatabase/DeckResults/index.tsx
src/ui/BuildDeck/DeckDatabase/DeckResults/index.tsx
+3
-2
src/ui/BuildDeck/DeckDatabase/index.tsx
src/ui/BuildDeck/DeckDatabase/index.tsx
+3
-3
src/ui/I18N/Source/Chinese/translation.json
src/ui/I18N/Source/Chinese/translation.json
+6
-1
src/ui/I18N/Source/English/translation.json
src/ui/I18N/Source/English/translation.json
+6
-1
src/ui/I18N/index.ts
src/ui/I18N/index.ts
+1
-1
src/ui/Layout/index.tsx
src/ui/Layout/index.tsx
+0
-1
No files found.
src/ui/BuildDeck/DeckDatabase/DeckResults/index.tsx
View file @
2aac735f
...
...
@@ -15,6 +15,7 @@ import { setSelectedDeck } from "../..";
import
{
editDeckStore
}
from
"
../../store
"
;
import
{
iDeckToEditingDeck
}
from
"
../../utils
"
;
import
styles
from
"
./index.module.scss
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
const
{
assetsPath
}
=
useConfig
();
...
...
@@ -41,7 +42,7 @@ const store = proxy<Props>({
export
const
DeckResults
:
React
.
FC
=
memo
(()
=>
{
const
snap
=
useSnapshot
(
store
);
const
{
message
}
=
App
.
useApp
();
const
{
t
:
i18n
}
=
useTranslation
(
"
DeckResults
"
);
useEffect
(()
=>
{
if
(
snap
.
onlyMine
)
{
// show only decks uploaded by myself
...
...
@@ -116,7 +117,7 @@ export const DeckResults: React.FC = memo(() => {
)
:
(
<
div
className=
{
styles
.
empty
}
>
<
IconFont
type=
"icon-empty"
size=
{
40
}
/>
<
div
>
找不到相应卡组
</
div
>
<
div
>
{
i18n
(
"
NoDeckGroupFound
"
)
}
</
div
>
</
div
>
)
}
</>
...
...
src/ui/BuildDeck/DeckDatabase/index.tsx
View file @
2aac735f
...
...
@@ -146,7 +146,7 @@ export const DeckDatabase: React.FC = () => {
icon=
{
<
SwapOutlined
/>
}
onClick=
{
()
=>
setShowMdproDecks
(
!
showMdproDecks
)
}
>
{
showMdproDecks
?
"
卡片数据库
"
:
"
Mdpro在线卡组
"
}
{
showMdproDecks
?
i18n
(
"
CardDatabase
"
)
:
i18n
(
"
MDProOnlineDeck
"
)
}
</
Button
>
</
Space
>
<
div
className=
{
styles
[
"
select-btns
"
]
}
>
...
...
@@ -156,8 +156,8 @@ export const DeckDatabase: React.FC = () => {
style=
{
{
width
:
"
18.90rem
"
}
}
defaultValue=
{
false
}
options=
{
[
{
value
:
true
,
label
:
"
只显示我上传的卡组
"
},
{
value
:
false
,
label
:
"
显示全部在线卡组
"
},
{
value
:
true
,
label
:
i18n
(
"
OnlyShowDecksIUploaded
"
)
},
{
value
:
false
,
label
:
i18n
(
"
ShowAllOnlineDecks
"
)
},
]
}
onChange=
{
// @ts-ignore
...
...
src/ui/I18N/Source/Chinese/translation.json
View file @
2aac735f
...
...
@@ -62,7 +62,12 @@
"PendulumScaleFromHighToLow"
:
"灵摆刻度从高到低"
,
"PendulumScaleFromLowToHigh"
:
"灵摆刻度从低到高"
,
"ResetSuccessful"
:
"重置成功"
,
"SaveSuccessful"
:
"保存成功"
"SaveSuccessful"
:
"保存成功"
,
"NoDeckGroupFound"
:
"找不到相应卡组"
,
"OnlyShowDecksIUploaded"
:
"只显示我上传的卡组"
,
"ShowAllOnlineDecks"
:
"显示全部在线卡组"
,
"CardDatabase"
:
"卡片数据库"
,
"MDProOnlineDeck"
:
"Mdpro在线卡组"
},
"Filter"
:
{
"CardFilter"
:
"卡片筛选"
,
...
...
src/ui/I18N/Source/English/translation.json
View file @
2aac735f
...
...
@@ -62,7 +62,12 @@
"PendulumScaleFromHighToLow"
:
"Pendulum Scale from high to low"
,
"PendulumScaleFromLowToHigh"
:
"Pendulum Scale from low to high"
,
"ResetSuccessful"
:
"Reset successful"
,
"SaveSuccessful"
:
"Save successful"
"SaveSuccessful"
:
"Save successful"
,
"NoDeckGroupFound"
:
"No corresponding Deck group found"
,
"OnlyShowDecksIUploaded"
:
"Only show decks I uploaded"
,
"ShowAllOnlineDecks"
:
"Show all online decks"
,
"CardDatabase"
:
"Card Database"
,
"MDProOnlineDeck"
:
"MDPro Online Deck"
},
"Filter"
:
{
"CardFilter"
:
"Card Filter"
,
...
...
src/ui/I18N/index.ts
View file @
2aac735f
...
...
@@ -86,7 +86,7 @@ const resources = {
i18next
.
use
(
initReactI18next
).
init
({
resources
,
lng
:
"
cn
"
,
//default language
lng
:
localStorage
.
getItem
(
"
language
"
)
?
localStorage
.
getItem
(
"
language
"
)?.
toString
()
:
"
cn
"
,
//default language
});
export
default
i18next
;
src/ui/Layout/index.tsx
View file @
2aac735f
...
...
@@ -109,7 +109,6 @@ export const Component = () => {
</
HeaderBtn
>
<
span
style=
{
{
flexGrow
:
1
}
}
/>
<
span
className=
{
styles
.
profile
}
>
{
location
.
pathname
===
"
/
"
&&
<
I18NSelector
/>
}
<
Dropdown
arrow
menu=
{
{
...
...
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