Skip to content

🌐 Add Portuguese translation for docs/pt/docs/advanced/websockets.md#12703

Merged
alejsdev merged 3 commits into
fastapi:masterfrom
devfernandoa:pt-translation-websockets
Oct 31, 2024
Merged

🌐 Add Portuguese translation for docs/pt/docs/advanced/websockets.md#12703
alejsdev merged 3 commits into
fastapi:masterfrom
devfernandoa:pt-translation-websockets

Conversation

@devfernandoa

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the lang-all Translations label Oct 28, 2024
@github-actions

Copy link
Copy Markdown
Contributor

@alejsdev alejsdev added lang-pt Portuguese translations awaiting-review labels Oct 28, 2024
@alejsdev alejsdev changed the title 🌐 Add Portuguese translation for docs/pt/docs/how-to/websockets.md 🌐 Add Portuguese translation for docs/pt/docs/advanced/websockets.md Oct 28, 2024

@nazarepiedady nazarepiedady left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did great work. Thanks for your collaboration.

@nazarepiedady

Copy link
Copy Markdown
Contributor

@ceb10n and @cassiobotaro, which one of you have time to review this pull request?

@ceb10n ceb10n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @devfernandoa

Just some typos and suggestions

And it would be nice to use the new style for includes described in the issue: Update docs include syntax for source examples #12554

Comment thread docs/pt/docs/advanced/websockets.md Outdated
@@ -0,0 +1,257 @@
# WebSockets

Você pode usar <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API" class="external-link" target="_blank">WebSockets</a> com **FastAPI**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two spaces here:
Você pode usar <a href...

Just remove one so it doesn't look strange :D

Comment thread docs/pt/docs/advanced/websockets.md Outdated
{!../../docs_src/websockets/tutorial001.py!}
```

/// note | "Detalhes Técnicos"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the double quotes here:

/// note | Detalhes Técnicos

Comment thread docs/pt/docs/advanced/websockets.md Outdated

## Aguardar por mensagens e enviar mensagens

Em seu rota WebSocket você pode `await` por mensagens e enviar mensagens.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to:

Em sua rota...

And I think it's a little strange: você pode await por mensagens

In english it makes sense, but when translating, it loses the sense...

I think you can translate using something like:

Em sua rota WebSocket você pode esperar (await) por mensagens e enviar mensagens.

Comment thread docs/pt/docs/advanced/websockets.md Outdated

</div>

Abra seu broser em: <a href="http://127.0.0.1:8000" class="external-link" target="_blank">http://127.0.0.1:8000</a>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed the w in browser: Abra seu browser em...

But I think you can use:

Abra o seu navegador em...

Comment thread docs/pt/docs/advanced/websockets.md Outdated
* `Path`
* `Query`

They work the same way as for other FastAPI endpoints/*path operations*:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be removed :D


</div>

Abrar seu browser em: <a href="http://127.0.0.1:8000" class="external-link" target="_blank">http://127.0.0.1:8000</a>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can translate browser here (and remove the r in Abra):

Abra o seu navegador em: ...

Comment thread docs/pt/docs/advanced/websockets.md Outdated
* O "Item ID", usado na rota.
* O "Token" usado como um parâmetro de consulta.

/// tip | dica

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a capital letter here:

/// tip | Dica

Comment thread docs/pt/docs/advanced/websockets.md Outdated

Quando uma conexão WebSocket é fechada, o `await websocket.receive_text()` levantará uma exceção `WebSocketDisconnect`, que você pode então capturar e lidar como neste exemplo.

//// tab | Python 3.9+

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can replace all the code with:

{* ../../docs_src/websockets/tutorial003_py39.py hl[79:81] *}

See this issue for reference: Update docs include syntax for source examples #12554


Para testar:

* Abrar o aplicativo com várias abas do navegador.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the r:

Abra o aplicativo...

Comment thread docs/pt/docs/advanced/websockets.md Outdated
Client #1596980209979 left the chat
```

/// tip | dica

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a capital letter here:

/// tip | Dica

@devfernandoa

Copy link
Copy Markdown
Contributor Author

Just fixed everything you mentioned, thanks @ceb10n !

@ceb10n ceb10n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast! ⚡

@github-actions

Copy link
Copy Markdown
Contributor

@alejsdev alejsdev enabled auto-merge (squash) October 31, 2024 12:19
@alejsdev

Copy link
Copy Markdown
Member

Thanks for your contribution! @devfernandoa 🎉
And thanks for the reviews and suggestions @ceb10n 🔍

@alejsdev alejsdev merged commit b7102a2 into fastapi:master Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-2 lang-all Translations lang-pt Portuguese translations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants