Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.7k
Comments
🌐 Add Portuguese translation fordocs/pt/docs/how-to/custom-request-and-route.md#12483
Conversation
📝 Docs preview for commit1cbea57 at:https://741627fc.fastapitiangolo.pages.dev Modified Pages |
📝 Docs preview for commitcf27c37 at:https://9d5256df.fastapitiangolo.pages.dev Modified Pages |
ceb10n left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you@devfernandoa \o/
Great work! 🚀
| Em algum casos, você pode querer sobreescrever a lógica usada pelas classes `Request`e `APIRoute`. | ||
| Em particular, isso pode ser uma boa alternativa para uma lógica em um intermediário |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think "Intermediário" is a good translation to middleware.
The translated docs in the tutorial section didn't translate middleware. I think it's because we don't have a good translation to it...
I would keep middleware here.
| Por exemplo, se você quiser ler ou manipular o corpo da requisição antes que ele seja processado pela sua aplicação. | ||
| /// danger | "perigo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You can remove the quotes here:
/// danger | Perigo
| ### Criar uma classe `GzipRequest` personalizada | ||
| /// tip | "dica" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The same here: remove the quotes and add a capital letter:
/// tip | Dica
| {!../../docs_src/custom_request_and_route/tutorial001.py!} | ||
| ``` | ||
| /// note | "Detalhes Técnicos" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Just remove the quotes here:
/// note | Detalhes Técnicos
| A única coisa que a função retornada por `GzipRequest.get_route_handler` faz de diferente é converter o `Request` para um `GzipRequest`. | ||
| Fazendo isso, nosso `GzipRequest` irá cuidar de descomprimir os dados (se necessário) antes de passá-los para nossas *operações de caminho*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Here,operações de caminho is not wrong, but the pattern used in the translations isoperações de rota.
It would be nice to change, just to keep the pattern...
| ## Acessando o corpo da requisição em um manipulador de exceção | ||
| /// tip | "dica" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The same:
/// tip | Dica
| {!../../docs_src/custom_request_and_route/tutorial003.py!} | ||
| ``` | ||
| Nesse exemplo, as *operações de caminho* sob o `router` irão usar a classe `TimedRoute` personalizada, e terão um cabeçalho extra `X-Response-Time` na resposta com o tempo que levou para gerar a resposta: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The same here, I would changeoperações de caminho tooperações de rota
docs/pt/docs/how-to/custom-request-and-route.mdw-to/custom-request-and-route
devfernandoa commentedOct 18, 2024
Just pushed all the reviewed changes,thanks@ceb10n ! |
📝 Docs preview for commitc3a749e at:https://03b96c65.fastapitiangolo.pages.dev Modified Pages |
alejsdev commentedOct 22, 2024
Great. Thanks for your interest in contributing to FastAPI!@devfernandoa 💯 |
No description provided.