🌐 Add Portuguese translation for docs/pt/docs/advanced/websockets.md#12703
Conversation
|
📝 Docs preview for commit 84c0f49 at: https://96f615a0.fastapitiangolo.pages.dev Modified Pages |
docs/pt/docs/advanced/websockets.md
nazarepiedady
left a comment
There was a problem hiding this comment.
You did great work. Thanks for your collaboration.
|
@ceb10n and @cassiobotaro, which one of you have time to review this pull request? |
ceb10n
left a comment
There was a problem hiding this comment.
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
| @@ -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**. | |||
There was a problem hiding this comment.
There are two spaces here:
Você pode usar <a href...
Just remove one so it doesn't look strange :D
| {!../../docs_src/websockets/tutorial001.py!} | ||
| ``` | ||
|
|
||
| /// note | "Detalhes Técnicos" |
There was a problem hiding this comment.
You can remove the double quotes here:
/// note | Detalhes Técnicos
|
|
||
| ## Aguardar por mensagens e enviar mensagens | ||
|
|
||
| Em seu rota WebSocket você pode `await` por mensagens e enviar mensagens. |
There was a problem hiding this comment.
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.
|
|
||
| </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>. |
There was a problem hiding this comment.
missed the w in browser: Abra seu browser em...
But I think you can use:
Abra o seu navegador em...
| * `Path` | ||
| * `Query` | ||
|
|
||
| They work the same way as for other FastAPI endpoints/*path operations*: |
There was a problem hiding this comment.
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>. |
There was a problem hiding this comment.
You can translate browser here (and remove the r in Abra):
Abra o seu navegador em: ...
| * O "Item ID", usado na rota. | ||
| * O "Token" usado como um parâmetro de consulta. | ||
|
|
||
| /// tip | dica |
There was a problem hiding this comment.
You can use a capital letter here:
/// tip | Dica
|
|
||
| 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+ |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
remove the r:
Abra o aplicativo...
| Client #1596980209979 left the chat | ||
| ``` | ||
|
|
||
| /// tip | dica |
There was a problem hiding this comment.
You can use a capital letter here:
/// tip | Dica
|
Just fixed everything you mentioned, thanks @ceb10n ! |
|
📝 Docs preview for commit 4ca0e36 at: https://805c6b42.fastapitiangolo.pages.dev Modified Pages |
|
Thanks for your contribution! @devfernandoa 🎉 |
No description provided.