From e12e119381ab1170c8394f62bb26cccce6703bf1 Mon Sep 17 00:00:00 2001
From: Plusb Preco
Date: Mon, 16 Nov 2015 12:15:21 +0900
Subject: [PATCH] Update as upstream
* Update as upstream
* Fix typos
* Improve grammar
---
docs-translations/ko-KR/README.md | 30 +++---
docs-translations/ko-KR/api/app.md | 8 +-
docs-translations/ko-KR/api/auto-updater.md | 6 +-
.../ko-KR/api/chrome-command-line-switches.md | 13 ++-
docs-translations/ko-KR/api/clipboard.md | 5 +-
.../ko-KR/api/content-tracing.md | 9 +-
docs-translations/ko-KR/api/crash-reporter.md | 8 +-
docs-translations/ko-KR/api/dialog.md | 2 +-
docs-translations/ko-KR/api/download-item.md | 101 ++++++++++++++++++
.../ko-KR/api/frameless-window.md | 6 +-
.../ko-KR/api/global-shortcut.md | 5 +-
docs-translations/ko-KR/api/ipc-main.md | 12 +--
docs-translations/ko-KR/api/menu.md | 10 +-
docs-translations/ko-KR/api/native-image.md | 33 +++---
docs-translations/ko-KR/api/power-monitor.md | 4 +-
.../ko-KR/api/power-save-blocker.md | 4 +-
docs-translations/ko-KR/api/protocol.md | 7 +-
docs-translations/ko-KR/api/remote.md | 21 +++-
docs-translations/ko-KR/api/screen.md | 7 +-
docs-translations/ko-KR/api/session.md | 6 +-
docs-translations/ko-KR/api/shell.md | 2 +-
docs-translations/ko-KR/api/synopsis.md | 59 +++++++---
docs-translations/ko-KR/api/tray.md | 25 ++---
docs-translations/ko-KR/api/web-frame.md | 16 ++-
docs-translations/ko-KR/api/web-view-tag.md | 20 ++--
.../ko-KR/tutorial/application-packaging.md | 24 ++---
.../desktop-environment-integration.md | 15 +--
.../ko-KR/tutorial/devtools-extension.md | 5 +-
.../ko-KR/tutorial/online-offline-events.md | 22 ++--
.../ko-KR/tutorial/quick-start.md | 9 +-
.../tutorial/using-pepper-flash-plugin.md | 19 +---
.../tutorial/using-selenium-and-webdriver.md | 4 +-
32 files changed, 340 insertions(+), 177 deletions(-)
create mode 100644 docs-translations/ko-KR/api/download-item.md
diff --git a/docs-translations/ko-KR/README.md b/docs-translations/ko-KR/README.md
index 73df162415..c4c7711949 100644
--- a/docs-translations/ko-KR/README.md
+++ b/docs-translations/ko-KR/README.md
@@ -31,32 +31,32 @@
### 메인 프로세스에서 사용할 수 있는 모듈:
* [app](api/app.md)
-* [auto-updater](api/auto-updater.md)
-* [browser-window (0% 번역됨)](api/browser-window.md)
-* [content-tracing](api/content-tracing.md)
+* [autoUpdater](api/auto-updater.md)
+* [BrowserWindow (0% 번역됨)](api/browser-window.md)
+* [contentTracing](api/content-tracing.md)
* [dialog](api/dialog.md)
-* [global-shortcut](api/global-shortcut.md)
-* [ipc-main](api/ipc-main.md)
-* [menu](api/menu.md)
-* [menu-item](api/menu-item.md)
-* [power-monitor](api/power-monitor.md)
-* [power-save-blocker](api/power-save-blocker.md)
+* [globalShortcut](api/global-shortcut.md)
+* [ipcMain](api/ipc-main.md)
+* [Menu](api/menu.md)
+* [MenuItem](api/menu-item.md)
+* [powerMonitor](api/power-monitor.md)
+* [powerSaveBlocker](api/power-save-blocker.md)
* [protocol](api/protocol.md)
* [session](api/session.md)
-* [web-contents (0% 번역됨)](api/web-contents.md)
-* [tray](api/tray.md)
+* [webContents (0% 번역됨)](api/web-contents.md)
+* [Tray](api/tray.md)
### 랜더러 프로세스에서 사용할 수 있는 모듈 (웹 페이지):
-* [ipc-renderer](api/ipc-renderer.md)
+* [ipcRenderer](api/ipc-renderer.md)
* [remote](api/remote.md)
-* [web-frame](api/web-frame.md)
+* [webFrame](api/web-frame.md)
### 두 프로세스 모두 사용할 수 있는 모듈:
* [clipboard](api/clipboard.md)
-* [crash-reporter](api/crash-reporter.md)
-* [native-image](api/native-image.md)
+* [crashReporter](api/crash-reporter.md)
+* [nativeImage](api/native-image.md)
* [screen](api/screen.md)
* [shell](api/shell.md)
diff --git a/docs-translations/ko-KR/api/app.md b/docs-translations/ko-KR/api/app.md
index f5e8e8d96b..e376427430 100644
--- a/docs-translations/ko-KR/api/app.md
+++ b/docs-translations/ko-KR/api/app.md
@@ -5,7 +5,7 @@
밑의 예제는 마지막 윈도우창가 종료되었을 때, 어플리케이션을 종료시키는 예제입니다:
```javascript
-var app = require('app');
+const app = require('electron').app;
app.on('window-all-closed', function() {
app.quit();
});
@@ -240,6 +240,12 @@ GPU가 작동하던 중 크래시가 일어났을 때 발생하는 이벤트입
* `userDesktop` - 현재 사용자의 데스트탑 디렉터리.
* `exe` - 현재 실행중인 Electron 바이너리 파일.
* `module` - `libchromiumcontent` 라이브러리.
+* `desktop` - 사용자의 데스크탑 디렉터리.
+* `documents` - 사용자의 "내 문서" 디렉터리.
+* `downloads` - 사용자의 다운로드 디렉터리.
+* `music` - 사용자의 음악 디렉터리.
+* `pictures` - 사용자의 사진 디렉터리.
+* `videos` - 사용자의 동영상 디렉터리.
### `app.setPath(name, path)`
diff --git a/docs-translations/ko-KR/api/auto-updater.md b/docs-translations/ko-KR/api/auto-updater.md
index f12d04042e..1b0d9c032c 100644
--- a/docs-translations/ko-KR/api/auto-updater.md
+++ b/docs-translations/ko-KR/api/auto-updater.md
@@ -62,7 +62,7 @@ Returns:
* `releaseNotes` String
* `releaseName` String
* `releaseDate` Date
-* `updateUrl` String
+* `updateURL` String
업데이트의 다운로드가 완료되었을 때 발생하는 이벤트입니다.
@@ -70,7 +70,7 @@ Returns:
`autoUpdater` 객체에서 사용할 수 있는 메서드입니다:
-### `autoUpdater.setFeedUrl(url)`
+### `autoUpdater.setFeedURL(url)`
* `url` String
@@ -78,7 +78,7 @@ Returns:
### `autoUpdater.checkForUpdates()`
-서버에 새로운 업데이트가 있는지 요청을 보내 확인합니다. API를 사용하기 전에 `setFeedUrl`를 호출해야 합니다.
+서버에 새로운 업데이트가 있는지 요청을 보내 확인합니다. API를 사용하기 전에 `setFeedURL`를 호출해야 합니다.
### `autoUpdater.quitAndInstall()`
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 aea9c49a10..216d402c41 100644
--- a/docs-translations/ko-KR/api/chrome-command-line-switches.md
+++ b/docs-translations/ko-KR/api/chrome-command-line-switches.md
@@ -5,7 +5,7 @@
어플리케이션 내부에서 스위치들을 추가할 수 있습니다:
```javascript
-var app = require('app');
+const app = require('electron').app;
app.commandLine.appendSwitch('remote-debugging-port', '8315');
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1');
@@ -28,7 +28,16 @@ HTTP 요청 캐시를 비활성화 합니다.
## --remote-debugging-port=`port`
-지정한 `port`에 HTTP기반의 리모트 디버거를 활성화 시킵니다. (개발자 콘솔)
+지정한 `port`에 HTTP 기반의 리모트 디버거를 활성화 시킵니다. (개발자 콘솔)
+
+## --js-flags=`flags`
+
+JS 엔진에 지정한 플래그를 전달합니다.
+`flags`를 메인 프로세스에서 활성화하고자 한다면, Electron이 시작되기 전에 스위치를 전달해야 합니다.
+
+```bash
+$ electron --js-flags="--harmony_proxies --harmony_collections" your-app
+```
## --proxy-server=`address:port`
diff --git a/docs-translations/ko-KR/api/clipboard.md b/docs-translations/ko-KR/api/clipboard.md
index 080078274e..01f1945856 100644
--- a/docs-translations/ko-KR/api/clipboard.md
+++ b/docs-translations/ko-KR/api/clipboard.md
@@ -3,14 +3,13 @@
`clipboard` 모듈은 복사/붙여넣기 작업을 수행하는 방법을 제공합니다. 다음 예제는 클립보드에 문자열을 씁니다:
```javascript
-var clipboard = require('clipboard');
+const clipboard = require('electron').clipboard;
clipboard.writeText('Example String');
```
X Window 시스템에선 selection 클립보드도 존재합니다. 이를 사용하려면 인자 뒤에 `selection` 문자열을 같이 지정해주어야 합니다:
```javascript
-var clipboard = require('clipboard');
clipboard.writeText('Example String', 'selection');
console.log(clipboard.readText('selection'));
```
@@ -78,7 +77,6 @@ console.log(clipboard.readText('selection'));
클립보드가 지정한 `data`의 형식을 지원하는지 확인합니다.
```javascript
-var clipboard = require('clipboard');
console.log(clipboard.has('selection
'));
```
@@ -98,7 +96,6 @@ console.log(clipboard.has('selection
'));
* `type` String (optional)
```javascript
-var clipboard = require('clipboard');
clipboard.write({text: 'test', html: "test"});
```
diff --git a/docs-translations/ko-KR/api/content-tracing.md b/docs-translations/ko-KR/api/content-tracing.md
index 08221fbc70..f5f8b03d29 100644
--- a/docs-translations/ko-KR/api/content-tracing.md
+++ b/docs-translations/ko-KR/api/content-tracing.md
@@ -4,9 +4,14 @@
이 모듈은 웹 인터페이스를 포함하고 있지 않으며 크롬 브라우저에서 `chrome://tracing/` 페이지를 열어 생성된 파일을 로드하면 결과를 볼 수 있습니다.
```javascript
-var contentTracing = require('content-tracing');
+const contentTracing = require('electron').contentTracing;
-contentTracing.startRecording('*', contentTracing.DEFAULT_OPTIONS, function() {
+const options = {
+ categoryFilter: '*',
+ traceOptions: 'record-until-full,enable-sampling'
+};
+
+contentTracing.startRecording(options, function() {
console.log('Tracing started');
setTimeout(function() {
diff --git a/docs-translations/ko-KR/api/crash-reporter.md b/docs-translations/ko-KR/api/crash-reporter.md
index 88cd3b82f3..a5d2955157 100644
--- a/docs-translations/ko-KR/api/crash-reporter.md
+++ b/docs-translations/ko-KR/api/crash-reporter.md
@@ -5,12 +5,12 @@
다음 예제는 윈격 서버에 어플리케이션 크래시 정보를 자동으로 보고하는 예제입니다:
```javascript
-var crashReporter = require('crash-reporter');
+const crashReporter = require('electron').crashReporter;
crashReporter.start({
productName: 'YourName',
companyName: 'YourCompany',
- submitUrl: 'https://your-domain.com/url-to-submit',
+ submitURL: 'https://your-domain.com/url-to-submit',
autoSubmit: true
});
```
@@ -25,7 +25,7 @@ crashReporter.start({
* `productName` String, 기본값: Electron
* `companyName` String, 기본값: GitHub, Inc
-* `submitUrl` String, 기본값: http://54.249.141.255:1127/post
+* `submitURL` String, 기본값: http://54.249.141.255:1127/post
* 크래시 리포트는 POST 방식으로 이 URL로 전송됩니다.
* `autoSubmit` Boolean, 기본값: true
* true로 지정할 경우 유저의 승인 없이 자동으로 오류를 보고합니다.
@@ -52,7 +52,7 @@ crashReporter.start({
## crash-reporter 업로드 형식
-Crash Reporter는 다음과 같은 데이터를 `submitUrl`에 `POST` 방식으로 전송합니다:
+Crash Reporter는 다음과 같은 데이터를 `submitURL`에 `POST` 방식으로 전송합니다:
* `ver` String - Electron의 버전
* `platform` String - 예시 'win32'
diff --git a/docs-translations/ko-KR/api/dialog.md b/docs-translations/ko-KR/api/dialog.md
index 08530c0547..e7e81240da 100644
--- a/docs-translations/ko-KR/api/dialog.md
+++ b/docs-translations/ko-KR/api/dialog.md
@@ -7,7 +7,7 @@
```javascript
var win = ...; // 대화 상자를 사용할 BrowserWindow 객체
-var dialog = require('dialog');
+const dialog = require('electron').dialog;
console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]}));
```
diff --git a/docs-translations/ko-KR/api/download-item.md b/docs-translations/ko-KR/api/download-item.md
new file mode 100644
index 0000000000..756353b8ba
--- /dev/null
+++ b/docs-translations/ko-KR/api/download-item.md
@@ -0,0 +1,101 @@
+# DownloadItem
+
+`DownloadItem` is an EventEmitter represents a download item in Electron. It
+is used in `will-download` event of `Session` module, and allows users to
+control the download item.
+
+```javascript
+// In the main process.
+win.webContents.session.on('will-download', function(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() {
+ console.log('Received bytes: ' + item.getReceivedBytes());
+ });
+ item.on('done', function(e, state) {
+ if (state == "completed") {
+ console.log("Download successfully");
+ } else {
+ console.log("Download is cancelled or interrupted that can't be resumed");
+ }
+ });
+```
+
+## Events
+
+### Event: 'updated'
+
+Emits when the `downloadItem` gets updated.
+
+### Event: 'done'
+
+* `event` Event
+* `state` String
+ * `completed` - The download completed successfully.
+ * `cancelled` - The download has been cancelled.
+ * `interrupted` - An error broke the connection with the file server.
+
+Emits when the download is in a terminal state. This includes a completed
+download, a cancelled download(via `downloadItem.cancel()`), and interrupted
+download that can't be resumed.
+
+## Methods
+
+The `downloadItem` object has the following methods:
+
+### `downloadItem.setSavePath(path)`
+
+* `path` String - Set the save file path of the download item.
+
+The API is only available in session's `will-download` callback function.
+If user doesn't set the save path via the API, Electron will use the original
+routine to determine the save path(Usually prompts a save dialog).
+
+### `downloadItem.pause()`
+
+Pauses the download.
+
+### `downloadItem.resume()`
+
+Resumes the download that has been paused.
+
+### `downloadItem.cancel()`
+
+Cancels the download operation.
+
+### `downloadItem.getURL()`
+
+Returns a `String` represents the origin url where the item is downloaded from.
+
+### `downloadItem.getMimeType()`
+
+Returns a `String` represents the mime type.
+
+### `downloadItem.hasUserGesture()`
+
+Returns a `Boolean` indicates whether the download has user gesture.
+
+### `downloadItem.getFilename()`
+
+Returns a `String` represents the file name of the download item.
+
+**Note:** The file name is not always the same as the actual one saved in local
+disk. If user changes the file name in a prompted download saving dialog, the
+actual name of saved file will be different.
+
+### `downloadItem.getTotalBytes()`
+
+Returns a `Integer` represents the total size in bytes of the download item.
+If the size is unknown, it returns 0.
+
+### `downloadItem.getReceivedBytes()`
+
+Returns a `Integer` represents the received bytes of the download item.
+
+### `downloadItem.getContentDisposition()`
+
+Returns a `String` represents the Content-Disposition field from the response
+header.
diff --git a/docs-translations/ko-KR/api/frameless-window.md b/docs-translations/ko-KR/api/frameless-window.md
index 28662c311b..decc0217ed 100644
--- a/docs-translations/ko-KR/api/frameless-window.md
+++ b/docs-translations/ko-KR/api/frameless-window.md
@@ -9,7 +9,7 @@ Frameless Window는 [테두리](https://developer.mozilla.org/en-US/docs/Glossar
Frameless Window를 만드려면 [BrowserWindow](browser-window.md) 객체의 `options`에서 `frame` 옵션을 `false`로 지정하면 됩니다:
```javascript
-var BrowserWindow = require('browser-window');
+const BrowserWindow = require('electron').BrowserWindow;
var win = new BrowserWindow({ width: 800, height: 600, frame: false });
```
@@ -20,8 +20,8 @@ OS X 10.10 Yosemite 이후의 최신 버전부터는 테두리가 없는 창을
옵션을 통해 제목만 숨기고 창 구성 요소("흔히 신호등으로 알고 있는")의 기능과 창 크기를 그대로 유지할 수 있습니다:
```javascript
-var BrowserWindow = require('browser-window');
-var win = new BrowserWindow({ width: 800, height: 600, 'title-bar-style': 'hidden' });
+var win = new BrowserWindow({ 'title-bar-style': 'hidden' });
+```
## 투명한 창 만들기
diff --git a/docs-translations/ko-KR/api/global-shortcut.md b/docs-translations/ko-KR/api/global-shortcut.md
index f000a3bdb6..2120f73cc5 100644
--- a/docs-translations/ko-KR/api/global-shortcut.md
+++ b/docs-translations/ko-KR/api/global-shortcut.md
@@ -7,8 +7,9 @@
이 모듈은 `app` 모듈의 `ready` 이벤트 이전에 사용할 수 없습니다.
```javascript
-var app = require('app');
-var globalShortcut = require('global-shortcut');
+const electron = require('electron');
+const app = electron.app;
+const globalShortcut = electron.globalShortcut;
app.on('ready', function() {
// 'ctrl+x' 단축키를 리스너에 등록합니다.
diff --git a/docs-translations/ko-KR/api/ipc-main.md b/docs-translations/ko-KR/api/ipc-main.md
index cecbf980e7..fae8aa4d5c 100644
--- a/docs-translations/ko-KR/api/ipc-main.md
+++ b/docs-translations/ko-KR/api/ipc-main.md
@@ -16,25 +16,25 @@
```javascript
// 메인 프로세스
-var ipc = require('ipc');
+const ipcMain = require('electron').ipcMain;
ipc.on('asynchronous-message', function(event, arg) {
- console.log(arg); // prints "ping"
+ console.log(arg); // "ping" 출력
event.sender.send('asynchronous-reply', 'pong');
});
ipc.on('synchronous-message', function(event, arg) {
- console.log(arg); // prints "ping"
+ console.log(arg); // "ping" 출력
event.returnValue = 'pong';
});
```
```javascript
// 랜더러 프로세스 (웹 페이지)
-var ipc = require('ipc');
-console.log(ipc.sendSync('synchronous-message', 'ping')); // prints "pong"
+const ipcRenderer = require('electron').ipcRenderer;
+console.log(ipc.sendSync('synchronous-message', 'ping')); // "pong" 출력
ipc.on('asynchronous-reply', function(arg) {
- console.log(arg); // prints "pong"
+ console.log(arg); // "pong" 출력
});
ipc.send('asynchronous-message', 'ping');
```
diff --git a/docs-translations/ko-KR/api/menu.md b/docs-translations/ko-KR/api/menu.md
index 56b7f4a198..d55fa807a3 100644
--- a/docs-translations/ko-KR/api/menu.md
+++ b/docs-translations/ko-KR/api/menu.md
@@ -11,9 +11,9 @@
```html
-
+
+