Skip to content

🌐 Add Portuguese translation for docs/pt/docs/how-to/custom-request-and-route.md#12483

Merged
alejsdev merged 6 commits intofastapi:masterfrom
devfernandoa:portuguese-translation
Oct 22, 2024
Merged

🌐 Add Portuguese translation for docs/pt/docs/how-to/custom-request-and-route.md#12483
alejsdev merged 6 commits intofastapi:masterfrom
devfernandoa:portuguese-translation

Conversation

@devfernandoa
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the lang-all Translations label Oct 17, 2024
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

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 \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
Copy link
Contributor

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"
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 quotes here:

/// danger | Perigo


### Criar uma classe `GzipRequest` personalizada

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

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"
Copy link
Contributor

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*.
Copy link
Contributor

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 is operaçõ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"
Copy link
Contributor

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:
Copy link
Contributor

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 change operações de caminho to operações de rota

@alejsdev alejsdev changed the title 🌐 Add Portuguese translation for docs/pt/docs/how-to/custom-request-and-route.md 🌐 Add Portuguese translation for docs/pt/docs/how-to/custom-request-and-route.md Oct 18, 2024
@alejsdev alejsdev added lang-pt Portuguese translations awaiting-review labels Oct 18, 2024
w-to/custom-request-and-route
@devfernandoa
Copy link
Contributor Author

Thank you @devfernandoa \o/

Great work! 🚀

Just pushed all the reviewed changes,thanks @ceb10n !

@github-actions
Copy link
Contributor

@devfernandoa devfernandoa requested a review from ceb10n October 18, 2024 13:05
@alejsdev alejsdev merged commit 94fafa5 into fastapi:master Oct 22, 2024
@alejsdev
Copy link
Member

Great. Thanks for your interest in contributing to FastAPI! @devfernandoa 💯

s-rigaud pushed a commit to s-rigaud/fastapi that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments