Repository: cordova-plugin-battery-status Updated Branches: refs/heads/master 6b9fddc3c -> f54a130c9
CB-6127lisa7cordova-plugin-consolecordova-plugin-battery-status documentation translation: cordova-plugin-battery-status Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/commit/f54a130c Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/tree/f54a130c Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/diff/f54a130c Branch: refs/heads/master Commit: f54a130c96332eedd874c7421527d393ede397fd Parents: 6b9fddc Author: Lisa Seacat DeLuca <[email protected]> Authored: Mon Jul 7 15:26:09 2014 -0400 Committer: Lisa Seacat DeLuca <[email protected]> Committed: Mon Jul 7 15:26:09 2014 -0400 ---------------------------------------------------------------------- doc/de/index.md | 2 +- doc/es/index.md | 4 +- doc/fr/index.md | 2 +- doc/it/index.md | 2 +- doc/ja/index.md | 2 +- doc/ko/index.md | 2 +- doc/ru/index.md | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/zh/index.md | 2 +- 8 files changed, 140 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/de/index.md ---------------------------------------------------------------------- diff --git a/doc/de/index.md b/doc/de/index.md index 6d7e4ff..42dbac4 100644 --- a/doc/de/index.md +++ b/doc/de/index.md @@ -44,7 +44,7 @@ Der Batterie-Status-Handler wird ein Objekt übergeben, das zwei Eigenschaften e * **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt Zoll *(boolesch)* -Anwendungen sollten in der Regel verwenden `window.addEventListener` Anfügen einen Ereignis-Listener einmal den `deviceready` Event Feuer. z.B.: +Anwendungen sollten in der Regel verwenden `window.addEventListener` Anfügen einen Ereignis-Listener nach dem `deviceready` -Ereignis ausgelöst. ### Unterstützte Plattformen http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/es/index.md ---------------------------------------------------------------------- diff --git a/doc/es/index.md b/doc/es/index.md index e5c91d7..ae53658 100644 --- a/doc/es/index.md +++ b/doc/es/index.md @@ -17,7 +17,7 @@ under the License. --> -# org.apache.Cordova.Battery-estado +# org.apache.cordova.battery-status Este plugin proporciona una implementación de una versión antigua de la [BaterÃa estado eventos API][1]. @@ -44,7 +44,7 @@ El controlador de estado de baterÃa se pasa un objeto que contiene dos propieda * **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)* -Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos una vez el `deviceready` evento incendios. por ejemplo: +Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos después de la `deviceready` evento incendios. ### Plataformas soportadas http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/fr/index.md ---------------------------------------------------------------------- diff --git a/doc/fr/index.md b/doc/fr/index.md index f58fcbc..a7572f1 100644 --- a/doc/fr/index.md +++ b/doc/fr/index.md @@ -44,7 +44,7 @@ Le gestionnaire est appelé avec un objet contenant deux propriétés : * **isPlugged** : un booléen indiquant si l'appareil est en cours de chargement ou non. *(Boolean)* -Les applications doivent généralement utiliser `window.addEventListener` pour attacher un écouteur d'événements une fois le `deviceready` événement incendies. par exemple : +Les applications doivent généralement utiliser `window.addEventListener` pour attacher un écouteur d'événements après le `deviceready` événement se déclenche. ### Plates-formes prises en charge http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/it/index.md ---------------------------------------------------------------------- diff --git a/doc/it/index.md b/doc/it/index.md index 12060e0..8bab4e3 100644 --- a/doc/it/index.md +++ b/doc/it/index.md @@ -44,7 +44,7 @@ Il gestore di stato della batteria viene passato un oggetto che contiene due pro * **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)* -Applicazioni in genere necessario utilizzare `window.addEventListener` per associare un listener di eventi una volta il `deviceready` evento incendi. per esempio: +Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi dopo il `deviceready` evento incendi. ### Piattaforme supportate http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/ja/index.md ---------------------------------------------------------------------- diff --git a/doc/ja/index.md b/doc/ja/index.md index 9d77097..6e05e4e 100644 --- a/doc/ja/index.md +++ b/doc/ja/index.md @@ -44,7 +44,7 @@ * **èµ·ãããã**ï¼ ããã¤ã¹ãæ¥ç¶ããã¦ã¤ã³ã*(ãã¼ã«å¤)*ãã©ããã示ããã¼ã«å¤ -é常ã¢ããªã±ã¼ã·ã§ã³ã«ä½¿ç¨ããå¿ è¦ãããã¾ã `window.addEventListener` ä¸åº¦ã®ã¤ãã³ã ãªã¹ãã¼ãã¢ã¿ãããã `deviceready` ã¤ãã³ãç«ç½ã ä¾ã +é常ã¢ããªã±ã¼ã·ã§ã³ã«ä½¿ç¨ããå¿ è¦ãããã¾ã `window.addEventListener` å¾ã®ã¤ãã³ã ãªã¹ãã¼ãã¢ã¿ããããã `deviceready` ã¤ãã³ããçºçãã¾ãã ### ãµãã¼ãããã¦ãããã©ãããã©ã¼ã http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/ko/index.md ---------------------------------------------------------------------- diff --git a/doc/ko/index.md b/doc/ko/index.md index cd49cb9..2fdce66 100644 --- a/doc/ko/index.md +++ b/doc/ko/index.md @@ -44,7 +44,7 @@ * **isPlugged**: ì¥ì¹ ì°ê²°ë ì¸ì¹ *(ë¶ì¸)* ì¸ì§ ì¬ë¶ë¥¼ ëíë´ë ë¶ì¸ ê° -ì¼ë°ì ì¼ë¡ ìì© íë¡ê·¸ë¨ì ì¬ì© í´ì¼ í©ëë¤ `window.addEventListener` íë² ì´ë²¤í¸ 리ì¤ë를 ë¶ì°© íë `deviceready` ì´ë²¤í¸ê° ë°ì í©ëë¤. ì를 ë¤ì´: +ì¼ë°ì ì¼ë¡ ìì© íë¡ê·¸ë¨ì ì¬ì© í´ì¼ í©ëë¤ `window.addEventListener` í ì´ë²¤í¸ 리ì¤ë를 ì°ê²° íë `deviceready` ì´ë²¤í¸ê° ë°ì í©ëë¤. ### ì§ì ëë íë«í¼ http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/ru/index.md ---------------------------------------------------------------------- diff --git a/doc/ru/index.md b/doc/ru/index.md new file mode 100644 index 0000000..b3551bb --- /dev/null +++ b/doc/ru/index.md @@ -0,0 +1,132 @@ +<!--- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +# org.apache.cordova.battery-status + +ÐÑÐ¾Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½ пÑедоÑÑавлÑÐµÑ ÑеализаÑÐ¸Ñ ÑÑаÑой веÑÑии [API СобÑÑий СÑаÑÑÑа ÐаÑаÑеи][1]. + + [1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/ + +API добавлÑÐµÑ ÑледÑÑÑие ÑÑи ÑобÑÑÐ¸Ñ Ð´Ð»Ñ Ð¾Ð±ÑекÑа `window`: + +* batterystatus +* batterycritical +* batterylow + +## УÑÑановка + + cordova plugin add org.apache.cordova.battery-status + + +## batterystatus + +ÐÑо ÑобÑÑие Ð²Ð¾Ð·Ð½Ð¸ÐºÐ°ÐµÑ Ð¿Ñи изменении пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи по кÑайней меÑе на 1%, или еÑли ÑÑÑÑойÑÑво подклÑÑаеÑÑÑ Ð¸Ð»Ð¸ оÑклÑÑаеÑÑÑ Ð¾Ñ Ð·Ð°ÑÑжаÑÑего ÑÑÑÑойÑÑва. + +ÐбÑабоÑÑÐ¸ÐºÑ ÑобÑÑÐ¸Ñ batterystatus пеÑедаеÑÑÑ Ð¾Ð±ÑекÑ, ÑодеÑжаÑий два ÑвойÑÑва: + +* **level**: пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи (0-100). *(ЧиÑло)* + +* **isPlugged**: логиÑеÑкое знаÑение, ÑказÑваÑÑее, подклÑÑено ли ÑÑÑÑойÑÑво к заÑÑжаÑÑÐµÐ¼Ñ ÑÑÑÑойÑÑÐ²Ñ *(Boolean)* + +ÐÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾Ð±ÑÑно Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¸ÑполÑзоваÑÑ `window.addEventListener` пÑикÑепиÑÑ Ð¿ÑоÑлÑÑиваÑÐµÐ»Ñ ÑобÑÑий поÑле `deviceready` пожаÑов ÑобÑÑиÑ. + +### ÐоддеÑживаемÑе плаÑÑоÑÐ¼Ñ + +* Amazon Fire ÐС +* iOS +* Android +* BlackBerry 10 +* Windows Phone 7 и 8 +* Tizen +* Firefox OS + +### ÐÑобенноÑÑи Windows Phone 7 и 8 + +Windows Phone 7 не обеÑпеÑÐ¸Ð²Ð°ÐµÑ API, ÑÑÐ¾Ð±Ñ Ð¾Ð¿ÑеделиÑÑ ÑÑÐ¾Ð²ÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи, Ñак ÑÑо ÑвойÑÑво `level` недоÑÑÑпно. ÐаÑамеÑÑ `isPlugged` *поддеÑживаеÑÑÑ*. + +### ÐÑÐ¸Ð¼ÐµÑ + + window.addEventListener("batterystatus", onBatteryStatus, false); + + function onBatteryStatus(info) { + // Handle the online event + console.log("Level: " + info.level + " isPlugged: " + info.isPlugged); + } + + +## batterycritical + +СобÑÑие возникаеÑ, когда пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи поÑÑи доÑÑиг поÑога полной ÑазÑÑдки баÑаÑеи. ÐнаÑение ÑÑого поÑога завиÑÐ¸Ñ Ð¾Ñ ÐºÐ¾Ð½ÐºÑеÑного ÑÑÑÑойÑÑва. + +ÐбÑабоÑÑÐ¸ÐºÑ ÑобÑÑÐ¸Ñ `batterycritical` пеÑедаеÑÑÑ Ð¾Ð±ÑекÑ, ÑодеÑжаÑий два ÑвойÑÑва: + +* **ÑÑовенÑ**: пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи (0-100). *(ЧиÑло)* + +* **isPlugged**: знаÑение boolean, ÑказÑваÑÑее, ÑвлÑеÑÑÑ Ð»Ð¸ ÑÑÑÑойÑÑво подклÑÑено дÑйма *(Boolean)* + +ÐÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾Ð±ÑÑно Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¸ÑполÑзоваÑÑ `window.addEventListener` ÑÑÐ¾Ð±Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ Ð¾Ð±ÑабоÑÑик ÑобÑÑÐ¸Ñ Ð¿Ð¾Ñле Ñого как пÑÐ¾Ð¸Ð·Ð¾Ð¹Ð´ÐµÑ ÑобÑÑие `deviceready`. + +### ÐоддеÑживаемÑе плаÑÑоÑÐ¼Ñ + +* Amazon Fire ÐС +* iOS +* Android +* BlackBerry 10 +* Tizen +* Firefox OS + +### ÐÑÐ¸Ð¼ÐµÑ + + window.addEventListener("batterycritical", onBatteryCritical, false); + + function onBatteryCritical(info) { + // Handle the battery critical event + alert("Battery Level Critical " + info.level + "%\nRecharge Soon!"); + } + + +## batterylow + +СобÑÑие возникаеÑ, когда пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи доÑÑÐ¸Ð³Ð°ÐµÑ Ð¿Ð¾Ñога низкого заÑÑда баÑаÑеи, ÑÑо знаÑение завиÑÐ¸Ñ Ð¾Ñ ÐºÐ¾Ð½ÐºÑеÑного ÑÑÑÑойÑÑва. + +ÐбÑабоÑÑÐ¸ÐºÑ ÑобÑÑÐ¸Ñ `batterylow` пеÑедаеÑÑÑ Ð¾Ð±ÑекÑ, ÑодеÑжаÑий два ÑвойÑÑва: + +* **ÑÑовенÑ**: пÑоÑÐµÐ½Ñ Ð·Ð°ÑÑда баÑаÑеи (0-100). *(ЧиÑло)* + +* **isPlugged**: знаÑение boolean, ÑказÑваÑÑее, ÑвлÑеÑÑÑ Ð»Ð¸ ÑÑÑÑойÑÑво подклÑÑено дÑйма *(Boolean)* + +ÐÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾Ð±ÑÑно Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¸ÑполÑзоваÑÑ `window.addEventListener` ÑÑÐ¾Ð±Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ Ð¾Ð±ÑабоÑÑик ÑобÑÑÐ¸Ñ Ð¿Ð¾Ñле Ñого как пÑÐ¾Ð¸Ð·Ð¾Ð¹Ð´ÐµÑ ÑобÑÑие `deviceready`. + +### ÐоддеÑживаемÑе плаÑÑоÑÐ¼Ñ + +* Amazon Fire ÐС +* iOS +* Android +* BlackBerry 10 +* Tizen +* Firefox OS + +### ÐÑÐ¸Ð¼ÐµÑ + + window.addEventListener("batterylow", onBatteryLow, false); + + function onBatteryLow(info) { + // Handle the battery low event + alert("Battery Level Low " + info.level + "%"); + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/f54a130c/doc/zh/index.md ---------------------------------------------------------------------- diff --git a/doc/zh/index.md b/doc/zh/index.md index bd9f541..22a5fc1 100644 --- a/doc/zh/index.md +++ b/doc/zh/index.md @@ -44,7 +44,7 @@ * **isPlugged**ï¼ ä¸å叿å¼ï¼è©²å¼æç¤ºè¨åæ¯å¦æ*(叿å¼)* -æç¨ç¨å¼é常æä½¿ç¨ `window.addEventListener` å°ä¸åäºä»¶ææªå¨éå 䏿¬¡ `deviceready` äºä»¶ç«ç½ã ä¾å¦ï¼ +æç¨ç¨å¼é常æä½¿ç¨ `window.addEventListener` å°éå ä¸åäºä»¶ææªå¨å¾ç `deviceready` äºä»¶è§¸ç¼ã ### æ¯æ´çå¹³èº
