Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comparisons #245

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

Merged

Conversation

@jonnathan-ls
Copy link
Contributor

@jonnathan-ls jonnathan-ls commented Jun 27, 2022

Comparisons

📝 Goal

Article translation

☑ What was done?

Translate again, the article

🤔 Reason?

The article had already been translated according to PR number 15, and even if combined, the translation does not appear in the main branch.

I couldn't find the reason for the translation not being in the main branch, but I deduce that it may have been from some sync PR with the main project (EN), as the folder order number is different from when the PR was approved

PR: javascript-tutorial/en.javascript.info#15

@jonnathan-ls jonnathan-ls changed the title (削除) fix(steps): translates the article on comparison (削除ここまで) (追記) Comparisons (追記ここまで) Jun 27, 2022
Remove English phrases. Probably forgotten.
Copy link
Contributor

@odsantos odsantos left a comment

Choose a reason for hiding this comment

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

Hi,

You did not translate "task.md", and in "solution.md", "apple" > "pineapple" might be also translated.

Please, fell free to tell where you disagree.

Thanks, Osvaldo.

@@ -1,103 +1,107 @@
# Comparisons
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
# Comparisons
# Comparações


- `true` -- means "yes", "correct" or "the truth".
- `false` -- means "no", "wrong" or "not the truth".
- `true` -- significa "sim", "correto" ou "verdade".
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
- `true` -- significa "sim", "correto" ou "verdade".
- `true` -- significa "sim", "correto" ou "verdadeiro".

alert( 2 > 1 ); // true (correct)
alert( 2 == 1 ); // false (wrong)
alert( 2 != 1 ); // true (correct)
alert( 2 > 1 ); // true (correto)
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
alert( 2 > 1 ); // true (correto)
alert( 2 > 1 ); // true (verdadeiro)

alert( 2 == 1 ); // false (wrong)
alert( 2 != 1 ); // true (correct)
alert( 2 > 1 ); // true (correto)
alert( 2 == 1 ); // false (errado)
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
alert( 2 == 1 ); // false (errado)
alert( 2 == 1 ); // false (falso)

alert( 2 != 1 ); // true (correct)
alert( 2 > 1 ); // true (correto)
alert( 2 == 1 ); // false (errado)
alert( 2 != 1 ); // true (correto)
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
alert( 2 != 1 ); // true (correto)
alert( 2 != 1 ); // true (verdadeiro)


- Comparisons `(1)` and `(2)` return `false` because `undefined` gets converted to `NaN` and `NaN` is a special numeric value which returns `false` for all comparisons.
- The equality check `(3)` returns `false` because `undefined` only equals `null`, `undefined`, and no other value.
- Comparações `(1)` e `(2)` retornam `false` porque `undefined` é convertido em `NaN` e `NaN` é um valor numérico especial que retorna `false` para todas as comparações.
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
- Comparações `(1)` e `(2)` retornam `false` porque `undefined` é convertido em `NaN` e `NaN` é um valor numérico especial que retorna `false` para todas as comparações.
- Comparações `(1)` e `(2)` retornam `false` porque `undefined` é convertido em `NaN`, e `NaN` é um valor numérico especial que retorna `false` para todas as comparações.

### Evite problemas

Why did we go over these examples? Should we remember these peculiarities all the time? Well, not really. Actually, these tricky things will gradually become familiar over time, but there's a solid way to avoid problems with them:
Por que examinamos esses exemplos? Devemos nos lembrar dessas peculiaridades o tempo todo? Bem, na verdade não. Na verdade, essas coisas complicadas gradualmente se tornarão familiares com o tempo, mas há uma maneira sólida de evitar problemas com elas:
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
Por que examinamos esses exemplos? Devemos nos lembrar dessas peculiaridades o tempo todo? Bem, na verdade não. Na verdade, essas coisas complicadas gradualmente se tornarão familiares com o tempo, mas há uma maneira sólida de evitar problemas com elas:
Por que examinamos esses exemplos? Devemos nos lembrar dessas peculiaridades o tempo todo? Bem, na verdade não. Essas coisas complicadas gradualmente se tornarão familiares com o tempo, mas há uma maneira sólida de evitar problemas com elas:

- Treat any comparison with `undefined/null` except the strict equality `===` with exceptional care.
- Don't use comparisons `>= > < <=` with a variable which may be `null/undefined`, unless you're really sure of what you're doing. If a variable can have these values, check for them separately.
- Trate qualquer comparação com `undefined/null` exceto a igualdade estrita `===` com cuidado excepcional.
- Não use comparações `>= > < <=` com uma variável que pode ser `null/undefined`, a menos que você tenha certeza do que está fazendo. Se uma variável puder ter esses valores, verifique-os separadamente.
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
- Não use comparações `>= > < <=` com uma variável que pode ser `null/undefined`, a menos que você tenha certeza do que está fazendo. Se uma variável puder ter esses valores, verifique-os separadamente.
- Não use comparações `>= > < <=` com uma variável que pode ser `null/undefined`, a menos que você tenha a certeza do que está fazendo. Se uma variável puder vir a ter esses valores, verifique-os separadamente.

Copy link
Contributor Author

@jonnathan-ls jonnathan-ls Dec 16, 2023

Choose a reason for hiding this comment

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

Eu uso uma extensão ("LTeX") que me auxilia na sintaxe e concordância do texto.

A expressão vir a ter foi identificada como uma perífrase, podendo ser simplificada.

image

Não há necessidade do vir a, vide exemplificação do motivo:

https://community.languagetool.org/rule/show/VIR_A_VERBO_VERBO?lang=pt-BR

image

Substitui o trecho por outra expressão que deixa mais nítido, tudo bem?

- ... Se uma variável puder a ter esses valores ...
+ ... Se uma variável tiver `null` ou `undefined` ...

Copy link
Member

@nazarepiedady nazarepiedady Dec 19, 2023

Choose a reason for hiding this comment

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

@jonnathan-ls eu recomendo usar a expressão Se uma variável for null ou undefined.

- The values `null` and `undefined` equal `==` each other and do not equal any other value.
- Be careful when using comparisons like `>` or `<` with variables that can occasionally be `null/undefined`. Checking for `null/undefined` separately is a good idea.
- Os operadores de comparação retornam um valor booleano.
- As strings são comparadas letra por letra na ordem do "dicionário".
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
- As strings são comparadas letra por letra na ordem do "dicionário".
- As strings são comparadas letra a letra na ordem do "dicionário".

- As strings são comparadas letra por letra na ordem do "dicionário".
- Quando valores de tipos diferentes são comparados, eles são convertidos em números (com a exclusão de uma verificação de igualdade estrita).
- Os valores `null` e `undefined` são iguais `==` entre si e não são iguais a nenhum outro valor.
- Tenha cuidado ao usar comparações como `>` ou `<` com variáveis ​​que podem ocasionalmente ser `null/undefined`. Verificar por `null/undefined` separadamente é uma boa ideia.
Copy link
Contributor

@odsantos odsantos Dec 7, 2022

Choose a reason for hiding this comment

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

Suggested change
- Tenha cuidado ao usar comparações como `>` ou `<` com variáveis ​​que podem ocasionalmente ser `null/undefined`. Verificar por `null/undefined` separadamente é uma boa ideia.
- Tenha cuidado ao usar comparações, como `>` ou `<`, com variáveis ​​que possam ocasionalmente ser `null/undefined`. Verificar por `null/undefined` separadamente é uma boa ideia.

Copy link
Member

@nazarepiedady nazarepiedady Dec 15, 2023

Choose a reason for hiding this comment

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

@jonnathan-ls could you update your pull request to resolve this commit suggestion?

jonnathan-ls reacted with thumbs up emoji
Copy link
Contributor Author

@jonnathan-ls jonnathan-ls Dec 16, 2023
edited
Loading

Choose a reason for hiding this comment

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

Done @nazarepiedady 😄 (a6fd6a8)

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

Copy link
Contributor Author

/done

Copy link
Contributor Author

jonnathan-ls commented Oct 15, 2023
edited
Loading

Olá @odsantos, apliquei os ajustes, poderia avaliar por gentileza?

You did not translate "task.md", and in "solution.md", "apple" > "pineapple" might be also translated.

Nessa parte, ao contemplar a tradução acaba invertendo a ordem das letras no dicionário
Então, foi preciso registrar o resultado como true

"maça" > "abacaxi" → true

  1. Comparação de dicionário, portanto, verdadeiro. "m" é a maior que "a".

Copy link
Contributor

@jonnathan-ls hope to do it as soon as possible. Thanks.

jonnathan-ls reacted with heart emoji

Copy link
Contributor Author

/done

Adicionei um novo commit (a6fd6a8) @odsantos e um comentário em uma de suas revisões: #245 (comment)

Copy link
Member

Eu aplicarei as modificações, quanto as pequenos pontos que carecem de ajustes serão revisados e atualizados posteriormente, precisamos fazer este projeto avançar e não bloquear o mesmo por causa de alguns pequenos detalhes, é melhor aproveitar cada contribuição ainda que pequena que recebemos.

jonnathan-ls reacted with heart emoji jonnathan-ls reacted with rocket emoji

@nazarepiedady nazarepiedady merged commit e4c7754 into javascript-tutorial:master Dec 20, 2023

Error: the article already translated in the Progress Issue #1 !?️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nazarepiedady nazarepiedady nazarepiedady left review comments

@odsantos odsantos odsantos requested changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /