Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
feat: New Crowdin translations (auto-merged 🤖) (#1903)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored Jun 2, 2021
1 parent fe2b9cf commit 46d8bfc
Show file tree
Hide file tree
Showing 11 changed files with 346 additions and 59 deletions.
57 changes: 49 additions & 8 deletions content/de-DE/docs/tutorial/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,63 @@ On Linux, the Unity graphical interface also has a similar feature that allows y

All three cases are covered by the same API - the [`setProgressBar()`][setprogressbar] method available on an instance of `BrowserWindow`. To indicate your progress, call this method with a number between `0` and `1`. For example, if you have a long-running task that is currently at 63% towards completion, you would call it as `setProgressBar(0.63)`.

Setting the parameter to negative values (e.g. `-1`) will remove the progress bar, whereas setting it to values greater than `1` (e.g. `2`) will switch the progress bar to indeterminate mode (Windows-only -- it will clamp to 100% otherwise). In this mode, a progress bar remains active but does not show an actual percentage. Use this mode for situations when you do not know how long an operation will take to complete.
Setting the parameter to negative values (e.g. `-1`) will remove the progress bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar in Windows or clamp to 100% in other operating systems. An indeterminate progress bar remains active but does not show an actual percentage, and is used for situations when you do not know how long an operation will take to complete.

See the [API documentation for more options and modes][setprogressbar].
Weitere Informationen können in der [API-Dokumentation für mehr Optionen und Modulen][setprogressbar] gefunden werden.

## Beispiel

Beginnend mit einer funktionierenden Anwendung aus dem [Quick Start Guide](quick-start.md), fügen Sie folgende Zeilen in die `main.js` Datei ein:
In this example, we add a progress bar to the main window that increments over time using Node.js timers.

```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()

win.setProgressBar(0.5)
const { app, BrowserWindow } = require('electron')

let progressInterval

function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})

win.loadFile('index.html')

const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms

let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)

// increment or reset progress bar
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```

After launching the Electron application, you should see the bar in the dock (macOS) or taskbar (Windows, Unity), indicating the progress percentage you just defined.
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity) should show a progress bar that starts at zero and progresses through 100% to completion. It should then show indeterminate (Windows) or pin to 100% (other operating systems) briefly and then loop.

![macOS dock progress bar](../images/dock-progress-bar.png)

Expand Down
2 changes: 1 addition & 1 deletion content/es-ES/docs/api/structures/notification-response.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Objeto NotificationResponse

* `actionIdentifier` String - The identifier string of the action that the user selected.
* `date` Number - The delivery date of the notification.
* `date` Number - La fecha de entrega de la notificación.
* `identifier` String - The unique identifier for this notification request.
* `userInfo` Record<String, any> - A dictionary of custom information associated with the notification.
* `userText` String (optional) - The text entered or chosen by the user.
4 changes: 2 additions & 2 deletions content/es-ES/docs/tutorial/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Electron is a framework for building desktop applications using JavaScript, HTML

These docs operate under the assumption that the reader is familiar with both Node.js and general web development. If you need to get more comfortable with either of these areas, we recommend the following resources:

* [Getting started with the Web (MDN)][mdn-guide]
* [Introduction to Node.js][node-guide]
* [Comenzando con la Web (MDN)][mdn-guide]
* [Introducción a Node.js][node-guide]

Moreover, you'll have a better time understanding how Electron works if you get acquainted with Chromium's process model. You can get a brief overview of Chrome architecture with the [Chrome comic][comic], which was released alongside Chrome's launch back in 2008. Although it's been over a decade since then, the core principles introduced in the comic remain helpful to understand Electron.

Expand Down
55 changes: 48 additions & 7 deletions content/es-ES/docs/tutorial/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,63 @@ En Linux, la interfaz gráfica Unity además tiene una característica similar q

Los tres casos son cubiertos por la misma API - el método [`setProgressBar()`][setprogressbar] disponible en una instancia de `BrowserWindow`. Para indicar tu progreso, invoca este método con un número entre `0` y `1`. Por ejemplo, si tiene una tarea de larga ejecución que actualmente esta al 63% para completar, debería llamarlo como `setProgressBar(0.63)`.

Estableciendo el parámetro a valores negativos (p.ej. `-1`) eliminara el progress bar, mientras que estableciendo valores mas grandes que `1` (p.ej. `2`) cambiará el progress bar al modo indeterminado (Solo Windows -- de lo contrario se ajustará al 100%). En este modo un progress bar permanece activo pero no muestra un porcentaje real. Use este modo para situaciones cuando no sabe cuanto tiempo tomará una tarea en completarse.
Setting the parameter to negative values (e.g. `-1`) will remove the progress bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar in Windows or clamp to 100% in other operating systems. An indeterminate progress bar remains active but does not show an actual percentage, and is used for situations when you do not know how long an operation will take to complete.

Ver el [API documentation for more options and modes][setprogressbar].

## Ejemplo

Comenzando con una aplicación funcional de la [Guía de inicio rápido](quick-start.md), agregue las siguientes líneas al archivo `main.js`:
In this example, we add a progress bar to the main window that increments over time using Node.js timers.

```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()

win.setProgressBar(0.5)
const { app, BrowserWindow } = require('electron')

let progressInterval

function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})

win.loadFile('index.html')

const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms

let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)

// increment or reset progress bar
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```

Después de lanzar la aplicación Electron, debería ver la barra en el dock (macOS) o taskbar (Windows, Unity), indicando el porcentaje de progreso que acaba de definir.
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity) should show a progress bar that starts at zero and progresses through 100% to completion. It should then show indeterminate (Windows) or pin to 100% (other operating systems) briefly and then loop.

![macOS dock progress bar](../images/dock-progress-bar.png)

Expand Down
55 changes: 48 additions & 7 deletions content/fr-FR/docs/tutorial/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,63 @@ Sur Linux, l’interface graphique Unity dispose également d’une fonctionnali

Les trois cas sont couverts par la même API - la méthode [`setProgressBar()`][setprogressbar] disponible sur une instance de `BrowserWindows`. Pour indiquer l'état de la progression vous devez appeler cette méthode avec un nombre entre `0` et `1`. Par exemple: Si vous avez une tâche qui dure relativement longtemps et qui est en est actuellement à 63% avant sa finalisation, vous l'appelleriez avec `setProgressBar(0.63)`.

Toute valeur négative (par ex. `-1`) supprimera la barre de progression alors qu'une valeur supérieures à `1` (e. . `2`) basculera la barre de progression en mode indéterminée (sauf pour Windows où elle plafonnera à 100 %). Dans ce mode, une barre de progression reste active mais n'affiche pas le pourcentage réel. Utilisez ce mode lorsque vous ne savez pas combien de temps prendra une opération pour s'effectuer.
Setting the parameter to negative values (e.g. `-1`) will remove the progress bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar in Windows or clamp to 100% in other operating systems. An indeterminate progress bar remains active but does not show an actual percentage, and is used for situations when you do not know how long an operation will take to complete.

Voir la [documentation API pour plus d'options et de modes][setprogressbar].

## Exemple

Pour commencer avec une application fonctionnelle, dans le [Guide de démarrage rapide](quick-start.md), ajoutez les lignes suivantes au fichier `main.js`:
In this example, we add a progress bar to the main window that increments over time using Node.js timers.

```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()

win.setProgressBar(0.5)
const { app, BrowserWindow } = require('electron')

let progressInterval

function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})

win.loadFile('index.html')

const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms

let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)

// increment or reset progress bar
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```

Après avoir lancé l'application Electron, vous devriez voir la barre dans le dock (macOS) ou la barre des tâches (Windows ou sous Unity) qui indique le pourcentage de progression défini précédemment.
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity) should show a progress bar that starts at zero and progresses through 100% to completion. It should then show indeterminate (Windows) or pin to 100% (other operating systems) briefly and then loop.

![Barre de progression du dock macOS](../images/dock-progress-bar.png)

Expand Down
55 changes: 48 additions & 7 deletions content/ja-JP/docs/tutorial/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,63 @@ Linux では、Unity のグラフィカルインターフェイスにも同様

[`setProgressBar()`][setprogressbar] メソッドは、`BrowserWindow` のインスタンスから利用できます。 進捗状況を示すには、`0` から `1` の間の数でこのメソッドを呼び出します。 例えば、現在完了までの進捗率が 63% に達している長期のタスクがある場合、`setProgressBar(0.63)` のように呼び出します。

パラメータを負の値 (例えば `-1`) に設定するとプログレスバーは削除されますが、`1`より大きい値 (例えば `2`) に設定するとプログレスバーは不定モード (Windows のみ -- これ以外は 100% に切り捨てられます) に切り替わります。 このモードではプログレスバーはアクティブなままですが、実際のパーセンテージが表示されません。 このモードは、操作完了までの時間がわからない場合に使用します
引数を負の値 (例: `-1`) にすると、プログレスバーが取り除かれます。 `1` より大きい値にすると、Windows では不定のプログレスバーが表示され、他のオペレーティングシステムでは 100% に切り詰められます。 不定のプログレスバーはアクティブな状態を維持しますが、実際のパーセンテージは表示されません。これは、操作が完了するまでの時間がわからない場合に使用します

[より多くのオプションやモードについては API ドキュメント][setprogressbar] を参照してください。

## サンプル

[クイックスタートガイド](quick-start.md)の作業アプリケーションから始めて、次の行を `main.js` ファイルに追加します
この例では、Node.js のタイマーを使って時間経過で増えるプログレスバーをメインウインドウに追加しています

```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()

win.setProgressBar(0.5)
const { app, BrowserWindow } = require('electron')

let progressInterval

function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})

win.loadFile('index.html')

const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms

let c = 0
progressInterval = setInterval(() => {
// プログレスバーを次の値へと更新する
// 0 から 1 の値は進捗状況を示し、1 より大きい値は不定または 100% で留まります。
win.setProgressBar(c)

// プログレスバーの増加またはリセット
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// アプリが終了される前に、両方のタイマーを消去
app.on('before-quit', () => {
clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```

Electron アプリケーションを起動すると、Dock (macOS) またはタスクバー (Windows、Unity) にバーが表示され、設定した進捗率が表示されます
Electron アプリケーションを起動すると、Dock (macOS) またはタスクバー (Windows、Unity) にプログレスバーが表示され、0 から始まり 100% で完了します。 その後、不定の表示 (Windows) や 100% で留まった表示 (他のオペレーティングシステム) が短時間表示され、ループします

![macOS Dock プログレスバー](../images/dock-progress-bar.png)

Expand Down
55 changes: 48 additions & 7 deletions content/pt-BR/docs/tutorial/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,63 @@ On Linux, the Unity graphical interface also has a similar feature that allows y

All three cases are covered by the same API - the [`setProgressBar()`][setprogressbar] method available on an instance of `BrowserWindow`. To indicate your progress, call this method with a number between `0` and `1`. For example, if you have a long-running task that is currently at 63% towards completion, you would call it as `setProgressBar(0.63)`.

Setting the parameter to negative values (e.g. `-1`) will remove the progress bar, whereas setting it to values greater than `1` (e.g. `2`) will switch the progress bar to indeterminate mode (Windows-only -- it will clamp to 100% otherwise). In this mode, a progress bar remains active but does not show an actual percentage. Use this mode for situations when you do not know how long an operation will take to complete.
Setting the parameter to negative values (e.g. `-1`) will remove the progress bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar in Windows or clamp to 100% in other operating systems. An indeterminate progress bar remains active but does not show an actual percentage, and is used for situations when you do not know how long an operation will take to complete.

Veja a [documentação da API para mais opções e modos][setprogressbar].

## Exemplo

Começando com um aplicativo de trabalho do [Guia de início rápido](quick-start.md), adicione as seguintes linhas ao arquivo `main.js`:
In this example, we add a progress bar to the main window that increments over time using Node.js timers.

```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()

win.setProgressBar(0.5)
const { app, BrowserWindow } = require('electron')

let progressInterval

function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})

win.loadFile('index.html')

const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms

let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)

// increment or reset progress bar
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```

After launching the Electron application, you should see the bar in the dock (macOS) or taskbar (Windows, Unity), indicating the progress percentage you just defined.
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity) should show a progress bar that starts at zero and progresses through 100% to completion. It should then show indeterminate (Windows) or pin to 100% (other operating systems) briefly and then loop.

![macOS dock progress bar](../images/dock-progress-bar.png)

Expand Down
Loading

0 comments on commit 46d8bfc

Please sign in to comment.