From 871571c65ed7f32034f6fb9fab42d4fd0ddaf707 Mon Sep 17 00:00:00 2001 From: Meyito Date: Tue, 6 Oct 2015 22:09:57 -0500 Subject: [PATCH 01/16] Translations of some of the Electron docs API in Spanish --- docs-translations/es/README.md | 12 +- .../es/api/chrome-command-line-switches.md | 119 ++++++++++++++++++ docs-translations/es/api/process.md | 47 +++++++ docs-translations/es/api/synopsis.md | 47 +++++++ 4 files changed, 219 insertions(+), 6 deletions(-) create mode 100644 docs-translations/es/api/chrome-command-line-switches.md create mode 100644 docs-translations/es/api/process.md create mode 100644 docs-translations/es/api/synopsis.md diff --git a/docs-translations/es/README.md b/docs-translations/es/README.md index 497cc4e05c..10c1b9fe99 100644 --- a/docs-translations/es/README.md +++ b/docs-translations/es/README.md @@ -10,15 +10,15 @@ ## Tutoriales -* [Introducción](../../docs/tutorial/quick-start.md) -* [Integración con el entorno de escritorio](../../docs/tutorial/desktop-environment-integration.md) -* [Detección del evento en línea/fuera de línea](../../docs/tutorial/online-offline-events.md) +* [Introducción](tutorial/quick-start.md) +* [Integración con el entorno de escritorio](tutorial/desktop-environment-integration.md) +* [Detección del evento en línea/fuera de línea](tutorial/online-offline-events.md) ## API -* [Sinopsis](../../docs/api/synopsis.md) -* [Proceso](../../docs/api/process.md) -* [Parámetros CLI soportados (Chrome)](../../docs/api/chrome-command-line-switches.md) +* [Sinopsis](api/synopsis.md) +* [Proceso](api/process.md) +* [Parámetros CLI soportados (Chrome)](api/chrome-command-line-switches.md) Elementos DOM customizados: diff --git a/docs-translations/es/api/chrome-command-line-switches.md b/docs-translations/es/api/chrome-command-line-switches.md new file mode 100644 index 0000000000..c063869adf --- /dev/null +++ b/docs-translations/es/api/chrome-command-line-switches.md @@ -0,0 +1,119 @@ +# Parámetros CLI soportados (Chrome) + +Esta página lista las líneas de comandos usadas por el navegador Chrome que también son +soportadas por Electron. Puedes usar [app.commandLine.appendSwitch][append-switch] para +anexarlas en el script principal de tu aplicación antes de que el evento [ready][ready] del +modulo [app][app] sea emitido: + +```javascript +var app = require('app'); +app.commandLine.appendSwitch('remote-debugging-port', '8315'); +app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1'); + +app.on('ready', function() { + // Your code here +}); +``` + +## --client-certificate=`path` + +Establece el `path` del archivo de certificado del cliente. + +## --ignore-connections-limit=`domains` + +Ignora el límite de conexiones para la lista de `domains` separados por `,`. + +## --disable-http-cache + +Deshabilita la cacheé del disco para las peticiones HTTP. + +## --remote-debugging-port=`port` + +Habilita la depuración remota a través de HTTP en el puerto especificado. + +## --proxy-server=`address:port` + +Usa un servidor proxy especificado, que sobreescribe la configuración del sistema. +Este cambio solo afecta peticiones HTTP y HTTPS. + +## --proxy-pac-url=`url` + +Utiliza el script PAC en la `url` especificada. + +## --no-proxy-server + +No usa un servidor proxy y siempre establece conexiones directas. Anula cualquier +otra bandera de servidor proxy bandera que se pase. + +## --host-rules=`rules` + +Una lista separada por comas de `rules` (reglas) que controlan cómo se asignan los +nombres de host. + +Por ejemplo: + +* `MAP * 127.0.0.1` Obliga a todos los nombres de host a ser asignados a 127.0.0.1 +* `MAP *.google.com proxy` Obliga todos los subdominios google.com a resolverse con + "proxy". +* `MAP test.com [::1]:77` Obliga a resolver "test.com" con un bucle invertido de IPv6. + También obligará a que el puerto de la dirección respuesta sea 77. +* `MAP * baz, EXCLUDE www.google.com` Reasigna todo a "baz", excepto a "www.google.com". + +Estas asignaciones especifican el host final en una petición de red (Anfitrión de la conexión TCP +y de resolución de conexión directa, y el `CONNECT` en una conexión proxy HTTP, y el host final de +la conexión proxy `SOCKS`). + +## --host-resolver-rules=`rules` + +Como `--host-rules` pero estas `rules` solo se aplican al solucionador. + +[app]: app.md +[append-switch]: app.md#appcommandlineappendswitchswitch-value +[ready]: app.md#event-ready + +## --ignore-certificate-errors + +Ignora errores de certificado relacionados. + +## --ppapi-flash-path=`path` + +Asigna la ruta `path` del pepper flash plugin. + +## --ppapi-flash-version=`version` + +Asigna la versión `version` del pepper flash plugin. + +## --log-net-log=`path` + +Permite guardar y escribir eventos de registros de red en `path`. + +## --ssl-version-fallback-min=`version` + +Establece la versión mínima de SSL/TLS ("tls1", "tls1.1" o "tls1.2") que +el repliegue de TLC aceptará. + +## --enable-logging + +Imprime el registro de Chromium en consola. + +Este cambio no puede ser usado en `app.commandLine.appendSwitch` ya que se analiza antes de que la +aplicación del usuario este cargada. + +## --v=`log_level` + +Da el maximo nivel activo de V-logging por defecto; 0 es el predeterminado. Valores positivos +son normalmente usados para los niveles de V-logging. + +Este modificador sólo funciona cuando también se pasa `--enable-logging`. + +## --vmodule=`pattern` + +Da los niveles máximos de V-logging por módulo para sobreescribir el valor dado por +`--v`. Ej. `my_module=2,foo*=3` cambiaria el nivel de registro para todo el código +el archivos de origen `my_module.*` y `foo*.*`. + +Cualquier patron que contiene un slash o un slash invertido será probado contra toda la ruta +y no sólo con el módulo. Ej. `*/foo/bar/*=2` cambiaría el nivel de registro para todo el código +en los archivos origen bajo un directorio `foo/bar`. + +Este modificador sólo funciona cuando también se pasa `--enable-logging`. diff --git a/docs-translations/es/api/process.md b/docs-translations/es/api/process.md new file mode 100644 index 0000000000..e03ef5fa1c --- /dev/null +++ b/docs-translations/es/api/process.md @@ -0,0 +1,47 @@ +# process + +El objeto `process` en Electron tiene las siguientes diferencias con respecto +al node convencional: + +* `process.type` String - El tipo del proceso puede ser `browser` (ej. proceso + principal) o `renderer`. +* `process.versions['electron']` String - Versión de Electron. +* `process.versions['chrome']` String - Versión de Chromium. +* `process.resourcesPath` String - Ruta al código fuente JavaScript. + +## Events + +### Event: 'loaded' + +Se emite cuando Electron ha cargado su script de inicialización interna y +está comenzando a cargar la página web o el script principal. + +Puede ser usado por el script precargado para añadir de nuevo los símbolos globales +de Node eliminados, al alcance global cuando la integración de Node está apagada: + +```js +// preload.js +var _setImmediate = setImmediate; +var _clearImmediate = clearImmediate; +process.once('loaded', function() { + global.setImmediate = _setImmediate; + global.clearImmediate = _clearImmediate; +}); +``` + +## Methods + +El objeto `process` tiene los siguientes métodos: + +### `process.hang` + +Interrumpe el hilo principal del proceso actual. + + +### process.setFdLimit(maxDescriptors) _OS X_ _Linux_ + +* `maxDescriptors` Integer + +Establece el límite dinámico del descriptor del archivo en `maxDescriptors` +o en el límite estricto del Sistema Operativo, el que sea menor para el +proceso actual. diff --git a/docs-translations/es/api/synopsis.md b/docs-translations/es/api/synopsis.md new file mode 100644 index 0000000000..0da368dea4 --- /dev/null +++ b/docs-translations/es/api/synopsis.md @@ -0,0 +1,47 @@ +# Synopsis + +Todos los [Módulos integrados de Node.js](http://nodejs.org/api/) se encuentran +disponibles en Electron y módulos de terceros son támbien totalmente compatibles +(incluyendo los [módulos nativos](../tutorial/using-native-node-modules.md)). + +Electron también provee algunos módulos integrados adicionales para desarrollar +aplicaciones nativas de escritorio. Algunos módulos sólo se encuentran disponibles +en el proceso principal, algunos sólo en el proceso renderer (pagina web), y +algunos pueden ser usados en ambos procesos. + +La regla básica es: Si un módulo es +[GUI](https://es.wikipedia.org/wiki/Interfaz_gráfica_de_usuario) o de bajo nivel, +entonces solo estará disponible en el proceso principal. Necesitas familiarizarte +con el concepto de [scripts para proceso principal vs scripts para proceso renderer] +(../tutorial/quick-start.md#the-main-process) para ser capaz de usar esos módulos. + +El script del proceso principal es como un script normal de Node.js: + +```javascript +var app = require('app'); +var BrowserWindow = require('browser-window'); + +var window = null; + +app.on('ready', function() { + window = new BrowserWindow({width: 800, height: 600}); + window.loadUrl('https://github.com'); +}); +``` + +El proceso renderer no es diferente de una página web normal, excepto por la +capacidad extra de utilizar módulos de node: + +```html + + + + + + +``` + +Para ejecutar tu aplicación, lee [Ejecutar la aplicación](../tutorial/quick-start.md#run-your-app). \ No newline at end of file From 821005e6b4d38062fe9c2cd4a6a1eb54d4c3efa2 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 7 Oct 2015 12:15:48 +0800 Subject: [PATCH 02/16] Fix a wrong usage of switch commandline. We should not always save switch path as ascii string, which will not be handled well on Windows. --- atom/app/atom_content_client.cc | 4 ++-- atom/browser/api/atom_api_app.cc | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/atom/app/atom_content_client.cc b/atom/app/atom_content_client.cc index e760c01453..0931a1b55a 100644 --- a/atom/app/atom_content_client.cc +++ b/atom/app/atom_content_client.cc @@ -99,7 +99,7 @@ void AtomContentClient::AddAdditionalSchemes( void AtomContentClient::AddPepperPlugins( std::vector* plugins) { auto command_line = base::CommandLine::ForCurrentProcess(); - auto flash_path = command_line->GetSwitchValueNative( + auto flash_path = command_line->GetSwitchValuePath( switches::kPpapiFlashPath); if (flash_path.empty()) return; @@ -108,7 +108,7 @@ void AtomContentClient::AddPepperPlugins( switches::kPpapiFlashVersion); plugins->push_back( - CreatePepperFlashInfo(base::FilePath(flash_path), flash_version)); + CreatePepperFlashInfo(flash_path, flash_version)); } } // namespace atom diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 2e7596971f..70595856c4 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -20,6 +20,7 @@ #include "atom/common/native_mate_converters/callback.h" #include "atom/common/native_mate_converters/file_path_converter.h" #include "atom/common/node_includes.h" +#include "atom/common/options_switches.h" #include "base/command_line.h" #include "base/environment.h" #include "base/files/file_path.h" @@ -27,6 +28,7 @@ #include "brightray/browser/brightray_paths.h" #include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/gpu_data_manager.h" +#include "content/public/common/content_switches.h" #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" #include "net/ssl/ssl_cert_request_info.h" @@ -301,6 +303,16 @@ namespace { void AppendSwitch(const std::string& switch_string, mate::Arguments* args) { auto command_line = base::CommandLine::ForCurrentProcess(); + + if (switch_string == atom::switches::kPpapiFlashPath || + switch_string == atom::switches::kClientCertificate || + switch_string == switches::kLogNetLog) { + base::FilePath path; + args->GetNext(&path); + command_line->AppendSwitchPath(switch_string, path); + return; + } + std::string value; if (args->GetNext(&value)) command_line->AppendSwitchASCII(switch_string, value); From 579f253340e83ef11f580d28b25f85388e3da743 Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 7 Oct 2015 20:19:37 +0900 Subject: [PATCH 03/16] Fix small typo --- docs-translations/ko-KR/api/auto-updater.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-translations/ko-KR/api/auto-updater.md b/docs-translations/ko-KR/api/auto-updater.md index 23f881c32b..4588b4ff9c 100644 --- a/docs-translations/ko-KR/api/auto-updater.md +++ b/docs-translations/ko-KR/api/auto-updater.md @@ -30,7 +30,7 @@ Squirrel의 인스톨러는 오류에 관대하게 설계되었습니다. 그리 Squirrel은 업데이트 확인을 위해 클라이언트 어플리케이션의 요청은 무시합니다. Squirrel은 응답을 분석해야 할 책임이 있기 때문에 `Accept: application/json`이 요청 헤더에 추가됩니다. -업데이트 응답과 본문 포맷에 대한 요구 사항은 [Server Support](#server-support)를 참고하세요. +업데이트 응답과 본문 포맷에 대한 요구 사항은 [서버 지원](#server-support)를 참고하세요. 업데이트 요청에는 서버가 해당 어플리케이션이 어떤 버전을 사용해야 하는지 판단하기 위해 *반드시* 버전 식별자를 포함시켜야 합니다. 추가로 OS 버전, 사용자 이름 같은 다른 식별 기준을 포함하여 서버에서 적합한 어플리케이션을 제공할 수 있도록 할 수 있습니다. From 3966441d21bf16f4735bdd93bdeabf72f154d0b1 Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 7 Oct 2015 20:20:34 +0900 Subject: [PATCH 04/16] Fix small typos --- docs-translations/ko-KR/api/auto-updater.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs-translations/ko-KR/api/auto-updater.md b/docs-translations/ko-KR/api/auto-updater.md index 4588b4ff9c..a91181a188 100644 --- a/docs-translations/ko-KR/api/auto-updater.md +++ b/docs-translations/ko-KR/api/auto-updater.md @@ -21,7 +21,7 @@ Squirrel은 사용자에게 어플리케이션의 업데이트를 알릴 필요 서버에선 이러한 요청을 분류 처리하여 적당한 업데이트를 제공할 수 있습니다. Squirrel JSON 업데이트 요청시 처리는 반드시 어떤 업데이트가 필요한지 요청의 기준에 맞춰 동적으로 생성되어야 합니다. -Squirrel은 사용해야 하는 업데이트 선택하는 과정을 서버에 의존합니다. [서버 지원](#server-support)을 참고하세요. +Squirrel은 사용해야 하는 업데이트 선택하는 과정을 서버에 의존합니다. [서버 지원](#서버-지원)을 참고하세요. Squirrel의 인스톨러는 오류에 관대하게 설계되었습니다. 그리고 업데이트가 유효한지 확인합니다. @@ -30,7 +30,7 @@ Squirrel의 인스톨러는 오류에 관대하게 설계되었습니다. 그리 Squirrel은 업데이트 확인을 위해 클라이언트 어플리케이션의 요청은 무시합니다. Squirrel은 응답을 분석해야 할 책임이 있기 때문에 `Accept: application/json`이 요청 헤더에 추가됩니다. -업데이트 응답과 본문 포맷에 대한 요구 사항은 [서버 지원](#server-support)를 참고하세요. +업데이트 응답과 본문 포맷에 대한 요구 사항은 [서버 지원](#서버-지원)를 참고하세요. 업데이트 요청에는 서버가 해당 어플리케이션이 어떤 버전을 사용해야 하는지 판단하기 위해 *반드시* 버전 식별자를 포함시켜야 합니다. 추가로 OS 버전, 사용자 이름 같은 다른 식별 기준을 포함하여 서버에서 적합한 어플리케이션을 제공할 수 있도록 할 수 있습니다. From 63c1fdd22a2ec048f5de1833e3d28d4379dfe39d Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 7 Oct 2015 20:46:57 +0900 Subject: [PATCH 05/16] Improve grammar * Improve the `auto-updater.md` content grammar. --- docs-translations/ko-KR/api/auto-updater.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs-translations/ko-KR/api/auto-updater.md b/docs-translations/ko-KR/api/auto-updater.md index a91181a188..98bd65dd0a 100644 --- a/docs-translations/ko-KR/api/auto-updater.md +++ b/docs-translations/ko-KR/api/auto-updater.md @@ -2,9 +2,9 @@ **이 모듈은 현재 OS X에서만 사용할 수 있습니다.** -Windows 어플리케이션 인스톨러를 생성하려면 [atom/grunt-electron-installer](https://github.com/atom/grunt-electron-installer)를 참고하세요. +Windows 인스톨러를 생성하려면 [atom/grunt-electron-installer](https://github.com/atom/grunt-electron-installer)를 참고하세요. -`auto-updater` 모듈은 [Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac) 프레임워크의 간단한 Wrapper입니다. +`auto-updater` 모듈은 [Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac) 프레임워크의 간단한 wrapper 입니다. Squirrel.Mac은 업데이트 설치를 위해 `.app` 폴더에 [codesign](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/codesign.1.html) @@ -14,11 +14,11 @@ Squirrel.Mac은 업데이트 설치를 위해 `.app` 폴더에 Squirrel은 어플리케이션이 **안전하고 투명한 업데이트**를 제공할 수 있도록 하는데 초점이 맞춰진 OS X 프레임워크입니다. -Squirrel은 사용자에게 어플리케이션의 업데이트를 알릴 필요 없이 서버가 지시하는 버전을 받아온 후 자동으로 업데이트합니다. -이 기능을 사용하면 Squirrel을 통해 클라이언트의 어플리케이션을 지능적으로 업데이트 할 수 있습니다. +Squirrel은 사용자에게 어플리케이션의 업데이트를 알릴 필요 없이 자동으로 서버가 지시하는 버전을 받아 어플리케이션을 업데이트합니다. +지능적으로 클라이언트 어플리케이션을 업데이트 할 수 있습니다. -또한 요청시 커스텀 헤더 또는 요청 본문에 인증 정보를 포함시킬 수 있습니다. -서버에선 이러한 요청을 분류 처리하여 적당한 업데이트를 제공할 수 있습니다. +업데이트 요청은 커스텀 헤더 또는 요청 본문에 인증 정보를 포함시킬 수 있습니다. +이에 따라 서버에선 이러한 요청을 분석 처리하여 사용자에게 적당한 업데이트를 제공할 수 있습니다. Squirrel JSON 업데이트 요청시 처리는 반드시 어떤 업데이트가 필요한지 요청의 기준에 맞춰 동적으로 생성되어야 합니다. Squirrel은 사용해야 하는 업데이트 선택하는 과정을 서버에 의존합니다. [서버 지원](#서버-지원)을 참고하세요. @@ -27,8 +27,8 @@ Squirrel의 인스톨러는 오류에 관대하게 설계되었습니다. 그리 ## 업데이트 요청 -Squirrel은 업데이트 확인을 위해 클라이언트 어플리케이션의 요청은 무시합니다. -Squirrel은 응답을 분석해야 할 책임이 있기 때문에 `Accept: application/json`이 요청 헤더에 추가됩니다. +Squirrel은 클라이언트 어플리케이션이 업데이트 확인을 위해 제공하는 요청을 무시합니다. +Squirrel이 응답을 분석할 수 있어야하기 때문에 요청 헤더에 `Accept: application/json` 헤더가 추가됩니다. 업데이트 응답과 본문 포맷에 대한 요구 사항은 [서버 지원](#서버-지원)를 참고하세요. @@ -46,7 +46,7 @@ autoUpdater.setFeedUrl('http://mycompany.com/myapp/latest?version=' + app.getVer ## 서버 지원 -업데이트를 제공하는 서버는 반드시 클라이언트로부터 받은 [Update Request](#update-requests)를 기반으로 업데이트를 처리할 수 있어야 합니다. +업데이트를 제공하는 서버는 반드시 클라이언트로부터 받은 [업데이트 요청](#업데이트-요청)을 기반으로 업데이트를 처리할 수 있어야 합니다. 만약 업데이트 요청이 들어오면 서버는 반드시 [200 OK](http://tools.ietf.org/html/rfc2616#section-10.2.1) 상태 코드를 포함한 [업데이트 JSON](#update-json-format)을 본문으로 보내야 합니다. From 6f61832a342dce60205df47a0b410ed932192f60 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Wed, 7 Oct 2015 09:03:11 -0700 Subject: [PATCH 06/16] :lipstick: Add semicolon to global-shortcut code example This keeps this line consistent with the rest of the documentation. --- docs/api/global-shortcut.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index adba06e1ad..fe69881f39 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -16,7 +16,7 @@ app.on('ready', function() { // Register a 'ctrl+x' shortcut listener. var ret = globalShortcut.register('ctrl+x', function() { console.log('ctrl+x is pressed'); - }) + }); if (!ret) { console.log('registration failed'); From 2978beaeb7fad9a05ffec71ef8256f23ec371f21 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Wed, 7 Oct 2015 09:03:46 -0700 Subject: [PATCH 07/16] :lipstick: Add preposition to globalShortcut.unregisterAll() --- docs/api/global-shortcut.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index fe69881f39..c9dfb19452 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -62,4 +62,4 @@ Unregisters the global shortcut of `accelerator`. ### `globalShortcut.unregisterAll()` -Unregisters all the global shortcuts. +Unregisters all of the global shortcuts. From c7dc901607b2320cdbe2cb6119e6d84a5765a606 Mon Sep 17 00:00:00 2001 From: Jan Wiemers Date: Wed, 7 Oct 2015 23:14:49 +0200 Subject: [PATCH 08/16] add --app parameter and update the example usage in the default_app #1877 --- atom/browser/default_app/index.html | 2 +- atom/browser/default_app/main.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/browser/default_app/index.html b/atom/browser/default_app/index.html index 96e45806d5..b9bdfffc65 100644 --- a/atom/browser/default_app/index.html +++ b/atom/browser/default_app/index.html @@ -58,7 +58,7 @@