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/tutorial/cookie-params.md #4112

Merged

Conversation

lbmendes
Copy link
Contributor

Hello everyone!

This PR adds the Portuguese translation of tutorial/cookie-params.md and adds this item in pt/mkdocs.yml

@tiangolo tiangolo changed the title 🌐 Portuguese translation for tutorial/cookie-params.md 🌐 Add Portuguese translation for tutorial/cookie-params.md Dec 8, 2021
@tiangolo tiangolo changed the title 🌐 Add Portuguese translation for tutorial/cookie-params.md 🌐 Add Portuguese translation for docs/pt/docs/tutorial/cookie-params.md Dec 8, 2021
@tiangolo tiangolo changed the title 🌐 Add Portuguese translation for docs/pt/docs/tutorial/cookie-params.md 🌐 Add Portuguese translation for docs/pt/docs/tutorial/cookie-params.md Dec 8, 2021
@tiangolo tiangolo added lang-all Translations lang-pt Portuguese translations awaiting-review labels Dec 8, 2021

Mas lembre-se que quando você importa `Query`, `Path`, `Cookie` e outras de `fastapi`, elas são na verdade funções que retornam classes especiais.

!!! info

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the correction, i will put it in a new commit.

Mas lembre-se que quando você importa `Query`, `Path`, `Cookie` e outras de `fastapi`, elas são na verdade funções que retornam classes especiais.

!!! info
Para declarar cookies, você precisa usar `Cookie`, porque senão os parâmetros poderiam ser interpretados como parâmetros de consulta.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Para declarar cookies, você precisa usar `Cookie`, porque senão os parâmetros poderiam ser interpretados como parâmetros de consulta.
Para declarar cookies, você precisa usar `Cookie`, caso contrário, os parâmetros seriam interpretados como parâmetros de `Query`.

I believe it sounds better this way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks man, it really sounds better as you suggested. I will put in a new commit with this text:

"Para declarar cookies, você precisa usar Cookie, caso contrário, os parâmetros seriam interpretados como parâmetros de consulta."

In the next topic I will explain better the cases i used Querye "de consulta".

@@ -0,0 +1,33 @@
# Parâmetros de Cookie

Você pode definir parâmetros de Cookie da mesma maneira que define paramêtros com `Query` e `Path`.

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have followed this guideline to translate (or not) Path and Query:

  • When the original mentions "query parameters", like in the info box of this page, I translated to the portuguese "parâmetros de consulta".
  • When Query or Path is mentioned in the original with markdown backticks I maintained as is because in markdown a term wrapped in backticks is supposed to be inline code (in these cases refering to the name of the classes Path or Query).

May be an option is to mention in both ways, but it could be a little bit verbose:

"Você pode definir parâmetros de Cookie da mesma maneira que define parâmetros de consulta (com Query) e de rota (com Path)"


## Declare parâmetros de `Cookie`

Então declare os paramêtros de cookie usando a mesma estrutura que em `Path` e `Query`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Então declare os paramêtros de cookie usando a mesma estrutura que em `Path` e `Query`.
Então declare os paramêtros de cookie usando a mesma estrutura que em `rota` e `consulta`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I explained in the topic above the guideline I followed to translate or not Path/Query mentions.

```

!!! note "Detalhes Técnicos"
`Cookie` é uma classe "irmã" de `Path` e `Query`. Ela também herda da mesma classe em comum `Param`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it makes sense to keep Path and Query because it’s referring to the classes


## Recapitulando

Declare cookies com `Cookie`, usando o mesmo padrão comum que utiliza-se em `Query` e `Path`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Declare cookies com `Cookie`, usando o mesmo padrão comum que utiliza-se em `Query` e `Path`.
Declare cookies com `Cookie`, usando o mesmo padrão comum que se utiliza em `consulta` e `rota`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I explained in the topic above the guideline I followed to translate or not Path/Query mentions.

@tiangolo
Copy link
Owner

Thank you @lbmendes! 🍪

And thanks @peidrao, @batlopes, and @lsglucas ! 👏 🍰

@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #4112 (259ac87) into master (c9eda31) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #4112   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          531       531           
  Lines        13629     13629           
=========================================
  Hits         13629     13629           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9eda31...259ac87. Read the comment docs.

@tiangolo tiangolo enabled auto-merge (squash) May 10, 2022 00:08
@tiangolo tiangolo merged commit 4fa4432 into tiangolo:master May 10, 2022
JeanArhancet pushed a commit to JeanArhancet/fastapi that referenced this pull request Aug 20, 2022
….md` (tiangolo#4112)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
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.

None yet

5 participants