Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
65e9fdea
Unverified
Commit
65e9fdea
authored
Dec 31, 2022
by
Ivan
Committed by
GitHub
Dec 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add russian locale (#879)
parent
2b2792de
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
263 additions
and
2 deletions
+263
-2
user_setting.go
api/user_setting.go
+1
-1
LocaleSelect.tsx
web/src/components/LocaleSelect.tsx
+1
-0
i18n.ts
web/src/i18n.ts
+4
-0
ru.json
web/src/locales/ru.json
+256
-0
i18n.d.ts
web/src/types/i18n.d.ts
+1
-1
No files found.
api/user_setting.go
View file @
65e9fdea
...
@@ -36,7 +36,7 @@ func (key UserSettingKey) String() string {
...
@@ -36,7 +36,7 @@ func (key UserSettingKey) String() string {
}
}
var
(
var
(
UserSettingLocaleValue
=
[]
string
{
"en"
,
"zh"
,
"vi"
,
"fr"
,
"nl"
,
"sv"
,
"de"
,
"es"
,
"uk"
}
UserSettingLocaleValue
=
[]
string
{
"en"
,
"zh"
,
"vi"
,
"fr"
,
"nl"
,
"sv"
,
"de"
,
"es"
,
"uk"
,
"ru"
}
UserSettingAppearanceValue
=
[]
string
{
"system"
,
"light"
,
"dark"
}
UserSettingAppearanceValue
=
[]
string
{
"system"
,
"light"
,
"dark"
}
UserSettingMemoVisibilityValue
=
[]
Visibility
{
Private
,
Protected
,
Public
}
UserSettingMemoVisibilityValue
=
[]
Visibility
{
Private
,
Protected
,
Public
}
UserSettingMemoDisplayTsOptionKeyValue
=
[]
string
{
"created_ts"
,
"updated_ts"
}
UserSettingMemoDisplayTsOptionKeyValue
=
[]
string
{
"created_ts"
,
"updated_ts"
}
...
...
web/src/components/LocaleSelect.tsx
View file @
65e9fdea
...
@@ -31,6 +31,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
...
@@ -31,6 +31,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
<
Option
value=
"de"
>
German
</
Option
>
<
Option
value=
"de"
>
German
</
Option
>
<
Option
value=
"es"
>
Español
</
Option
>
<
Option
value=
"es"
>
Español
</
Option
>
<
Option
value=
"uk"
>
Українська
</
Option
>
<
Option
value=
"uk"
>
Українська
</
Option
>
<
Option
value=
"ru"
>
Русский
</
Option
>
</
Select
>
</
Select
>
);
);
};
};
...
...
web/src/i18n.ts
View file @
65e9fdea
...
@@ -9,6 +9,7 @@ import svLocale from "./locales/sv.json";
...
@@ -9,6 +9,7 @@ import svLocale from "./locales/sv.json";
import
deLocale
from
"./locales/de.json"
;
import
deLocale
from
"./locales/de.json"
;
import
esLocale
from
"./locales/es.json"
;
import
esLocale
from
"./locales/es.json"
;
import
ukLocale
from
"./locales/uk.json"
;
import
ukLocale
from
"./locales/uk.json"
;
import
ruLocale
from
"./locales/ru.json"
;
i18n
.
use
(
initReactI18next
).
init
({
i18n
.
use
(
initReactI18next
).
init
({
resources
:
{
resources
:
{
...
@@ -39,6 +40,9 @@ i18n.use(initReactI18next).init({
...
@@ -39,6 +40,9 @@ i18n.use(initReactI18next).init({
uk
:
{
uk
:
{
translation
:
ukLocale
,
translation
:
ukLocale
,
},
},
ru
:
{
translation
:
ruLocale
,
},
},
},
lng
:
"nl"
,
lng
:
"nl"
,
fallbackLng
:
"en"
,
fallbackLng
:
"en"
,
...
...
web/src/locales/ru.json
0 → 100644
View file @
65e9fdea
This diff is collapsed.
Click to expand it.
web/src/types/i18n.d.ts
View file @
65e9fdea
type
Locale
=
"en"
|
"zh"
|
"vi"
|
"fr"
|
"nl"
|
"sv"
|
"de"
|
"es"
|
"uk"
;
type
Locale
=
"en"
|
"zh"
|
"vi"
|
"fr"
|
"nl"
|
"sv"
|
"de"
|
"es"
|
"uk"
|
"ru"
;
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