Skip to content

Conversation

@amirhshahbazi
Copy link
Contributor

Translated the BigInt page.

@javascript-translate-bot

Error: the article already has PR number in the Progress Issue #1, it's 117 ⁉️

Copy link
Member

@mahdyar mahdyar left a comment

Choose a reason for hiding this comment

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

You don't need to make a new pull request for any changes you make. you can add more commits by pushing to the BigInt branch on your fork.
In addition to that, please read the Translation Tips:

Please keep line breaks and paragraphs "as is": don't add new lines and don't remove existing ones. Makes it easy to merge future changes from the English version into the translation.

You've removed the newline on line 8, please add it back.

@javascript-translate-bot

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

@amirhshahbazi
Copy link
Contributor Author

Thanks for the review, @mahdyar
/done

```

## Math operators
## عملیات ریاضی
Copy link
Member

Choose a reason for hiding this comment

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

Math operators means عملگرهای ریاضی, not عملیات ریاضی.

```

Please note: the division `5/2` returns the result rounded towards zero, without the decimal part. All operations on bigints return bigints.
در نظر داشته باشید: عملیات تقسیم 5/2 نتیجه را بدون قسمت اعشار و رند شده به سمت صفر، باز می گرداند. همه ی عملیات بر روی bigint ها، مقداری را از نوع bigint باز می گردانند.
Copy link
Member

Choose a reason for hiding this comment

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

Put 5/2 between backticks as it was.


```js run
alert(1n + 2); // Error: Cannot mix BigInt and other types
alert(1n + 2); // خطا: Cannot mix BigInt and other types
Copy link
Member

Choose a reason for hiding this comment

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

There is no need to translate Error here.

```

We should explicitly convert them if needed: using either `BigInt()` or `Number()`, like this:
می بایست آن ها ابتدا به صورت زیر، توسط `BigInt()` یا `Number()` تبدیل کرد:
Copy link
Member

Choose a reason for hiding this comment

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

You missed if needed.

````

## Comparisons
## عملگرهای مقایسه
Copy link
Member

Choose a reason for hiding this comment

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

مقایسه‌ای would be a better translation.

alert( +bigint ); // خطا
```
So we should use `Number()` to convert a bigint to a number.
باید ابتدا از `Number()` برای تبدیل یک bigint به نوع عددی استفاده کرد.
Copy link
Member

Choose a reason for hiding this comment

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

There is no ابتدا in the text, don't add your own words. Also, you missed so.
پس باید از...

alert( 1n || 2 ); // 1 (1n برابر با true است)

alert( 0n || 2 ); // 2 (0n is considered falsy)
alert( 0n || 2 ); // 2 (0n برابر با false است)
Copy link
Member

Choose a reason for hiding this comment

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

Considering means در نظر گرفتن.

@javascript-translate-bot

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

@amirhshahbazi
Copy link
Contributor Author

Thanks,
/done

Copy link
Member

@mahdyar mahdyar 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, @amirhshahbazi!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants