Skip to content

Commit 689a92d

Browse files
committed
feat: translation solution and task.md
1 parent 15cd75f commit 689a92d

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

2-ui/4-forms-controls/4-forms-submit/1-modal-dialog/solution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A modal window can be implemented using a half-transparent `<div id="cover-div">` that covers the whole window, like this:
1+
Uma janela de modal pode ser implementada usando um elemento semitransparente `<div id="cover-div">` que cobre toda a janela, como por exemplo:
22

33
```css
44
#cover-div {
@@ -13,8 +13,8 @@ A modal window can be implemented using a half-transparent `<div id="cover-div">
1313
}
1414
```
1515

16-
Because the `<div>` covers everything, it gets all clicks, not the page below it.
16+
Por conta da `<div>` cobrir todo o espaço, irá capturar todos os cliques feito dentro nela, e não na página abaixo dela.
1717

18-
Also we can prevent page scroll by setting `body.style.overflowY='hidden'`.
18+
Também podemos impedir a rolagem da página definindo `body.style.overflowY='hidden'`.
1919

20-
The form should be not in the `<div>`, but next to it, because we don't want it to have `opacity`.
20+
O formulário não deve estar dentro da `<div>`, mas sim ao lado dela, porque não queremos que ele tenha `opacity`.

2-ui/4-forms-controls/4-forms-submit/1-modal-dialog/task.md

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

33
---
44

5-
# Modal form
5+
# Formuário modal
66

7-
Create a function `showPrompt(html, callback)` that shows a form with the message `html`, an input field and buttons `OK/CANCEL`.
7+
Crie uma função `showPrompt(html, callback)` onde mostra um formulário com uma mensagem `html`, um campo de entrada e botões `OK/CANCEL`.
88

9-
- A user should type something into a text field and press `key:Enter` or the OK button, then `callback(value)` is called with the value they entered.
10-
- Otherwise if the user presses `key:Esc` or CANCEL, then `callback(null)` is called.
9+
- Um usuário deve esprever algo dentro do campo de texto e pressionar `key:Enter` ou o botão de OK button, então é chamado o `callback(value)` com o valor que foi inserido.
10+
- Porém, se o usuário pressionar `key:Esc` ou CANCEL, então `callback(null)` é chamado.
1111

12-
In both cases that ends the input process and removes the form.
12+
Em ambos os casos, isso encerra o processo de entrada e remove o formulário.
1313

14-
Requirements:
14+
Requisitos:
1515

16-
- The form should be in the center of the window.
17-
- The form is *modal*. In other words, no interaction with the rest of the page is possible until the user closes it.
18-
- When the form is shown, the focus should be inside the `<input>` for the user.
19-
- Keys `key:Tab`/`key:Shift+Tab` should shift the focus between form fields, don't allow it to leave for other page elements.
16+
- O formulário deve estar no centro da janela.
17+
- O formulário é um *modal*. Em outras palavras, não será possível interagir com o restante da página até que o usuário a feche.
18+
- Quando o formulário for exibido, o foco do usuário deverá estar dentro do campo `<input>`.
19+
- As teclas `key:Tab`/`key:Shift+Tab` devem alternar o foco entre os campos do formulário, não permitindo que o foco saia para outros elementos da página.
2020

21-
Usage example:
21+
Exemplo de uso:
2222

2323
```js
2424
showPrompt("Enter something<br>...smart :)", function(value) {
2525
alert(value);
2626
});
2727
```
2828

29-
A demo in the iframe:
29+
Uma demonstração dentro de um iframe:
3030

3131
[iframe src="solution" height=160 border=1]
3232

33-
P.S. The source document has HTML/CSS for the form with fixed positioning, but it's up to you to make it modal.
33+
Obs: O documento de origem contém HTML/CSS para o formulário com posicionamento fixo, mas cabe a você torná-lo um modal.

0 commit comments

Comments
 (0)