Skip to content

Commit b9f817d

Browse files
authored
feat: add Korean language pack (#558)
1 parent 1ee89ba commit b9f817d

File tree

6 files changed

+115
-14
lines changed

6 files changed

+115
-14
lines changed

src/extensions/locales-defaults/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { IExtension, IContributeType } from 'mo/model/extension';
22

3+
const koKR = require('./locales/ko-KR.json');
34
const zhCN = require('./locales/zh-CN.json');
45
const en = require('./locales/en.json');
5-
const locales = [zhCN, en];
6+
const locales = [zhCN, en, koKR];
67

78
export const ExtendsLocales: IExtension = {
89
id: 'ExtendsLocales',

src/extensions/locales-defaults/locales/en.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"name": "English",
44
"source": {
55
"molecule.welcome": "Welcome to Molecule",
6+
"menubar": "Menu Bar",
67
"menu.file": "File",
78
"menu.settings": "Settings",
9+
"menu.account": "Account",
810
"menu.colorTheme": "Color Theme",
911
"menu.newFile": "New File",
1012
"menu.newFolder": "New Folder",
@@ -24,14 +26,18 @@
2426
"menu.showSideBar.label": "Toggle Side Bar Visibility",
2527
"menu.showStatusBar": "Show Status Bar",
2628
"menu.showActivityBar": "Show Activity Bar",
29+
"menu.hideActivityBar": "Hide Activity Bar",
2730
"menu.showPanel": "Show Panel",
2831
"menu.showPanel.title": "Toggle Panel",
32+
"menu.defaultProjectName": "Default Project Name",
2933
"menu.run": "Run",
34+
"menu.runTask": "Run Task",
3035
"menu.help": "Help",
36+
"menu.about": "About",
3137
"menu.menuBarHorizontal": "Menu Bar Horizontal Mode",
3238
"menu.menuBarVertical": "Menu Bar Vertical Mode",
33-
"sidebar.explore.title": "Explorer",
3439
"sidebar.explore.folders": "Folders",
40+
"sidebar.explore.title": "Explorer",
3541
"sidebar.explore.openEditor": "Open Editors",
3642
"sidebar.explore.openEditor.group": "Group ${i}",
3743
"sidebar.explore.outline": "Outline",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"id": "ko-KR",
3+
"name": "한국어",
4+
"source": {
5+
"molecule.welcome": "Molecule에 오신 것을 환영합니다",
6+
"menubar": "메뉴 모음",
7+
"menu.file": "파일",
8+
"menu.settings": "설정",
9+
"menu.account": "계정",
10+
"menu.colorTheme": "색 테마",
11+
"menu.newFile": "새 파일",
12+
"menu.newFolder": "새 폴더",
13+
"menu.open": "열기",
14+
"menu.edit": "편집",
15+
"menu.undo": "되돌리기",
16+
"menu.redo": "다시 실행",
17+
"menu.selection": "선택",
18+
"menu.selectAll": "모두 선택",
19+
"menu.copyLineUp": "위에 줄 복사",
20+
"menu.view": "보기",
21+
"menu.commandPalette": "명령어 팔레트",
22+
"menu.openView": "뷰 열기",
23+
"menu.appearance": "모양",
24+
"menu.showMenuBar": "메뉴 모음 표시",
25+
"menu.showSideBar": "사이드 모음 표시",
26+
"menu.showSideBar.label": "사이드 모음 표시 유형 토글",
27+
"menu.showStatusBar": "상태 표시줄 보기",
28+
"menu.showActivityBar": "작업 막대 표시",
29+
"menu.hideActivityBar": "작업 막대 숨기기",
30+
"menu.showPanel": "패널 표시",
31+
"menu.showPanel.title": "패널 토글",
32+
"menu.defaultProjectName": "기본 프로젝트 이름",
33+
"menu.run": "실행",
34+
"menu.runTask": "작업 실행",
35+
"menu.help": "도움말",
36+
"menu.about": "정보",
37+
"menu.menuBarHorizontal": "메뉴 모음 가로 모드",
38+
"menu.menuBarVertical": "메뉴 모음 새로 모드",
39+
"sidebar.explore.folders": "폴더",
40+
"sidebar.explore.title": "탐색기",
41+
"sidebar.explore.openEditor": "편집기 열기",
42+
"sidebar.explore.openEditor.group": "${i} 그룹",
43+
"sidebar.explore.outline": "개요",
44+
"sidebar.search.title": "검색",
45+
"sidebar.replace.placement": "바꾸기",
46+
"sidebar.explore.refresh": "탐색기 새로 고침",
47+
"sidebar.explore.collapseFolders": "탐색기 내에 폴더 축소",
48+
"sidebar.explore.toggleVertical": "세로로 토글",
49+
"sidebar.explore.saveAll": "모두 저장",
50+
"sidebar.explore.actionDesc": "보기 및 더 기타 작업...",
51+
"sidebar.explore.outlineMore": "더 많은 액션들...",
52+
"toolbar.refresh": "새로 고침",
53+
"toolbar.clearAll": "모두 지우기",
54+
"toolbar.collapseAll": "모두 축소",
55+
"search.matchCase": "대/소문자 구분",
56+
"search.matchWholeWord": "전체 단어 일치",
57+
"search.useRegularExpression": "정규식 사용",
58+
"search.preserveCase": "대/소문자 보존",
59+
"search.replaceAll": "모두 바꾸기",
60+
"panel.output.title": "출력",
61+
"panel.toolbox.closePanel": "패널 닫기",
62+
"panel.toolbox.maximize": "패널 크기 최대화",
63+
"panel.toolbox.restoreSize": "패널 크기 복원",
64+
"panel.problems.title": "문제",
65+
"panel.problems.empty": "작업 영역안에는 문제가 감지되지 않았습니다.",
66+
"notification.title": "알림",
67+
"notification.title.no": "새로운 알림이 없습니다.",
68+
"editor.closeToRight": "오른쪽에 있는 항목 닫기",
69+
"editor.closeToLeft": "왼쪽에 있는 항목 닫기",
70+
"editor.closeAll": "모두 닫기",
71+
"editor.closeSaved": "저장된 항목 닫기",
72+
"editor.closeOthers": "기타 항목 닫기",
73+
"editor.close": "닫기",
74+
"editor.actions.splitRight": "오른쪽으로 분할",
75+
"editor.showOpenEditors": "열려 있는 편집기 표시",
76+
"contextmenu.rename": "이름 바꾸기",
77+
"contextmenu.delete": "삭제",
78+
"contextmenu.newFile": "새 파일",
79+
"contextmenu.newFolder": "새 폴더",
80+
"contextmenu.removeFolder": "폴더 삭제",
81+
"contextmenu.openToTheSide": "사이드에 열기",
82+
"contextmenu.addFolderToSpace": "작업 영역에 폴더 추가...",
83+
"contextmenu.findInSpace": "작업 영역에서 찾기...",
84+
"contextmenu.download": "다운로드..."
85+
}
86+
}

src/extensions/locales-defaults/locales/zh-CN.json

+12-4
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,27 @@
3636
"menu.about": "关于",
3737
"menu.menuBarHorizontal": "菜单栏水平模式",
3838
"menu.menuBarVertical": "菜单栏垂直模式",
39+
"sidebar.explore.folders": "文件夹",
3940
"sidebar.explore.title": "浏览",
4041
"sidebar.explore.openEditor": "打开的编辑器",
4142
"sidebar.explore.openEditor.group": "第 ${i} 组",
4243
"sidebar.explore.outline": "轮廓",
43-
"sidebar.explore.outlineMore": "更多操作...",
44-
"sidebar.explore.refresh": "刷新浏览",
45-
"sidebar.explore.folders": "文件夹",
46-
"sidebar.explore.collapseFolders": "折叠文件夹",
4744
"sidebar.search.title": "搜索",
4845
"sidebar.replace.placement": "替换",
46+
"sidebar.explore.refresh": "刷新浏览",
47+
"sidebar.explore.collapseFolders": "折叠文件夹",
48+
"sidebar.explore.toggleVertical": "切换垂直",
49+
"sidebar.explore.saveAll": "全部保存",
50+
"sidebar.explore.actionDesc": "视图和更多操作...",
51+
"sidebar.explore.outlineMore": "更多操作...",
4952
"toolbar.refresh": "刷新",
5053
"toolbar.clearAll": "清除所有",
5154
"toolbar.collapseAll": "折叠所有",
55+
"search.matchCase": "区分大小写",
56+
"search.matchWholeWord": "匹配整个字词",
57+
"search.useRegularExpression": "使用正则表达式",
58+
"search.preserveCase": "保留大小写",
59+
"search.replaceAll": "全部替换",
5260
"panel.output.title": "输出",
5361
"panel.problems.title": "问题",
5462
"panel.problems.empty": "未在工作区检测到问题",

src/i18n/__tests__/localeService.test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ describe('The Locale Service', () => {
3838
expect(defaultLocale).toEqual(BuiltInLocales);
3939
});
4040

41-
test('The size of Built-in Locales should be 2', () => {
41+
test('The size of Built-in Locales should be 3', () => {
4242
const localeService = new LocaleService();
4343
const locales = localeService.getLocales();
44-
expect(locales.length).toBe(2);
44+
expect(locales.length).toBe(3);
4545
});
4646

4747
test('Initialize the locales', () => {
@@ -50,7 +50,7 @@ describe('The Locale Service', () => {
5050
expect(localeService.getCurrentLocale()!.id).toEqual(
5151
localeService.getDefaultLocale().id
5252
);
53-
expect(localeService.getLocales().length).toBe(3);
53+
expect(localeService.getLocales().length).toBe(4);
5454
localeService.initialize([], 'test');
5555
expect(localeService.getCurrentLocale()!.id).toEqual(BuiltInDefault.id);
5656
// Clear the cached locale value
@@ -75,14 +75,14 @@ describe('The Locale Service', () => {
7575

7676
test('Add locales', () => {
7777
const localeService = new LocaleService();
78-
expect(localeService.getLocales().length).toBe(2);
79-
localeService.addLocales([TestLocale]);
8078
expect(localeService.getLocales().length).toBe(3);
79+
localeService.addLocales([TestLocale]);
80+
expect(localeService.getLocales().length).toBe(4);
8181
localeService.addLocales([]);
82-
expect(localeService.getLocales().length).toBe(3);
82+
expect(localeService.getLocales().length).toBe(4);
8383
// Add an existed locale
8484
localeService.addLocales([TestLocale]);
85-
expect(localeService.getLocales().length).toBe(3);
85+
expect(localeService.getLocales().length).toBe(4);
8686
});
8787

8888
test('Add an locale inherit the en', () => {

src/provider/__tests__/__snapshots__/molecule.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ exports[`Test MoleculeProvider Match The MoleculeProvider snapshot 1`] = `
218218
<span
219219
className="mo-collapse__header__title"
220220
>
221-
No Open Folder
221+
Default Project Name
222222
</span>
223223
<div
224224
className="mo-collapse__extra"

0 commit comments

Comments
 (0)