Skip to content

Commit 6d7b6d7

Browse files
Translate title.md to Portuguese (#1023)
1 parent 30e703e commit 6d7b6d7

File tree

1 file changed

+26
-27
lines changed
  • src/content/reference/react-dom/components

1 file changed

+26
-27
lines changed

src/content/reference/react-dom/components/title.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ title: "<title>"
44

55
<Intro>
66

7-
The [built-in browser `<title>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) lets you specify the title of the document.
7+
O [componente `<title>` do navegador incorporado](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) permite que você especifique o título do documento.
88

99
```js
10-
<title>My Blog</title>
10+
<title>Meu Blog</title>
1111
```
1212

1313
</Intro>
@@ -16,45 +16,45 @@ The [built-in browser `<title>` component](https://developer.mozilla.org/en-US/d
1616

1717
---
1818

19-
## Reference {/*reference*/}
19+
## Referência {/*reference*/}
2020

2121
### `<title>` {/*title*/}
2222

23-
To specify the title of the document, render the [built-in browser `<title>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title). You can render `<title>` from any component and React will always place the corresponding DOM element in the document head.
23+
Para especificar o título do documento, renderize o [componente `<title>` de navegador incorporado](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title). Você pode renderizar o `<title>` de qualquer componente, e o React sempre colocará o elemento DOM correspondente no head do documento.
2424

2525
```js
26-
<title>My Blog</title>
26+
<title>Meu Blog</title>
2727
```
2828

29-
[See more examples below.](#usage)
29+
[Veja mais exemplos abaixo.](#usage)
3030

3131
#### Props {/*props*/}
3232

33-
`<title>` supports all [common element props.](/reference/react-dom/components/common#props)
33+
`<title>` suporta todas as [props de elementos comuns.](/reference/react-dom/components/common#props)
3434

35-
* `children`: `<title>` accepts only text as a child. This text will become the title of the document. You can also pass your own components as long as they only render text.
35+
* `children`: `<title>` aceita apenas texto como um filho. Este texto se tornará o título do documento. Você também pode passar seus próprios componentes desde que eles renderizem apenas texto.
3636

37-
#### Special rendering behavior {/*special-rendering-behavior*/}
37+
#### Comportamento de renderização especial {/*special-rendering-behavior*/}
3838

39-
React will always place the DOM element corresponding to the `<title>` component within the document’s `<head>`, regardless of where in the React tree it is rendered. The `<head>` is the only valid place for `<title>` to exist within the DOM, yet it’s convenient and keeps things composable if a component representing a specific page can render its `<title>` itself.
39+
O React sempre colocará o elemento DOM correspondente ao componente `<title>` dentro do `<head>` do documento, independentemente de onde na árvore React ele for renderizado. O `<head>` é o único lugar válido para `<title>` existir dentro do DOM, mas é conveniente e mantém as coisas compostas se um componente representando uma página específica pode renderizar seu próprio `<title>`.
4040

41-
There are two exception to this:
42-
* If `<title>` is within an `<svg>` component, then there is no special behavior, because in this context it doesn’t represent the document’s title but rather is an [accessibility annotation for that SVG graphic](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title).
43-
* If the `<title>` has an [`itemProp`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop) prop, there is no special behavior, because in this case it doesn’t represent the document’s title but rather metadata about a specific part of the page.
41+
Há duas exceções a isso:
42+
* Se `<title>` estiver dentro de um componente `<svg>`, então não há comportamento especial, porque nesse contexto ele não representa o título do documento, mas sim uma [anotação de acessibilidade para esse gráfico SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title).
43+
* Se o `<title>` tiver uma prop [`itemProp`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop), não há comportamento especial, porque nesse caso ele não representa o título do documento, mas sim metadados sobre uma parte específica da página.
4444

4545
<Pitfall>
4646

47-
Only render a single `<title>` at a time. If more than one component renders a `<title>` tag at the same time, React will place all of those titles in the document head. When this happens, the behavior of browsers and search engines is undefined.
47+
Renderize apenas um `<title>` por vez. Se mais de um componente renderizar uma tag `<title>` ao mesmo tempo, o React colocará todos esses títulos no head do documento. Quando isso acontece, o comportamento dos navegadores e mecanismos de busca fica indefinido.
4848

4949
</Pitfall>
5050

5151
---
5252

53-
## Usage {/*usage*/}
53+
## Uso {/*usage*/}
5454

55-
### Set the document title {/*set-the-document-title*/}
55+
### Definir o título do documento {/*set-the-document-title*/}
5656

57-
Render the `<title>` component from any component with text as its children. React will put a `<title>` DOM node in the document `<head>`.
57+
Renderize o componente `<title>` de qualquer componente com texto como seus filhos. O React colocará um nó DOM `<title>` no `<head>` do documento.
5858

5959
<SandpackWithHTMLOutput>
6060

@@ -64,27 +64,26 @@ import ShowRenderedHTML from './ShowRenderedHTML.js';
6464
export default function ContactUsPage() {
6565
return (
6666
<ShowRenderedHTML>
67-
<title>My Site: Contact Us</title>
68-
<h1>Contact Us</h1>
69-
<p>Email us at support@example.com</p>
67+
<title>Meu Site: Fale Conosco</title>
68+
<h1>Fale Conosco</h1>
69+
<p>Envie um e-mail para support@example.com</p>
7070
</ShowRenderedHTML>
7171
);
7272
}
7373
```
7474

7575
</SandpackWithHTMLOutput>
7676

77-
### Use variables in the title {/*use-variables-in-the-title*/}
77+
### Use variáveis no título {/*use-variables-in-the-title*/}
7878

79-
The children of the `<title>` component must be a single string of text. (Or a single number or a single object with a `toString` method.) It might not be obvious, but using JSX curly braces like this:
79+
Os filhos do componente `<title>` devem ser uma única string de texto. (Ou um único número ou um único objeto com um método `toString`.) Pode não ser óbvio, mas usar chaves JSX assim:
8080

8181
```js
82-
<title>Results page {pageNumber}</title> // 🔴 Problem: This is not a single string
82+
<title>Página de resultados {pageNumber}</title> // 🔴 Problema: Isso não é uma única string
8383
```
8484

85-
... actually causes the `<title>` component to get a two-element array as its children (the string `"Results page"` and the value of `pageNumber`). This will cause an error. Instead, use string interpolation to pass `<title>` a single string:
85+
... na verdade, faz com que o componente `<title>` receba um array de dois elementos como seus filhos (a string `"Página de resultados"` e o valor de `pageNumber`). Isso causará um erro. Em vez disso, use a interpolação de string para passar ao `<title>` uma única string:
8686

8787
```js
88-
<title>{`Results page ${pageNumber}`}</title>
89-
```
90-
88+
<title>{`Página de resultados ${pageNumber}`}</title>
89+
```

0 commit comments

Comments
 (0)