From 6bad16377decd93d4c376f7c2763826a664b1b5b Mon Sep 17 00:00:00 2001
From: Plusb Preco
Date: Tue, 10 May 2016 16:27:14 +0900
Subject: [PATCH] :memo: Update Korean docs as upstream
[ci skip]
---
docs-translations/ko-KR/api/app.md | 12 ++--
docs-translations/ko-KR/api/browser-window.md | 10 +--
.../ko-KR/api/chrome-command-line-switches.md | 4 +-
docs-translations/ko-KR/api/clipboard.md | 4 +-
.../ko-KR/api/content-tracing.md | 6 +-
docs-translations/ko-KR/api/crash-reporter.md | 2 +-
.../ko-KR/api/desktop-capturer.md | 4 +-
docs-translations/ko-KR/api/dialog.md | 4 +-
docs-translations/ko-KR/api/download-item.md | 8 +--
docs-translations/ko-KR/api/file-object.md | 10 +--
.../ko-KR/api/frameless-window.md | 8 +--
.../ko-KR/api/global-shortcut.md | 9 ++-
docs-translations/ko-KR/api/ipc-main.md | 10 +--
docs-translations/ko-KR/api/menu.md | 37 ++++++-----
docs-translations/ko-KR/api/native-image.md | 8 +--
docs-translations/ko-KR/api/power-monitor.md | 4 +-
.../ko-KR/api/power-save-blocker.md | 4 +-
docs-translations/ko-KR/api/process.md | 4 +-
docs-translations/ko-KR/api/protocol.md | 58 ++++++++++++------
docs-translations/ko-KR/api/remote.md | 41 ++++++-------
docs-translations/ko-KR/api/screen.md | 27 ++++----
docs-translations/ko-KR/api/session.md | 32 +++++-----
docs-translations/ko-KR/api/shell.md | 3 +-
docs-translations/ko-KR/api/synopsis.md | 33 ++++++----
.../ko-KR/api/system-preferences.md | 2 +-
docs-translations/ko-KR/api/tray.md | 12 ++--
docs-translations/ko-KR/api/web-contents.md | 61 ++++++++++---------
docs-translations/ko-KR/api/web-frame.md | 2 +-
docs-translations/ko-KR/api/web-view-tag.md | 38 ++++++------
docs-translations/ko-KR/faq/electron-faq.md | 10 +--
.../ko-KR/tutorial/application-packaging.md | 8 +--
.../desktop-environment-integration.md | 21 ++++---
.../ko-KR/tutorial/online-offline-events.md | 20 +++---
.../ko-KR/tutorial/quick-start.md | 35 ++++++-----
.../tutorial/using-pepper-flash-plugin.md | 4 +-
.../tutorial/using-selenium-and-webdriver.md | 42 ++++++-------
.../tutorial/using-widevine-cdm-plugin.md | 4 +-
37 files changed, 314 insertions(+), 287 deletions(-)
diff --git a/docs-translations/ko-KR/api/app.md b/docs-translations/ko-KR/api/app.md
index 2df0c760c4d..4b747d0b1b5 100644
--- a/docs-translations/ko-KR/api/app.md
+++ b/docs-translations/ko-KR/api/app.md
@@ -5,8 +5,8 @@
밑의 예시는 마지막 윈도우가 종료되었을 때, 어플리케이션을 종료시키는 예시입니다:
```javascript
-const app = require('electron').app;
-app.on('window-all-closed', function() {
+const { app } = require('electron');
+app.on('window-all-closed', () => {
app.quit();
});
```
@@ -244,7 +244,7 @@ Returns:
`callback(username, password)` 형태의 콜백을 호출하여 인증을 처리해야 합니다.
```javascript
-app.on('login', function(event, webContents, request, authInfo, callback) {
+app.on('login', (event, webContents, request, authInfo, callback) => {
event.preventDefault();
callback('username', 'secret');
})
@@ -486,9 +486,9 @@ OS X에선 사용자가 Finder에서 어플리케이션의 두 번째 인스턴
인스턴스의 윈도우를 활성화 시키는 예시입니다:
```javascript
-var myWindow = null;
+let myWindow = null;
-var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
+const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
// 어플리케이션을 중복 실행했습니다. 주 어플리케이션 인스턴스를 활성화 합니다.
if (myWindow) {
if (myWindow.isMinimized()) myWindow.restore();
@@ -503,7 +503,7 @@ if (shouldQuit) {
}
// 윈도우를 생성하고 각종 리소스를 로드하고 작업합니다.
-app.on('ready', function() {
+app.on('ready', () => {
});
```
diff --git a/docs-translations/ko-KR/api/browser-window.md b/docs-translations/ko-KR/api/browser-window.md
index 7cb53df4c95..321439f8493 100644
--- a/docs-translations/ko-KR/api/browser-window.md
+++ b/docs-translations/ko-KR/api/browser-window.md
@@ -6,13 +6,13 @@
```javascript
// 메인 프로세스에서
-const BrowserWindow = require('electron').BrowserWindow;
+const { BrowserWindow } = require('electron');
// 또는 렌더러 프로세스에서
-const BrowserWindow = require('electron').remote.BrowserWindow;
+const { BrowserWindow } = require('electron').remote;
-var win = new BrowserWindow({ width: 800, height: 600, show: false });
-win.on('closed', function() {
+let win = new BrowserWindow({ width: 800, height: 600, show: false });
+win.on('closed', () => {
win = null;
});
@@ -318,7 +318,7 @@ Returns:
e.g. `APPCOMMAND_BROWSER_BACKWARD` 는 `browser-backward`와 같이 반환됩니다.
```javascript
-someWindow.on('app-command', function(e, cmd) {
+someWindow.on('app-command', (e, cmd) => {
// 마우스의 뒤로가기 버튼을 눌렀을 때 뒤로가기 탐색을 실행합니다
if (cmd === 'browser-backward' && someWindow.webContents.canGoBack()) {
someWindow.webContents.goBack();
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 7f1f4ced616..1b5f672fa5a 100644
--- a/docs-translations/ko-KR/api/chrome-command-line-switches.md
+++ b/docs-translations/ko-KR/api/chrome-command-line-switches.md
@@ -7,11 +7,11 @@
명령줄 옵션을 추가로 지정할 수 있습니다:
```javascript
-const app = require('electron').app;
+const { app } = require('electron');
app.commandLine.appendSwitch('remote-debugging-port', '8315');
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1');
-app.on('ready', function() {
+app.on('ready', () => {
// Your code here
});
```
diff --git a/docs-translations/ko-KR/api/clipboard.md b/docs-translations/ko-KR/api/clipboard.md
index 0590713e83b..8f48c6f579f 100644
--- a/docs-translations/ko-KR/api/clipboard.md
+++ b/docs-translations/ko-KR/api/clipboard.md
@@ -2,8 +2,10 @@
> 시스템 클립보드에 복사와 붙여넣기를 수행합니다.
+다음 예시는 클립보드에 문자열을 쓰는 방법을 보여줍니다:
+
```javascript
-const clipboard = require('electron').clipboard;
+const { clipboard } = require('electron');
clipboard.writeText('Example String');
```
diff --git a/docs-translations/ko-KR/api/content-tracing.md b/docs-translations/ko-KR/api/content-tracing.md
index ac923ee9fe9..204ed20622d 100644
--- a/docs-translations/ko-KR/api/content-tracing.md
+++ b/docs-translations/ko-KR/api/content-tracing.md
@@ -7,7 +7,7 @@
`chrome://tracing/` 페이지를 열고 생성된 파일을 로드하면 결과를 볼 수 있습니다.
```javascript
-const contentTracing = require('electron').contentTracing;
+const { contentTracing } = require('electron');
const options = {
categoryFilter: '*',
@@ -17,8 +17,8 @@ const options = {
contentTracing.startRecording(options, function() {
console.log('Tracing started');
- setTimeout(function() {
- contentTracing.stopRecording('', function(path) {
+ setTimeout(() => {
+ contentTracing.stopRecording('', (path) => {
console.log('Tracing data recorded to ' + path);
});
}, 5000);
diff --git a/docs-translations/ko-KR/api/crash-reporter.md b/docs-translations/ko-KR/api/crash-reporter.md
index 90851f7ee5b..f4e674132ab 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').crashReporter;
+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 0ee1b3e1d22..6135ca500d5 100644
--- a/docs-translations/ko-KR/api/desktop-capturer.md
+++ b/docs-translations/ko-KR/api/desktop-capturer.md
@@ -5,9 +5,9 @@
```javascript
// 렌더러 프로세스 내부
-var desktopCapturer = require('electron').desktopCapturer;
+const { desktopCapturer } = require('electron');
-desktopCapturer.getSources({types: ['window', 'screen']}, function(error, sources) {
+desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
if (error) throw error;
for (var i = 0; i < sources.length; ++i) {
if (sources[i].name == "Electron") {
diff --git a/docs-translations/ko-KR/api/dialog.md b/docs-translations/ko-KR/api/dialog.md
index 2110e376c27..7282f5888c8 100644
--- a/docs-translations/ko-KR/api/dialog.md
+++ b/docs-translations/ko-KR/api/dialog.md
@@ -6,7 +6,7 @@
```javascript
var win = ...; // 대화 상자를 사용할 BrowserWindow 객체
-const dialog = require('electron').dialog;
+const { dialog } = require('electron');
console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]}));
```
@@ -14,7 +14,7 @@ console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', '
객체를 사용하고 싶다면, `remote`를 통해 접근하는 방법을 고려해야 합니다:
```javascript
-const dialog = require('electron').remote.dialog;
+const { dialog } = require('electron').remote;
```
## Methods
diff --git a/docs-translations/ko-KR/api/download-item.md b/docs-translations/ko-KR/api/download-item.md
index 4267a41df71..4de29eb8607 100644
--- a/docs-translations/ko-KR/api/download-item.md
+++ b/docs-translations/ko-KR/api/download-item.md
@@ -8,17 +8,17 @@
```javascript
// 메인 프로세스
-win.webContents.session.on('will-download', function(event, item, webContents) {
+win.webContents.session.on('will-download', (event, item, webContents) => {
// Set the save path, making Electron not to prompt a save dialog.
item.setSavePath('/tmp/save.pdf');
console.log(item.getMimeType());
console.log(item.getFilename());
console.log(item.getTotalBytes());
- item.on('updated', function() {
+ item.on('updated', () => {
console.log('Received bytes: ' + item.getReceivedBytes());
});
- item.on('done', function(e, state) {
- if (state == "completed") {
+ item.on('done', (e, state) => {
+ if (state === "completed") {
console.log("Download successfully");
} else {
console.log("Download is cancelled or interrupted that can't be resumed");
diff --git a/docs-translations/ko-KR/api/file-object.md b/docs-translations/ko-KR/api/file-object.md
index 6d7519a7ad2..898f7f75b82 100644
--- a/docs-translations/ko-KR/api/file-object.md
+++ b/docs-translations/ko-KR/api/file-object.md
@@ -14,16 +14,16 @@ API를 사용하여 작업할 때 선택된 파일의 경로를 알 수 있도
@@ -878,8 +879,8 @@ Input `event`를 웹 페이지로 전송합니다.
```javascript
win.loadURL('https://github.com');
-win.webContents.on('did-finish-load', function() {
- win.webContents.savePage('/tmp/test.html', 'HTMLComplete', function(error) {
+win.webContents.on('did-finish-load', () => {
+ win.webContents.savePage('/tmp/test.html', 'HTMLComplete', (error) => {
if (!error)
console.log("Save page successfully");
});
@@ -916,13 +917,13 @@ try {
console.log("Debugger attach failed : ", err);
};
-win.webContents.debugger.on('detach', function(event, reason) {
+win.webContents.debugger.on('detach', (event, reason) => {
console.log("Debugger detached due to : ", reason);
});
-win.webContents.debugger.on('message', function(event, method, params) {
- if (method == "Network.requestWillBeSent") {
- if (params.request.url == "https://www.github.com")
+win.webContents.debugger.on('message', (event, method, params) => {
+ if (method === "Network.requestWillBeSent") {
+ if (params.request.url === "https://www.github.com")
win.webContents.debugger.detach();
}
})
diff --git a/docs-translations/ko-KR/api/web-frame.md b/docs-translations/ko-KR/api/web-frame.md
index 4b9ade4bebe..73566b50bd3 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
-var webFrame = require('electron').webFrame;
+const { webFrame } = require('electron');
webFrame.setZoomFactor(2);
```
diff --git a/docs-translations/ko-KR/api/web-view-tag.md b/docs-translations/ko-KR/api/web-view-tag.md
index 63b6a92ae89..ab56e2c96a4 100644
--- a/docs-translations/ko-KR/api/web-view-tag.md
+++ b/docs-translations/ko-KR/api/web-view-tag.md
@@ -29,18 +29,20 @@
```html
```
@@ -205,7 +207,7 @@ API를 사용할 수 있습니다. 이를 지정하면 내부에서 로우레벨
**예시**
```javascript
-webview.addEventListener("dom-ready", function() {
+webview.addEventListener("dom-ready", () => {
webview.openDevTools();
});
```
@@ -631,10 +633,12 @@ Returns:
다음 예시 코드는 새 URL을 시스템의 기본 브라우저로 여는 코드입니다.
```javascript
-webview.addEventListener('new-window', function(e) {
- var protocol = require('url').parse(e.url).protocol;
+const { shell } = require('electron');
+
+webview.addEventListener('new-window', (e) => {
+ const protocol = require('url').parse(e.url).protocol;
if (protocol === 'http:' || protocol === 'https:') {
- require('electron').shell.openExternal(e.url);
+ shell.openExternal(e.url);
}
});
```
@@ -687,7 +691,7 @@ Returns:
이동시키는 예시입니다.
```javascript
-webview.addEventListener('close', function() {
+webview.addEventListener('close', () => {
webview.src = 'about:blank';
});
```
@@ -706,7 +710,7 @@ Returns:
```javascript
// In embedder page.
-webview.addEventListener('ipc-message', function(event) {
+webview.addEventListener('ipc-message', (event) => {
console.log(event.channel);
// Prints "pong"
});
@@ -715,8 +719,8 @@ webview.send('ping');
```javascript
// In guest page.
-var ipcRenderer = require('electron').ipcRenderer;
-ipcRenderer.on('ping', function() {
+var { 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 ae77335b000..f74867caded 100644
--- a/docs-translations/ko-KR/faq/electron-faq.md
+++ b/docs-translations/ko-KR/faq/electron-faq.md
@@ -62,16 +62,16 @@ console.log(require('remote').getGlobal('sharedObject').someProperty);
만약 빠르게 고치고 싶다면, 다음과 같이 변수를 전역 변수로 만드는 방법이 있습니다:
```javascript
-app.on('ready', function() {
- var tray = new Tray('/path/to/icon.png');
+app.on('ready', () => {
+ const tray = new Tray('/path/to/icon.png');
})
```
를 이렇게:
```javascript
-var tray = null;
-app.on('ready', function() {
+let tray = null;
+app.on('ready', () => {
tray = new Tray('/path/to/icon.png');
})
```
@@ -86,7 +86,7 @@ Node.js가 Electron에 합쳐졌기 때문에, DOM에 `module`, `exports`, `requ
```javascript
// 메인 프로세스에서.
-var mainWindow = new BrowserWindow({
+let mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false
}
diff --git a/docs-translations/ko-KR/tutorial/application-packaging.md b/docs-translations/ko-KR/tutorial/application-packaging.md
index bc56d824617..2cef8ea9c70 100644
--- a/docs-translations/ko-KR/tutorial/application-packaging.md
+++ b/docs-translations/ko-KR/tutorial/application-packaging.md
@@ -70,8 +70,8 @@ require('/path/to/example.asar/dir/module.js');
`BrowserWindow` 클래스를 이용해 원하는 웹 페이지도 표시할 수 있습니다:
```javascript
-const BrowserWindow = require('electron').BrowserWindow;
-var win = new BrowserWindow({width: 800, height: 600});
+const { BrowserWindow } = require('electron');
+let win = new BrowserWindow({width: 800, height: 600});
win.loadURL('file:///path/to/example.asar/static/index.html');
```
@@ -85,7 +85,7 @@ win.loadURL('file:///path/to/example.asar/static/index.html');
```html
@@ -99,7 +99,7 @@ $.get('file:///path/to/example.asar/file.txt', function(data) {
읽어들입니다:
```javascript
-var originalFs = require('original-fs');
+const originalFs = require('original-fs');
originalFs.readFileSync('/path/to/example.asar');
```
diff --git a/docs-translations/ko-KR/tutorial/desktop-environment-integration.md b/docs-translations/ko-KR/tutorial/desktop-environment-integration.md
index 44cc6635242..46bd5dae01b 100644
--- a/docs-translations/ko-KR/tutorial/desktop-environment-integration.md
+++ b/docs-translations/ko-KR/tutorial/desktop-environment-integration.md
@@ -17,7 +17,7 @@ Windows, Linux, OS X 운영체제 모두 기본적으로 어플리케이션에
**참고:** 이 API는 HTML5 API이기 때문에 렌더러 프로세스에서만 사용할 수 있습니다.
```javascript
-var myNotification = new Notification('Title', {
+let myNotification = new Notification('Title', {
body: 'Lorem Ipsum Dolor Sit Amet'
});
@@ -114,8 +114,8 @@ const electron = require('electron');
const app = electron.app;
const Menu = electron.Menu;
-var dockMenu = Menu.buildFromTemplate([
- { label: 'New Window', click: function() { console.log('New Window'); } },
+const dockMenu = Menu.buildFromTemplate([
+ { label: 'New Window', click: () => { console.log('New Window'); } },
{ label: 'New Window with Settings', submenu: [
{ label: 'Basic' },
{ label: 'Pro'}
@@ -203,24 +203,25 @@ __Windows Media Player의 미리보기 툴바:__
미리보기 툴바를 설정할 수 있습니다:
```javascript
-const BrowserWindow = require('electron').BrowserWindow;
+const { BrowserWindow } = require('electron');
const path = require('path');
-var win = new BrowserWindow({
+let win = new BrowserWindow({
width: 800,
height: 600
});
+
win.setThumbarButtons([
{
tooltip: "button1",
icon: path.join(__dirname, 'button1.png'),
- click: function() { console.log("button2 clicked"); }
+ click: () => { console.log("button2 clicked"); }
},
{
tooltip: "button2",
icon: path.join(__dirname, 'button2.png'),
flags:['enabled', 'dismissonclick'],
- click: function() { console.log("button2 clicked."); }
+ click: () => { console.log("button2 clicked."); }
}
]);
```
@@ -259,7 +260,7 @@ __작업 표시줄 버튼의 프로그래스 바:__
있습니다:
```javascript
-var window = new BrowserWindow({...});
+let window = new BrowserWindow({...});
window.setProgressBar(0.5);
```
@@ -286,7 +287,7 @@ __작업 표시줄 버튼 위의 오버레이:__
API를 사용할 수 있습니다:
```javascript
-var window = new BrowserWindow({...});
+let window = new BrowserWindow({...});
window.setOverlayIcon('path/to/overlay.png', 'Description for overlay');
```
@@ -305,7 +306,7 @@ __대표 파일 팝업 메뉴:__
[BrowserWindow.setDocumentEdited][setdocumentedited]를 사용할 수 있습니다:
```javascript
-var window = new BrowserWindow({...});
+let window = new BrowserWindow({...});
window.setRepresentedFilename('/etc/passwd');
window.setDocumentEdited(true);
```
diff --git a/docs-translations/ko-KR/tutorial/online-offline-events.md b/docs-translations/ko-KR/tutorial/online-offline-events.md
index 698544e83b6..75dcf05805b 100644
--- a/docs-translations/ko-KR/tutorial/online-offline-events.md
+++ b/docs-translations/ko-KR/tutorial/online-offline-events.md
@@ -10,8 +10,9 @@ const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
-var onlineStatusWindow;
-app.on('ready', function() {
+let onlineStatusWindow;
+
+app.on('ready', () => {
onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false });
onlineStatusWindow.loadURL('file://' + __dirname + '/online-status.html');
});
@@ -24,7 +25,7 @@ _online-status.html_