From ade5b142f83763125f7b3f364a6a2d00f11067de Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Thu, 27 Aug 2015 09:19:24 +0900 Subject: [PATCH] Update as upstream --- docs-translations/ko/api/auto-updater.md | 24 +++++--- docs-translations/ko/styleguide.md | 78 ++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 docs-translations/ko/styleguide.md diff --git a/docs-translations/ko/api/auto-updater.md b/docs-translations/ko/api/auto-updater.md index dd9adf86..369f5829 100644 --- a/docs-translations/ko/api/auto-updater.md +++ b/docs-translations/ko/api/auto-updater.md @@ -1,4 +1,4 @@ -# auto-updater +# autoUpdater **이 모듈은 현재 OS X에서만 사용할 수 있습니다.** @@ -76,26 +76,30 @@ Squirrel은 "url"로 `Accept: application/zip` 헤더와 함께 업데이트 zip `pub_date`은 ISO 8601 표준에 따라 포맷된 날짜입니다. -## Event: error +## Events + +`autoUpdater` 객체는 다음과 같은 이벤트를 발생시킵니다: + +### Event: 'error' * `event` Event * `message` String 업데이트시 에러가 나면 발생하는 이벤트입니다. -## Event: checking-for-update +### Event: 'checking-for-update' 업데이트를 확인하기 시작할 때 발생하는 이벤트입니다. -## Event: update-available +### Event: 'update-available' 사용 가능한 업데이트가 있을 때 발생하는 이벤트입니다. 이벤트는 자동으로 다운로드 됩니다. -## Event: update-not-available +### Event: 'update-not-available' 사용 가능한 업데이트가 없을 때 발생하는 이벤트입니다. -## Event: update-downloaded +### Event: 'update-downloaded' * `event` Event * `releaseNotes` String @@ -106,12 +110,16 @@ Squirrel은 "url"로 `Accept: application/zip` 헤더와 함께 업데이트 zip 업데이트의 다운로드가 완료되었을 때 발생하는 이벤트입니다. `quitAndUpdate()`를 호출하면 어플리케이션을 종료하고 업데이트를 설치합니다. -## autoUpdater.setFeedUrl(url) +## Methods + +`autoUpdater` 객체에서 사용할 수 있는 메서드입니다: + +### `autoUpdater.setFeedUrl(url)` * `url` String `url`을 설정하고 자동 업데이터를 초기화합니다. `url`은 한번 설정되면 변경할 수 없습니다. -## autoUpdater.checkForUpdates() +### `autoUpdater.checkForUpdates()` 서버에 새로운 업데이트가 있는지 요청을 보내 확인합니다. API를 사용하기 전에 `setFeedUrl`를 호출해야 합니다. diff --git a/docs-translations/ko/styleguide.md b/docs-translations/ko/styleguide.md new file mode 100644 index 00000000..065d37f5 --- /dev/null +++ b/docs-translations/ko/styleguide.md @@ -0,0 +1,78 @@ +# Electron Documentation Styleguide + +Find the appropriate section for your task: [reading Electron documentation](#) +or [writing Electron documentation](#). + +## Writing Electron Documentation + +These are the ways that we construct the Electron documentation. + +- Maximum one `h1` title per page. +- Use `bash` instead of `cmd` in code blocks (because of syntax highlighter). +- Doc `h1` titles should match object name (i.e. `browser-window` ¡æ + `BrowserWindow`). + - Hyphen separated filenames, however, are fine. +- No headers following headers, add at least a one-sentence description. +- Methods headers are wrapped in `code` ticks. +- Event headers are wrapped in single 'quotation' marks. +- No nesting lists more than 2 levels (unfortunately because of markdown + renderer). +- Add section titles: Events, Class Methods and Instance Methods. +- Use 'will' over 'would' when describing outcomes. +- Events and methods are `h3` headers. +- Optional arguments written as `function (required[, optional])`. +- Optional arguments are denoted when called out in list. +- Line length is 80-column wrapped. +- Platform specific methods are noted in italics following method header. + - ```### `method(foo, bar)` _OS X_``` + +## Reading Electron Documentation + +Here are some tips for understanding Electron documentation syntax. + +### Methods + +An example of [method](https://developer.mozilla.org/en-US/docs/Glossary/Method) +documentation: + +--- + +`methodName(required[, optional]))` + +* `require` String, **required** +* `optional` Integer + +--- + +The method name is followed by the arguments it takes. Optional arguments are +notated by brackets surrounding the optional argument as well as the comma +required if this optional argument follows another argument. + +Below the method is more detailed information on each of the arguments. The type +of argument is notated by either the common types: [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object), [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) +or a custom type like Electron's [`webContent`](api/web-content.md). + +### Events + +An example of [event](https://developer.mozilla.org/en-US/docs/Web/API/Event) +documentation: + +--- + +Event: 'wake-up' + +Returns: + +* `time` String + +--- + +The event is a string that is used after a `.on` listener method. If it returns +a value it and its type is noted below. If you were to listen and respond to +this event it might look something like this: + +```javascript +Alarm.on('wake-up', function(time) { + console.log(time) +}) +``` \ No newline at end of file -- 2.43.0