Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

devfernandoa
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the lang-all Translations label Oct 28, 2024
Copy link
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
Copy link
Contributor

@nazarepiedady nazarepiedady left a comment

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
Contributor

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

Copy link
Contributor

@ceb10n ceb10n left a comment

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

@@ -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
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

{!../../docs_src/websockets/tutorial001.py!}
```

/// note | "Detalhes Técnicos"
Copy link
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


## Aguardar por mensagens e enviar mensagens

Em seu rota WebSocket você pode `await` por mensagens e enviar mensagens.
Copy link
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.


</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
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...

* `Path`
* `Query`

They work the same way as for other FastAPI endpoints/*path operations*:
Copy link
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
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: ...

* O "Item ID", usado na rota.
* O "Token" usado como um parâmetro de consulta.

/// tip | dica
Copy link
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


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
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
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...

Client #1596980209979 left the chat
```

/// tip | dica
Copy link
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
Contributor Author

Just fixed everything you mentioned, thanks @ceb10n !

Copy link
Contributor

@ceb10n ceb10n left a comment

Choose a reason for hiding this comment

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

That was fast! ⚡

Copy link
Contributor

@alejsdev alejsdev enabled auto-merge (squash) October 31, 2024 12:19
@alejsdev
Copy link
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
56 checks passed
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