From 56e679632f52bc4f7368d659e2096f28b150202c Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 13 Jul 2016 01:12:04 +0900 Subject: [PATCH 1/2] :memo: Update Korean docs as upstream [ci skip] --- docs-translations/ko-KR/README.md | 4 +- docs-translations/ko-KR/api/app.md | 2 +- docs-translations/ko-KR/api/browser-window.md | 1 + docs-translations/ko-KR/api/dialog.md | 2 +- docs-translations/ko-KR/api/locales.md | 140 ++++++++++++++++++ docs-translations/ko-KR/api/remote.md | 6 +- docs-translations/ko-KR/api/web-contents.md | 10 +- docs-translations/ko-KR/api/web-view-tag.md | 2 +- .../development/atom-shell-vs-node-webkit.md | 2 + .../development/build-instructions-windows.md | 3 +- .../development/setting-up-symbol-server.md | 2 +- .../ko-KR/{faq/electron-faq.md => faq.md} | 0 .../tutorial/application-distribution.md | 4 +- .../ko-KR/tutorial/quick-start.md | 2 +- docs-translations/ko-KR/tutorial/security.md | 2 +- .../ko-KR/tutorial/windows-store-guide.md | 4 - 16 files changed, 161 insertions(+), 25 deletions(-) create mode 100644 docs-translations/ko-KR/api/locales.md rename docs-translations/ko-KR/{faq/electron-faq.md => faq.md} (100%) diff --git a/docs-translations/ko-KR/README.md b/docs-translations/ko-KR/README.md index b522b06f97a9..8a8898f191e8 100644 --- a/docs-translations/ko-KR/README.md +++ b/docs-translations/ko-KR/README.md @@ -15,7 +15,7 @@ URL에 포함되어 있습니다. 만약 그렇지 않다면, 아마 현재 보 Electron에 대해 자주 묻는 질문이 있습니다. 이슈를 생성하기 전에 다음 문서를 먼저 확인해 보세요: -* [Electron FAQ](faq/electron-faq.md) +* [Electron FAQ](faq.md) ## 개발 가이드 @@ -69,8 +69,8 @@ Electron에 대해 자주 묻는 질문이 있습니다. 이슈를 생성하기 * [protocol](api/protocol.md) * [session](api/session.md) * [systemPreferences](api/system-preferences.md) -* [webContents](api/web-contents.md) * [Tray](api/tray.md) +* [webContents](api/web-contents.md) ### 렌더러 프로세스에서 사용할 수 있는 모듈 (웹 페이지): diff --git a/docs-translations/ko-KR/api/app.md b/docs-translations/ko-KR/api/app.md index d8d639c86698..a521702abc1a 100644 --- a/docs-translations/ko-KR/api/app.md +++ b/docs-translations/ko-KR/api/app.md @@ -402,7 +402,7 @@ npm 모듈 규칙에 따라 대부분의 경우 `package.json`의 `name` 필드 ### `app.getLocale()` 현재 애플리케이션의 [로케일](https://ko.wikipedia.org/wiki/%EB%A1%9C%EC%BC%80%EC%9D%BC)을 -반환합니다. +반환합니다. 반환될 수 있는 값은 [여기](locales.md)에서 찾아볼 수 있습니다. **참고:** 패키징된 앱을 배포할 때, `locales` 폴더도 같이 배포해야 합니다. diff --git a/docs-translations/ko-KR/api/browser-window.md b/docs-translations/ko-KR/api/browser-window.md index d214a0270d0b..96bd6af04538 100644 --- a/docs-translations/ko-KR/api/browser-window.md +++ b/docs-translations/ko-KR/api/browser-window.md @@ -199,6 +199,7 @@ On Windows it is * `desktop`은 데스크탑 배경 레벨(`kCGDesktopWindowLevel - 1`)에 윈도우를 배치합니다. 참고로 이렇게 만들어진 윈도우는 포커스, 키보드, 마우스 이벤트를 받을 수 없습니다. 하지만 편법으로 `globalShortcut`을 통해 키 입력을 받을 수 있습니다. +* Windows의 경우, 가능한 타입으론 `toolbar`가 있습니다. `titleBarStyle` 속성은 macOS 10.10 Yosemite 이후 버전만 지원하며, 다음 3가지 종류의 값을 사용할 수 있습니다: diff --git a/docs-translations/ko-KR/api/dialog.md b/docs-translations/ko-KR/api/dialog.md index c478d47bea1c..3e0624ca46d7 100644 --- a/docs-translations/ko-KR/api/dialog.md +++ b/docs-translations/ko-KR/api/dialog.md @@ -32,7 +32,7 @@ const {dialog} = require('electron').remote; * `filters` Array * `properties` Array - 대화 상자가 사용할 기능(모드)이 담긴 배열입니다. 다음을 포함할 수 있습니다: `openFile`, `openDirectory`, `multiSelections`, - `createDirectory` + `createDirectory`, `showHiddenFiles`. * `callback` Function (optional) 사용할 대화 상자의 기능이 담긴 배열입니다. 다음을 포함할 수 있습니다: `openFile`, diff --git a/docs-translations/ko-KR/api/locales.md b/docs-translations/ko-KR/api/locales.md new file mode 100644 index 000000000000..468cbd752eea --- /dev/null +++ b/docs-translations/ko-KR/api/locales.md @@ -0,0 +1,140 @@ +# 로케일 + +> `app.getLocale()`에서 반환되는 로케일 값. + +Electron은 로케일을 가져오기 위해 Chromium의 `l10n_util` 라이브러리를 사용합니다. +반환될 수 있는 값은 다음과 같습니다: + + +| 언어 코드 | 언어 이름 | +|---------------|---------------| +| af | Afrikaans | +| ar-AE | Arabic (U.A.E.) | +| ar-IQ | Arabic (Iraq) | +| ar | Arabic (Standard) | +| ar-BH | Arabic (Bahrain) | +| ar-DZ | Arabic (Algeria) | +| ar-EG | Arabic (Egypt) | +| ar | Aragonese | +| ar-JO | Arabic (Jordan) | +| ar-KW | Arabic (Kuwait) | +| ar-LB | Arabic (Lebanon) | +| ar-LY | Arabic (Libya) | +| ar-MA | Arabic (Morocco) | +| ar-OM | Arabic (Oman) | +| ar-QA | Arabic (Qatar) | +| ar-SA | Arabic (Saudi Arabia) | +| ar-SY | Arabic (Syria) | +| ar-TN | Arabic (Tunisia) | +| ar-YE | Arabic (Yemen) | +| as | Assamese | +| ast | Asturian | +| az | Azerbaijani | +| be | Belarusian | +| bg | Bulgarian | +| bg | Bulgarian | +| bn | Bengali | +| br | Breton | +| bs | Bosnian | +| ca | Catalan | +| ce | Chechen | +| ch | Chamorro | +| co | Corsican | +| cr | Cree | +| cs | Czech | +| cv | Chuvash | +| da | Danish | +| de | German (Standard) | +| de-AT | German (Austria) | +| de-CH | German (Switzerland) | +| de-DE | German (Germany) | +| de-LI | German (Liechtenstein) | +| de-LU | German (Luxembourg) | +| el | Greek | +| en-AU | English (Australia) | +| en-BZ | English (Belize) | +| en | English | +| en-CA | English (Canada) | +| en-GB | English (United Kingdom) | +| en-IE | English (Ireland) | +| en-JM | English (Jamaica) | +| en-NZ | English (New Zealand) | +| en-PH | English (Philippines) | +| en-TT | English (Trinidad & Tobago) | +| en-US | English (United States) | +| en-ZA | English (South Africa) | +| en-ZW | English (Zimbabwe) | +| eo | Esperanto | +| et | Estonian | +| eu | Basque | +| fa | Persian | +| fa | Farsi | +| fa-IR | Persian/Iran | +| fi | Finnish | +| fj | Fijian | +| fo | Faeroese | +| fr-CH | French (Switzerland) | +| fr-FR | French (France) | +| fr-LU | French (Luxembourg) | +| fr-MC | French (Monaco) | +| fr | French (Standard) | +| fr-BE | French (Belgium) | +| fr-CA | French (Canada) | +| fur | Friulian | +| fy | Frisian | +| ga | Irish | +| gd-IE | Gaelic (Irish) | +| gd | Gaelic (Scots) | +| gl | Galacian | +| gu | Gujurati | +| he | Hebrew | +| hi | Hindi | +| hr | Croatian | +| ht | Haitian | +| hu | Hungarian | +| hy | Armenian | +| id | Indonesian | +| is | Icelandic | +| it-CH | Italian (Switzerland) | +| it | Italian (Standard) | +| iu | Inuktitut | +| ja | Japanese | +| ka | Georgian | +| kk | Kazakh | +| km | Khmer | +| kn | Kannada | +| ko | Korean | +| ko-KP | Korean (North Korea) | +| ko-KR | Korean (South Korea) | +| ks | Kashmiri | +| ky | Kirghiz | +| la | Latin | +| lb | Luxembourgish | +| lt | Lithuanian | +| lv | Latvian | +| mi | Maori | +| mk | FYRO Macedonian | +| ml | Malayalam | +| mo | Moldavian | +| mr | Marathi | +| ms | Malay | +| mt | Maltese | +| my | Burmese | +| nb | Norwegian (Bokmal) | +| ne | Nepali | +| ng | Ndonga | +| nl | Dutch (Standard) | +| nl-BE | Dutch (Belgian) | +| nn | Norwegian (Nynorsk) | +| no | Norwegian | +| nv | Navajo | +| oc | Occitan | +| om | Oromo | +| or | Oriya | +| sq | Albanian | +| tlh | Klingon | +| zh-TW | Chinese (Taiwan) | +| zh | Chinese | +| zh-CN | Chinese (PRC) | +| zh-HK | Chinese (Hong Kong) | +| zh-SG | Chinese (Singapore) | diff --git a/docs-translations/ko-KR/api/remote.md b/docs-translations/ko-KR/api/remote.md index 4b2c9be14996..763637f81ae4 100644 --- a/docs-translations/ko-KR/api/remote.md +++ b/docs-translations/ko-KR/api/remote.md @@ -20,7 +20,7 @@ let win = new BrowserWindow({width: 800, height: 600}); win.loadURL('https://github.com'); ``` -**참고:** 반대로 메인 프로세스에서 렌더러 프로세스에 접근 하려면 [webContents.executeJavascript](web-contents.md#webcontentsexecutejavascriptcode-usergesture) +**참고:** 반대로 메인 프로세스에서 렌더러 프로세스에 접근 하려면 [webContents.executeJavascript](web-contents.md#webcontentsexecutejavascriptcode-usergesture-callback) 메서드를 사용하면 됩니다. ## Remote 객체 @@ -70,7 +70,7 @@ exports.withRendererCallback = (mapper) => { ; exports.withLocalCallback = () => { - return exports.mapNumbers(x => x + 1); + return [1,2,3].map(x => x + 1); }; ``` @@ -82,7 +82,7 @@ const withRendererCb = mapNumbers.withRendererCallback(x => x + 1); const withLocalCb = mapNumbers.withLocalCallback(); -console.log(withRendererCb, withLocalCb); // [true, true, true], [2, 3, 4] +console.log(withRendererCb, withLocalCb); // [undefined, undefined, undefined], [2, 3, 4] ``` 보다시피 동기적인 렌더러 콜백 함수의 반환 값은 예상되지 않은 값입니다. 그리고 메인 diff --git a/docs-translations/ko-KR/api/web-contents.md b/docs-translations/ko-KR/api/web-contents.md index ba53f3dbd8ff..30c90affdd78 100644 --- a/docs-translations/ko-KR/api/web-contents.md +++ b/docs-translations/ko-KR/api/web-contents.md @@ -633,8 +633,8 @@ CSS 코드를 현재 웹 페이지에 삽입합니다. * `action` String - [`webContents.findInPage`](web-contents.md#webcontentfindinpage) 요청이 종료되었을 때 일어날 수 있는 작업을 지정합니다. - * `clearSelection` - 선택을 일반 선택으로 변경합니다. - * `keepSelection` - 선택을 취소합니다. + * `clearSelection` - 선택을 취소합니다. + * `keepSelection` - 선택을 일반 선택으로 변경합니다. * `activateSelection` - 포커스한 후 선택된 노드를 클릭합니다. 제공된 `action`에 대한 `webContents`의 모든 `findInPage` 요청을 중지합니다. @@ -669,17 +669,13 @@ ServiceWorker가 존재하면 모두 등록을 해제하고 JS Promise가 만족 * `printBackground` Boolean - 웹 페이지의 배경 색과 이미지를 출력합니다. 기본값은 `false`입니다. -윈도우의 웹 페이지를 프린트합니다. `silent`가 `false`로 지정되어있을 땐, Electron이 +윈도우의 웹 페이지를 프린트합니다. `silent`가 `true`로 지정되어있을 땐, Electron이 시스템의 기본 프린터와 기본 프린터 설정을 가져옵니다. 웹 페이지에서 `window.print()`를 호출하는 것은 `webContents.print({silent: false, printBackground: false})`를 호출하는 것과 같습니다. -**참고:** Windows에서의 프린터 API는 `pdf.dll`에 의존합니다. 따라서 애플리케이션이 -print기능을 사용하지 않는 경우 전체 바이너리 크기를 줄이기 위해 `pdf.dll`을 삭제해도 -됩니다. - ### `webContents.printToPDF(options, callback)` * `options` Object diff --git a/docs-translations/ko-KR/api/web-view-tag.md b/docs-translations/ko-KR/api/web-view-tag.md index 7238ea69abff..cb77e77d2429 100644 --- a/docs-translations/ko-KR/api/web-view-tag.md +++ b/docs-translations/ko-KR/api/web-view-tag.md @@ -475,7 +475,7 @@ Service worker에 대한 개발자 도구를 엽니다. 페이지에 입력 `event`를 보냅니다. -`event` 객체에 대해 자세히 알아보려면 [webContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent)를 +`event` 객체에 대해 자세히 알아보려면 [webContents.sendInputEvent](web-contents.md#webcontentssendinputeventevent)를 참고하세요. ### `.showDefinitionForSelection()` _macOS_ diff --git a/docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md b/docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md index e5e967420efd..5f436f89f031 100644 --- a/docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md +++ b/docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md @@ -44,4 +44,6 @@ __4. 다중 컨텍스트__ Node의 [다중 컨텍스트](http://strongloop.com/strongblog/whats-new-node-js-v0-12-multiple-context-execution/)를 사용하기 때문에 Electron은 웹 페이지의 새로운 JavaScript 컨텍스트를 생성하지 않습니다. +참고: NW.js는 0.13 버전부터 선택적으로 다중 컨텍스트를 지원합니다. + [node-bindings]: https://github.com/electron/electron/tree/master/atom/common diff --git a/docs-translations/ko-KR/development/build-instructions-windows.md b/docs-translations/ko-KR/development/build-instructions-windows.md index 525dae2f0143..fef72d2af0fc 100644 --- a/docs-translations/ko-KR/development/build-instructions-windows.md +++ b/docs-translations/ko-KR/development/build-instructions-windows.md @@ -10,7 +10,8 @@ * [Node.js](http://nodejs.org/download/) * [Git](http://git-scm.com) -현재 사용하고 있는 PC에 Windows를 설치하지 않았다면 [modern.ie](https://www.modern.ie/en-us/virtualization-tools#downloads)에서 +현재 사용하고 있는 PC에 Windows를 설치하지 않았다면 +[dev.microsoftedge.com](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)에서 사용 기한이 정해져있는 무료 가상머신 버전의 Windows를 받아 Electron을 빌드하는 방법도 있습니다. diff --git a/docs-translations/ko-KR/development/setting-up-symbol-server.md b/docs-translations/ko-KR/development/setting-up-symbol-server.md index 6a214c5b843a..9835d447081e 100644 --- a/docs-translations/ko-KR/development/setting-up-symbol-server.md +++ b/docs-translations/ko-KR/development/setting-up-symbol-server.md @@ -48,5 +48,5 @@ Windbg에서 다음의 커맨드를 입력하여 왜 심볼이 로드되지 않 ``` > !sym noisy -> .reload /f chromiumcontent.dll +> .reload /f electron.exe ``` diff --git a/docs-translations/ko-KR/faq/electron-faq.md b/docs-translations/ko-KR/faq.md similarity index 100% rename from docs-translations/ko-KR/faq/electron-faq.md rename to docs-translations/ko-KR/faq.md diff --git a/docs-translations/ko-KR/tutorial/application-distribution.md b/docs-translations/ko-KR/tutorial/application-distribution.md index 1b4dde82df84..e6bb62449986 100644 --- a/docs-translations/ko-KR/tutorial/application-distribution.md +++ b/docs-translations/ko-KR/tutorial/application-distribution.md @@ -110,8 +110,8 @@ MyApp.app/Contents 애플리케이션을 일일이 수동으로 패키지로 만드는 대신, 서드 파티 패키징 툴을 사용하며 이러한 작업을 자동화 시킬 수 있습니다: -* [electron-packager](https://github.com/maxogden/electron-packager) -* [electron-builder](https://github.com/loopline-systems/electron-builder) +* [electron-builder](https://github.com/electron-userland/electron-builder) +* [electron-packager](https://github.com/electron-userland/electron-packager) ## Electron 소스 코드를 다시 빌드하여 리소스 수정하기 diff --git a/docs-translations/ko-KR/tutorial/quick-start.md b/docs-translations/ko-KR/tutorial/quick-start.md index 2f0d89bba30b..7096425a599f 100644 --- a/docs-translations/ko-KR/tutorial/quick-start.md +++ b/docs-translations/ko-KR/tutorial/quick-start.md @@ -230,4 +230,4 @@ $ cd electron-quick-start $ npm install && npm start ``` -[share-data]: ../faq/electron-faq.md#어떻게-웹-페이지-간에-데이터를-공유할-수-있나요 +[share-data]: ../faq.md#어떻게-웹-페이지-간에-데이터를-공유할-수-있나요 diff --git a/docs-translations/ko-KR/tutorial/security.md b/docs-translations/ko-KR/tutorial/security.md index 6d8a44f693d0..5a53d2b8bd4c 100644 --- a/docs-translations/ko-KR/tutorial/security.md +++ b/docs-translations/ko-KR/tutorial/security.md @@ -59,7 +59,7 @@ request와 기여는 언제나 환영합니다. * [`Content-Security-Policy`](http://www.html5rocks.com/en/tutorials/security/content-security-policy/) 를 정의하고, 한정적인 규칙을 사용하세요 (i.e. `script-src 'self'`) * 문자열을 코드로 실행할 수 있는 - [`eval`을 덮어쓰고 비활성화](https://github.com/nylas/N1/blob/0abc5d5defcdb057120d726b271933425b75b415/static/index.js#L6)하세요. + [`eval`을 덮어쓰고 비활성화](https://github.com/nylas/N1/blob/0abc5d5defcdb057120d726b271933425b75b415/static/index.js#L6-L8)하세요. * `allowDisplayingInsecureContent`를 `true`로 설정하지 마세요. * `allowRunningInsecureContent`를 `true`로 설정하지 마세요. * 무엇을 하고 있는지 확실히 알고 있지않는 이상 `experimentalFeatures` 또는 diff --git a/docs-translations/ko-KR/tutorial/windows-store-guide.md b/docs-translations/ko-KR/tutorial/windows-store-guide.md index 1f76070d0641..d932f0e6b312 100644 --- a/docs-translations/ko-KR/tutorial/windows-store-guide.md +++ b/docs-translations/ko-KR/tutorial/windows-store-guide.md @@ -61,18 +61,14 @@ npm install -g electron-windows-store │ ├── am.pak │ ├── ar.pak │ ├── [...] -├── msvcp120.dll -├── msvcr120.dll ├── natives_blob.bin ├── node.dll -├── pdf.dll ├── resources │ ├── app │ └── atom.asar ├── snapshot_blob.bin ├── squirrel.exe ├── ui_resources_200_percent.pak -├── vccorlib120.dll └── xinput1_3.dll ``` From 797aef60eebb4a25196a78bc01d71caca9eea154 Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 13 Jul 2016 02:53:26 +0900 Subject: [PATCH 2/2] :memo: Update Korean docs as upstream [ci skip] --- docs-translations/ko-KR/api/app.md | 82 ++++++++++++++----- docs-translations/ko-KR/api/browser-window.md | 14 +--- docs-translations/ko-KR/api/web-contents.md | 23 ++++++ docs-translations/ko-KR/api/web-view-tag.md | 5 ++ .../desktop-environment-integration.md | 30 +++++++ 5 files changed, 123 insertions(+), 31 deletions(-) diff --git a/docs-translations/ko-KR/api/app.md b/docs-translations/ko-KR/api/app.md index a521702abc1a..9dcd0db8e3cf 100644 --- a/docs-translations/ko-KR/api/app.md +++ b/docs-translations/ko-KR/api/app.md @@ -264,6 +264,19 @@ app.on('login', (event, webContents, request, authInfo, callback) => { GPU가 작동하던 중 크래시가 일어났을 때 발생하는 이벤트입니다. +### Event: 'accessibility-support-changed' _macOS_ _Windows_ + +Returns: + +* `event` Event +* `accessibilitySupportEnabled` Boolean - Chrome의 접근성 지원이 활성화되어있으면 + `true`를 반환하고 아니라면 `false`를 반환합니다. + +Chrome의 접근성 지원이 변경될 때 발생하는 이벤트입니다. 이 이벤트는 스크린 리더와 같은 +접근성 기술이 활성화되거나 비활성화될 때 발생합니다. +자세한 내용은 https://www.chromium.org/developers/design-documents/accessibility 를 +참고하세요. + ## Methods `app` 객체는 다음과 같은 메서드를 가지고 있습니다: @@ -579,6 +592,33 @@ pkcs12 형식으로된 인증서를 플랫폼 인증서 저장소로 가져옵 이 메서드는 `app`의 `ready` 이벤트가 발생하기 전에만 호출할 수 있습니다. +### `app.setBadgeCount(count)` _Linux_ _macOS_ + +* `count` Integer + +현재 앱에 대해 카운터 뱃지를 설정합니다. count를 `0`으로 설정하면 뱃지를 숨깁니다. +호출이 성공적으로 끝나면 `true`를 반환하고 아닌 경우 `false`를 반환합니다. + +macOS에선 독 아이콘에 표시됩니다. Linux에선 Unity 런처에서만 작동합니다. + +**참고:** Unity 런처는 이 기능을 작동하기 위해 `.desktop` 파일을 필요로 합니다. +이에 대한 자세한 내용은 [데스크톱 환경 통합][unity-requiremnt]을 참고하세요. + +### `app.getBadgeCount()` _Linux_ _macOS_ + +현재 카운터 뱃지에 표시중인 값을 반환합니다. + +### `app.isUnityRunning()` _Linux_ + +현재 데스크톱 환경이 Unity인지 여부를 반환합니다. + +### `app.isAccessibilitySupportEnabled()` _macOS_ _Windows_ + +`Boolean` 값을 반환하며 Chrome의 접근성 지원이 활성화되어있으면 `true`를 그렇지 +않다면 `false`를 반환합니다. 이 API는 사용할 수 있는 스크린 리더와 같은 접근성 기술이 +감지되었을 때 `true`를 반환합니다. 자세한 내용은 +https://www.chromium.org/developers/design-documents/accessibility 를 참고하세요. + ### `app.commandLine.appendSwitch(switch[, value])` Chrominum의 명령줄에 스위치를 추가합니다. `value`는 추가적인 값을 뜻하며 옵션입니다. @@ -647,32 +687,31 @@ dock 아이콘을 표시합니다. dock 아이콘의 `image`를 설정합니다. -### `app.launcher.setBadgeCount(count)` _Linux_ -* `count` Integer +### `app.getLoginItemSettings()` _macOS_ -Unity 런처에서 앱 아이콘 옆에 표시될 숫자를 설정합니다. `0`으로 설정하면 뱃지를 -숨깁니다. +앱의 로그인 항목 설정을 객체로 반환합니다. -**참고:** 이 기능은 현재 Ubuntu Unity에서만 사용할 수 있습니다. 다른 환경에서 이 -함수를 호출하는 것은 아무런 효과가 없습니다. +* `openAtLogin` Boolean - 앱이 로그인시 열리도록 설정되어있는 경우 `true`를 반환. +* `openAsHidden` Boolean - 앱이 로구인시 숨겨진 채로 열리도록 설정되어있는 경우 + `true`를 반환. +* `wasOpenedAtLogin` Boolean - 자동으로 로그인할 때 애플리케이션이 열려있었는지 여부. +* `wasOpenedAsHidden` Boolean - 앱이 숨겨진 로그인 항목처럼 열려있었는지 여부. + 이는 앱이 시작시 어떤 윈도우도 열지 않을 것을 표시합니다. +* `restoreState` Boolean - 앱이 이전 세션에서 상태를 복원하여 로그인 항목처럼 + 열려있었는지 여부. 이는 앱이 마지막으로 종료되었던 때에 열려있었던 윈도우를 복원하는 + 것을 표시합니다. -**참고:** 이 기능을 사용하려면 `package.json`의 `desktopName` 필드에 `.desktop` 파일 이름을 설정해야 합니다. 기본적으로 패키징된 애플리케이션의 `app.getName().desktop`을 사용합니다. +### `app.setLoginItemSettings(settings)` _macOS_ -### `app.launcher.getBadgeCount()` _Linux_ +* `settings` Object + * `openAtLogin` Boolean - `true`로 지정하면 로그인시 애플리케이션을 열도록 하며 + `false`로 지정시 로그인 항목에서 삭제합니다. + * `openAsHidden` Boolean - `true`로 지정하면 애플리케이션을 숨겨진 채로 열도록 + 합니다. 기본값은 `false`입니다. 사용자가 시스템 설정에서 이 설정을 변경할 수 + 있으며 앱이 열렸을 때 현재 값을 확인하려면 + `app.getLoginItemStatus().wasOpenedAsHidden`를 확인해야 합니다. -런처 아이콘 옆 배지의 카운터에 표시된 현재 값을 반환합니다. - -**참고:** `setBadgeCount`가 Ubuntu Unity에서만 지원하기 때문에, 애플리케이션이 다른 -플랫폼에서 돌아가고 있다면 이 메서드는 `0`을 반환합니다. - -### `app.launcher.isUnityRunning()` _Linux_ - -현재 데스크톱 환경이 Unity인지 여부를 반환합니다. Unity가 맞다면 `true`를 반환합니다. - -### `app.launcher.isCounterBadgeAvailable()` _Linux_ - -현재 데스크톱 환경이 애플리케이션 아이콘 카운터 뱃지를 사용할 수 있는지 여부를 -반환합니다. 사용할 수 있다면 `true`를 반환합니다. +앱의 로그인 항목 설정을 지정합니다. [dock-menu]:https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/customizing_docktile/concepts/dockconcepts.html#//apple_ref/doc/uid/TP30000986-CH2-TPXREF103 [tasks]:http://msdn.microsoft.com/en-us/library/windows/desktop/dd378460(v=vs.85).aspx#tasks @@ -681,3 +720,4 @@ Unity 런처에서 앱 아이콘 옆에 표시될 숫자를 설정합니다. `0` [LSCopyDefaultHandlerForURLScheme]: https://developer.apple.com/library/mac/documentation/Carbon/Reference/LaunchServicesReference/#//apple_ref/c/func/LSCopyDefaultHandlerForURLScheme [handoff]: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals/HandoffFundamentals.html [activity-type]: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSUserActivity_Class/index.html#//apple_ref/occ/instp/NSUserActivity/activityType +[unity-requiremnt]: ../tutorial/desktop-environment-integration.md#unity-launcher-shortcuts-linux diff --git a/docs-translations/ko-KR/api/browser-window.md b/docs-translations/ko-KR/api/browser-window.md index 96bd6af04538..be4e8550ca93 100644 --- a/docs-translations/ko-KR/api/browser-window.md +++ b/docs-translations/ko-KR/api/browser-window.md @@ -182,6 +182,9 @@ On Windows it is 기본 값은 `true`입니다. * `titleBarStyle` String, macOS - 윈도우 타이틀 바 스타일을 지정합니다. 자세한 사항은 아래를 참고하세요. +* `thickFrame` Boolean - Windows에서 테두리 없는 윈도우를 위해 표준 윈도우 프레임을 + 추가하는 `WS_THICKFRAME` 스타일을 사용합니다. `false`로 지정하면 윈도우의 그림자와 + 애니메이션을 삭제합니다. 기본값은 `true`입니다. * `webPreferences` Object - 웹 페이지 기능을 설정합니다. 사용할 수 있는 속성은 아래를 참고하세요. @@ -884,16 +887,7 @@ Windows 메시지 훅을 등록합니다. `callback`은 WndProc에서 메시지 ### `win.capturePage([rect, ]callback)` -* `rect` Object (optional) - 캡쳐할 페이지의 영역 - * `x` Integer - * `y` Integer - * `width` Integer - * `height` Integer -* `callback` Function - -페이지의 스크린샷을 `rect`에 설정한 만큼 캡처합니다. 캡처가 완료되면 `callback`이 -`callback(image)` 형식으로 호출됩니다. `image`는 [NativeImage](native-image.md)의 -인스턴스이며 스크린샷 데이터를 담고있습니다. `rect`를 생략하면 페이지 전체를 캡처합니다. +`webContents.capturePage([rect, ]callback)`와 같습니다. ### `win.loadURL(url[, options])` diff --git a/docs-translations/ko-KR/api/web-contents.md b/docs-translations/ko-KR/api/web-contents.md index 30c90affdd78..8a0796f13696 100644 --- a/docs-translations/ko-KR/api/web-contents.md +++ b/docs-translations/ko-KR/api/web-contents.md @@ -648,6 +648,19 @@ webContents.on('found-in-page', (event, result) => { const requestId = webContents.findInPage('api'); ``` +### `webContents.capturePage([rect, ]callback)` + +* `rect` Object (optional) - 캡쳐할 페이지의 영역 + * `x` Integer + * `y` Integer + * `width` Integer + * `height` Integer +* `callback` Function + +페이지의 스크린샷을 `rect`에 설정한 만큼 캡처합니다. 캡처가 완료되면 `callback`이 +`callback(image)` 형식으로 호출됩니다. `image`는 [NativeImage](native-image.md)의 +인스턴스이며 스크린샷 데이터를 담고있습니다. `rect`를 생략하면 페이지 전체를 캡처합니다. + ### `webContents.hasServiceWorker(callback)` * `callback` Function @@ -925,6 +938,16 @@ Input `event`를 웹 페이지로 전송합니다. 프레임 프레젠테이션 이벤트들에 대한 구독을 중지합니다. +### `webContents.startDrag(item)` + +* `item` object + * `file` String + * `icon` [NativeImage](native-image.md) + +현재 진행중인 드래그-드롭에 `item`을 드래그 중인 아이템으로 설정합니다. `file`은 +드래그될 파일의 절대 경로입니다. 그리고 `icon`은 드래그 도중 커서 밑에 표시될 +이미지입니다. + ### `webContents.savePage(fullPath, saveType, callback)` * `fullPath` String - 전체 파일 경로. diff --git a/docs-translations/ko-KR/api/web-view-tag.md b/docs-translations/ko-KR/api/web-view-tag.md index cb77e77d2429..6170556570e3 100644 --- a/docs-translations/ko-KR/api/web-view-tag.md +++ b/docs-translations/ko-KR/api/web-view-tag.md @@ -458,6 +458,11 @@ Service worker에 대한 개발자 도구를 엽니다. `webview` 페이지를 PDF 형식으로 인쇄합니다. `webContents.printToPDF(options, callback)` 메서드와 같습니다. +### `.capturePage([rect, ]callback)` + +`webview`의 페이지의 스냅샷을 캡쳐합니다. +`webContents.printToPDF(options, callback)` 메서드와 같습니다. + ### `.send(channel[, arg1][, arg2][, ...])` * `channel` String diff --git a/docs-translations/ko-KR/tutorial/desktop-environment-integration.md b/docs-translations/ko-KR/tutorial/desktop-environment-integration.md index 4298083e9a33..2f9ac97a493e 100644 --- a/docs-translations/ko-KR/tutorial/desktop-environment-integration.md +++ b/docs-translations/ko-KR/tutorial/desktop-environment-integration.md @@ -310,6 +310,36 @@ win.setRepresentedFilename('/etc/passwd'); win.setDocumentEdited(true); ``` +## 파일을 윈도우 밖으로 드래그할 수 있도록 만들기 + +파일을 조작하는 특정 종류의 애플리케이션들에서 파일을 Electron에서 다른 애플리케이션으로 +드래그할 수 있는 기능은 중요합니다. 이 기능을 구현하려면 애플리케이션에서 +`ondragstart` 이벤트가 발생했을 때 `webContents.startDrag(item)` API를 호출해야 +합니다: + +웹 페이지에서: + +```html +item + +``` + +메인 프로세스에서: + +```javascript +ipcMain.on('ondragstart', (event, filePath) => { + event.sender.startDrag({ + file: filePath, + icon: '/path/to/icon.png' + }) +}) +``` + [addrecentdocument]: ../api/app.md#appaddrecentdocumentpath-os-x-windows [clearrecentdocuments]: ../api/app.md#appclearrecentdocuments-os-x-windows [setusertaskstasks]: ../api/app.md#appsetusertaskstasks-windows