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
BBeretta
Neos
Commits
069fbdc4
Commit
069fbdc4
authored
May 14, 2024
by
BBeretta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: imports sorted
parent
75b8dbfd
Pipeline
#27124
failed with stages
in 12 minutes and 36 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
13 deletions
+10
-13
src/Language/LanguageContext.tsx
src/Language/LanguageContext.tsx
+1
-1
src/Language/LanguageSelector.tsx
src/Language/LanguageSelector.tsx
+1
-1
src/i18n.tsx
src/i18n.tsx
+3
-3
src/main.tsx
src/main.tsx
+2
-4
src/ui/Layout/index.tsx
src/ui/Layout/index.tsx
+2
-3
src/ui/Start/index.tsx
src/ui/Start/index.tsx
+1
-1
No files found.
src/Language/LanguageContext.tsx
View file @
069fbdc4
import
React
,
{
createContext
,
use
State
,
useContext
}
from
"
react
"
;
import
React
,
{
createContext
,
use
Context
,
useState
}
from
"
react
"
;
interface
LanguageContextType
{
language
:
string
;
...
...
src/Language/LanguageSelector.tsx
View file @
069fbdc4
...
...
@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
import
{
useTranslation
}
from
"
react-i18next
"
;
const
LanguageSelector
:
React
.
FC
=
()
=>
{
const
{
t
,
i18n
}
=
useTranslation
();
const
{
i18n
}
=
useTranslation
();
const
onClickLanguageChange
=
(
e
:
React
.
ChangeEvent
<
HTMLSelectElement
>
)
=>
{
const
language
=
e
.
target
.
value
;
...
...
src/i18n.tsx
View file @
069fbdc4
import
i18next
from
"
i18next
"
;
import
{
initReactI18next
}
from
"
react-i18next
"
;
import
translationBrazilian
from
"
./Translation/Brazilian/translation.json
"
;
import
translationChinese
from
"
./Translation/Chinese/translation.json
"
;
//Import all translation files
import
translationEnglish
from
"
./Translation/English/translation.json
"
;
import
translationSpanish
from
"
./Translation/Spanish/translation.json
"
;
import
translationFrench
from
"
./Translation/French/translation.json
"
;
import
translationChinese
from
"
./Translation/Chinese/translation.json
"
;
import
translationJapanese
from
"
./Translation/Japanese/translation.json
"
;
import
translationBrazilian
from
"
./Translation/Brazilian/translation.json
"
;
import
translationPortuguese
from
"
./Translation/Portuguese/translation.json
"
;
import
translationSpanish
from
"
./Translation/Spanish/translation.json
"
;
//---Using translation
// const resources = {
...
...
src/main.tsx
View file @
069fbdc4
...
...
@@ -18,6 +18,7 @@ import "u-reset.css";
import
"
overlayscrollbars/overlayscrollbars.css
"
;
import
"
@/styles/core.scss
"
;
import
"
@/styles/inject.scss
"
;
import
"
./i18n
"
;
import
{
ProConfigProvider
}
from
"
@ant-design/pro-provider
"
;
import
{
App
,
ConfigProvider
}
from
"
antd
"
;
...
...
@@ -27,11 +28,8 @@ import ReactDOM from "react-dom/client";
import
{
theme
}
from
"
@/ui/theme
"
;
import
{
NeosRouter
}
from
"
./ui/NeosRouter
"
;
import
"
./i18n
"
;
import
{
LanguageProvider
}
from
"
./Language/LanguageContext
"
;
import
{
NeosRouter
}
from
"
./ui/NeosRouter
"
;
const
root
=
ReactDOM
.
createRoot
(
document
.
getElementById
(
"
root
"
)
as
HTMLElement
,
...
...
src/ui/Layout/index.tsx
View file @
069fbdc4
import
{
Avatar
,
Dropdown
}
from
"
antd
"
;
import
classNames
from
"
classnames
"
;
import
React
,
{
useEffect
}
from
"
react
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
import
{
type
LoaderFunction
,
NavLink
,
...
...
@@ -16,6 +17,7 @@ import {
removeCookie
,
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
LanguageSelector
from
"
@/Language/LanguageSelector
"
;
import
{
accountStore
}
from
"
@/stores
"
;
import
styles
from
"
./index.module.scss
"
;
...
...
@@ -30,9 +32,6 @@ import {
initWASM
,
}
from
"
./utils
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
import
LanguageSelector
from
"
@/Language/LanguageSelector
"
;
const
NeosConfig
=
useConfig
();
export
const
loader
:
LoaderFunction
=
async
()
=>
{
...
...
src/ui/Start/index.tsx
View file @
069fbdc4
import
{
RightOutlined
}
from
"
@ant-design/icons
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
...
...
@@ -8,7 +9,6 @@ import { accountStore } from "@/stores";
import
{
Background
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
styles
from
"
./index.module.scss
"
;
import
{
useTranslation
}
from
"
react-i18next
"
;
const
NeosConfig
=
useConfig
();
...
...
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