Skip to content

Commit

Permalink
feat: 补充语言列表
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu committed Apr 26, 2023
1 parent dd20e9a commit 3b033d0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/common/Setting/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const languageOptions: { label: string; key: Language; value: Language }[] = [
{ label: '繁體中文', key: 'zh-TW', value: 'zh-TW' },
{ label: 'English', key: 'en-US', value: 'en-US' },
{ label: '한국어', key: 'ko-KR', value: 'ko-KR' },
{ label: 'Русский язык', key: 'ru-RU', value: 'ru-RU' },
]
function updateUserInfo(options: Partial<UserInfo>) {
Expand Down
3 changes: 3 additions & 0 deletions src/hooks/useLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export function useLanguage() {
case 'en-US':
setLocale('en-US')
return enUS
case 'ru-RU':
setLocale('ru-RU')
return enUS
case 'ko-KR':
setLocale('ko-KR')
return koKR
Expand Down
2 changes: 1 addition & 1 deletion src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const i18n = createI18n({
'ko-KR': koKR,
'zh-CN': zhCN,
'zh-TW': zhTW,
'ru-RU': ruRU,
'ru-RU': ruRU,
},
})

Expand Down
2 changes: 1 addition & 1 deletion src/locales/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ export default {
importError: '키 값 불일치',
importRepeatTitle: '제목이 반복되어 건너뜀: {msg}',
importRepeatContent: '내용이 반복되어 건너뜀: {msg}',
onlineImportWarning: '참고: JSON 파일 소스를 확인하십시오!',
onlineImportWarning: '참고: JSON 파일 소스를 확인하십시오!',
},
}
2 changes: 1 addition & 1 deletion src/locales/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
siderButton: 'Хранилище подсказок',
local: 'Локальное',
online: 'Онлайн',
title: 'Название',
title: 'Название',
description: 'Описание',
clearStoreConfirm: 'Вы действительно хотите очистить данные?',
importPlaceholder: 'Пожалуйста, вставьте здесь JSON-данные',
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/app/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const LOCAL_NAME = 'appSetting'

export type Theme = 'light' | 'dark' | 'auto'

export type Language = 'zh-CN' | 'zh-TW' | 'en-US' | 'ko-KR'
export type Language = 'zh-CN' | 'zh-TW' | 'en-US' | 'ko-KR' | 'ru-RU'

export interface AppState {
siderCollapsed: boolean
Expand Down

0 comments on commit 3b033d0

Please sign in to comment.