Skip to content

Commit e39f5f8

Browse files
committed
Improving translation of api/directives.md to portuguese (issue found on v-bind directive)
1 parent 273c35f commit e39f5f8

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

src/api/directives.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,96 +6,96 @@
66

77
- **Detalhes:**
88

9-
Updates the element's [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent). If you need to update the part of `textContent`, you should use [mustache interpolations](/guide/template-syntax.html#text) instead
9+
Atualiza o [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) do elemento. Se você precisa atualizar a parte de `textContent`, você deve usar [interpolações mustache](/guide/template-syntax.html#text).
1010

1111
- **Exemplo:**
1212

1313
```html
1414
<span v-text="msg"></span>
15-
<!-- same as -->
15+
<!-- o mesmo que -->
1616
<span>{{msg}}</span>
1717
```
1818

19-
- **Ver também:** [Data Binding Syntax - Interpolations](../guide/template-syntax.html#text)
19+
- **Ver também:** [Sintaxe de Templates - Interpolações](../guide/template-syntax.html#text)
2020

2121
## v-html
2222

2323
- **Espera:** `string`
2424

2525
- **Detalhes:**
2626

27-
Updates the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML). **Note that the contents are inserted as plain HTML - they will not be compiled as Vue templates**. If you find yourself trying to compose templates using `v-html`, try to rethink the solution by using components instead.
27+
Atualiza o [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML) do elemento. **Perceba que os conteúdos são inseridos como HTML puro - eles não serão compilados como templates Vue**. Se você se encontra tentando compor templates usando `v-html`, tente repensar a solução usando componentes em vez disso.
2828

2929
::: warning
30-
Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use `v-html` on trusted content and **never** on user-provided content.
30+
Renderizar dinamicamente HTML arbitrário em seu website pode ser muito perigoso porque isso pode facilmente levar a [ataques XSS](https://en.wikipedia.org/wiki/Cross-site_scripting). Apenas use `v-html` em conteúdo confiável e **nunca** em conteúdo fornecido por usuário.
3131
:::
3232

33-
In [single-file components](../guide/single-file-component.html), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html) or an additional, global `<style>` element with a manual scoping strategy such as BEM.
33+
Em [Componentes Single File](../guide/single-file-component.html), estilos `scoped` não serão aplicados a conteúdos `v-html`, pois tal HTML não é processado pelo compilador de templates do Vue. Se você quer atingir conteúdo `v-html` com CSS com escopo, é possível utilizar [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html) ou um elemento global adicional `<style>` , com uma estratégia manual de escopo como BEM.
3434

3535
- **Exemplo:**
3636

3737
```html
3838
<div v-html="html"></div>
3939
```
4040

41-
- **Ver também:** [Data Binding Syntax - Interpolations](../guide/template-syntax.html#raw-html)
41+
- **Ver também:** [Sintaxe de Templates - Interpolações](../guide/template-syntax.html#raw-html)
4242

4343
## v-show
4444

4545
- **Espera:** `any`
4646

4747
- **Uso:**
4848

49-
Toggles the element's `display` CSS property based on the truthy-ness of the expression value.
49+
Alterna a propriedade CSS `display` do elemento baseado na condição de verdade do valor da expressão.
5050

51-
This directive triggers transitions when its condition changes.
51+
Esta diretiva dispara transições quando sua condição muda.
5252

53-
- **Ver também:** [Conditional Rendering - v-show](../guide/conditional.html#v-show)
53+
- **Ver também:** [Renderização Condicional - v-show](../guide/conditional.html#v-show)
5454

5555
## v-if
5656

5757
- **Espera:** `any`
5858

5959
- **Uso:**
6060

61-
Conditionally render the element based on the truthy-ness of the expression value. The element and its contained directives / components are destroyed and re-constructed during toggles. If the element is a `<template>` element, its content will be extracted as the conditional block.
61+
Renderiza condicionalmente o elemento baseado na condição de verdade do valor da expressão. O elemento e suas diretivas/componentes contidos são destruídos e reconstruídos durante alternâncias (*toggles*). Se o elemento é um `<template>`, o seu conteúdo será extraído como o bloco condicional.
6262

63-
This directive triggers transitions when its condition changes.
63+
Esta diretiva dispara transições quando sua condição muda.
6464

65-
When used together, `v-if` has a higher priority than `v-for`. We don't recommend using these two directives together on one element — see the [list rendering guide](../guide/list.html#v-for-with-v-if) for details.
65+
Quando usada em conjunto com `v-if`, `v-for` tem uma prioridade maior. Não recomendamos o uso dessas duas diretivas juntas em um elemento - consulte a [guia de renderização de listas](../guide/list.html#v-for-with-v-if) para obter detalhes.
6666

67-
- **Ver também:** [Conditional Rendering - v-if](../guide/conditional.html#v-if)
67+
- **Ver também:** [Renderização Condicional - v-if](../guide/conditional.html#v-if)
6868

6969
## v-else
7070

7171
- **Não espera expressão**
7272

73-
- **Restriction:** previous sibling element must have `v-if` or `v-else-if`.
73+
- **Restriction:** o elemento-irmão anterior deve ter `v-if` ou `v-else-if`.
7474

7575
- **Uso:**
7676

77-
Denote the "else block" for `v-if` or a `v-if`/`v-else-if` chain.
77+
Significa o bloco "senão" de uma cadeia `v-if` ou `v-if`/`v-else-if`.
7878

7979
```html
8080
<div v-if="Math.random() > 0.5">
81-
Now you see me
81+
Agora você me vê
8282
</div>
8383
<div v-else>
84-
Now you don't
84+
Agora você não me vê
8585
</div>
8686
```
8787

88-
- **Ver também:** [Conditional Rendering - v-else](../guide/conditional.html#v-else)
88+
- **Ver também:** [Renderização Condicional - v-else](../guide/conditional.html#v-else)
8989

9090
## v-else-if
9191

9292
- **Espera:** `any`
9393

94-
- **Restriction:** previous sibling element must have `v-if` or `v-else-if`.
94+
- **Restriction:** o elemento-irmão anterior deve ter `v-if` ou `v-else-if`.
9595

9696
- **Uso:**
9797

98-
Denote the "else if block" for `v-if`. Can be chained.
98+
Significa o bloco "senão caso" para `v-if`. Pode ser encadeado.
9999

100100
```html
101101
<div v-if="type === 'A'">
@@ -108,48 +108,48 @@
108108
C
109109
</div>
110110
<div v-else>
111-
Not A/B/C
111+
Não A/B/C
112112
</div>
113113
```
114114

115-
- **Ver também:** [Conditional Rendering - v-else-if](../guide/conditional.html#v-else-if)
115+
- **Ver também:** [Renderização Condicional - v-else-if](../guide/conditional.html#v-else-if)
116116

117117
## v-for
118118

119119
- **Espera:** `Array | Object | number | string | Iterable`
120120

121121
- **Uso:**
122122

123-
Render the element or template block multiple times based on the source data. The directive's value must use the special syntax `alias in expression` to provide an alias for the current element being iterated on:
123+
Renderiza o elemento ou bloco de template múltiplas vezes baseado nos dados de origem (*source data*). O valor da diretiva deve usar a sintaxe especial `alias in expression` para fornecer um alias para o elemento atual ser iterado em:
124124

125125
```html
126126
<div v-for="item in items">
127127
{{ item.text }}
128128
</div>
129129
```
130130

131-
Alternatively, you can also specify an alias for the index (or the key if used on an Object):
131+
Alternativamente, você também pode especificar um alias para o índice (ou a chave, se usada em um Objeto):
132132

133133
```html
134134
<div v-for="(item, index) in items"></div>
135135
<div v-for="(value, key) in object"></div>
136136
<div v-for="(value, name, index) in object"></div>
137137
```
138138

139-
The default behavior of `v-for` will try to patch the elements in-place without moving them. To force it to reorder elements, you should provide an ordering hint with the `key` special attribute:
139+
O comportamento padrão de `v-for` tentará corrigir os elementos no local sem os mover. Para forçá-lo a reordenar elementos, você precisa fornecer uma sugestão de ordenação com o atributo especial `key`:
140140

141141
```html
142142
<div v-for="item in items" :key="item.id">
143143
{{ item.text }}
144144
</div>
145145
```
146146

147-
`v-for` can also work on values that implement the [Iterable Protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol), including native `Map` and `Set`.
147+
`v-for` também pode trabalhar em valores que implementam o [Protocolo Iterável](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol), incluindo `Map` e `Set` nativos.
148148

149-
The detailed usage for `v-for` is explained in the guide section linked below.
149+
O uso detalhado de `v-for` é explicado na seção de Guia com link abaixo.
150150

151151
- **Ver também:**
152-
- [List Rendering](../guide/list.html)
152+
- [Renderização de Listas](../guide/list.html)
153153

154154
## v-on
155155

@@ -161,79 +161,79 @@
161161

162162
- **Modificadores:**
163163

164-
- `.stop` - call `event.stopPropagation()`.
165-
- `.prevent` - call `event.preventDefault()`.
166-
- `.capture` - add event listener in capture mode.
167-
- `.self` - only trigger handler if event was dispatched from this element.
168-
- `.{keyAlias}` - only trigger handler on certain keys.
169-
- `.once` - trigger handler at most once.
170-
- `.left` - only trigger handler for left button mouse events.
171-
- `.right` - only trigger handler for right button mouse events.
172-
- `.middle` - only trigger handler for middle button mouse events.
173-
- `.passive` - attaches a DOM event with `{ passive: true }`.
164+
- `.stop` - chama `event.stopPropagation()`.
165+
- `.prevent` - chama `event.preventDefault()`.
166+
- `.capture` - adiciona escuta de eventos em modo de captura.
167+
- `.self` - aciona o manipulador somente se o evento foi disparado a partir deste elemento.
168+
- `.{keyAlias}` - aciona o manipulador apenas em certas chaves.
169+
- `.once` - aciona o manipulador somente uma vez.
170+
- `.left` - aciona o manipulador somente para eventos do botão esquerdo do mouse.
171+
- `.right` - aciona o manipulador somente para eventos do botão direito do mouse.
172+
- `.middle` - aciona o manipulador somente para eventos do botão do meio do mouse.
173+
- `.passive` - atribui um evento ao DOM com `{ passive: true }`.
174174

175175
- **Uso:**
176176

177-
Attaches an event listener to the element. The event type is denoted by the argument. The expression can be a method name, an inline statement, or omitted if there are modifiers present.
177+
Atribui uma escuta de evento ao elemento. O tipo de evento é indicado pelo argumento. A expressão pode ser um nome de método, uma declaração *inline*, ou omitida quando há modificadores presentes.
178178

179-
When used on a normal element, it listens to [**native DOM events**](https://developer.mozilla.org/en-US/docs/Web/Events) only. When used on a custom element component, it listens to **custom events** emitted on that child component.
179+
Quando usada em um elemento normal, escuta somente [**eventos nativos de DOM**](https://developer.mozilla.org/en-US/docs/Web/Events). Quando usada em um componente de elemento personalizado, escuta **eventos personalizados** emitidos naquele componente-filho.
180180

181-
When listening to native DOM events, the method receives the native event as the only argument. If using inline statement, the statement has access to the special `$event` property: `v-on:click="handle('ok', $event)"`.
181+
Quando escutando a eventos nativos de DOM, o método recebe o evento nativo como argumento único. Quando usada declaração *inline*, ela tem acesso à propriedade especial `$event`: `v-on:click="handle('ok', $event)"`.
182182

183183
`v-on` also supports binding to an object of event/listener pairs without an argument. Note when using the object syntax, it does not support any modifiers.
184184

185185
- **Exemplo:**
186186

187187
```html
188-
<!-- method handler -->
188+
<!-- manipulador de método -->
189189
<button v-on:click="doThis"></button>
190190

191-
<!-- dynamic event -->
191+
<!-- evento dinâmico -->
192192
<button v-on:[event]="doThis"></button>
193193

194-
<!-- inline statement -->
194+
<!-- declaração inline -->
195195
<button v-on:click="doThat('hello', $event)"></button>
196196

197-
<!-- shorthand -->
197+
<!-- forma abreviada -->
198198
<button @click="doThis"></button>
199199

200-
<!-- shorthand dynamic event -->
200+
<!-- forma abreviada para o evento dinâmico -->
201201
<button @[event]="doThis"></button>
202202

203-
<!-- stop propagation -->
203+
<!-- para a propagação -->
204204
<button @click.stop="doThis"></button>
205205

206-
<!-- prevent default -->
206+
<!-- previne padrão -->
207207
<button @click.prevent="doThis"></button>
208208

209-
<!-- prevent default without expression -->
209+
<!-- previne padrão sem expressão -->
210210
<form @submit.prevent></form>
211211

212-
<!-- chain modifiers -->
212+
<!-- modificador em cadeia -->
213213
<button @click.stop.prevent="doThis"></button>
214214

215-
<!-- key modifier using keyAlias -->
215+
<!-- modificador de chave usando keyAlias -->
216216
<input @keyup.enter="onEnter" />
217217

218-
<!-- the click event will be triggered at most once -->
218+
<!-- o evento de clique será acionado somente uma vez -->
219219
<button v-on:click.once="doThis"></button>
220220

221-
<!-- object syntax -->
221+
<!-- sintaxe de objeto -->
222222
<button v-on="{ mousedown: doThis, mouseup: doThat }"></button>
223223
```
224224

225-
Listening to custom events on a child component (the handler is called when "my-event" is emitted on the child):
225+
Escutando eventos personalizados em um componente-filho (o manipulador é chamado quando “my-event” é emitido no filho):
226226

227227
```html
228228
<my-component @my-event="handleThis"></my-component>
229229

230-
<!-- inline statement -->
230+
<!-- declaração inline -->
231231
<my-component @my-event="handleThis(123, $event)"></my-component>
232232
```
233233

234234
- **Ver também:**
235-
- [Event Handling](../guide/events.html)
236-
- [Components - Custom Events](../guide/component-basics.html#listening-to-child-components-events)
235+
- [Manipulação de Eventos](../guide/events.html)
236+
- [Componentes - Eventos Personalizados](../guide/component-basics.html#listening-to-child-components-events)
237237

238238
## v-bind
239239

@@ -245,7 +245,7 @@
245245

246246
- **Modificadores:**
247247

248-
- `.camel` - transform the kebab-case attribute name into camelCase.
248+
- `.camel` - transforma o nome do atributo de kebab-case para camelCase.
249249

250250
- **Uso:**
251251

0 commit comments

Comments
 (0)