From c4d34eb465cf8bda67ce0c99aff76920b0d7919d Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 11 May 2016 03:14:06 +0900 Subject: [PATCH] :memo: Update Korean docs as upstream [ci skip] --- docs-translations/ko-KR/api/app.md | 14 +-- docs-translations/ko-KR/api/browser-window.md | 12 +- .../ko-KR/api/chrome-command-line-switches.md | 5 +- docs-translations/ko-KR/api/clipboard.md | 4 +- docs-translations/ko-KR/api/content-tracing.md | 4 +- docs-translations/ko-KR/api/crash-reporter.md | 2 +- docs-translations/ko-KR/api/desktop-capturer.md | 6 +- docs-translations/ko-KR/api/dialog.md | 24 ++-- docs-translations/ko-KR/api/download-item.md | 6 +- docs-translations/ko-KR/api/frameless-window.md | 10 +- docs-translations/ko-KR/api/global-shortcut.md | 3 +- docs-translations/ko-KR/api/ipc-main.md | 4 +- docs-translations/ko-KR/api/menu.md | 32 ++--- docs-translations/ko-KR/api/native-image.md | 7 +- docs-translations/ko-KR/api/power-monitor.md | 2 +- docs-translations/ko-KR/api/power-save-blocker.md | 2 +- docs-translations/ko-KR/api/process.md | 2 +- docs-translations/ko-KR/api/protocol.md | 26 ++--- docs-translations/ko-KR/api/remote.md | 14 +-- docs-translations/ko-KR/api/screen.md | 18 ++- docs-translations/ko-KR/api/session.md | 16 +-- docs-translations/ko-KR/api/shell.md | 2 +- docs-translations/ko-KR/api/synopsis.md | 18 +-- docs-translations/ko-KR/api/system-preferences.md | 2 +- docs-translations/ko-KR/api/tray.md | 10 +- docs-translations/ko-KR/api/web-contents.md | 130 +++++++-------------- docs-translations/ko-KR/api/web-frame.md | 6 +- docs-translations/ko-KR/api/web-view-tag.md | 20 ++-- docs-translations/ko-KR/faq/electron-faq.md | 6 +- docs-translations/ko-KR/styleguide.md | 2 +- .../ko-KR/tutorial/application-packaging.md | 4 +- .../tutorial/desktop-environment-integration.md | 45 ++++--- .../ko-KR/tutorial/online-offline-events.md | 15 +-- docs-translations/ko-KR/tutorial/quick-start.md | 18 +-- .../ko-KR/tutorial/using-pepper-flash-plugin.md | 4 +- .../ko-KR/tutorial/using-selenium-and-webdriver.md | 2 +- .../ko-KR/tutorial/using-widevine-cdm-plugin.md | 6 +- 37 files changed, 216 insertions(+), 287 deletions(-) diff --git a/docs-translations/ko-KR/api/app.md b/docs-translations/ko-KR/api/app.md index 4b747d0..52a7baa 100644 --- a/docs-translations/ko-KR/api/app.md +++ b/docs-translations/ko-KR/api/app.md @@ -5,7 +5,7 @@ 밑의 예시는 마지막 윈도우가 종료되었을 때, 어플리케이션을 종료시키는 예시입니다: ```javascript -const { app } = require('electron'); +const {app} = require('electron'); app.on('window-all-closed', () => { app.quit(); }); @@ -182,9 +182,9 @@ Returns: 기본 동작을 방지하고 인증을 승인할 수 있습니다. ```javascript -app.on('certificate-error', function(event, webContents, url, error, certificate, callback) { - if (url == "https://github.com") { - // Verification logic. +app.on('certificate-error', (event, webContents, url, error, certificate, callback) => { + if (url === 'https://github.com') { + // 확인 로직. event.preventDefault(); callback(true); } else { @@ -213,10 +213,10 @@ Returns: 것을 막습니다. ```javascript -app.on('select-client-certificate', function(event, webContents, url, list, callback) { +app.on('select-client-certificate', (event, webContents, url, list, callback) => { event.preventDefault(); callback(list[0]); -}) +}); ``` ### Event: 'login' @@ -247,7 +247,7 @@ Returns: app.on('login', (event, webContents, request, authInfo, callback) => { event.preventDefault(); callback('username', 'secret'); -}) +}); ``` ### Event: 'gpu-process-crashed' diff --git a/docs-translations/ko-KR/api/browser-window.md b/docs-translations/ko-KR/api/browser-window.md index 321439f..ee77a9b 100644 --- a/docs-translations/ko-KR/api/browser-window.md +++ b/docs-translations/ko-KR/api/browser-window.md @@ -6,12 +6,12 @@ ```javascript // 메인 프로세스에서 -const { BrowserWindow } = require('electron'); +const {BrowserWindow} = require('electron'); // 또는 렌더러 프로세스에서 -const { BrowserWindow } = require('electron').remote; +const {BrowserWindow} = require('electron').remote; -let win = new BrowserWindow({ width: 800, height: 600, show: false }); +let win = new BrowserWindow({width: 800, height: 600, show: false}); win.on('closed', () => { win = null; }); @@ -214,7 +214,7 @@ Electron에선 빈 문자열 또는 `false`를 전달할 경우 윈도우 종료 예시는 다음과 같습니다: ```javascript -window.onbeforeunload = function(e) { +window.onbeforeunload = (e) => { console.log('I do not want to be closed'); // 반드시 문자열을 반환해야 하고 사용자에게 페이지 언로드에 대한 확인 창을 보여주는 @@ -390,7 +390,7 @@ ID에 해당하는 윈도우를 찾습니다. ```javascript // `win`은 BrowserWindow의 인스턴스입니다 -var win = new BrowserWindow({ width: 800, height: 600 }); +let win = new BrowserWindow({width: 800, height: 600}); ``` ### `win.webContents` @@ -683,7 +683,7 @@ Mac OS X에서 시트를 부착할 위치를 지정합니다. 기본적으로 표시하기 위해 사용할 것입니다: ```javascript -var toolbarRect = document.getElementById('toolbar').getBoundingClientRect(); +let toolbarRect = document.getElementById('toolbar').getBoundingClientRect(); win.setSheetOffset(toolbarRect.height); ``` diff --git a/docs-translations/ko-KR/api/chrome-command-line-switches.md b/docs-translations/ko-KR/api/chrome-command-line-switches.md index 1b5f672..810d9c7 100644 --- a/docs-translations/ko-KR/api/chrome-command-line-switches.md +++ b/docs-translations/ko-KR/api/chrome-command-line-switches.md @@ -7,7 +7,7 @@ 명령줄 옵션을 추가로 지정할 수 있습니다: ```javascript -const { app } = require('electron'); +const {app} = require('electron'); app.commandLine.appendSwitch('remote-debugging-port', '8315'); app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1'); @@ -109,8 +109,7 @@ Net log 이벤트를 활성화하고 `path`에 로그를 기록합니다. ## --ssl-version-fallback-min=`version` -TLS fallback에서 사용할 SSL/TLS 최소 버전을 지정합니다. ("tls1", "tls1.1", -"tls1.2") +TLS fallback에서 사용할 SSL/TLS 최소 버전을 지정합니다. (`tls1`, `tls1.1`, `tls1.2`) ## --cipher-suite-blacklist=`cipher_suites` diff --git a/docs-translations/ko-KR/api/clipboard.md b/docs-translations/ko-KR/api/clipboard.md index 8f48c6f..8b027d2 100644 --- a/docs-translations/ko-KR/api/clipboard.md +++ b/docs-translations/ko-KR/api/clipboard.md @@ -5,7 +5,7 @@ 다음 예시는 클립보드에 문자열을 쓰는 방법을 보여줍니다: ```javascript -const { clipboard } = require('electron'); +const {clipboard} = require('electron'); clipboard.writeText('Example String'); ``` @@ -113,7 +113,7 @@ console.log(clipboard.has('

selection

')); * `type` String (optional) ```javascript -clipboard.write({text: 'test', html: "test"}); +clipboard.write({text: 'test', html: 'test'}); ``` `data`를 클립보드에 씁니다. diff --git a/docs-translations/ko-KR/api/content-tracing.md b/docs-translations/ko-KR/api/content-tracing.md index 204ed20..57ef519 100644 --- a/docs-translations/ko-KR/api/content-tracing.md +++ b/docs-translations/ko-KR/api/content-tracing.md @@ -7,14 +7,14 @@ `chrome://tracing/` 페이지를 열고 생성된 파일을 로드하면 결과를 볼 수 있습니다. ```javascript -const { contentTracing } = require('electron'); +const {contentTracing} = require('electron'); const options = { categoryFilter: '*', traceOptions: 'record-until-full,enable-sampling' }; -contentTracing.startRecording(options, function() { +contentTracing.startRecording(options, () => { console.log('Tracing started'); setTimeout(() => { diff --git a/docs-translations/ko-KR/api/crash-reporter.md b/docs-translations/ko-KR/api/crash-reporter.md index f4e6741..f70d3fb 100644 --- a/docs-translations/ko-KR/api/crash-reporter.md +++ b/docs-translations/ko-KR/api/crash-reporter.md @@ -5,7 +5,7 @@ 다음 예시는 윈격 서버에 어플리케이션 크래시 정보를 자동으로 보고하는 예시입니다: ```javascript -const { crashReporter } = require('electron'); +const {crashReporter} = require('electron'); crashReporter.start({ productName: 'YourName', diff --git a/docs-translations/ko-KR/api/desktop-capturer.md b/docs-translations/ko-KR/api/desktop-capturer.md index 6135ca5..7093ad3 100644 --- a/docs-translations/ko-KR/api/desktop-capturer.md +++ b/docs-translations/ko-KR/api/desktop-capturer.md @@ -5,12 +5,12 @@ ```javascript // 렌더러 프로세스 내부 -const { desktopCapturer } = require('electron'); +const {desktopCapturer} = require('electron'); desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => { if (error) throw error; - for (var i = 0; i < sources.length; ++i) { - if (sources[i].name == "Electron") { + for (let i = 0; i < sources.length; ++i) { + if (sources[i].name === 'Electron') { navigator.webkitGetUserMedia({ audio: false, video: { diff --git a/docs-translations/ko-KR/api/dialog.md b/docs-translations/ko-KR/api/dialog.md index 7282f58..3013238 100644 --- a/docs-translations/ko-KR/api/dialog.md +++ b/docs-translations/ko-KR/api/dialog.md @@ -5,16 +5,16 @@ 다음 예시는 파일과 디렉터리를 다중으로 선택하는 대화 상자를 표시하는 예시입니다: ```javascript -var win = ...; // 대화 상자를 사용할 BrowserWindow 객체 -const { dialog } = require('electron'); -console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]})); +let win = ...; // 대화 상자를 사용할 BrowserWindow 객체 +const {dialog} = require('electron'); +console.log(dialog.showOpenDialog({properties: ['openFile', 'openDirectory', 'multiSelections']})); ``` 대화 상자는 Electron의 메인 스레드에서 열립니다. 만약 렌더러 프로세스에서 대화 상자 객체를 사용하고 싶다면, `remote`를 통해 접근하는 방법을 고려해야 합니다: ```javascript -const { dialog } = require('electron').remote; +const {dialog} = require('electron').remote; ``` ## Methods @@ -45,10 +45,10 @@ const { dialog } = require('electron').remote; ```javascript { filters: [ - { name: 'Images', extensions: ['jpg', 'png', 'gif'] }, - { name: 'Movies', extensions: ['mkv', 'avi', 'mp4'] }, - { name: 'Custom File Type', extensions: ['as'] }, - { name: 'All Files', extensions: ['*'] } + {name: 'Images', extensions: ['jpg', 'png', 'gif']}, + {name: 'Movies', extensions: ['mkv', 'avi', 'mp4']}, + {name: 'Custom File Type', extensions: ['as']}, + {name: 'All Files', extensions: ['*']} ] } ``` @@ -102,10 +102,10 @@ const { dialog } = require('electron').remote; 라벨을 가지고 있을 때 해당 버튼의 인덱스를 반환합니다. 따로 두 라벨이 지정되지 않은 경우 0을 반환합니다. OS X와 Windows에선 `cancelId` 지정 여부에 상관없이 "Cancel" 버튼이 언제나 `cancelId`로 지정됩니다. - * `noLink` Boolean - Windows Electron은 "Cancel"이나 "Yes"와 같은 흔히 사용되는 - 버튼을 찾으려고 시도하고 대화 상자 내에서 해당 버튼을 커맨드 링크처럼 만듭니다. - 이 기능으로 앱을 좀 더 Modern Windows 앱처럼 만들 수 있습니다. 이 기능을 원하지 - 않으면 `noLink`를 true로 지정하면 됩니다. + * `noLink` Boolean - Windows에서 Electron은 ("Cancel"이나 "Yes"와 같은) 흔히 + 사용되는 버튼을 찾으려고 시도하고 대화 상자 내에서 해당 버튼을 커맨드 링크처럼 + 만듭니다. 이 기능으로 앱을 좀 더 현대적인 Windows 앱처럼 만들 수 있습니다. 이 + 기능을 원하지 않으면 `noLink`를 true로 지정하면 됩니다. * `callback` Function (optional) 대화 상자를 표시합니다. `browserWindow`를 지정하면 대화 상자가 완전히 닫힐 때까지 diff --git a/docs-translations/ko-KR/api/download-item.md b/docs-translations/ko-KR/api/download-item.md index 4de29eb..a748908 100644 --- a/docs-translations/ko-KR/api/download-item.md +++ b/docs-translations/ko-KR/api/download-item.md @@ -18,10 +18,10 @@ win.webContents.session.on('will-download', (event, item, webContents) => { console.log('Received bytes: ' + item.getReceivedBytes()); }); item.on('done', (e, state) => { - if (state === "completed") { - console.log("Download successfully"); + if (state === 'completed') { + console.log('Download successfully'); } else { - console.log("Download is cancelled or interrupted that can't be resumed"); + console.log('Download is cancelled or interrupted that can\'t be resumed'); } }); }); diff --git a/docs-translations/ko-KR/api/frameless-window.md b/docs-translations/ko-KR/api/frameless-window.md index 95c0294..3d0892a 100644 --- a/docs-translations/ko-KR/api/frameless-window.md +++ b/docs-translations/ko-KR/api/frameless-window.md @@ -13,8 +13,8 @@ Frameless Window를 만드려면 [BrowserWindow](browser-window.md) 객체의 `options` 객체에서 `frame` 옵션을 `false`로 지정하면 됩니다: ```javascript -const { BrowserWindow } = require('electron'); -let win = new BrowserWindow({ width: 800, height: 600, frame: false }); +const {BrowserWindow} = require('electron'); +let win = new BrowserWindow({width: 800, height: 600, frame: false}); ``` ### 최신 OS X에서 사용할 수 있는 대안 @@ -22,10 +22,10 @@ let win = new BrowserWindow({ width: 800, height: 600, frame: false }); OS X 10.10 Yosemite 이후의 최신 버전부터는 테두리가 없는 창을 만들 때 새로운 방법을 사용할 수 있습니다. `frame` 옵션을 `false`로 지정하여 제목과 창 구성 요소를 모두 비활성화하는 대신 새로운 `titleBarStyle` 옵션을 통해 제목만 숨기고 창 구성 요소 -("흔히 신호등으로 알고 있는")의 기능과 창 크기를 그대로 유지할 수 있습니다: +("신호등 버튼")의 기능과 창 크기를 그대로 유지할 수 있습니다: ```javascript -let win = new BrowserWindow({ 'titleBarStyle': 'hidden' }); +let win = new BrowserWindow({titleBarStyle: 'hidden'}); ``` ## 투명한 창 만들기 @@ -34,7 +34,7 @@ Frameless Window 창의 배경을 투명하게 만들고 싶다면 `transparent` 바꿔주기만 하면됩니다: ```javascript -let win = new BrowserWindow({ transparent: true, frame: false }); +let win = new BrowserWindow({transparent: true, frame: false}); ``` ### API의 한계 diff --git a/docs-translations/ko-KR/api/global-shortcut.md b/docs-translations/ko-KR/api/global-shortcut.md index 3536cf1..3af9bb4 100644 --- a/docs-translations/ko-KR/api/global-shortcut.md +++ b/docs-translations/ko-KR/api/global-shortcut.md @@ -11,8 +11,7 @@ 사용할 수 없습니다. ```javascript -const electron = require('electron'); -const { app, globalShortcut } = electron; +const {app, globalShortcut} = require('electron'); app.on('ready', () => { // 'CommandOrControl+X' 단축키를 리스너에 등록합니다. diff --git a/docs-translations/ko-KR/api/ipc-main.md b/docs-translations/ko-KR/api/ipc-main.md index 9b9ef83..f509496 100644 --- a/docs-translations/ko-KR/api/ipc-main.md +++ b/docs-translations/ko-KR/api/ipc-main.md @@ -20,7 +20,7 @@ ```javascript // 메인 프로세스 -const { ipcMain } = require('electron'); +const {ipcMain} = require('electron'); ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg); // "ping" 출력 event.sender.send('asynchronous-reply', 'pong'); @@ -34,7 +34,7 @@ ipcMain.on('synchronous-message', (event, arg) => { ```javascript // 렌더러 프로세스 (웹 페이지) -const { ipcRenderer } = require('electron'); +const {ipcRenderer} = require('electron'); console.log(ipc.sendSync('synchronous-message', 'ping')); // "pong" 출력 ipcRenderer.on('asynchronous-reply', (arg) => { diff --git a/docs-translations/ko-KR/api/menu.md b/docs-translations/ko-KR/api/menu.md index 599c3b9..df3ed07 100644 --- a/docs-translations/ko-KR/api/menu.md +++ b/docs-translations/ko-KR/api/menu.md @@ -14,12 +14,12 @@ ```html @@ -52,7 +52,7 @@ app.on('ready', () => { 직관적으로 사용할 수 있습니다: ```javascript -const { app, BrowserWindow } = require('electron'); +const {app, BrowserWindow} = require('electron'); ``` 모든 `electron` 모듈이 필요하다면, 먼저 require한 후 각 독립적인 모듈을 @@ -60,7 +60,7 @@ const { app, BrowserWindow } = require('electron'); ```javascript const electron = require('electron'); -const { app, BrowserWindow } = electron; +const {app, BrowserWindow} = electron; ``` 위 코드는 다음과 같습니다: @@ -87,7 +87,7 @@ process.env.ELECTRON_HIDE_INTERNAL_MODULES = 'true' 또는 `hideInternalModules` API를 사용해도 됩니다: ```javascript -require('electron').hideInternalModules() +require('electron').hideInternalModules(); ``` [gui]: https://en.wikipedia.org/wiki/Graphical_user_interface diff --git a/docs-translations/ko-KR/api/system-preferences.md b/docs-translations/ko-KR/api/system-preferences.md index fa39968..c5707ea 100644 --- a/docs-translations/ko-KR/api/system-preferences.md +++ b/docs-translations/ko-KR/api/system-preferences.md @@ -56,7 +56,7 @@ OS X에선 API가 `NSUserDefaults`를 읽어들입니다. 유명한 `key`와 `ty 예시입니다 (투명한 윈도우는 DWM 컴포지션이 비활성화되어있을 시 작동하지 않습니다): ```javascript -let browserOptions = { width: 1000, height: 800 }; +let browserOptions = {width: 1000, height: 800}; // 플랫폼이 지원하는 경우에만 투명 윈도우를 생성. if (process.platform !== 'win32' || systemPreferences.isAeroGlassEnabled()) { diff --git a/docs-translations/ko-KR/api/tray.md b/docs-translations/ko-KR/api/tray.md index 6cfecd4..d208de2 100644 --- a/docs-translations/ko-KR/api/tray.md +++ b/docs-translations/ko-KR/api/tray.md @@ -3,16 +3,16 @@ > 아이콘과 컨텍스트 메뉴를 시스템 알림 영역에 추가합니다. ```javascript -const { app, Menu, Tray } = require('electron'); +const {app, Menu, Tray} = require('electron'); let appIcon = null; app.on('ready', () => { appIcon = new Tray('/path/to/my/icon'); // 현재 어플리케이션 디렉터리를 기준으로 하려면 `__dirname + '/images/tray.png'` 형식으로 입력해야 합니다. const contextMenu = Menu.buildFromTemplate([ - { label: 'Item1', type: 'radio' }, - { label: 'Item2', type: 'radio' }, - { label: 'Item3', type: 'radio', checked: true }, - { label: 'Item4', type: 'radio' } + {label: 'Item1', type: 'radio'}, + {label: 'Item2', type: 'radio'}, + {label: 'Item3', type: 'radio', checked: true}, + {label: 'Item4', type: 'radio'} ]); appIcon.setToolTip('이것은 나의 어플리케이션 입니다!'); appIcon.setContextMenu(contextMenu); diff --git a/docs-translations/ko-KR/api/web-contents.md b/docs-translations/ko-KR/api/web-contents.md index ae7b6d2..d0d7bd4 100644 --- a/docs-translations/ko-KR/api/web-contents.md +++ b/docs-translations/ko-KR/api/web-contents.md @@ -8,10 +8,10 @@ 접근하는 예시입니다: ```javascript -const { BrowserWindow } = require('electron'); +const BrowserWindow = require('electron').BrowserWindow; let win = new BrowserWindow({width: 800, height: 1500}); -win.loadURL("http://github.com"); +win.loadURL('http://github.com'); let webContents = win.webContents; ``` @@ -38,8 +38,7 @@ Returns: 이 이벤트는 `did-finish-load`와 비슷하나, 로드가 실패했거나 취소되었을 때 발생합니다. 예를 들면 `window.stop()`이 실행되었을 때 발생합니다. 발생할 수 있는 전체 에러 코드의 목록과 설명은 [여기](https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h)서 -확인할 수 있습니다. 참고로 리다이렉트 응답은 `errorCode` -3과 함께 발생합니다; 이 -에러는 명시적으로 무시할 수 있습니다. +확인할 수 있습니다. ### Event: 'did-frame-finish-load' @@ -226,7 +225,7 @@ Returns: * `issuerName` String - 인증서 발급자 이름 * `callback` Function -클라이언트 인증이 요청되었을 때 발생하는 이벤트입니다. +클라이언트 인증이 요청되었을 때 발생하는 이벤트 입니다. 사용법은 [`app`의 `select-client-certificate` 이벤트](app.md#event-select-client-certificate)와 같습니다. @@ -293,7 +292,7 @@ Returns: * `image` NativeImage (optional) * `scale` Float (optional) -커서 타입이 변경될 때 발생하는 이벤트입니다. `type` 인수는 다음 값이 될 수 있습니다: +커서 타입이 변경될 때 발생하는 이벤트입니다. `type` 매개변수는 다음 값이 될 수 있습니다: `default`, `crosshair`, `pointer`, `text`, `wait`, `help`, `e-resize`, `n-resize`, `ne-resize`, `nw-resize`, `s-resize`, `se-resize`, `sw-resize`, `w-resize`, `ns-resize`, `ew-resize`, `nesw-resize`, `nwse-resize`, `col-resize`, @@ -302,59 +301,10 @@ Returns: `cell`, `context-menu`, `alias`, `progress`, `nodrop`, `copy`, `none`, `not-allowed`, `zoom-in`, `zoom-out`, `grab`, `grabbing`, `custom`. -만약 `type` 인수가 `custom` 이고 `image` 인수가 `NativeImage`를 통한 커스텀 -커서를 지정했을 때, 해당 이미지로 커서가 변경됩니다. 또한 `scale` 인수는 이미지의 +만약 `type` 매개변수가 `custom` 이고 `image` 매개변수가 `NativeImage`를 통한 커스텀 +커서를 지정했을 때, 해당 이미지로 커서가 변경됩니다. 또한 `scale` 매개변수는 이미지의 크기를 조정합니다. -### Event: 'context-menu' - -Returns: - -* `event` Event -* `params` Object - * `x` Integer - x 좌표 - * `y` Integer - y 좌표 - * `linkURL` String - 컨텍스트 메뉴가 호출된 노드를 둘러싸는 링크의 URL. - * `linkText` String - 링크에 연관된 텍스트. 콘텐츠의 링크가 이미지인 경우 빈 - 문자열이 됩니다. - * `pageURL` String - 컨텍스트 메뉴가 호출된 상위 수준 페이지의 URL. - * `frameURL` String - 컨텍스트 메뉴가 호출된 서브 프레임의 URL. - * `srcURL` String - 컨텍스트 메뉴가 호출된 요소에 대한 소스 URL. 요소와 소스 URL은 - 이미지, 오디오, 비디오입니다. - * `mediaType` String - 컨텍스트 메뉴가 호출된 노드의 타입. 값은 `none`, `image`, - `audio`, `video`, `canvas`, `file` 또는 `plugin`이 될 수 있습니다. - * `mediaFlags` Object - 컨텍스트 메뉴가 호출된 미디어 요소에 대한 인수들. - * `inError` - Boolean - * `isPaused` - Boolean - * `isMuted` - Boolean - * `hasAudio` - Boolean - * `isLooping` - Boolean - * `isControlsVisible` - Boolean - * `canToggleControls` - Boolean - * `canRotate` - Boolean - * `hasImageContent` Boolean - 컨텍스트 메뉴가 내용이 있는 이미지에서 호출되었는지 - 여부. - * `isEditable` Boolean - 컨텍스트를 편집할 수 있는지 여부. - * `editFlags` Object - 이 플래그는 랜더러가 다음 행동을 취할 수 있는지 여부를 - 표시합니다. - * `canUndo` - Boolean - * `canRedo` - Boolean - * `canCut` - Boolean - * `canCopy` - Boolean - * `canPaste` - Boolean - * `canDelete` - Boolean - * `canSelectAll` - Boolean - * `selectionText` String - 컨텍스트 메뉴가 호출된 부분에 있는 선택된 텍스트. - * `titleText` String - 컨텍스트 메뉴가 호출된 선택된 제목 또는 알림 텍스트. - * `misspelledWord` String - 만약 있는 경우, 커서가 가르키는 곳에서 발생한 오타. - * `frameCharset` String - 메뉴가 호출된 프레임의 문자열 인코딩. - * `inputFieldType` String - 컨텍스트 메뉴가 입력 필드에서 호출되었을 때, 그 필드의 - 타입. 값은 `none`, `plainText`, `password`, `other` 중 한 가지가 될 수 있습니다. - * `menuSourceType` String - 컨텍스트 메뉴를 호출한 입력 소스. 값은 `none`, - `mouse`, `keyboard`, `touch`, `touchMenu` 중 한 가지가 될 수 있습니다. - -새로운 컨텍스트 메뉴의 제어가 필요할 때 발생하는 이벤트입니다. - ## Instance Methods `webContents`객체는 다음과 같은 인스턴스 메서드들을 가지고 있습니다. @@ -372,7 +322,7 @@ Returns: 하는 경우 `pragma` 헤더를 사용할 수 있습니다. ```javascript -const options = {"extraHeaders" : "pragma: no-cache\n"} +const options = {extraHeaders: 'pragma: no-cache\n'}; webContents.loadURL(url, options) ``` @@ -389,7 +339,7 @@ webContents.loadURL(url, options) ```javascript let win = new BrowserWindow({width: 800, height: 600}); -win.loadURL("http://github.com"); +win.loadURL('http://github.com'); let currentURL = win.webContents.getURL(); ``` @@ -583,12 +533,12 @@ CSS 코드를 현재 웹 페이지에 삽입합니다. 제공된 `action`에 대한 `webContents`의 모든 `findInPage` 요청을 중지합니다. ```javascript -webContents.on('found-in-page', function(event, result) { +webContents.on('found-in-page', (event, result) => { if (result.finalUpdate) - webContents.stopFindInPage("clearSelection"); + webContents.stopFindInPage('clearSelection'); }); -const requestId = webContents.findInPage("api"); +const requestId = webContents.findInPage('api'); ``` ### `webContents.hasServiceWorker(callback)` @@ -626,7 +576,7 @@ print기능을 사용하지 않는 경우 전체 바이너리 크기를 줄이 ### `webContents.printToPDF(options, callback)` * `options` Object - * `marginsType` Integer - 사용할 마진의 타입을 지정합니다. 0 부터 2 사이 값을 사용할 + * `marginsType` Integer - 사용할 마진의 종류를 지정합니다. 0 부터 2 사이 값을 사용할 수 있고 각각 기본 마진, 마진 없음, 최소 마진입니다. * `pageSize` String - 생성되는 PDF의 페이지 크기를 지정합니다. 값은 `A3`, `A4`, `A5`, `Legal`, `Letter` 와 `Tabloid`가 사용될 수 있습니다. @@ -634,7 +584,7 @@ print기능을 사용하지 않는 경우 전체 바이너리 크기를 줄이 * `printSelectionOnly` Boolean - 선택된 영역만 프린트할지 여부를 정합니다. * `landscape` Boolean - landscape을 위해선 `true`를, portrait를 위해선 `false`를 사용합니다. -* `callback` Function - `function(error, data) {}` +* `callback` Function - `(error, data) => {}` Chromium의 미리보기 프린팅 커스텀 설정을 이용하여 윈도우의 웹 페이지를 PDF로 프린트합니다. @@ -654,14 +604,14 @@ Chromium의 미리보기 프린팅 커스텀 설정을 이용하여 윈도우의 ``` ```javascript -const { BrowserWindow } = require('electron'); +const BrowserWindow = require('electron').BrowserWindow; const fs = require('fs'); let win = new BrowserWindow({width: 800, height: 600}); win.loadURL('http://github.com'); win.webContents.on('did-finish-load', () => { - // 기본 프린트 옵션을 사용합니다 + // Use default printing options win.webContents.printToPDF({}, (error, data) => { if (error) throw error; fs.writeFile('/tmp/print.pdf', data, (error) => { @@ -681,8 +631,8 @@ win.webContents.on('did-finish-load', () => { 이후에 사용해야 합니다. ```javascript -mainWindow.webContents.on('devtools-opened', function() { - mainWindow.webContents.addWorkSpace(__dirname); +win.webContents.on('devtools-opened', () => { + win.webContents.addWorkSpace(__dirname); }); ``` @@ -696,9 +646,9 @@ mainWindow.webContents.on('devtools-opened', function() { * `options` Object (optional) * `detach` Boolean - 새 창에서 개발자 도구를 엽니다. - * `mode` String - 개발자 도구를 지정한 도킹 상태와 함께 엽니다. 옵션은 `right`, - `bottom`, `undocked`, `detach`가 될 수 있습니다. 기본값은 마지막 표시 상태를 - 사용합니다. `undocked` 모드에선 다시 도킹을 할 수 있습니다. 하지만 `detach` + * `mode` String - 개발자 도구 표시 상태를 지정합니다. 옵션은 "right", "bottom", + "undocked", "detach"가 될 수 있습니다. 기본값은 마지막 표시 상태를 + 사용합니다. `undocked` 모드에선 다시 독을 할 수 있습니다. 하지만 `detach` 모드에선 할 수 없습니다. 개발자 도구를 엽니다. @@ -745,14 +695,13 @@ mainWindow.webContents.on('devtools-opened', function() { 메인 프로세스에서 렌더러 프로세스로 메시지를 보내는 예시 입니다: ```javascript -// 메인 프로세스에서. -let mainWindow = null; - +// In the main process. +let win = null; app.on('ready', () => { - mainWindow = new BrowserWindow({width: 800, height: 600}); - mainWindow.loadURL(`file://${__dirname}/index.html`); - mainWindow.webContents.on('did-finish-load', () => { - mainWindow.webContents.send('ping', 'whoooooooh!'); + win = new BrowserWindow({width: 800, height: 600}); + win.loadURL('file://' + __dirname + '/index.html'); + win.webContents.on('did-finish-load', () => { + win.webContents.send('ping', 'whoooooooh!'); }); }); ``` @@ -763,7 +712,7 @@ app.on('ready', () => { @@ -871,7 +820,7 @@ Input `event`를 웹 페이지로 전송합니다. * `HTMLOnly` - 페이지의 HTML만 저장합니다. * `HTMLComplete` - 페이지의 완성된 HTML을 저장합니다. * `MHTML` - 페이지의 완성된 HTML을 MHTML로 저장합니다. -* `callback` Function - `function(error) {}`. +* `callback` Function - `(error) => {}`. * `error` Error 만약 페이지를 저장하는 프로세스가 성공적으로 끝났을 경우 true를 반환합니다. @@ -882,7 +831,7 @@ win.loadURL('https://github.com'); win.webContents.on('did-finish-load', () => { win.webContents.savePage('/tmp/test.html', 'HTMLComplete', (error) => { if (!error) - console.log("Save page successfully"); + console.log('Save page successfully'); }); }); ``` @@ -912,23 +861,23 @@ win.webContents.on('did-finish-load', () => { ```javascript try { - win.webContents.debugger.attach("1.1"); + win.webContents.debugger.attach('1.1'); } catch(err) { - console.log("Debugger attach failed : ", err); + console.log('Debugger attach failed : ', err); }; win.webContents.debugger.on('detach', (event, reason) => { - console.log("Debugger detached due to : ", reason); + console.log('Debugger detached due to : ', reason); }); win.webContents.debugger.on('message', (event, method, params) => { - if (method === "Network.requestWillBeSent") { - if (params.request.url === "https://www.github.com") + if (method === 'Network.requestWillBeSent') { + if (params.request.url === 'https://www.github.com') win.webContents.debugger.detach(); } -}) +}); -win.webContents.debugger.sendCommand("Network.enable"); +win.webContents.debugger.sendCommand('Network.enable'); ``` #### `webContents.debugger.attach([protocolVersion])` @@ -949,7 +898,7 @@ win.webContents.debugger.sendCommand("Network.enable"); * `method` String - 메서드 이름, 반드시 원격 디버깅 프로토콜에 의해 정의된 메서드중 하나가 됩니다. -* `commandParams` Object (optional) - 요청 인수를 표현한 JSON 객체. +* `commandParams` Object (optional) - 요청 매개변수를 표현한 JSON 객체. * `callback` Function (optional) - 응답 * `error` Object - 커맨드의 실패를 표시하는 에러 메시지. * `result` Object - 원격 디버깅 프로토콜에서 커맨드 설명의 'returns' 속성에 의해 @@ -969,7 +918,8 @@ win.webContents.debugger.sendCommand("Network.enable"); * `event` Event * `method` String - 메서드 이름. -* `params` Object - 원격 디버깅 프로토콜의 'parameters' 속성에서 정의된 이벤트 인수 +* `params` Object - 원격 디버깅 프로토콜의 'parameters' 속성에서 정의된 이벤트 + 매개변수 디버깅 타겟이 관련 이벤트를 발생시킬 때 마다 발생하는 이벤트입니다. diff --git a/docs-translations/ko-KR/api/web-frame.md b/docs-translations/ko-KR/api/web-frame.md index 73566b5..69e563d 100644 --- a/docs-translations/ko-KR/api/web-frame.md +++ b/docs-translations/ko-KR/api/web-frame.md @@ -5,7 +5,7 @@ 다음 예시는 현재 페이지를 200% 줌 합니다: ```javascript -const { webFrame } = require('electron'); +const {webFrame} = require('electron'); webFrame.setZoomFactor(2); ``` @@ -58,8 +58,8 @@ Input field나 text area에 철자 검사(spell checking) 제공자를 설정합 [node-spellchecker][spellchecker]를 철자 검사 제공자로 사용하는 예시입니다: ```javascript -webFrame.setSpellCheckProvider("en-US", true, { - spellCheck: function(text) { +webFrame.setSpellCheckProvider('en-US', true, { + spellCheck(text) { return !(require('spellchecker').isMisspelled(text)); } }); diff --git a/docs-translations/ko-KR/api/web-view-tag.md b/docs-translations/ko-KR/api/web-view-tag.md index ab56e2c..3191db7 100644 --- a/docs-translations/ko-KR/api/web-view-tag.md +++ b/docs-translations/ko-KR/api/web-view-tag.md @@ -35,15 +35,15 @@ const loadstart = () => { indicator.innerText = 'loading...'; - } + }; const loadstop = () => { indicator.innerText = ''; - } + }; webview.addEventListener('did-start-loading', loadstart); webview.addEventListener('did-stop-loading', loadstop); - } + }; ``` @@ -207,7 +207,7 @@ API를 사용할 수 있습니다. 이를 지정하면 내부에서 로우레벨 **예시** ```javascript -webview.addEventListener("dom-ready", () => { +webview.addEventListener('dom-ready', () => { webview.openDevTools(); }); ``` @@ -590,7 +590,7 @@ Returns: 콘솔에 다시 로깅하는 예시입니다. ```javascript -webview.addEventListener('console-message', function(e) { +webview.addEventListener('console-message', (e) => { console.log('Guest page logged a message:', e.message); }); ``` @@ -610,12 +610,12 @@ Returns: 사용할 수 있을 때 발생하는 이벤트입니다. ```javascript -webview.addEventListener('found-in-page', function(e) { +webview.addEventListener('found-in-page', (e) => { if (e.result.finalUpdate) - webview.stopFindInPage("keepSelection"); + webview.stopFindInPage('keepSelection'); }); -const rquestId = webview.findInPage("test"); +const rquestId = webview.findInPage('test'); ``` ### Event: 'new-window' @@ -633,7 +633,7 @@ Returns: 다음 예시 코드는 새 URL을 시스템의 기본 브라우저로 여는 코드입니다. ```javascript -const { shell } = require('electron'); +const {shell} = require('electron'); webview.addEventListener('new-window', (e) => { const protocol = require('url').parse(e.url).protocol; @@ -719,7 +719,7 @@ webview.send('ping'); ```javascript // In guest page. -var { ipcRenderer } = require('electron'); +const {ipcRenderer} = require('electron'); ipcRenderer.on('ping', () => { ipcRenderer.sendToHost('pong'); }); diff --git a/docs-translations/ko-KR/faq/electron-faq.md b/docs-translations/ko-KR/faq/electron-faq.md index f74867c..38235e2 100644 --- a/docs-translations/ko-KR/faq/electron-faq.md +++ b/docs-translations/ko-KR/faq/electron-faq.md @@ -64,7 +64,7 @@ console.log(require('remote').getGlobal('sharedObject').someProperty); ```javascript app.on('ready', () => { const tray = new Tray('/path/to/icon.png'); -}) +}); ``` 를 이렇게: @@ -73,7 +73,7 @@ app.on('ready', () => { let tray = null; app.on('ready', () => { tray = new Tray('/path/to/icon.png'); -}) +}); ``` ## Electron에서 jQuery/RequireJS/Meteor/AngularJS를 사용할 수 없습니다. @@ -86,7 +86,7 @@ Node.js가 Electron에 합쳐졌기 때문에, DOM에 `module`, `exports`, `requ ```javascript // 메인 프로세스에서. -let mainWindow = new BrowserWindow({ +let win = new BrowserWindow({ webPreferences: { nodeIntegration: false } diff --git a/docs-translations/ko-KR/styleguide.md b/docs-translations/ko-KR/styleguide.md index bf9eba1..340fa42 100644 --- a/docs-translations/ko-KR/styleguide.md +++ b/docs-translations/ko-KR/styleguide.md @@ -94,5 +94,5 @@ Returns: ```javascript Alarm.on('wake-up', (time) => { console.log(time) -}) +}); ``` diff --git a/docs-translations/ko-KR/tutorial/application-packaging.md b/docs-translations/ko-KR/tutorial/application-packaging.md index 2cef8ea..8002350 100644 --- a/docs-translations/ko-KR/tutorial/application-packaging.md +++ b/docs-translations/ko-KR/tutorial/application-packaging.md @@ -70,7 +70,7 @@ require('/path/to/example.asar/dir/module.js'); `BrowserWindow` 클래스를 이용해 원하는 웹 페이지도 표시할 수 있습니다: ```javascript -const { BrowserWindow } = require('electron'); +const {BrowserWindow} = require('electron'); let win = new BrowserWindow({width: 800, height: 600}); win.loadURL('file:///path/to/example.asar/static/index.html'); ``` @@ -84,7 +84,7 @@ win.loadURL('file:///path/to/example.asar/static/index.html'); ```html