Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit128d0eb

Browse files
committed
Traslation
1 parentb070c86 commit128d0eb

File tree

4 files changed

+67
-66
lines changed

4 files changed

+67
-66
lines changed

‎2-ui/4-forms-controls/3-events-change-input/1-deposit-calculator/solution.view/index.html‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,33 @@
2323

2424
<body>
2525

26-
Deposit calculator.
26+
Calculadora de depósito.
2727

2828
<formname="calculator">
2929
<table>
3030
<tr>
31-
<td>Initial deposit</td>
31+
<td>Depósito inicial</td>
3232
<td>
3333
<inputname="money"type="number"value="10000"required>
3434
</td>
3535
</tr>
3636
<tr>
37-
<td>How many months?</td>
37+
<td>¿Cúantos meses?</td>
3838
<td>
3939
<selectname="months">
40-
<optionvalue="3">3 (minimum)</option>
41-
<optionvalue="6">6 (half-year)</option>
42-
<optionvalue="12"selected>12 (one year)</option>
43-
<optionvalue="18">18 (1.5years)</option>
44-
<optionvalue="24">24 (2years)</option>
45-
<optionvalue="30">30 (2.5years)</option>
46-
<optionvalue="36">36 (3years)</option>
47-
<optionvalue="60">60 (5 years)</option>
40+
<optionvalue="3">3 (mínimo)</option>
41+
<optionvalue="6">6 (medio año)</option>
42+
<optionvalue="12"selected>12 (un año)</option>
43+
<optionvalue="18">18 (1.5años)</option>
44+
<optionvalue="24">24 (2años)</option>
45+
<optionvalue="30">30 (2.5años)</option>
46+
<optionvalue="36">36 (3años)</option>
47+
<optionvalue="60">60 (5años)</option>
4848
</select>
4949
</td>
5050
</tr>
5151
<tr>
52-
<td>Interest per year?</td>
52+
<td>¿Interés anual?</td>
5353
<td>
5454
<inputname="interest"type="number"value="5"required>
5555
</td>
@@ -62,8 +62,8 @@
6262

6363
<tableid="diagram">
6464
<tr>
65-
<th>Was:</th>
66-
<th>Becomes:</th>
65+
<th>Inicial:</th>
66+
<th>Final:</th>
6767
</tr>
6868
<tr>
6969
<thid="money-before"></th>

‎2-ui/4-forms-controls/3-events-change-input/1-deposit-calculator/source.view/index.html‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,33 @@
2323

2424
<body>
2525

26-
Deposit calculator.
26+
Calculadora de depósito.
2727

2828
<formname="calculator">
2929
<table>
3030
<tr>
31-
<td>Initial deposit</td>
31+
<td>Depósito inicial</td>
3232
<td>
3333
<inputname="money"type="number"value="10000"required>
3434
</td>
3535
</tr>
3636
<tr>
37-
<td>How many months?</td>
37+
<td>¿Cúantos meses?</td>
3838
<td>
3939
<selectname="months">
40-
<optionvalue="3">3 (minimum)</option>
41-
<optionvalue="6">6 (half-year)</option>
42-
<optionvalue="12"selected>12 (one year)</option>
43-
<optionvalue="18">18 (1.5years)</option>
44-
<optionvalue="24">24 (2years)</option>
45-
<optionvalue="30">30 (2.5years)</option>
46-
<optionvalue="36">36 (3years)</option>
47-
<optionvalue="60">60 (5 years)</option>
40+
<optionvalue="3">3 (mínimo)</option>
41+
<optionvalue="6">6 (medio año)</option>
42+
<optionvalue="12"selected>12 (un año)</option>
43+
<optionvalue="18">18 (1.5años)</option>
44+
<optionvalue="24">24 (2años)</option>
45+
<optionvalue="30">30 (2.5años)</option>
46+
<optionvalue="36">36 (3años)</option>
47+
<optionvalue="60">60 (5años)</option>
4848
</select>
4949
</td>
5050
</tr>
5151
<tr>
52-
<td>Interest per year?</td>
52+
<td>¿Interés anual?</td>
5353
<td>
5454
<inputname="interest"type="number"value="5"required>
5555
</td>
@@ -62,8 +62,8 @@
6262

6363
<tableid="diagram">
6464
<tr>
65-
<th>Was:</th>
66-
<th>Becomes:</th>
65+
<th>Inicial:</th>
66+
<th>Final:</th>
6767
</tr>
6868
<tr>
6969
<thid="money-before"></th>

‎2-ui/4-forms-controls/3-events-change-input/1-deposit-calculator/task.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ importance: 5
22

33
---
44

5-
#Deposit calculator
5+
#Calculadora de depósito
66

7-
Create an interface that allows to enter a sum of bank deposit and percentage, then calculates how much it will be after given periods of time.
7+
Crea una interfaz que permita ingresar una suma de depósito bancario y porcentaje, luego calcula cuanto será después de un periodo de tiempo determinado.
88

9-
Here's the demo:
9+
Acá una demostración:
1010

1111
[iframe src="solution" height="350" border="1"]
1212

13-
Any input change should be processed immediately.
13+
Cualquier modificación debe ser procesada de inmediato.
1414

15-
The formula is:
15+
La fórmula es:
1616
```js
17-
// initial:the initial money sum
18-
// interest: e.g. 0.05means 5%per year
19-
// years:how many years to wait
17+
// initial:la suma inicial de dinero
18+
// interest: e.g. 0.05significa 5%anual
19+
// years:cuantos años esperar
2020
let result=Math.round(initial* (1+ interest* years));
2121
```
Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
#Events: change, input, cut, copy, paste
1+
#Eventos: change, input, cut, copy, paste
22

3-
Let's cover various events that accompany data updates.
3+
Veamos varios eventos que acompañan la actualzación de datos.
44

5-
##Event: change
5+
##Evento: change
66

7-
The`change`event triggers when the element has finished changing.
7+
El evento`change`se activa cuando el elemento finaliza un cambio.
88

9-
For text inputs that means that the event occurs when it loses focus.
9+
Para ingreso de texto significa que el evento ocurre cuando se pierde foco en el elemento.
1010

11-
For instance, while we are typing in the text field below --there'snoevent. But when we move thefocussomewhere else, for instance,clickon a button -- there will be a`change` event:
11+
Por ejemplo, mientras estamos escribiendo en el siguiente cuadro de texto -- nohay evento. Pero cuando movemos elfocusa otro lado, por ejemplo hacemosclicken un botón, entonces ocurre el evento`change`:
1212

1313
```html autorun height=40 run
1414
<inputtype="text"onchange="alert(this.value)">
1515
<inputtype="button"value="Button">
1616
```
1717

18-
For other elements:`select`,`input type=checkbox/radio`it triggers right after the selection changes:
18+
Para otros elementos:`select`,`input type=checkbox/radio`ocurre justo después de cambiar la opción seleccionada:
1919

2020
```html autorun height=40 run
2121
<selectonchange="alert(this.value)">
@@ -27,13 +27,13 @@ For other elements: `select`, `input type=checkbox/radio` it triggers right afte
2727
```
2828

2929

30-
##Event: input
30+
##Evento: input
3131

32-
The`input`event triggers every time after a value is modified by the user.
32+
El evento`input`ocurre cada vez que un valor es modificado por el ususario.
3333

34-
Unlike keyboard events, it triggers on any value change, even those that does not involve keyboard actions: pasting with a mouseor using speech recognition to dictate the text.
34+
A diferencia de los eventos de teclado, ocurre con el cambio a cualquier valor, incluso aquellos no que involucran acciones de teclado: copiar/pegar con el mouseo usar reconocimiento de voz para dictar texto.
3535

36-
For instance:
36+
Por ejemplo:
3737

3838
```html autorun height=40 run
3939
<inputtype="text"id="input"> oninput: <spanid="result"></span>
@@ -44,25 +44,26 @@ For instance:
4444
</script>
4545
```
4646

47-
If we want to handle every modification of an`<input>`then this event is the best choice.
47+
Si queremos manejar cualquier modificación en un`<input>`entonces este evento es la mejor opción.
4848

49-
On the other hand,`input`event doesn't trigger on keyboard input and other actions that do not involve value change, e.g. pressing arrow keys`key:⇦``key:⇨`while in the input.
49+
Por otro lado, el evento`input`no ocurre con ingresos de teclado u otras acciones que no involucren modificar un valor, e.g presionar las flechas de dirección`key:⇦``key:⇨`mientras se está en el input.
5050

5151
```smart header="Can't prevent anything in`oninput`"
52-
The`input`event occurs after the value is modified.
52+
El evento`input`ocurre después de que el valor es modificado.
5353

54-
So we can't use`event.preventDefault()`there--it's just too late, there would be noeffect.
54+
Por lo tanto no podemos usar`event.preventDefault()`en este caso--ya es muy tarde por lo que nohabría efecto.
5555
```
5656
57-
##Events: cut, copy, paste
57+
##Eventos: cut, copy, paste
5858
59-
These events occur on cutting/copying/pasting a value.
59+
Estos eventos ocurren al cortar/copiar/pegar un valor.
6060
61-
They belong to[ClipboardEvent](https://www.w3.org/TR/clipboard-apis/#clipboard-event-interfaces)class and provide access to the data that is copied/pasted.
61+
Estos pertenecen a la clase[ClipboardEvent](https://www.w3.org/TR/clipboard-apis/#clipboard-event-interfaces)y proveen acceso a los datos copiados/pegados.
6262
63-
We also can use `event.preventDefault()` to abort the action, then nothing gets copied/pasted.
63+
También podemos usar `event.preventDefault()`para cancelar la acción y que nada sea copiado/pegado.
64+
65+
Por ejemplo, el código siguiente previene tales eventos y muestra que es los que estamos intentando cortar/copiar/pegar:
6466
65-
For instance, the code below prevents all such events and shows what we are trying to cut/copy/paste:
6667
6768
```html autorun height=40 run
6869
<input type="text" id="input">
@@ -74,20 +75,20 @@ For instance, the code below prevents all such events and shows what we are tryi
7475
</script>
7576
```
7677

77-
Please note, that it's possible to copy/paste not just text, but everything. For instance, we can copy a file in the OS file manager, and paste it.
78+
Por favor ten en cuenta que no solo es posible copiar/pegar texto, sino cualquier cosa. Por ejemplo, podemos copiar un archivo en el gestor de archivos del SO y pegarlo.
7879

79-
There's a list of methods[in the specification](https://www.w3.org/TR/clipboard-apis/#dfn-datatransfer)that can work with different data types including files, read/write to the clipboard.
80+
Hay una lista de métodos[en la especificación](https://www.w3.org/TR/clipboard-apis/#dfn-datatransfer)que puede trabajar con diferentes tipos de datos incluyendo archivos, leer/escribir del portapapeles.
8081

81-
But please note that clipboard is a"global"OS-level thing. Most browsers allow read/write access to the clipboard only in the scope of certain user actions for the safety, e.g.in`onclick` event handlers.
82+
Pero ten en cuenta que el portapapeles es algo a nivel"global"del SO. La mayoría de los navegadores dan acceso a leer/escribir del portapapeles dentro del alcance del usuario por cuestiones de seguridad, e.g.al manejar eventos`onclick`.
8283

83-
Also it's forbidden to generate "custom" clipboard events with`dispatchEvent`in all browsers except Firefox.
84+
Además está prohibido generar eventos "personalizados" del portapapeles con`dispatchEvent`en todos los navegadores excepto Firefox.
8485

85-
##Summary
86+
##Resumen
8687

87-
Data change events:
88+
Eventos de modificación de datos:
8889

89-
|Event|Description|Specials|
90+
|Evento|Descripción|Especiales|
9091
|---------|----------|-------------|
91-
|`change`|A value was changed.|For text inputs triggers on focus loss.|
92-
|`input`|For text inputs on every change.| Triggers immediately unlike`change`.|
93-
|`cut/copy/paste`|Cut/copy/paste actions.| The action can be prevented. The`event.clipboardData`property gives read/write access to the clipboard.|
92+
|`change`|Un valor fue cambiado.|Para ingreso de texto, ocurre al perderse el focus|
93+
|`input`|Para ingresos de texto en cada cambio| Ocurre inmediatamente a diferencia de`change`.|
94+
|`cut/copy/paste`|Acciones cortar/copiar/pegar| La acción uede ser cancelada. La propiedad`event.clipboardData`brinda acceso a leer/escribir del portapeles.|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp