From 85052ac7125951c837d0087d030e587ff5876643 Mon Sep 17 00:00:00 2001 From: Alexandre GOMES <17035424+gomesalexandre@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:10:00 +0000 Subject: [PATCH] FIX inconsistent use of 'JavaScript' casing (#544) --- de/1/00-overview.md | 2 +- de/1/events.md | 2 +- de/1/web3js.md | 6 +++--- de/2/10-interactingcontracts.md | 2 +- de/2/13-kittygenes.md | 2 +- de/2/14-wrappingitup.md | 4 ++-- de/2/3-msgsender.md | 2 +- de/4/payable.md | 2 +- de/6/00-overview.md | 2 +- de/6/02.md | 2 +- de/6/04.md | 2 +- en/1/00-overview.md | 2 +- en/1/events.md | 2 +- en/1/web3js.md | 6 +++--- en/2/10-interactingcontracts.md | 2 +- en/2/13-kittygenes.md | 2 +- en/2/14-wrappingitup.md | 4 ++-- en/2/3-msgsender.md | 2 +- en/4/payable.md | 2 +- en/6/00-overview.md | 2 +- en/6/02.md | 2 +- en/6/04.md | 2 +- en/index.json | 2 +- es/1/00-overview.md | 2 +- es/1/web3js.md | 6 +++--- es/2/10-interactingcontracts.md | 2 +- es/2/13-kittygenes.md | 2 +- es/2/14-wrappingitup.md | 4 ++-- es/2/3-msgsender.md | 2 +- es/4/payable.md | 2 +- es/6/00-overview.md | 2 +- fa/2/13-kittygenes.md | 2 +- fa/2/14-wrappingitup.md | 4 ++-- fa/4/payable.md | 2 +- fa/6/00-overview.md | 2 +- fa/6/02.md | 2 +- fa/6/04.md | 2 +- fa/index.json | 2 +- fr/1/00-overview.md | 2 +- fr/1/events.md | 2 +- fr/1/web3js.md | 6 +++--- fr/2/10-interactingcontracts.md | 2 +- fr/2/13-kittygenes.md | 2 +- fr/2/14-wrappingitup.md | 4 ++-- fr/2/3-msgsender.md | 2 +- fr/4/payable.md | 2 +- fr/6/02.md | 2 +- it/1/00-overview.md | 2 +- it/1/events.md | 2 +- it/1/web3js.md | 6 +++--- it/2/10-interactingcontracts.md | 2 +- it/2/14-wrappingitup.md | 4 ++-- it/2/3-msgsender.md | 2 +- it/4/payable.md | 2 +- it/6/00-overview.md | 2 +- it/6/02.md | 2 +- jp/1/web3js.md | 2 +- no/1/00-overview.md | 2 +- no/1/events.md | 2 +- no/1/web3js.md | 6 +++--- no/2/10-interactingcontracts.md | 2 +- no/2/13-kittygenes.md | 2 +- no/2/14-wrappingitup.md | 4 ++-- no/2/3-msgsender.md | 2 +- pl/1/00-overview.md | 2 +- pl/1/events.md | 2 +- pl/1/web3js.md | 4 ++-- pt/1/00-overview.md | 2 +- pt/1/events.md | 2 +- pt/1/web3js.md | 6 +++--- pt/2/10-interactingcontracts.md | 2 +- pt/2/13-kittygenes.md | 2 +- pt/2/14-wrappingitup.md | 4 ++-- pt/2/3-msgsender.md | 2 +- pt/3/01-externaldependencies.md | 2 +- pt/3/12-forloops.md | 2 +- pt/4/payable.md | 2 +- pt/6/00-overview.md | 2 +- pt/6/02-web3-providers.md | 2 +- ru/1/00-overview.md | 2 +- ru/1/events.md | 2 +- ru/1/web3js.md | 6 +++--- ru/2/10-interactingcontracts.md | 2 +- ru/2/13-kittygenes.md | 2 +- ru/2/14-wrappingitup.md | 4 ++-- ru/2/3-msgsender.md | 2 +- sk/1/web3js.md | 2 +- sk/2/10-interactingcontracts.md | 2 +- sk/3/01-externaldependencies.md | 2 +- sk/6/04.md | 4 ++-- sk/6/10-wrappingitup.md | 2 +- th/1/events.md | 2 +- th/1/web3js.md | 6 +++--- th/2/10-interactingcontracts.md | 2 +- th/2/13-kittygenes.md | 2 +- th/2/14-wrappingitup.md | 2 +- th/2/3-msgsender.md | 2 +- th/4/payable.md | 2 +- th/6/00-overview.md | 2 +- th/6/02.md | 2 +- th/6/04.md | 2 +- tr/1/00-overview.md | 2 +- tr/1/events.md | 2 +- tr/1/web3js.md | 6 +++--- tr/2/10-interactingcontracts.md | 2 +- tr/2/14-wrappingitup.md | 4 ++-- 106 files changed, 138 insertions(+), 138 deletions(-) diff --git a/de/1/00-overview.md b/de/1/00-overview.md index 66a832e64..2cb517667 100755 --- a/de/1/00-overview.md +++ b/de/1/00-overview.md @@ -7,4 +7,4 @@ Du denkst also, Du hast das Zeug ein **CryptoZombie** zu werden, huh? Dieser Kurs wird Dir zeigen, wie man **ein Spiel auf Ethereum entwickelt**. -Er richtet sich an Anfänger von Solidity. Wir gehen aber davon aus, dass Du ein bisschen Erfahrungen im programmieren in einer anderen Sprache hast (z.B. Javascript). \ No newline at end of file +Er richtet sich an Anfänger von Solidity. Wir gehen aber davon aus, dass Du ein bisschen Erfahrungen im programmieren in einer anderen Sprache hast (z.B. JavaScript). diff --git a/de/1/events.md b/de/1/events.md index f597ca2c5..a6e3a74b3 100755 --- a/de/1/events.md +++ b/de/1/events.md @@ -69,7 +69,7 @@ Example: } -Your app front-end could then listen for the event. A javascript implementation would look something like: +Your app front-end could then listen for the event. A JavaScript implementation would look something like: YourContract.IntegersAdded(function(error, result) { // do something with result diff --git a/de/1/web3js.md b/de/1/web3js.md index 8ee8ab0cf..4bad0fd01 100755 --- a/de/1/web3js.md +++ b/de/1/web3js.md @@ -11,9 +11,9 @@ material: hideSliders: true answer: 1 --- -Our Solidity contract is complete! Now we need to write a javascript frontend that interacts with the contract. +Our Solidity contract is complete! Now we need to write a JavaScript frontend that interacts with the contract. -Ethereum has a Javascript library called ***Web3.js***. +Ethereum has a JavaScript library called ***Web3.js***. In a later lesson, we'll go over in depth how to deploy a contract and set up Web3.js. But for now let's just look at some sample code for how Web3.js would interact with our deployed contract. @@ -68,7 +68,7 @@ Don't worry if this doesn't all make sense yet. } -What our javascript then does is take the values generated in `zombieDetails` above, and use some browser-based javascript magic (we're using Vue.js) to swap out the images and apply CSS filters. You'll get all the code for this in a later lesson. +What our JavaScript then does is take the values generated in `zombieDetails` above, and use some browser-based JavaScript magic (we're using Vue.js) to swap out the images and apply CSS filters. You'll get all the code for this in a later lesson. # Give it a try! diff --git a/de/2/10-interactingcontracts.md b/de/2/10-interactingcontracts.md index e2a3780e2..26daf65fe 100755 --- a/de/2/10-interactingcontracts.md +++ b/de/2/10-interactingcontracts.md @@ -158,7 +158,7 @@ The function looks like this: } -The function looks a bit different than we're used to. You can see it returns... a bunch of different values. If you're coming from a programming language like Javascript, this is different — in Solidity you can return more than one value from a function. +The function looks a bit different than we're used to. You can see it returns... a bunch of different values. If you're coming from a programming language like JavaScript, this is different — in Solidity you can return more than one value from a function. Now that we know what this function looks like, we can use it to create an interface: diff --git a/de/2/13-kittygenes.md b/de/2/13-kittygenes.md index 7acd4629c..1317c57a0 100755 --- a/de/2/13-kittygenes.md +++ b/de/2/13-kittygenes.md @@ -112,7 +112,7 @@ We'll say that cat-zombies have `99` as their last two digits of DNA (since cats ## If statements -If statements in Solidity look just like javascript: +If statements in Solidity look just like JavaScript: function eatBLT(string sandwich) public { // Remember with strings, we have to compare their keccak256 hashes diff --git a/de/2/14-wrappingitup.md b/de/2/14-wrappingitup.md index 4a1e187e4..6708b32aa 100755 --- a/de/2/14-wrappingitup.md +++ b/de/2/14-wrappingitup.md @@ -16,11 +16,11 @@ That's it, you've completed lesson 2! You can check out the demo to the right to see it in action. Go ahead, I know you can't wait until the bottom of this page -## Javascript implementation +## JavaScript implementation Once we're ready to deploy this contract to Ethereum we'll just compile and deploy `ZombieFeeding` — since this contract is our final contract that inherits from `ZombieFactory`, and has access to all the public methods in both contracts. -Let's look at an example of interacting with our deployed contract using Javascript and web3.js: +Let's look at an example of interacting with our deployed contract using JavaScript and web3.js: var abi = /* abi generated by the compiler */ var ZombieFeedingContract = web3.eth.contract(abi) diff --git a/de/2/3-msgsender.md b/de/2/3-msgsender.md index 252c3675e..23f560be9 100755 --- a/de/2/3-msgsender.md +++ b/de/2/3-msgsender.md @@ -96,7 +96,7 @@ Let's update our `_createZombie` method from lesson 1 to assign ownership of the 2. Second, let's increase `ownerZombieCount` for this `msg.sender`. -In Solidity, you can increase a `uint` with `++`, just like in javascript: +In Solidity, you can increase a `uint` with `++`, just like in JavaScript: uint number = 0; number++; diff --git a/de/4/payable.md b/de/4/payable.md index db5368c48..7fcfe34e1 100755 --- a/de/4/payable.md +++ b/de/4/payable.md @@ -244,7 +244,7 @@ What happens here is that someone would call the function from web3.js (from the OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) -Notice the `value` field, where the javascript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. +Notice the `value` field, where the JavaScript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. > Note: If a function is not marked `payable` and you try to send Ether to it as above, the function will reject your transaction. diff --git a/de/6/00-overview.md b/de/6/00-overview.md index 6f03e64f1..51d55358d 100755 --- a/de/6/00-overview.md +++ b/de/6/00-overview.md @@ -15,4 +15,4 @@ In this lesson, we're going to look at how to interact with your smart contract Note that app front-ends are written in **JavaScript**, not Solidity. But since the focus of this course is on Ethereum / Solidity, we're assuming you are already comfortable building websites with HTML, JavaScript (including ES6 promises), and JQuery, and will not be spending time covering the basics of those languages. -If you are not already comfortable building websites with HTML / Javascript, you should complete a basic tutorial elsewhere before starting this lesson. \ No newline at end of file +If you are not already comfortable building websites with HTML / JavaScript, you should complete a basic tutorial elsewhere before starting this lesson. diff --git a/de/6/02.md b/de/6/02.md index 13ef477b1..9c0a0adb6 100755 --- a/de/6/02.md +++ b/de/6/02.md @@ -447,6 +447,6 @@ You can use this boilerplate code in all the apps you create in order to require ## Put it to the Test -We've created some empty script tags before the closing `` tag in our HTML file. We can write our javascript code for this lesson here. +We've created some empty script tags before the closing `` tag in our HTML file. We can write our JavaScript code for this lesson here. 1. Go ahead and copy/paste the template code from above for detecting Metamask. It's the block that starts with `window.addEventListener`. \ No newline at end of file diff --git a/de/6/04.md b/de/6/04.md index dce46b3a7..06ed9ac3b 100755 --- a/de/6/04.md +++ b/de/6/04.md @@ -496,7 +496,7 @@ Note that this is **asynchronous**, like an API call to an external server. So W Once the promise resolves (which means we got an answer back from the web3 provider), our example code continues with the `then` statement, which logs `result` to the console. -`result` will be a javascript object that looks like this: +`result` will be a JavaScript object that looks like this: { "name": "H4XF13LD MORRIS'S COOLER OLDER BROTHER", diff --git a/en/1/00-overview.md b/en/1/00-overview.md index 2d62f0eb7..08c824418 100644 --- a/en/1/00-overview.md +++ b/en/1/00-overview.md @@ -11,4 +11,4 @@ So you think you have what it takes to become a **CryptoZombie**, huh? This course will teach you how to **build a game on Ethereum**. It's designed for beginners to Solidity, but it assumes you have some experience -programming in another language (e.g. Javascript). +programming in another language (e.g. JavaScript). diff --git a/en/1/events.md b/en/1/events.md index 423c346d6..2dd9dc28f 100644 --- a/en/1/events.md +++ b/en/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public returns (uint) { } ``` -Your app front-end could then listen for the event. A javascript implementation would look something like: +Your app front-end could then listen for the event. A JavaScript implementation would look something like: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/en/1/web3js.md b/en/1/web3js.md index f93a6e4a0..65778af13 100644 --- a/en/1/web3js.md +++ b/en/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Our Solidity contract is complete! Now we need to write a javascript frontend that interacts with the contract. +Our Solidity contract is complete! Now we need to write a JavaScript frontend that interacts with the contract. -Ethereum has a Javascript library called **_Web3.js_**. +Ethereum has a JavaScript library called **_Web3.js_**. In a later lesson, we'll go over in depth how to deploy a contract and set up Web3.js. But for now let's just look at some sample code for how Web3.js would interact with our deployed contract. @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -What our javascript then does is take the values generated in `zombieDetails` above, and use some browser-based javascript magic (we're using Vue.js) to swap out the images and apply CSS filters. You'll get all the code for this in a later lesson. +What our JavaScript then does is take the values generated in `zombieDetails` above, and use some browser-based JavaScript magic (we're using Vue.js) to swap out the images and apply CSS filters. You'll get all the code for this in a later lesson. # Give it a try! diff --git a/en/2/10-interactingcontracts.md b/en/2/10-interactingcontracts.md index b39203fa4..81f963861 100644 --- a/en/2/10-interactingcontracts.md +++ b/en/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -The function looks a bit different than we're used to. You can see it returns... a bunch of different values. If you're coming from a programming language like Javascript, this is different — in Solidity you can return more than one value from a function. +The function looks a bit different than we're used to. You can see it returns... a bunch of different values. If you're coming from a programming language like JavaScript, this is different — in Solidity you can return more than one value from a function. Now that we know what this function looks like, we can use it to create an interface: diff --git a/en/2/13-kittygenes.md b/en/2/13-kittygenes.md index 0175ad992..277c0f87a 100644 --- a/en/2/13-kittygenes.md +++ b/en/2/13-kittygenes.md @@ -145,7 +145,7 @@ We'll say that cat-zombies have `99` as their last two digits of DNA (since cats ## If statements -If statements in Solidity look just like javascript: +If statements in Solidity look just like JavaScript: ``` function eatBLT(string memory sandwich) public { diff --git a/en/2/14-wrappingitup.md b/en/2/14-wrappingitup.md index b11cb9baf..e06b66a5b 100644 --- a/en/2/14-wrappingitup.md +++ b/en/2/14-wrappingitup.md @@ -15,11 +15,11 @@ That's it, you've completed lesson 2! You can check out the demo to the right to see it in action. Go ahead, I know you can't wait until the bottom of this page 😉. Click a kitty to attack, and see the new kitty zombie you get! -## Javascript implementation +## JavaScript implementation Once we're ready to deploy this contract to Ethereum we'll just compile and deploy `ZombieFeeding` — since this contract is our final contract that inherits from `ZombieFactory`, and has access to all the public methods in both contracts. -Let's look at an example of interacting with our deployed contract using Javascript and web3.js: +Let's look at an example of interacting with our deployed contract using JavaScript and web3.js: ``` var abi = /* abi generated by the compiler */ diff --git a/en/2/3-msgsender.md b/en/2/3-msgsender.md index 59ded3370..6a7a062a9 100644 --- a/en/2/3-msgsender.md +++ b/en/2/3-msgsender.md @@ -122,7 +122,7 @@ Let's update our `_createZombie` method from lesson 1 to assign ownership of the 2. Second, let's increase `ownerZombieCount` for this `msg.sender`. -In Solidity, you can increase a `uint` with `++`, just like in javascript: +In Solidity, you can increase a `uint` with `++`, just like in JavaScript: ``` uint number = 0; diff --git a/en/4/payable.md b/en/4/payable.md index 2afdbcf49..893d2a447 100644 --- a/en/4/payable.md +++ b/en/4/payable.md @@ -313,7 +313,7 @@ What happens here is that someone would call the function from web3.js (from the OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -Notice the `value` field, where the javascript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. +Notice the `value` field, where the JavaScript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. >Note: If a function is not marked `payable` and you try to send Ether to it as above, the function will reject your transaction. diff --git a/en/6/00-overview.md b/en/6/00-overview.md index c244fd1bb..7cd7f7513 100644 --- a/en/6/00-overview.md +++ b/en/6/00-overview.md @@ -18,4 +18,4 @@ In this lesson, we're going to look at how to interact with your smart contract Note that app front-ends are written in **JavaScript**, not Solidity. But since the focus of this course is on Ethereum / Solidity, we're assuming you are already comfortable building websites with HTML, JavaScript (including ES6 promises), and JQuery, and will not be spending time covering the basics of those languages. -If you are not already comfortable building websites with HTML / Javascript, you should complete a basic tutorial elsewhere before starting this lesson. +If you are not already comfortable building websites with HTML / JavaScript, you should complete a basic tutorial elsewhere before starting this lesson. diff --git a/en/6/02.md b/en/6/02.md index 9b1847440..8b06ea2fd 100644 --- a/en/6/02.md +++ b/en/6/02.md @@ -552,6 +552,6 @@ You can use this boilerplate code in all the apps you create in order to require ## Put it to the Test -We've created some empty script tags before the closing `` tag in our HTML file. We can write our javascript code for this lesson here. +We've created some empty script tags before the closing `` tag in our HTML file. We can write our JavaScript code for this lesson here. 1. Go ahead and copy/paste the template code from above for detecting Metamask. It's the block that starts with `window.addEventListener`. diff --git a/en/6/04.md b/en/6/04.md index 74138cf64..efa6a458c 100644 --- a/en/6/04.md +++ b/en/6/04.md @@ -601,7 +601,7 @@ Note that this is **asynchronous**, like an API call to an external server. So W Once the promise resolves (which means we got an answer back from the web3 provider), our example code continues with the `then` statement, which logs `result` to the console. -`result` will be a javascript object that looks like this: +`result` will be a JavaScript object that looks like this: ``` { diff --git a/en/index.json b/en/index.json index da8f15c6d..eb24d7a77 100644 --- a/en/index.json +++ b/en/index.json @@ -19,7 +19,7 @@ "course" : { "solidity" : { "title": "Solidity Path: Beginner to Intermediate Smart Contracts", - "summary": "

So you think you have what it takes to become a CryptoZombie, huh?

This course will teach you how to build a game on Ethereum.

It's designed for beginners to Solidity, but it assumes you have some experience programming in another language (e.g. Javascript)." + "summary": "

So you think you have what it takes to become a CryptoZombie, huh?

This course will teach you how to build a game on Ethereum.

It's designed for beginners to Solidity, but it assumes you have some experience programming in another language (e.g. JavaScript)." }, "hand_on_path": { "title": "Hands-on Path: Make and Deploy a Custom Game Mode", diff --git a/es/1/00-overview.md b/es/1/00-overview.md index eedee5788..2a54a3dc9 100644 --- a/es/1/00-overview.md +++ b/es/1/00-overview.md @@ -9,4 +9,4 @@ roadmap: roadmap.jpg Este curso te enseñará cómo **crear un juego en Ethereum**. Está diseñado para principiantes en Solidity, pero asume que tienes alguna experiencia -programando en algún otro lenguage (por ejemplo Javascript). +programando en algún otro lenguage (por ejemplo JavaScript). diff --git a/es/1/web3js.md b/es/1/web3js.md index 45d92556e..6d3522418 100644 --- a/es/1/web3js.md +++ b/es/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -¡Nuestro contrato en Solidity está completo! Ahora tenemos que escribir una aplicación de usuario en javascript para interactuar con él. +¡Nuestro contrato en Solidity está completo! Ahora tenemos que escribir una aplicación de usuario en JavaScript para interactuar con él. -Ethereum tiene una librería Javascript llamada **_Web3.js_**. +Ethereum tiene una librería JavaScript llamada **_Web3.js_**. En lecciones posteriores veremos en detalle como publicar un contrato y como configurar Web3.js. Pero por ahora vamos solamente a ver un ejemplo de código de cómo Web3.js interactuaría con nuestro contrato. @@ -67,7 +67,7 @@ function generateZombie(id, name, dna) { return zombieDetails } ``` -Lo que nuestro código javascript hace es recoger los valores generados en `zombieDetails` más arriba, y usar un poco de magia Javascript en el navegador (usamos Vue.js) para intercambiar las imágenes y aplicar filtros CSS. Te daremos todo el código para hacer esto en una lección posterior. +Lo que nuestro código JavaScript hace es recoger los valores generados en `zombieDetails` más arriba, y usar un poco de magia JavaScript en el navegador (usamos Vue.js) para intercambiar las imágenes y aplicar filtros CSS. Te daremos todo el código para hacer esto en una lección posterior. # ¡Pruébalo! diff --git a/es/2/10-interactingcontracts.md b/es/2/10-interactingcontracts.md index 649f5f1d4..1a5e73408 100644 --- a/es/2/10-interactingcontracts.md +++ b/es/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -La función parece algo diferente de las que hemos usado. Puedes ver que devuelve... una lista de diferentes valores. Si vienes de un lenguaje de programación como Javascript, esto es diferente - en Solidity puedes devolver más de un valor en una función. +La función parece algo diferente de las que hemos usado. Puedes ver que devuelve... una lista de diferentes valores. Si vienes de un lenguaje de programación como JavaScript, esto es diferente - en Solidity puedes devolver más de un valor en una función. Ahora que sabemos como es esta función, podemos usarla para crear una interfaz: diff --git a/es/2/13-kittygenes.md b/es/2/13-kittygenes.md index cc27c6d0b..86bc636ed 100644 --- a/es/2/13-kittygenes.md +++ b/es/2/13-kittygenes.md @@ -145,7 +145,7 @@ Diremos que los gato-zombis tienen `99` en los últimos dos dígitos de su ADN ( ## Sentencias if -Una sentencia if en Solidity es igual que en javascript: +Una sentencia if en Solidity es igual que en JavaScript: ``` function eatBLT(string sandwich) public { diff --git a/es/2/14-wrappingitup.md b/es/2/14-wrappingitup.md index 6471afe11..d36cf373b 100644 --- a/es/2/14-wrappingitup.md +++ b/es/2/14-wrappingitup.md @@ -15,11 +15,11 @@ material: Ahora puede probar nuestra demostración a la derecha para verlo en acción. Sigue adelante, sé que no puedes esperar hasta el final de esta página 😉. Clica en un gato para atacar, y ¡mira que nuevo gato zombi consigues! -## Implementación javascript +## Implementación JavaScript Una vez estemos listos para implementar este contrato en Ethereum solamente tendremos que compilar e implementar `ZombieFeeding` — debido a que este contrato es nuestro contrato final que hereda de `ZombieFactory`, y tiene acceso a todos los métodos públicos de ambos contratos. -Vamos a ver un ejemplo de cómo interactuaría nuestro contrato implementado usando Javascript y web3.js: +Vamos a ver un ejemplo de cómo interactuaría nuestro contrato implementado usando JavaScript y web3.js: ``` var abi = /* abi generado por el compilador */ diff --git a/es/2/3-msgsender.md b/es/2/3-msgsender.md index def0ce68f..dd3c1e66d 100644 --- a/es/2/3-msgsender.md +++ b/es/2/3-msgsender.md @@ -122,7 +122,7 @@ Vamos a actualizar nuestro método `_createZombie` de la Lección para asignarle 2. Segundo, incrementamos `ownerZombieCount` para este `msg.sender`. -En Solidity, puedes incrementar un `uint` con `++`, así como en javascript: +En Solidity, puedes incrementar un `uint` con `++`, así como en JavaScript: ``` uint number = 0; diff --git a/es/4/payable.md b/es/4/payable.md index 19a28c8c9..1d6f13ffd 100644 --- a/es/4/payable.md +++ b/es/4/payable.md @@ -312,7 +312,7 @@ Lo que sucede aquí es que alguien llamaría a la función desde web3.js (desde OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -Nótese el campo `value`, donde la llamada de función javascript especifíca cuánto de `ether` enviar (0.001). Si piensas en la transacción como un sobre, y los parámetros que usted envía a la llamada de función son los contenidos de la carta que coloca adentro, entonces añadir un `value` es como poner dinero en efectivo dentro del sobre — la carta y el dinero son entregados juntos al receptor. +Nótese el campo `value`, donde la llamada de función JavaScript especifíca cuánto de `ether` enviar (0.001). Si piensas en la transacción como un sobre, y los parámetros que usted envía a la llamada de función son los contenidos de la carta que coloca adentro, entonces añadir un `value` es como poner dinero en efectivo dentro del sobre — la carta y el dinero son entregados juntos al receptor. >Nota: Si una función no es marcada como `payable` y usted intenta enviar Ether a esta, como se hizo anteriormente, la función rechazará su transacción. diff --git a/es/6/00-overview.md b/es/6/00-overview.md index 7422b5496..3c8584f22 100644 --- a/es/6/00-overview.md +++ b/es/6/00-overview.md @@ -16,4 +16,4 @@ En esta lección, vamos a aprender a como interactuar con un Contrato Inteligent Ten en cuenta que los front-ends de las DApps están escritas en **JavaScript** y no Solidity. Pero dado que el enfoque de este curso está en Ethereum y Solidity, ya damos por hecho que ya te sientes cómodo construyendo sitios web con HTML, JavaScript (incluyendo ES6 promises), y JQuery, así que no vamos a perder mucho tiempo cubriendo lo básico de dichos lenguajes. -Si aún no te sientes muy cómodo construyendo sitios web con HTML / Javascript, es muy recomendable que sigas cualquier tutorial sobre estos lenguajes de programación. +Si aún no te sientes muy cómodo construyendo sitios web con HTML / JavaScript, es muy recomendable que sigas cualquier tutorial sobre estos lenguajes de programación. diff --git a/fa/2/13-kittygenes.md b/fa/2/13-kittygenes.md index d0ee0c672..6091a57f4 100644 --- a/fa/2/13-kittygenes.md +++ b/fa/2/13-kittygenes.md @@ -146,7 +146,7 @@ material: ## عبارات شرطی -عبارات شرطی در Solidity درست مثل javascript هستند: +عبارات شرطی در Solidity درست مثل JavaScript هستند: ``` function eatBLT(string sandwich) public { diff --git a/fa/2/14-wrappingitup.md b/fa/2/14-wrappingitup.md index 023d24732..4925dfd34 100644 --- a/fa/2/14-wrappingitup.md +++ b/fa/2/14-wrappingitup.md @@ -16,11 +16,11 @@ material: می توانید نسخه نمایشی را در سمت راست بررسی کنید تا در عمل مشاهده کنید. شروع کنید ،احتمالا نمی توانید تا انتهای این صفحه صبر کنید. برای حمله به یک بچه گربه کلیک کنید و زامبی گربه ای جدیدی را که دریافت می کنید را ببینید! -## پیاده سازی Javascript +## پیاده سازی JavaScript پس از آماده شدن برای deploy این قرارداد در Ethereum ، ما فقط `ZombieFeeding` را compile و deploy خواهیم کرد - از آنجا که این قرارداد آخرین قرارداد ما است که از `ZombieFactory` به ارث می رسد ، و به همه توابع public در هر دو قرارداد دسترسی دارد. -بیایید مثالی از تعامل با قرارداد deploy شده خود را با استفاده از Javascript و web3.js بررسی کنیم: +بیایید مثالی از تعامل با قرارداد deploy شده خود را با استفاده از JavaScript و web3.js بررسی کنیم: ``` var abi = /* abi generated by the compiler */ diff --git a/fa/4/payable.md b/fa/4/payable.md index 595c524da..990e6bb09 100644 --- a/fa/4/payable.md +++ b/fa/4/payable.md @@ -312,7 +312,7 @@ What happens here is that someone would call the function from web3.js (from the OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -Notice the `value` field, where the javascript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. +Notice the `value` field, where the JavaScript function call specifies how much `ether` to send (0.001). If you think of the transaction like an envelope, and the parameters you send to the function call are the contents of the letter you put inside, then adding a `value` is like putting cash inside the envelope — the letter and the money get delivered together to the recipient. >Note: If a function is not marked `payable` and you try to send Ether to it as above, the function will reject your transaction. diff --git a/fa/6/00-overview.md b/fa/6/00-overview.md index d280bbf56..0323c1bc7 100644 --- a/fa/6/00-overview.md +++ b/fa/6/00-overview.md @@ -17,4 +17,4 @@ In this lesson, we're going to look at how to interact with your smart contract Note that app front-ends are written in **JavaScript**, not Solidity. But since the focus of this course is on Ethereum / Solidity, we're assuming you are already comfortable building websites with HTML, JavaScript (including ES6 promises), and JQuery, and will not be spending time covering the basics of those languages. -If you are not already comfortable building websites with HTML / Javascript, you should complete a basic tutorial elsewhere before starting this lesson. +If you are not already comfortable building websites with HTML / JavaScript, you should complete a basic tutorial elsewhere before starting this lesson. diff --git a/fa/6/02.md b/fa/6/02.md index 6f52c0210..a4e706c8a 100644 --- a/fa/6/02.md +++ b/fa/6/02.md @@ -552,6 +552,6 @@ You can use this boilerplate code in all the apps you create in order to require ## Put it to the Test -We've created some empty script tags before the closing `` tag in our HTML file. We can write our javascript code for this lesson here. +We've created some empty script tags before the closing `` tag in our HTML file. We can write our JavaScript code for this lesson here. 1. Go ahead and copy/paste the template code from above for detecting Metamask. It's the block that starts with `window.addEventListener`. diff --git a/fa/6/04.md b/fa/6/04.md index 35c0ef1c1..ca2e383b9 100644 --- a/fa/6/04.md +++ b/fa/6/04.md @@ -601,7 +601,7 @@ Note that this is **asynchronous**, like an API call to an external server. So W Once the promise resolves (which means we got an answer back from the web3 provider), our example code continues with the `then` statement, which logs `result` to the console. -`result` will be a javascript object that looks like this: +`result` will be a JavaScript object that looks like this: ``` { diff --git a/fa/index.json b/fa/index.json index c81d05b2f..a0346e658 100644 --- a/fa/index.json +++ b/fa/index.json @@ -19,7 +19,7 @@ "course" : { "solidity" : { "title": "Solidity Path: Beginner to Intermediate Smart Contracts", - "summary": "

So you think you have what it takes to become a CryptoZombie, huh?

This course will teach you how to build a game on Ethereum.

It's designed for beginners to Solidity, but it assumes you have some experience programming in another language (e.g. Javascript)." + "summary": "

So you think you have what it takes to become a CryptoZombie, huh?

This course will teach you how to build a game on Ethereum.

It's designed for beginners to Solidity, but it assumes you have some experience programming in another language (e.g. JavaScript)." }, "hand_on_path": { "title": "Hands-on Path: Make and Deploy a Custom Game Mode", diff --git a/fr/1/00-overview.md b/fr/1/00-overview.md index 2dd26d1aa..efa3aec4c 100644 --- a/fr/1/00-overview.md +++ b/fr/1/00-overview.md @@ -9,4 +9,4 @@ Vous pensez avoir ce qu´il faut pour devenir un **CryptoZombie**, hein ? Ce cours vous apprendra comment **réaliser un jeu basé sur Ethereum**. Il est conçu pour les débutants en Solidity, mais il est préférable que vous ayez de l'expérience en -programmation dans un autre langage (Javascript par exemple). +programmation dans un autre langage (JavaScript par exemple). diff --git a/fr/1/events.md b/fr/1/events.md index cc00f02b3..bfa32d56c 100644 --- a/fr/1/events.md +++ b/fr/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Votre application frontale pourrait alors être en attente de l'évènement. Voici un exemple d'implémentation javascript : +Votre application frontale pourrait alors être en attente de l'évènement. Voici un exemple d'implémentation JavaScript : ``` YourContract.IntegersAdded(function(error, result) { diff --git a/fr/1/web3js.md b/fr/1/web3js.md index 486a9d229..08b199ade 100644 --- a/fr/1/web3js.md +++ b/fr/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Notre contrat Solidity est fini ! Maintenant nous devons écrire la partie client en Javascript pour interagir avec le contrat. +Notre contrat Solidity est fini ! Maintenant nous devons écrire la partie client en JavaScript pour interagir avec le contrat. -Ethereum a une bibliothèque Javascript appelée **_Web3.js_**. +Ethereum a une bibliothèque JavaScript appelée **_Web3.js_**. Dans une prochaine leçon, nous verrons en détail comment déployer un contrat et configurer Web3.js. Mais pour l'instant, regardons simplement un exemple de code pour voir comment Web3.js pourrait interagir avec notre contrat déployé. @@ -69,7 +69,7 @@ function generateZombie(id, name, dna) { } ``` -Notre code Javascript prends alors les valeurs générées dans `zombieDetails` ci-dessus, et utilise de la magie Javascript (nous utilisons Vue.js) pour changer les images et appliquer des filtres CSS. Vous obtiendrez tout le code nécessaire dans une prochaine leçon. +Notre code JavaScript prends alors les valeurs générées dans `zombieDetails` ci-dessus, et utilise de la magie JavaScript (nous utilisons Vue.js) pour changer les images et appliquer des filtres CSS. Vous obtiendrez tout le code nécessaire dans une prochaine leçon. # A votre tour d’essayer ! diff --git a/fr/2/10-interactingcontracts.md b/fr/2/10-interactingcontracts.md index 401cb3cd2..7f30f50ad 100644 --- a/fr/2/10-interactingcontracts.md +++ b/fr/2/10-interactingcontracts.md @@ -182,7 +182,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -La fonction est un peu différente que ce dont nous avons l'habitude. Vous pouvez voir qu'elle retourne... un tas de différentes valeurs. Si vous venez d'un langage de programmation comme Javascript, c'est différent - en Solidity une fonction peut retourner plus d'une valeur. +La fonction est un peu différente que ce dont nous avons l'habitude. Vous pouvez voir qu'elle retourne... un tas de différentes valeurs. Si vous venez d'un langage de programmation comme JavaScript, c'est différent - en Solidity une fonction peut retourner plus d'une valeur. Maintenant que nous savons à quoi ressemble notre fonction, nous pouvons l'utiliser pour créer une interface : diff --git a/fr/2/13-kittygenes.md b/fr/2/13-kittygenes.md index da67099a3..446cd9506 100644 --- a/fr/2/13-kittygenes.md +++ b/fr/2/13-kittygenes.md @@ -145,7 +145,7 @@ Les deux derniers chiffres de l'ADN d'un zombie-chat sont `99` (car les chats on ## déclaration `if` (si) -Les déclaration `if` en Solidity sont les mêmes qu'en Javascript : +Les déclaration `if` en Solidity sont les mêmes qu'en JavaScript : ``` function eatBLT(string sandwich) public { diff --git a/fr/2/14-wrappingitup.md b/fr/2/14-wrappingitup.md index 8249798ac..35c3efd1a 100644 --- a/fr/2/14-wrappingitup.md +++ b/fr/2/14-wrappingitup.md @@ -15,11 +15,11 @@ Et voila, vous avez terminé la leçon 2 ! Vous pouvez voir comment cela fonctionne avec la démo à droite. Allez-y, je sais que nous avez hâte d'arriver en bas de cette page 😉. Cliquez sur un chaton pour l'attaquer et regardez le nouveau zombie que vous obtiendrez ! -## Implémentation Javascript +## Implémentation JavaScript Une fois que nous sommes prêt à déployer ce contrat sur Ethereum, nous avons juste besoin de compiler et déployer `ZombieFeeding` - vu que c'est notre contrat final qui hérite de `ZombieFactory`, et qui a accès à tous les fonctions publiques des deux contrats. -Voici un exemple d'interaction avec notre contrat déployé utilisant Javascript et web3.js: +Voici un exemple d'interaction avec notre contrat déployé utilisant JavaScript et web3.js: ``` var abi = /* abi générée par le compilateur */ diff --git a/fr/2/3-msgsender.md b/fr/2/3-msgsender.md index 226ff116e..3592a6183 100644 --- a/fr/2/3-msgsender.md +++ b/fr/2/3-msgsender.md @@ -123,7 +123,7 @@ Mettons à jour notre fonction `_createZombie` de la leçon 1 pour désigner com 2. Ensuite, augmentons notre `ownerZombieCount` pour ce `msg.sender`. -En Solidity, vous pouvez augmenter un `uint` avec `++`, comme en Javascript : +En Solidity, vous pouvez augmenter un `uint` avec `++`, comme en JavaScript : ``` uint number = 0; diff --git a/fr/4/payable.md b/fr/4/payable.md index 026caad5d..97ed9434a 100644 --- a/fr/4/payable.md +++ b/fr/4/payable.md @@ -277,7 +277,7 @@ Quelqu'un va appeler la fonction depuis web3.js (depuis l'interface utilisateur OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -On remarque le champs `value` (valeur), où l'appel de la fonction Javascript indique combien d'`ether` envoyer (0.001). Si vous imaginez la transaction comme une enveloppe, et les paramètres que vous envoyez à l'appel de la fonction comme étant la lettre que vous mettez à l'intérieur, alors ajouter `value` revient au même que d'ajouter du cash à l'intérieur de l'enveloppe - la lettre et l'argent vont être donnés au même moment au destinataire. +On remarque le champs `value` (valeur), où l'appel de la fonction JavaScript indique combien d'`ether` envoyer (0.001). Si vous imaginez la transaction comme une enveloppe, et les paramètres que vous envoyez à l'appel de la fonction comme étant la lettre que vous mettez à l'intérieur, alors ajouter `value` revient au même que d'ajouter du cash à l'intérieur de l'enveloppe - la lettre et l'argent vont être donnés au même moment au destinataire. > Remarque : Si une fonction n'est pas marquée `payable` et que vous essayez de lui envoyer des Ether, la fonction rejettera votre transaction. diff --git a/fr/6/02.md b/fr/6/02.md index 668d55f8c..0ff2d0fc9 100644 --- a/fr/6/02.md +++ b/fr/6/02.md @@ -448,6 +448,6 @@ Vous pouvez utiliser ce code standard dans toutes les applications que vous cré ## A votre tour -Nous avons créé une balise script vide avant la balise de fermeture `` dans notre fichier HTML. Vous pouvez écrire notre code javascript pour notre leçon ici. +Nous avons créé une balise script vide avant la balise de fermeture `` dans notre fichier HTML. Vous pouvez écrire notre code JavaScript pour notre leçon ici. 1. Faites un copier/coller du code modèle ci-dessus pour détecter MetaMask. C'est le bloc qui commence par `window.addEventListener`. diff --git a/it/1/00-overview.md b/it/1/00-overview.md index 1eefaef9a..0ea28894e 100644 --- a/it/1/00-overview.md +++ b/it/1/00-overview.md @@ -8,4 +8,4 @@ Quindi pensi di avere quello che serve per diventare un ** CryptoZombie **, eh? Questo corso ti insegnerà come **costruire un gioco su Ethereum**. -È progettato per i principianti di Solidity, ma presume che tu abbia esperienza di programmazione in un'altra lingua (ad esempio Javascript). +È progettato per i principianti di Solidity, ma presume che tu abbia esperienza di programmazione in un'altra lingua (ad esempio JavaScript). diff --git a/it/1/events.md b/it/1/events.md index a86504a02..1b40ac473 100644 --- a/it/1/events.md +++ b/it/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Il front-end dell'app potrebbe quindi ascoltare l'evento. Un'implementazione javascript sarebbe simile a: +Il front-end dell'app potrebbe quindi ascoltare l'evento. Un'implementazione JavaScript sarebbe simile a: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/it/1/web3js.md b/it/1/web3js.md index b91513183..590373b87 100644 --- a/it/1/web3js.md +++ b/it/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Il nostro contratto di Solidity è completo! Ora dobbiamo scrivere un frontend javascript che interagisce con il contratto. +Il nostro contratto di Solidity è completo! Ora dobbiamo scrivere un frontend JavaScript che interagisce con il contratto. -Ethereum ha una libreria Javascript chiamata **_Web3.js_**. +Ethereum ha una libreria JavaScript chiamata **_Web3.js_**. In una lezione successiva esamineremo in dettaglio come distribuire un contratto e configurare Web3.js. Ma per ora diamo un'occhiata al codice di esempio di come Web3.js interagirebbe con il nostro contratto distribuito. @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -Ciò che il nostro javascript fa è prendere i valori generati sopra in `zombieDetails` ed usare un po' di magia javascript basata su browser (stiamo usando Vue.js) per scambiare le immagini e applicare i filtri CSS. Otterrai tutto il codice per questo in una lezione successiva. +Ciò che il nostro JavaScript fa è prendere i valori generati sopra in `zombieDetails` ed usare un po' di magia JavaScript basata su browser (stiamo usando Vue.js) per scambiare le immagini e applicare i filtri CSS. Otterrai tutto il codice per questo in una lezione successiva. # Provalo anche tu! diff --git a/it/2/10-interactingcontracts.md b/it/2/10-interactingcontracts.md index 47b9eaf41..6f3c93e46 100644 --- a/it/2/10-interactingcontracts.md +++ b/it/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -La funzione sembra un po' diversa da quelle cui siamo abituati a vedere. Puoi vedere che infatti ritorna... un mucchio di valori diversi! Se provieni da un linguaggio di programmazione come Javascript questo è diverso: in Solidity puoi restituire più di un valore da una funzione. +La funzione sembra un po' diversa da quelle cui siamo abituati a vedere. Puoi vedere che infatti ritorna... un mucchio di valori diversi! Se provieni da un linguaggio di programmazione come JavaScript questo è diverso: in Solidity puoi restituire più di un valore da una funzione. Ora che sappiamo come appare questa funzione, possiamo usarla per creare un'interfaccia: diff --git a/it/2/14-wrappingitup.md b/it/2/14-wrappingitup.md index 6b8581c35..3822e4bc8 100644 --- a/it/2/14-wrappingitup.md +++ b/it/2/14-wrappingitup.md @@ -15,11 +15,11 @@ Ecco fatto, hai completato la lezione 2! Puoi vedere la demo a destra per vederla in azione. Vai avanti, so che non puoi aspettare fino alla fine di questa pagina 😉. Fai clic su un gattino per attaccare e vedi il nuovo gatto-zombi che ottieni! -## Implementazione Javascript +## Implementazione JavaScript Una volta che siamo pronti a distribuire questo contratto su Ethereum, compileremo ed implementeremo semplicemente `ZombieFeeding`, poiché questo contratto è il nostro contratto finale che eredita da `ZombieFactory` ed ha accesso a tutti i metodi pubblici in entrambi i contratti. -Diamo un'occhiata ad un esempio di interazione con il nostro contratto distribuito utilizzando Javascript e web3.js: +Diamo un'occhiata ad un esempio di interazione con il nostro contratto distribuito utilizzando JavaScript e web3.js: ``` var abi = /* abi generato dal compilatore */ diff --git a/it/2/3-msgsender.md b/it/2/3-msgsender.md index 8c85b6280..e641031a3 100644 --- a/it/2/3-msgsender.md +++ b/it/2/3-msgsender.md @@ -122,7 +122,7 @@ Aggiorniamo il nostro metodo `_createZombie` della lezione 1 per assegnare la pr 2. Successivamente aumentiamo `ownerZombieCount` per questo `msg.sender`. -In Solidity puoi aumentare un `uint` con `++`, proprio come in javascript: +In Solidity puoi aumentare un `uint` con `++`, proprio come in JavaScript: ``` uint number = 0; diff --git a/it/4/payable.md b/it/4/payable.md index 33be47e86..a3583ce8e 100644 --- a/it/4/payable.md +++ b/it/4/payable.md @@ -310,7 +310,7 @@ Quello che succede qui è che qualcuno potrebbe chiamare la funzione da web3.js OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -Si noti il campo `value`, in cui la chiamata della funzione javascript specifica la quantità di `ether` da inviare (0.001). Pensa la transazione come ad una busta, i parametri che invii alla chiamata di funzione sono i contenuti della lettera che hai inserito, quindi aggiungere un valore è come mettere denaro nella busta: la lettera e il denaro vengono consegnati insieme al destinatario. +Si noti il campo `value`, in cui la chiamata della funzione JavaScript specifica la quantità di `ether` da inviare (0.001). Pensa la transazione come ad una busta, i parametri che invii alla chiamata di funzione sono i contenuti della lettera che hai inserito, quindi aggiungere un valore è come mettere denaro nella busta: la lettera e il denaro vengono consegnati insieme al destinatario. >Nota: se una funzione non è contrassegnata come `payable` e si tenta di inviare Ether come sopra, la funzione rifiuterà la transazione. diff --git a/it/6/00-overview.md b/it/6/00-overview.md index bedaeb99d..c4e544bb4 100644 --- a/it/6/00-overview.md +++ b/it/6/00-overview.md @@ -17,4 +17,4 @@ In questa lezione vedremo come interagire con il tuo contratto intelligente e co Nota che i front-end dell'app sono scritti in **JavaScript**, non in Solidity. Ma poiché il focus di questo corso è su Ethereum / Solidity, presumiamo che sia già a tuo agio nel costruire siti Web con HTML, JavaScript (incluso ES6 promises) e JQuery, e non spenderemo tempo a comprendere le basi di tali linguaggi. -Se non ti senti a tuo agio nel costruire siti Web con HTML / Javascript, ti consigliamo di completare un tutorial di base altrove prima di iniziare questa lezione. +Se non ti senti a tuo agio nel costruire siti Web con HTML / JavaScript, ti consigliamo di completare un tutorial di base altrove prima di iniziare questa lezione. diff --git a/it/6/02.md b/it/6/02.md index 8d32cc6b1..2abb68bce 100644 --- a/it/6/02.md +++ b/it/6/02.md @@ -551,6 +551,6 @@ Puoi utilizzare questo codice boilerplate in tutte le app che crei per richieder ## Facciamo una prova -Abbiamo creato alcuni tag script vuoti prima del tag di chiusura `` nel nostro file HTML. Possiamo scrivere qui il nostro codice javascript per questa lezione. +Abbiamo creato alcuni tag script vuoti prima del tag di chiusura `` nel nostro file HTML. Possiamo scrivere qui il nostro codice JavaScript per questa lezione. 1. Procedi e copia/incolla il codice template da sopra per rilevare Metamask. È il blocco che inizia con `window.addEventListener`. diff --git a/jp/1/web3js.md b/jp/1/web3js.md index b21912676..8a21d63d1 100644 --- a/jp/1/web3js.md +++ b/jp/1/web3js.md @@ -12,7 +12,7 @@ material: これでSolidityのコントラクトが完成だ!せっかくだからコントラクトがやり取りできるようにJavaScriptでフロントエンドの作り方も教えてやろう。 -イーサリアムには**_Web3.js_**というJavascriptライブラリがある。 +イーサリアムには**_Web3.js_**というJavaScriptライブラリがある。 Web3.jsの設定とかコントラクトに実装する方法とか詳しいことは後で教えてやる。今はとりあえずサンプルコードを見せるから、それをみてWeb3.jsがどういう風にコントラクトとやり取りをするのかを学ぶのだ。 diff --git a/no/1/00-overview.md b/no/1/00-overview.md index 1c9dbe658..45ec19dbf 100644 --- a/no/1/00-overview.md +++ b/no/1/00-overview.md @@ -8,4 +8,4 @@ Så du tror du har det som trengs for å bli en **CryptoZombie**? Dette kurset vil lære deg hvordan man **lager et spill for Ethereum**. -Det er laget for nybegynnere i Solidity, men det er forutintatt at du har noe kjennskap til programmering i andre programmeringsspråk(f.eks. Javascript). +Det er laget for nybegynnere i Solidity, men det er forutintatt at du har noe kjennskap til programmering i andre programmeringsspråk(f.eks. JavaScript). diff --git a/no/1/events.md b/no/1/events.md index 681ead1d9..6bdd35809 100644 --- a/no/1/events.md +++ b/no/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Appen din, på front-end siden, kan lytte etter eventet. En javascript implementasjon vil se slik ut: +Appen din, på front-end siden, kan lytte etter eventet. En JavaScript implementasjon vil se slik ut: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/no/1/web3js.md b/no/1/web3js.md index 78a5e9569..6083ad2a9 100644 --- a/no/1/web3js.md +++ b/no/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Solidity-kontrakten vår er ferdig! Nå trenger vi å skrive en javascript frontend som kan samhandle kontrakten vår. +Solidity-kontrakten vår er ferdig! Nå trenger vi å skrive en JavaScript frontend som kan samhandle kontrakten vår. -Ethereum har et Javascript library kalt **_Web3.js_**. +Ethereum har et JavaScript library kalt **_Web3.js_**. I en senere leksjon, kommer vi til å gå mer i dybden på hvordan distribuere en kontrakt og sette opp Web3.js. Men for nå la oss se på litt eksempel kode for hvordan Web3.js vil samhandle vår distribuerte kontrakt. @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -Det som javascript-en vår så gjør er å ta de genererte dataene i `zombieDetails` over, og bruker dem som nettleser-basert javascript magi (vi bruker Vue.js) for å bytte ut bildene og legge til CSS filter. Du kommer til å få all koden til dette i senere leksjoner. +Det som javascript-en vår så gjør er å ta de genererte dataene i `zombieDetails` over, og bruker dem som nettleser-basert JavaScript magi (vi bruker Vue.js) for å bytte ut bildene og legge til CSS filter. Du kommer til å få all koden til dette i senere leksjoner. # Test det! diff --git a/no/2/10-interactingcontracts.md b/no/2/10-interactingcontracts.md index 6b11ad6f2..f7aa0fc38 100644 --- a/no/2/10-interactingcontracts.md +++ b/no/2/10-interactingcontracts.md @@ -183,7 +183,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -Funksjonen ser litt annerledes ut enn vi er vant til. Du kan se det returnerer ... en rekke forskjellige verdier. Hvis du kommer fra et programmeringsspråk som Javascript, er dette annerledes - i Solidity kan du returnere mer enn en verdi fra en funksjon. +Funksjonen ser litt annerledes ut enn vi er vant til. Du kan se det returnerer ... en rekke forskjellige verdier. Hvis du kommer fra et programmeringsspråk som JavaScript, er dette annerledes - i Solidity kan du returnere mer enn en verdi fra en funksjon. Nå som vi vet hva denne funksjonen ser ut, kan vi bruke den til å lage et interface: diff --git a/no/2/13-kittygenes.md b/no/2/13-kittygenes.md index 816ba3f54..f2c2be2f2 100644 --- a/no/2/13-kittygenes.md +++ b/no/2/13-kittygenes.md @@ -145,7 +145,7 @@ Vi sier at katetzombier har `99` som de to siste sifrene i DNA (siden katter har ## If statements -If statements i Solidity ser akkurat ut som i javascript: +If statements i Solidity ser akkurat ut som i JavaScript: ``` function eatBLT(string sandwich) public { diff --git a/no/2/14-wrappingitup.md b/no/2/14-wrappingitup.md index d34ff3e65..29244e10b 100644 --- a/no/2/14-wrappingitup.md +++ b/no/2/14-wrappingitup.md @@ -15,11 +15,11 @@ material: Du kan sjekke demoen til høyre for å se den i aksjon. Fortsett, jeg vet at du ikke kan vente til bunnen av denne siden 😉. Klikk en kattunge for å angripe, og se den nye kittyzombieen du får! -## Javascript implementasjon +## JavaScript implementasjon Når vi er klare til å distribuere denne kontrakten til Ethereum, samler vi og distribuerer `ZombieFeeding` - siden denne kontrakten er vår endelige kontrakt som arver fra `ZombieFactory`, og har tilgang til alle offentlige metoder i begge kontrakter. -La oss se på et eksempel på samspill med vår distribuerte kontrakt ved hjelp av Javascript og web3.js: +La oss se på et eksempel på samspill med vår distribuerte kontrakt ved hjelp av JavaScript og web3.js: ``` var abi = /* abi generert av kompilatoren */ diff --git a/no/2/3-msgsender.md b/no/2/3-msgsender.md index e7a4cb1e3..4036e9d55 100644 --- a/no/2/3-msgsender.md +++ b/no/2/3-msgsender.md @@ -122,7 +122,7 @@ La oss oppdatere vår `_createZombie`-metode fra leksjon 1 for å tilordne eiers 2. Så, la oss øke `ownerZombieCount` for denne `msg.sender`-en. -I Solidity kan du øke en `uint` med `++`, akkurat som i javascript: +I Solidity kan du øke en `uint` med `++`, akkurat som i JavaScript: ``` uint number = 0; diff --git a/pl/1/00-overview.md b/pl/1/00-overview.md index 51b33bff6..ea6f2b077 100644 --- a/pl/1/00-overview.md +++ b/pl/1/00-overview.md @@ -9,4 +9,4 @@ Myślisz, że masz wszystko co potrzeba, aby stać się **CryptoZombie**, huh? Ten kurs nauczy Cię jak **zbudować grę na Ethereum**. Jest zaprojektowany z myślą o początkujących w Solidity. Zakłada jednak, że masz -jakieś programistyczne doświadczenie (np. w Javascript). +jakieś programistyczne doświadczenie (np. w JavaScript). diff --git a/pl/1/events.md b/pl/1/events.md index 18f02531b..d6c38b5cd 100644 --- a/pl/1/events.md +++ b/pl/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Twoja aplikacja frontowa może nasłuchiwać na zdarzenia. Javascript-owa implementacja powinna wyglądać następująco: +Twoja aplikacja frontowa może nasłuchiwać na zdarzenia. JavaScript-owa implementacja powinna wyglądać następująco: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/pl/1/web3js.md b/pl/1/web3js.md index 0508ea39d..6b84a7ce4 100644 --- a/pl/1/web3js.md +++ b/pl/1/web3js.md @@ -12,7 +12,7 @@ material: Nasz kontrakt Solidity jest gotowy! Teraz musimy już tylko napisać frontend w JavaScripcie, który będzie wchodził w interakcje z naszym kontraktem. -Ethereum dostarcza biblotekę Javascript o nazwie **_Web3.js_**. +Ethereum dostarcza biblotekę JavaScript o nazwie **_Web3.js_**. W późniejszych lekcjach pokażemy jak publikować kontrakt oraz jak ustawić Web3.js. Narazie jednak zobaczmy jak wygląda przykładowy kod, który komunikuje się z kontraktem. @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -Następnie javascript pobiera wygenerowaną powyżej wartość w `zombieDetails` i używa przeglądarkowej magii (używamy Vue.js) aby podmienić zdjęcia i filtry CSS. Zobaczysz ten kod w późniejszej lekcji. +Następnie JavaScript pobiera wygenerowaną powyżej wartość w `zombieDetails` i używa przeglądarkowej magii (używamy Vue.js) aby podmienić zdjęcia i filtry CSS. Zobaczysz ten kod w późniejszej lekcji. # Zadanie do wykonania diff --git a/pt/1/00-overview.md b/pt/1/00-overview.md index 7b758cca7..ae786d31a 100644 --- a/pt/1/00-overview.md +++ b/pt/1/00-overview.md @@ -9,4 +9,4 @@ Então, você acha que tem o que é preciso para se tornar um **CryptoZombie**, Este curso irá ensinar você como **construir um jogo no Ethereum** É projetado para iniciantes em Solidity, mas presume que você tem alguma experiência -em programação em outra linguagem (exemplo: Javascript) +em programação em outra linguagem (exemplo: JavaScript) diff --git a/pt/1/events.md b/pt/1/events.md index 7fc19c413..eb4f09d42 100644 --- a/pt/1/events.md +++ b/pt/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -O seu aplicativo frontend poderá então ouvir o evento. Uma implementação em Javascript ficaria assim: +O seu aplicativo frontend poderá então ouvir o evento. Uma implementação em JavaScript ficaria assim: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/pt/1/web3js.md b/pt/1/web3js.md index dbe17cffa..2e6aa88a4 100644 --- a/pt/1/web3js.md +++ b/pt/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Nosso contrato em Solidity esta completo! Agora nós vamos escrever o frontend em javascript que interage com o contrato. +Nosso contrato em Solidity esta completo! Agora nós vamos escrever o frontend em JavaScript que interage com o contrato. -Ethereum possui uma biblioteca em Javascript chamada **_Web3.js_**. +Ethereum possui uma biblioteca em JavaScript chamada **_Web3.js_**. Nas lições mais à frente, iremos nos aprofundar em como implantar um contrato e configurar a Web3.js. Mas por enquanto vamos somente ver uma amostra de um código de como a Web3.js irá interagir com um contrato já implantado (deployed). @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -O que o nosso javascript faz é pegar os valores gerados em `zombieDetails` acima, e os usa em um tipo de aplicação mágica no navegador (estamos usando Vue.js) para mudar as imagens e aplicar os filtros CSS. Você terá acesso a todo o código em futuras lições. +O que o nosso JavaScript faz é pegar os valores gerados em `zombieDetails` acima, e os usa em um tipo de aplicação mágica no navegador (estamos usando Vue.js) para mudar as imagens e aplicar os filtros CSS. Você terá acesso a todo o código em futuras lições. # Tente também! diff --git a/pt/2/10-interactingcontracts.md b/pt/2/10-interactingcontracts.md index bd23704b5..ad871a165 100644 --- a/pt/2/10-interactingcontracts.md +++ b/pt/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -A função parece um pouco diferente da função que nós precisamos. Você pode ver o que ela retorna... um monte de valores diferentes. Se você vem de uma linguagem de programação como Javascript, isto é diferente - em Solidity você pode retornar mais de um valor por função. +A função parece um pouco diferente da função que nós precisamos. Você pode ver o que ela retorna... um monte de valores diferentes. Se você vem de uma linguagem de programação como JavaScript, isto é diferente - em Solidity você pode retornar mais de um valor por função. Agora que nós sabemos como a função deve ser, podemos usá-la para criar uma interface: diff --git a/pt/2/13-kittygenes.md b/pt/2/13-kittygenes.md index 078090619..33e482054 100644 --- a/pt/2/13-kittygenes.md +++ b/pt/2/13-kittygenes.md @@ -145,7 +145,7 @@ Digamos que o gato-zumbi tem `99` como seus últimos 2 dígitos de DNA (desde qu ## Declarações de condição (IF) -Declaração de condições em Solidity parecem com as de javascript: +Declaração de condições em Solidity parecem com as de JavaScript: ``` function eatBLT(string sandwich) public { diff --git a/pt/2/14-wrappingitup.md b/pt/2/14-wrappingitup.md index 8f5e316ea..ee5743446 100644 --- a/pt/2/14-wrappingitup.md +++ b/pt/2/14-wrappingitup.md @@ -15,11 +15,11 @@ material: Você pode testar na demo ao lodo direito para ver em ação. Vá em frente, Eu sei que você não pode esperar até o fim desta página 😉. Clique é um gatinho para atacar, e veja o novo gato zumbi que você consegue! -## Implementação em Javascript +## Implementação em JavaScript Uma vez que estamos prontos para a implantação do contrato no Ethereum podemos compilar e implantar `ZombieFeeding` - desde que este contrato é o nosso contrato final que herda de `ZombieFactory`, e tem acesso a todos os métodos públicos em ambos os contratos. -Vejamos em um exemplo de interação com nosso contrato implantado usando Javascript e web3.js: +Vejamos em um exemplo de interação com nosso contrato implantado usando JavaScript e web3.js: ``` var abi = /* abi gerada pelo compilador */ diff --git a/pt/2/3-msgsender.md b/pt/2/3-msgsender.md index c7078bb43..488842f07 100644 --- a/pt/2/3-msgsender.md +++ b/pt/2/3-msgsender.md @@ -122,7 +122,7 @@ Vamos atualizar o nosso método `_createZombie` da lição 1 para atribuir a pro 2. Segundo, vamos incrementar o contador `ownerZombieCount` para este `msg.sender` -Em Solidity, você pode incrementar um `uint` com `++`, como em javascript: +Em Solidity, você pode incrementar um `uint` com `++`, como em JavaScript: ``` uint number = 0; diff --git a/pt/3/01-externaldependencies.md b/pt/3/01-externaldependencies.md index a961570c7..5df9a4fd1 100644 --- a/pt/3/01-externaldependencies.md +++ b/pt/3/01-externaldependencies.md @@ -141,7 +141,7 @@ material: } --- -Até agora, Solidity pareceu bastante similar a outras linguagens como Javascript. Mas as aplicações distribuídas em Ethereum são um tanto diferentes de aplicações normais em diversas maneiras. +Até agora, Solidity pareceu bastante similar a outras linguagens como JavaScript. Mas as aplicações distribuídas em Ethereum são um tanto diferentes de aplicações normais em diversas maneiras. Para começar, após você implantar um contrato em Ethereum, este é **_imutável_**, quer dizer que ele nunca poder ser modificado ou melhorado novamente. diff --git a/pt/3/12-forloops.md b/pt/3/12-forloops.md index 1073f23ab..f804bea5b 100644 --- a/pt/3/12-forloops.md +++ b/pt/3/12-forloops.md @@ -242,7 +242,7 @@ Desde que funções `view` não custam gas algum quando chamadas externamente, p ## Usando laços `for` -A sintaxe do laço `for` em Solidity é similar a de Javascript. +A sintaxe do laço `for` em Solidity é similar a de JavaScript. Vejamos um exemplo onde queremos fazer um array de números pares: diff --git a/pt/4/payable.md b/pt/4/payable.md index 3a2427b03..7e28b51fa 100644 --- a/pt/4/payable.md +++ b/pt/4/payable.md @@ -276,7 +276,7 @@ O que aconteceu aqui é que alguém queria chamar uma função da web3.js (de al OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -Perceba o campo `value` (valor), onde a função javascript irá especificar quanto `ether` à enviar (0.001). Se você pensar que a transação é como um envelope, e os parâmetros que você envia para a chamada da função são os conteúdos da carta que você colocou dentro, então adicionar o `value` é como colocar dinheiro dentro do envelope - a carta e o dinheiro serão entregues juntos ao destinatário. +Perceba o campo `value` (valor), onde a função JavaScript irá especificar quanto `ether` à enviar (0.001). Se você pensar que a transação é como um envelope, e os parâmetros que você envia para a chamada da função são os conteúdos da carta que você colocou dentro, então adicionar o `value` é como colocar dinheiro dentro do envelope - a carta e o dinheiro serão entregues juntos ao destinatário. >Nota: Se a função não for marcada como `payable` e você tentar enviar Ether como feito acima, a função irá rejeitar a sua transação. diff --git a/pt/6/00-overview.md b/pt/6/00-overview.md index 42726e4b5..efab2428d 100644 --- a/pt/6/00-overview.md +++ b/pt/6/00-overview.md @@ -16,4 +16,4 @@ Nesta lição, vamos ver como interagir com seu smart contract e construir um fr Observe que aplicativos front-ends são escritos em **JavaScript**, não em Solidity. Mas como o foco deste curso é o Ethereum / Solidity, presumimos que você já esteja confortável criando websites com HTML, JavaScript (incluindo o ES6 promisses) e JQuery, e não passaremos tempo cobrindo o básico dessas linguagens. -Se você ainda não estiver confortável construindo sites com HTML / Javascript, você deve fazer algum tutorial básico em outro lugar antes de iniciar esta lição. +Se você ainda não estiver confortável construindo sites com HTML / JavaScript, você deve fazer algum tutorial básico em outro lugar antes de iniciar esta lição. diff --git a/pt/6/02-web3-providers.md b/pt/6/02-web3-providers.md index d2d01b078..41296076a 100644 --- a/pt/6/02-web3-providers.md +++ b/pt/6/02-web3-providers.md @@ -449,6 +449,6 @@ Você pode usar esse código pronto em todos os aplicativos criados para exigir ## Vamos testar -Criamos algumas tags de script vazias antes da tag de fechamento `` em nosso arquivo HTML. Podemos escrever o nosso código javascript para esta lição aqui. +Criamos algumas tags de script vazias antes da tag de fechamento `` em nosso arquivo HTML. Podemos escrever o nosso código JavaScript para esta lição aqui. 1. Vá em frente e copie/cole o código do modelo acima para detectar o Metamask. É o bloco que começa com o `window.addEventListener`. diff --git a/ru/1/00-overview.md b/ru/1/00-overview.md index 36cf1cc36..7b61519a6 100644 --- a/ru/1/00-overview.md +++ b/ru/1/00-overview.md @@ -8,4 +8,4 @@ roadmap: roadmap.jpg На этом курсе ты научишься, как **создать игру на Ethereum**. -Курс для новичков в Ethereum, но надеемся, что у тебя есть опыт программирования на других языках (например, на Javascript). +Курс для новичков в Ethereum, но надеемся, что у тебя есть опыт программирования на других языках (например, на JavaScript). diff --git a/ru/1/events.md b/ru/1/events.md index bc7edc296..c8349b286 100644 --- a/ru/1/events.md +++ b/ru/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Теперь внешний интерфейс приложения сможет услышать событие. Примерно так будет выглядеть выполнение javascript: +Теперь внешний интерфейс приложения сможет услышать событие. Примерно так будет выглядеть выполнение JavaScript: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/ru/1/web3js.md b/ru/1/web3js.md index ca0fbc0d6..f039bcc56 100644 --- a/ru/1/web3js.md +++ b/ru/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Наш контракт Solidity готов! Теперь напишем внешний интерфейс javascript, который будет взаимодействовать с контрактом. +Наш контракт Solidity готов! Теперь напишем внешний интерфейс JavaScript, который будет взаимодействовать с контрактом. -В Ethereum есть библиотека Javascript под названием **_Web3.js_**. +В Ethereum есть библиотека JavaScript под названием **_Web3.js_**. В следующем уроке мы подробно изучим, как развернуть контракт и настроить Web3.js. А сейчас просто посмотрим, как Web3.js будет взаимодействовать с развернутым контрактом. @@ -66,7 +66,7 @@ function generateZombie(id, name, dna) { } ``` -В результате javascript берет значения, сгенерированные в `zombieDetails`, и применяет «браузерную магию» javascript (мы используем Vue.js), чтобы изменить изображения и примененить CSS-фильтр. В следующем уроке ты увидишь код целиком. +В результате JavaScript берет значения, сгенерированные в `zombieDetails`, и применяет «браузерную магию» JavaScript (мы используем Vue.js), чтобы изменить изображения и примененить CSS-фильтр. В следующем уроке ты увидишь код целиком. # Попробуй! diff --git a/ru/2/10-interactingcontracts.md b/ru/2/10-interactingcontracts.md index e2ae7e1fd..387b28de0 100644 --- a/ru/2/10-interactingcontracts.md +++ b/ru/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -Функция выглядит не совсем привычно. Смотри, она возвращает кучу разных значений! В отличие от Javascript в Solidity можно вернуть больше одного значения из функции. +Функция выглядит не совсем привычно. Смотри, она возвращает кучу разных значений! В отличие от JavaScript в Solidity можно вернуть больше одного значения из функции. Теперь, когда мы знаем, как должна выглядеть функция, можем использовать ее для создания интерфейса: diff --git a/ru/2/13-kittygenes.md b/ru/2/13-kittygenes.md index ef70415cb..475ec3b70 100644 --- a/ru/2/13-kittygenes.md +++ b/ru/2/13-kittygenes.md @@ -145,7 +145,7 @@ material: ## Оператор «если» -Оператор «если» в Solidity похож на javascript: +Оператор «если» в Solidity похож на JavaScript: ``` function eatBLT(string sandwich) public { diff --git a/ru/2/14-wrappingitup.md b/ru/2/14-wrappingitup.md index f7197bec8..119b68ceb 100644 --- a/ru/2/14-wrappingitup.md +++ b/ru/2/14-wrappingitup.md @@ -15,11 +15,11 @@ material: Чтобы увидеть все в действии, посмотри демо в поле справа. Вперед! Уверены, что ты умираешь от любопытства. Кликни, чтобы напасть на котика, и оцени своего нового зомбокитти! -## Внедрение Javascript +## Внедрение JavaScript Как только мы готовы деплоить контракт в Ethereum, то просто компилируем и разворачиваем `ZombieFeeding` — это наш окончательный контракт, который наследуется от `ZombieFactory` и имеет доступ ко всем открытым методам обоих контрактов. -Посмотри пример взаимодействия развернутого контракта с использование Javascript и web3.js: +Посмотри пример взаимодействия развернутого контракта с использование JavaScript и web3.js: ``` var abi = /* abi generated by the compiler */ diff --git a/ru/2/3-msgsender.md b/ru/2/3-msgsender.md index b76623319..aabaa27f4 100644 --- a/ru/2/3-msgsender.md +++ b/ru/2/3-msgsender.md @@ -122,7 +122,7 @@ function whatIsMyNumber() public view returns (uint) { 2. Во-вторых, увеличим `ownerZombieCount` для этого `msg.sender`. -В Solidity можно увеличить `uint` с помощью `++`, как в javascript: +В Solidity можно увеличить `uint` с помощью `++`, как в JavaScript: ``` uint number = 0; diff --git a/sk/1/web3js.md b/sk/1/web3js.md index 99163f9cd..dfe609e82 100644 --- a/sk/1/web3js.md +++ b/sk/1/web3js.md @@ -69,7 +69,7 @@ function generateZombie(id, name, dna) { } ``` -Náš Javascript ďalej vezme niektoré z hodnôt zo `zombieDetails` vyššie a so štipkou javascriptovej mágie (používame Vue.js) dosiahneme, aby sme menili obrázky a aplikovali CSS filtre. V neskorších lekciách uvidíš kompletný kód. +Náš JavaScript ďalej vezme niektoré z hodnôt zo `zombieDetails` vyššie a so štipkou javascriptovej mágie (používame Vue.js) dosiahneme, aby sme menili obrázky a aplikovali CSS filtre. V neskorších lekciách uvidíš kompletný kód. # Vyskúšaj si to sám diff --git a/sk/2/10-interactingcontracts.md b/sk/2/10-interactingcontracts.md index 04df5daf9..37bf6b41f 100644 --- a/sk/2/10-interactingcontracts.md +++ b/sk/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -Táto funkcia vyzerá trochu inak ako to, na čo sme zvyknutý. Všimni si že vracia... nie jednu, ale hneď niekoľko hodnôt. Ak prichádzaš z jazykov ako Javascript, možno budeš prekvapený. v Solidity je možné vrátit z funkcie niekoľko hodnôt naraz. +Táto funkcia vyzerá trochu inak ako to, na čo sme zvyknutý. Všimni si že vracia... nie jednu, ale hneď niekoľko hodnôt. Ak prichádzaš z jazykov ako JavaScript, možno budeš prekvapený. v Solidity je možné vrátit z funkcie niekoľko hodnôt naraz. Teraz keď už vieme, ako táto funkcia vyzerá, môžme to použiť na deklaráciu rozrania: diff --git a/sk/3/01-externaldependencies.md b/sk/3/01-externaldependencies.md index 4f20fc6c8..b9297e808 100644 --- a/sk/3/01-externaldependencies.md +++ b/sk/3/01-externaldependencies.md @@ -141,7 +141,7 @@ material: } --- -Doposiaľ Solidity vyzeralo celkom podobne ako ostatné programovanie jazyky, napríklad Javascript. Existuje však niekoľko veľkých rozdielov, akými sa decentralizované aplikácie (DApps) na Ethéreu líšia od klasických aplikácií. +Doposiaľ Solidity vyzeralo celkom podobne ako ostatné programovanie jazyky, napríklad JavaScript. Existuje však niekoľko veľkých rozdielov, akými sa decentralizované aplikácie (DApps) na Ethéreu líšia od klasických aplikácií. Za prvé, po tom čo nasadíš svoj kontrakt na Ethereum blockchain, stane sa **_nemeniteľným_**. To znamená že jeho kód už nikdy nemože byť upravený. diff --git a/sk/6/04.md b/sk/6/04.md index 90c57814d..bfc8591b1 100644 --- a/sk/6/04.md +++ b/sk/6/04.md @@ -476,9 +476,9 @@ Zombie[] public zombies; Keď v Solidity deklaruješ premennú ako `public`, automaticky sa vytvorí `public` "getter" funkcia s rovnakým názvom. Keby si teda chcel prístupiť k dátam zombie s ID `15`, zavolal by si funkciu `zombies(15)`. -A takto by si napísal v svojom front endede Javascript funkciu ktorá by brala zombie id ako argument, dotázala by sa kontraktu na dáta, a vrátila výsledok: +A takto by si napísal v svojom front endede JavaScript funkciu ktorá by brala zombie id ako argument, dotázala by sa kontraktu na dáta, a vrátila výsledok: -> Poznámka: Všetky príklady kódu ktoré v tejto lekcii používame používaju Web3.js **verzie 1.0**. Táto verzia používa javascript promises namiesto callbackov. Existuje veľa tutoriálov v ktorých je použitá staršia verzia Web3.js. Vo verzii 1.0 sa syntax poriadne zmenila, takže ak niekedy budeš kopírovať kód z iných tutoriálov, najprv sa uisti že počítali s rovnakou verziou akú používaš ty! +> Poznámka: Všetky príklady kódu ktoré v tejto lekcii používame používaju Web3.js **verzie 1.0**. Táto verzia používa JavaScript promises namiesto callbackov. Existuje veľa tutoriálov v ktorých je použitá staršia verzia Web3.js. Vo verzii 1.0 sa syntax poriadne zmenila, takže ak niekedy budeš kopírovať kód z iných tutoriálov, najprv sa uisti že počítali s rovnakou verziou akú používaš ty! ``` function getZombieDetails(id) { diff --git a/sk/6/10-wrappingitup.md b/sk/6/10-wrappingitup.md index 245071582..26eb9d205 100644 --- a/sk/6/10-wrappingitup.md +++ b/sk/6/10-wrappingitup.md @@ -55,7 +55,7 @@ Preto sme nechali túto implementáciu pomerne strohú. Tu je zoznam nápadov, k A to je len začiatok - som si istý že by sa dalo vymyslieť ešte oveľa viac funkcií. Už teraz máme obrovský zoznam. -Kedže pre vytvorenie takéhoto webového rozrania by sme potrebovali napísať veľa front-end kódu (HTML, CSS, Javascript, framework ako React alebo Vue.js), tvorba kompletného frontedu by zabrala osobitný kurz s aspoň 10 lekciami. Túto implementáciu teda necháme na tebe. +Kedže pre vytvorenie takéhoto webového rozrania by sme potrebovali napísať veľa front-end kódu (HTML, CSS, JavaScript, framework ako React alebo Vue.js), tvorba kompletného frontedu by zabrala osobitný kurz s aspoň 10 lekciami. Túto implementáciu teda necháme na tebe. > Poznámka: Napriek tomu že sú smart kontrakty decentralizované, náš front end pre interakciu s našou DAppkou by bol kompletne centralizovaný na nejakom webovom serveri. > diff --git a/th/1/events.md b/th/1/events.md index fab653eeb..eca9b33e6 100644 --- a/th/1/events.md +++ b/th/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -ด้านหน้าแอพพลิเคชั่นของคุณในตอนนี้ก็จะสามารถรับฟังอีเว้นท์ที่จะเกิดได้แล้ว ส่วนใน Javascript การเขียนโค้ดจะหน้าตาดังนี้ : +ด้านหน้าแอพพลิเคชั่นของคุณในตอนนี้ก็จะสามารถรับฟังอีเว้นท์ที่จะเกิดได้แล้ว ส่วนใน JavaScript การเขียนโค้ดจะหน้าตาดังนี้ : ``` YourContract.IntegersAdded(function(error, result) { diff --git a/th/1/web3js.md b/th/1/web3js.md index 05e91a815..f0077904f 100644 --- a/th/1/web3js.md +++ b/th/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Solidity contract ของเราก็เสร็จเรียบร้อยแล้ว! ตอนนี้ก็ได้เวลาของการเขียน javascript ที่จะไว้ใช้ด้านหน้าเพื่อ interact กับ contract แล้ว +Solidity contract ของเราก็เสร็จเรียบร้อยแล้ว! ตอนนี้ก็ได้เวลาของการเขียน JavaScript ที่จะไว้ใช้ด้านหน้าเพื่อ interact กับ contract แล้ว -Ethereum นั้นมี Javascript library ชื่อว่า **_Web3.js_** +Ethereum นั้นมี JavaScript library ชื่อว่า **_Web3.js_** ในบทหลังๆ เราจะทำการเรียนรู้ในเชิงลึกเกี่ยวกับการนำ contract มาปรับใช้และติดตั้ง Web3.js แต่ในตอนนี้จะขอพูดถึงแค่ตัวอย่างของโค้ดว่า Web3.jsนั้น interact กับ contractที่นำมาปรับใช้ของเราอย่างไร @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -และนี่ก็คือ javascript ของเรา ที่จะทำการสร้าง `zombieDetails` ด้านบน และอาจจะต้องใช้ javascripts ที่หามาจาก browser อีกเล็กน้อย (ในที่นี้เราใช้ Vau.js) เพื่อใช้ในการเปลี่ยนรูปต่างๆ ไปมาและใส่ CSS filter ต่างๆ ซึ่งคุณจะเข้าใจโค้ดทั้งหมดนี้ในบทต่อๆ ไป +และนี่ก็คือ JavaScript ของเรา ที่จะทำการสร้าง `zombieDetails` ด้านบน และอาจจะต้องใช้ javascripts ที่หามาจาก browser อีกเล็กน้อย (ในที่นี้เราใช้ Vau.js) เพื่อใช้ในการเปลี่ยนรูปต่างๆ ไปมาและใส่ CSS filter ต่างๆ ซึ่งคุณจะเข้าใจโค้ดทั้งหมดนี้ในบทต่อๆ ไป # ลองมาทดสอบกัน! diff --git a/th/2/10-interactingcontracts.md b/th/2/10-interactingcontracts.md index 02797d994..b29648f19 100644 --- a/th/2/10-interactingcontracts.md +++ b/th/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -ฟังก์ชั่นจะมีความแตกต่างเล็กน้อยจากฟังก์ชั่นปกติที่เราใช้กัน สามารถเห็นได้จากการรีเทิร์น... ค่าที่แตกต่างกันไปจำนวนหนึ่ง หากคุณมีความรู้มาจากภาษา Javascript สิ่งนี้จะค่อนข้างแตกต่าง ใน Solidity เราสามารถรีเทิร์นผลลัพธ์ออกมาจากฟังก์ชั่นได้หลายค่า +ฟังก์ชั่นจะมีความแตกต่างเล็กน้อยจากฟังก์ชั่นปกติที่เราใช้กัน สามารถเห็นได้จากการรีเทิร์น... ค่าที่แตกต่างกันไปจำนวนหนึ่ง หากคุณมีความรู้มาจากภาษา JavaScript สิ่งนี้จะค่อนข้างแตกต่าง ใน Solidity เราสามารถรีเทิร์นผลลัพธ์ออกมาจากฟังก์ชั่นได้หลายค่า ตอนนี้เราก็ทราบแล้วว่าฟังก์ชั่นหน้าตาเป็นอย่างไร ทำให้สามารถใช้ในการสร้าง interface ขึ้นมาได้: diff --git a/th/2/13-kittygenes.md b/th/2/13-kittygenes.md index e99f83acb..ef494eed0 100644 --- a/th/2/13-kittygenes.md +++ b/th/2/13-kittygenes.md @@ -145,7 +145,7 @@ material: ## ตัวอย่าง If statements -If statements in Solidity look just like javascript: +If statements in Solidity look just like JavaScript: ``` function eatBLT(string sandwich) public { diff --git a/th/2/14-wrappingitup.md b/th/2/14-wrappingitup.md index 5eb202604..ebc89df93 100644 --- a/th/2/14-wrappingitup.md +++ b/th/2/14-wrappingitup.md @@ -19,7 +19,7 @@ material: เนื่องจากตอนนี้ contract ได้พร้อมแล้วที่จะปรับใช้บน Ethereum เราจะมาคอมไพล์และใช้ฟังก์ชั่น `ZombieFeeding` กัน— เนื่องจาก contract นี้มีการ inherit มาจาก `ZombieFactory` ทำให้สามารถเข้าถึง method ของทั้ง 2 contract ที่เป็น public ได้ -มาดูตัวอย่างของการ interact กับ contract ของเราโดยการใช้Javascript และ web3.js กันดีกว่า: +มาดูตัวอย่างของการ interact กับ contract ของเราโดยการใช้JavaScript และ web3.js กันดีกว่า: ``` var abi = /* abi สร้างโดย compiler */ diff --git a/th/2/3-msgsender.md b/th/2/3-msgsender.md index 63f69bf11..faa1bf757 100644 --- a/th/2/3-msgsender.md +++ b/th/2/3-msgsender.md @@ -122,7 +122,7 @@ function whatIsMyNumber() public view returns (uint) { 2. ขั้นตอนที่ 2 คือการเพิ่มจำนวน `ownerZombieCount` สำหรับ `msg.sender` -ใน Solidity จะเพิ่มค่า `uint` ด้วยเครื่องหมาย `++` เหมือนใน javascript: +ใน Solidity จะเพิ่มค่า `uint` ด้วยเครื่องหมาย `++` เหมือนใน JavaScript: ``` uint number = 0; diff --git a/th/4/payable.md b/th/4/payable.md index 3ce74cdc2..f8db20208 100644 --- a/th/4/payable.md +++ b/th/4/payable.md @@ -276,7 +276,7 @@ contract OnlineStore { OnlineStore.buySomething({from: web3.eth.defaultAccount, value: web3.utils.toWei(0.001)}) ``` -ให้สังเกตในส่วนของ field `value` ที่ฟังก์ชั่น javascript ได้กำหนดว่าจะต้องส่ง `ether` ไปเท่าไหร่ (0.001) หากนึกถึงการถ่ายโอนในรูปแบบของจดหมาย และให้ parameter ที่ได้ส่งไปยังการเรียกใช้ฟังก์ชั่นเป็นเหมือนเนื้อหาด้านในของจดหมายแล้ว แปลว่าการเพิ่ม `value` เข้าไปก็เป็นเหมือนกับการใส่เงินเข้าไปภายในจดหมายนั่นเอง — จดหมายและเงินจะถูกส่งไปด้วยกันยังผู้รับ +ให้สังเกตในส่วนของ field `value` ที่ฟังก์ชั่น JavaScript ได้กำหนดว่าจะต้องส่ง `ether` ไปเท่าไหร่ (0.001) หากนึกถึงการถ่ายโอนในรูปแบบของจดหมาย และให้ parameter ที่ได้ส่งไปยังการเรียกใช้ฟังก์ชั่นเป็นเหมือนเนื้อหาด้านในของจดหมายแล้ว แปลว่าการเพิ่ม `value` เข้าไปก็เป็นเหมือนกับการใส่เงินเข้าไปภายในจดหมายนั่นเอง — จดหมายและเงินจะถูกส่งไปด้วยกันยังผู้รับ >Note: หากฟังก์ชั่นไม่ได้ถูกมาร์คไว้ว่าเป็น `payable` และเรายังพยายามที่จะส่ง Ether ไปหาแบบที่เราได้ทำไว้ข้างต้น ฟังก์ชั่นก็จะทำการละทิ้งการถ่ายโอนนี้ diff --git a/th/6/00-overview.md b/th/6/00-overview.md index e8b32257a..dd5201723 100644 --- a/th/6/00-overview.md +++ b/th/6/00-overview.md @@ -16,4 +16,4 @@ roadmap: roadmap6.png จำไว้ว่า front-end บนแอพพลิเคชั่นของเราถูกเขียนด้วยภาษา **JavaScript** ไม่ใช่ Solidity แต่ในเมื่อคอร์สนี้เพ่งความสนใจไปที่เรื่อง Ethereum / Solidity จึงไม่มีทางเลือกที่จะต้องคิดว่าเรามีความรู้ในเรื่องของการสร้างเว็บไซต์ด้วยโค้ด HTML, JavaScript กันอยู่แล้ว (รวมถึง ES6 promises) และ JQuery ซึ่งจะขอไม่ใช้เวลาในการพูดถึงเรื่องเนื้อหาพื้นฐานในภาษาเหล่านั้นนะจ๊ะ -แปลว่าถ้ายังไม่คุ้นเคยกับการสร้างเว็บไซต์ด้วย HTML / Javascript แล้วล่ะก็ ขอให้ไปศึกษาพื้นฐานต่างๆ ดังกล่าวจากที่อื่นมาให้แน่นก่อน แล้วค่อยกลับมาเรียนรู้กันต่อได้เลย +แปลว่าถ้ายังไม่คุ้นเคยกับการสร้างเว็บไซต์ด้วย HTML / JavaScript แล้วล่ะก็ ขอให้ไปศึกษาพื้นฐานต่างๆ ดังกล่าวจากที่อื่นมาให้แน่นก่อน แล้วค่อยกลับมาเรียนรู้กันต่อได้เลย diff --git a/th/6/02.md b/th/6/02.md index 5b72a2933..d385df2b7 100644 --- a/th/6/02.md +++ b/th/6/02.md @@ -449,7 +449,7 @@ window.addEventListener('load', function() { ## มาเริ่มทดสอบกันเลยดีกว่า -เนื่องจากเราได้สร้าง script tag เปล่าๆ ขึ้นมาเป็นที่เรียบร้อยก่อนที่จะมี tag `` ภายในไฟล์ HTML เอาไว้แล้ว เราจึงสามารถเขียนโค้ด javascript สำหรับบทเรียนนี้ไปได้เลย +เนื่องจากเราได้สร้าง script tag เปล่าๆ ขึ้นมาเป็นที่เรียบร้อยก่อนที่จะมี tag `` ภายในไฟล์ HTML เอาไว้แล้ว เราจึงสามารถเขียนโค้ด JavaScript สำหรับบทเรียนนี้ไปได้เลย 1. ให้ copy/paste ส่วนของ template code จากด้านบนในการตรวจสอบ Metamask โดยมันจะเป็น block ที่เริ่มต้นด้วย`window.addEventListener` diff --git a/th/6/04.md b/th/6/04.md index 030d6d27f..953f44675 100644 --- a/th/6/04.md +++ b/th/6/04.md @@ -500,7 +500,7 @@ getZombieDetails(15) หลังจากที่ผ่านส่วน promise ได้แล้ว (หมายถึงเราได้คำตอบกลับมาจาก web3 provider เป็นที่เรียบร้อย) โค้ดตัวอย่างของเราจะดำเนินต่อไปที่ statement ที่ชื่อ `then` ซึ่งแสดง `result` หรือผลลัพธ์ออกมาทางคอนโซล (console) -`result` คือ object ในรูป javascript มีหน้าตาดังนี้: +`result` คือ object ในรูป JavaScript มีหน้าตาดังนี้: ``` { diff --git a/tr/1/00-overview.md b/tr/1/00-overview.md index 2b682a427..42a5dfe7c 100644 --- a/tr/1/00-overview.md +++ b/tr/1/00-overview.md @@ -8,5 +8,5 @@ Sanki bir **CryptoZombie**ye başlamak için ne gerektiğini düşünüyorsun, h Bu kurs size **Ethereum'da bir oyun yapmanın** nasıl olduğunu öğretecek. -Güvenirlik için yeni başlayanlar için tasarlandı ancak başka bir dilde (örn. Javascript) +Güvenirlik için yeni başlayanlar için tasarlandı ancak başka bir dilde (örn. JavaScript) biraz tecrübe sahibi olduğunuzu varsayar. diff --git a/tr/1/events.md b/tr/1/events.md index ce3fed5d8..6f9b4d629 100644 --- a/tr/1/events.md +++ b/tr/1/events.md @@ -91,7 +91,7 @@ function add(uint _x, uint _y) public { } ``` -Uygulamanızın başlangıç aşaması daha sonra etkinliği dinleyebilir. Bir javascript uygulaması şöyle görünür: +Uygulamanızın başlangıç aşaması daha sonra etkinliği dinleyebilir. Bir JavaScript uygulaması şöyle görünür: ``` YourContract.IntegersAdded(function(error, result) { diff --git a/tr/1/web3js.md b/tr/1/web3js.md index 88d00cf57..1bbaecc2b 100644 --- a/tr/1/web3js.md +++ b/tr/1/web3js.md @@ -10,9 +10,9 @@ material: answer: 1 --- -Solidity kontratımız tamamlandı! Şimdi kontrat ile etkileşen bir javascript ön yüzü yazmamız gerek. +Solidity kontratımız tamamlandı! Şimdi kontrat ile etkileşen bir JavaScript ön yüzü yazmamız gerek. -Ethereum **_Web3.js_** denilen bir Javascript kütüphanesine sahip. +Ethereum **_Web3.js_** denilen bir JavaScript kütüphanesine sahip. Sonraki bir derste, bir kontratın nasıl dağıtılacağının ve Web3.js kurulumunun derinlerine ineceğiz. Fakat şimdilik, Web3.js'nin sevk edilmiş kontratla nasıl etkileşeceğine ilişkin bazı örnek kodlara bakalım. @@ -68,7 +68,7 @@ function generateZombie(id, name, dna) { } ``` -Java scriptimiz daha sonra ne yaparsa yukarıdaki `zombieDetails` içinde oluşturulan değerleri alır ve görüntüleri götürmek için bir tarayıcı merkezli javascript sihirbazı (biz Vue.js kullanıyoruz) kullanır ve CSS filtreleri uygular. Sonraki derslerde bunun için tüm kodları alacaksınız. +Java scriptimiz daha sonra ne yaparsa yukarıdaki `zombieDetails` içinde oluşturulan değerleri alır ve görüntüleri götürmek için bir tarayıcı merkezli JavaScript sihirbazı (biz Vue.js kullanıyoruz) kullanır ve CSS filtreleri uygular. Sonraki derslerde bunun için tüm kodları alacaksınız. # Bir şans ver! diff --git a/tr/2/10-interactingcontracts.md b/tr/2/10-interactingcontracts.md index 5b228c5a8..f557ca70d 100644 --- a/tr/2/10-interactingcontracts.md +++ b/tr/2/10-interactingcontracts.md @@ -184,7 +184,7 @@ function getKitty(uint256 _id) external view returns ( } ``` -Fonksiyon alışık olduğumuzdan biraz farklı gözüküyor. Bir grup farklı değer getirdiğini... görebilirsiniz. Javascript gibi bir programlama dilinden geliyorsanız, bu farklıdır — Solidity'de bir fonksiyondan birden fazla değer getirebilirsiniz. +Fonksiyon alışık olduğumuzdan biraz farklı gözüküyor. Bir grup farklı değer getirdiğini... görebilirsiniz. JavaScript gibi bir programlama dilinden geliyorsanız, bu farklıdır — Solidity'de bir fonksiyondan birden fazla değer getirebilirsiniz. Şimdi bu foksiyonun nasıl göründüğünü biliyoruz, onu bir arayüz oluşturmak için kullanabiliriz: diff --git a/tr/2/14-wrappingitup.md b/tr/2/14-wrappingitup.md index fdb2b802a..c9fdd7f7a 100644 --- a/tr/2/14-wrappingitup.md +++ b/tr/2/14-wrappingitup.md @@ -15,11 +15,11 @@ material: Çalışmasını görmek için demoyu kontrol edebilirsiniz. Devam edin, Biliyorum bu sayfanın aşağısına kadar bekleyemiyorsunuz 😉. Saldırı için bir kitty'e tıklayın ve edindiğiniz yeni kitty zombieyi görün! -## Javascript uygulaması +## JavaScript uygulaması Bu kontratı Ethereum'a açmaya hazır olduğumuzda `ZombieFeeding`'i derleyip yayacağız — bu kontrat `ZombieFactory`'den kalan son kontratımız olduğundan ve her iki kontratta da tüm genel yöntemlere erişimi olduğundan. -Javascript ve web3.js kullanarak yayılan kontratımızın bir etkileşim örneğine bakalım: +JavaScript ve web3.js kullanarak yayılan kontratımızın bir etkileşim örneğine bakalım: ``` var abi = /* abi derleyici tarafından oluşturuldu */