Logical operators by Mr-Saxobeat · Pull Request #56 · javascript-tutorial/pt.javascript.info
Repository navigation
Logical operators - #56
Closed
Mr-Saxobeat wants to merge 9 commits into javascript-tutorial:master from Mr-Saxobeat:logical-operators
Closed
Logical operators #56 Mr-Saxobeat wants to merge 9 commits into javascript-tutorial:master from Mr-Saxobeat:logical-operators
Conversation
Mr-Saxobeat commented Sep 19, 2019
Copy link Copy Markdown
Contributor
Translate article, tasks and solutions.
Mr-Saxobeat added 9 commits September 17, 2019 09:13
Merge pull request #1 from javascript-tutorial/master
8a9997d
Sync with the original
Create article-pt.md
ae5c0ae
Start to translate the article
Finish translating the OR part
ba126b4
Fix identation
240ce48
Finish a simple translation
7797c95
There are some grammar erros
Finish portuguese article
8ee735b
Fix grammar errors and some expressions translations
Replace the english article by the portuguese
e5a21be
Just deleted the english version I was using to translate
Delete empty lines at the end of article
7a982ad
Translate the tasks and solutions
02f7bd3
javascript-translate-bot
added
the
review needed
label
Sep 19, 2019
javascript-translate-bot
requested a review
from a team
September 19, 2019 13:13
javascript-translate-bot commented Sep 19, 2019
Copy link Copy Markdown
|
Error: the article already has PR number in the Progress Issue #1 , it's 55 ⁉️ |
Mr-Saxobeat commented Sep 19, 2019 · edited Loading
Copy link Copy Markdown
Contributor
Author
@iliakan What should I do? I've already closed the #55 because I forgot to translate the tasks that before. |
Mr-Saxobeat commented Sep 19, 2019
Copy link Copy Markdown
Contributor
Author
|
I'm sorry, I didn't know that I should commit to the older pull request #55 . |
View reviewed changes
odsantos left a comment
Copy link Copy Markdown
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Here is the review.
Comment thread 1-js/02-first-steps/11-logical-operators/7-check-if-out-range/task.md|
|
||
| Write an `if` condition to check that `age` is NOT between 14 and 90 inclusively . | ||
| Escreva uma condição `if` para verificar se `idade` NÃO está entre o intervalo fechado `14` e `90` . | ||
|
|
|
|
||
| # A question about "if" | ||
| # A questão sobre "if" | ||
|
|
| ``` | ||
|
|
||
| Note the vertical indents inside the `if` blocks. They are technically not required, but make the code more readable . | ||
| Note as identações verticais dentro dos blocos de `if` s. Tecnicamente, elas não são necessárias, mas fazem o código mais legível . |
| Escreva o código que irá perguntar por um login com um `prompt`. | ||
|
|
||
| If the visitor enters `"Admin"`, then `prompt` for a password, if the input is an empty line or `key:Esc` -- show "Canceled .", if it's another string -- then show "I don't know you ". | ||
| Se o visitante digitar `"Admin"`, então faça `prompt` para a senha, se a entrada é uma linha vazia ou `key:Esc` -- mostre "Cancelado .", se for qualquer outra string -- então mostre "Eu não conheço você. ". |
| - For an empty string or cancelled input, show "Canceled." | ||
| - Se for igual a "TheMaster", então mostre "Bem vindo !", | ||
| - Qualquer outra string -- mostre "Senha incorreta ", | ||
| - Para uma string vazia ou cancelada, mostre "Cancelado.". |
|
|
||
| Write an "if" condition to check that `age` is between `14` and `90` inclusively . | ||
| Escreva uma condição "if" para verificar se `idade` está entre o intervalo fechado `14` e `90`. | ||
|
|
| @@ -1,12 +1,11 @@ | ||
| The first variant : | ||
| A primeira variação : | ||
|
|
|
|
||
| The second variant : | ||
| A segunda variação : | ||
|
|
| Escreva uma condição `if` para verificar se `idade` NÃO está entre o intervalo fechado `14` e `90` . | ||
|
|
||
| Create two variants: the first one using NOT `!`, the second one -- without it . | ||
| Crie duas variações: a primeira usando NÃO `!`, e uma segunda -- sem ele . |
| Nós podemos usar OU `||`: | ||
|
|
||
| ```js run | ||
| let currentUser = null; |
javascript-translate-bot commented Dec 17, 2019
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
CLAassistant commented May 15, 2020 · edited Loading
Copy link Copy Markdown
|
|
odsantos commented Nov 25, 2020
Copy link Copy Markdown
Contributor
|
Hi @Mr-Saxobeat you're still on this? |
herbertpdl commented Jul 23, 2021
Copy link Copy Markdown
Contributor
|
Hello @odsantos , I would like to collaborate. I saw that this topic is stopped from a long time. Thank you! |
odsantos commented Jul 23, 2021
Copy link Copy Markdown
Contributor
|
Hi @herbertpdl we'd appreciate it if you could translate Thank you. |
jonnathan-ls commented Jul 16, 2022
Copy link Copy Markdown
Contributor
|
This PR has been open for a long time and there has been no progress on the requested review. Before evaluating what will be done with this demand: @Mr-Saxobeat : are you still interested in continuing the translation? If so, please check the notes recorded in the requested code review by @odsantos , after correction, I will carry out my review. @herbertpdl : if MrSaxobeat, not interested or not responding, would you like to do a translation? |
jonnathan-ls commented Oct 14, 2022
Copy link Copy Markdown
Contributor
|
Still interested in translation? |
View reviewed changes
jonnathan-ls left a comment
Copy link Copy Markdown
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Segue minha revisão!
Comment thread 1-js/02-first-steps/11-logical-operators/article.md| Existem três operadores lógicos em JavaScript: `||` ( OU ), `&&` ( E ), `!` ( NÃO ). | ||
|
|
||
| Although they are called "logical ", they can be applied to values of any type, not only boolean. Their result can also be of any type . | ||
| Embora eles sejam chamados de "lógicos ", podem ser aplicados a valores de qualquer tipo, não apenas a boolean. Seus resultados também podem ser de qualquer tipo . |
| ``` | ||
|
|
||
| In classical programming, the logical OR is meant to manipulate boolean values only. If any of its arguments are `true`, it returns `true`, otherwise it returns `false`. | ||
| Em programação clássica, o operador OU é mencionado para manipular apenas valores booleanos. Se qualquer um dos seus argumentos for `true`, ele retorna `true`, se não, retorna `false`. |
| Em programação clássica, o operador OU é mencionado para manipular apenas valores booleanos. Se qualquer um dos seus argumentos for `true`, ele retorna `true`, se não, retorna `false`. | ||
|
|
||
| In JavaScript, the operator is a little bit trickier and more powerful. But first, let's see what happens with boolean values . | ||
| Em JavaScript, este operador é um pouco mais útil e poderoso. Mas primeiro, vamos ver o que acontece com valores booleanos . |
| Como podemos ver, o resultado é sempre `true` , exceto para o caso onde os dois operandos são `false`. | ||
|
|
||
| If an operand is not a boolean, it's converted to a boolean for the evaluation . | ||
| Se um operando não é um boolean, ele é convertido em um boolean para ser avaliado . |
| Um valor é retornado na sua forma original, sem conversão . | ||
|
|
||
| In other words, a chain of OR `"||"` returns the first truthy value or the last one if no such value is found . | ||
| Em outras palavras, uma cadeia de OU `"||"` retorna o primeiro valor verdadeiro ou o último se nenhum `true` for encontrado . |
| Uma atribuição é um caso simples. Outros ##SIDE EFFECTS(???)## podem também estarem envolvidos . | ||
|
|
||
| As we can see, such a use case is a "shorter way of doing `if`". The first operand is converted to boolean. If it's false, the second one is evaluated . | ||
| Como podemos ver, esse caso é como "uma maneira mais curta de se usar `if`". O primeiro operando é convertido para boolean. Se for false, o segundo operando é avaliado . |
javascript-translate-bot commented Mar 11, 2023
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
jonnathan-ls commented Mar 11, 2023 · edited Loading
Copy link Copy Markdown
Contributor
|
@odsantos adicionei minha revisão também. Considerando que este PR e bastante antigo e como não tivemos retorno do @Mr-Saxobeat , pensei em utilizar a tradução realizada, corrigir as sugestões que solicitamos e realizar o
|
odsantos commented Mar 12, 2023
Copy link Copy Markdown
Contributor
|
@jonnathan-ls I agree. Probably we could resolve the conflicts, revise each other, or have another maintainer joined to this PR, and have it merged when at least two maintainers see the translation ready for that. |
jonnathan-ls commented Apr 17, 2023
Copy link Copy Markdown
Contributor
Considering that this PR is abandoned and the branch that the user used in the merge creation is no longer available so that it would be possible to contribute directly, a new PR #401 was opened replicating the existing translation in this PR with the corrections of the revision suggestions presented. Therefore, we are closing this PR.
Considerando que este PR está abandonado e a branch que o usuário utilizou na criação do merge não está mais disponível para que fosse possível contribuir diretamente, foi aberto um novo PR #401 replicando a tradução existente neste PR com as correções das sugestões de revisão apresentadas Portanto, estamos dando como encerrado este PR. |