]> khamidou — GitHub mirrors - electron.git/commitdiff
Add download-item.md translation
authorPlusb Preco <plusb21@gmail.com>
Mon, 16 Nov 2015 04:41:47 +0000 (13:41 +0900)
committerPlusb Preco <plusb21@gmail.com>
Mon, 16 Nov 2015 04:41:47 +0000 (13:41 +0900)
docs-translations/ko-KR/api/download-item.md

index 756353b8ba3dcc8e2dfbc83ce8b57c710ce7cfbf..a81299f27d0b7bb4f54b2018c7e48b5ce8b471b4 100644 (file)
@@ -1,11 +1,11 @@
 # 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.
+`DownloadItem`은 EventEmitter를 상속받았으며 Electron의 다운로드 아이템을 표현합니다.
+이 클래스 객체는 `Session` 모듈의 `will-download` 이벤트에 사용되며
+사용자가 다운로드 아이템을 다룰 수 있도록 도와줍니다.
 
 ```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');
@@ -28,74 +28,70 @@ win.webContents.session.on('will-download', function(event, item, webContents) {
 
 ### Event: 'updated'
 
-Emits when the `downloadItem` gets updated.
+`downloadItem`이 갱신될 때 발생하는 이벤트입니다.
 
 ### 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.
+  * `completed` - 다운로드가 성공적으로 완료되었습니다.
+  * `cancelled` - 다운로드가 취소되었습니다.
+  * `interrupted` - 다운로드 중 파일 서버로부터의 연결이 끊겼습니다.
 
-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.
+다운로드가 종료될 때 발생하는 이벤트입니다.
+이 이벤트는 다운로드 중 문제가 발생하여 중단되거나, 모두 성공적으로 완료된 경우,
+`downloadItem.cancel()` 같은 메서드를 통해 취소하는 경우의 종료 작업이 모두 포함됩니다.
 
 ## Methods
 
-The `downloadItem` object has the following methods:
+`downloadItem` 객체는 다음과 같은 메서드를 가지고 있습니다:
 
 ### `downloadItem.setSavePath(path)`
 
-* `path` String - Set the save file path of the download item.
+* `path` String - 다운로드 아이템을 저장할 파일 경로를 지정합니다.
 
-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).
+이 API는 세션의 `will-download` 콜백 함수에서만 사용할 수 있습니다.
+사용자가 API를 통해 아무 경로도 설정하지 않을 경우 Electron은 기본 루틴 파일 저장을 실행합니다. (파일 대화 상자를 엽니다)
 
 ### `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.
+다운로드 아이템의 URL을 표현하는 문자열을 반환합니다.
 
 ### `downloadItem.getMimeType()`
 
-Returns a `String` represents the mime type.
+다우로드 아이템의 MIME 타입을 표현하는 문자열을 반환합니다.
 
 ### `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.
+현재 아이템의 전체 다운로드 크기를 정수로 반환합니다. 크기가 unknown이면 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.
+응답 헤더에서 Content-Disposition 필드를 문자열로 반환합니다.