GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — The modern mode, "use strict" by szvvx · Pull Request #15 · javascript-tutorial/hu.javascript.info Conversation
szcsl
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @justizumi! Thanks for the PR! I appreciate your contribution, but unfortunately, the hungarian translation is awkward on occassions and this can hinder understanding for newbies. I am happy to help make it sound more natural, although it will require a bit of a rewrite -- but the PR and the contribution would still be yours. :) May I comment your PRs?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was an error while loading. Please reload this page.
|
Dear @szcsl Thank you for reviewing my pull request! I also noticed, that my translation may not be as good as it should be, but I would be more than happy, if you could help me improve it! So please feel free to comment my PR's! Tips on how to be better at translating in the first place are appreciated too :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Apologies for commenting a lot. I tried to honor the initial translation as much as possible, but I have a strong preference for reducing unnecessary constructs. But again, many thanks for taking your time!
I put the whole replacement text in the comment for each line, where applicable. Feel free to ask if in doubt. I'll setup a more convenient communaction channel soon, to ease the conversation.
I could have merged it and update it myself, but I don't want to hijack your contribution. If you prefer, I can simply merge and update the other PR and any future PRs -- but I think it's fair, to have it merged as your PR. :)
My general guidelines for translations are:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1,89 +1,89 @@ | |||
| # The modern mode, "use strict" | |||
| # A modern mode, "use strict" | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Modern üzemmód, "use strict"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # A modern mode, "use strict" | ||
|
|
||
| For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn't change. | ||
| Egy hosszú ideig a JavaScript kompatibilitási hibák nélkül fejlődött. Új funkciók gyakran jelentek meg, ám a régiek viszont sosem változtak. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A JavaScript hosszú ideig kompatibilitási nehézségek nélkül fejlődött. A nyelv új elemekkel bővült, a meglévőek pedig változatlanok voltak.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Egy hosszú ideig a JavaScript kompatibilitási hibák nélkül fejlődött. Új funkciók gyakran jelentek meg, ám a régiek viszont sosem változtak. | ||
|
|
||
| That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript's creators got stuck in the language forever. | ||
| Ennek nagy előnye volt, hogy a kódot bármikor is írták mindig helytálló maradt, ám viszont azzal hogy a régi dolgok sosem változtak azzal az a nagy baj, hogy bármilyen imperfekciót is ejtettek a JavaScript készítői, az örökre a nyelvben ragadt. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A nyelv újabb verziói így kompatibilisek maradtak a korábban írt programokkal, cserébe viszont együtt kellett élni a nyelv tervezésekor hozott rossz döntésekkel.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most such modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`. | ||
| Ez volt a helyzet, míg 2009-ben meg nem jelent az ECMAScript 5 (ES5). Az ES5 sok új funkciót hozott a JS-be és sok régit is megváltoztatott. Ahoz hogy a régi kód továbbá is működőképes maradhasson, ezeknek a változtatásoknak nagy részét alapból kikapcsolták. Ezeket a funciókat egy különleges diretívával kapcsolhatjuk be, a `"use strict"`-el. | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ez volt a tényállás, mígnem 2009-ben megjelent az ECMAScript 5 (ES5), amely nem csak bővítette a nyelvet, hanem néhol meg is változtatta a működését. Annak érdekében, hogy ezek a változások ne okozzanak gondot a régebben írt programokban, e változtatások alapértelmezetten ki vannak kapcsolva, az engedélyezésükhöz pedig egy speciális "use strict" diektívát kell elhelyezni a kódban.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## "use strict" | ||
|
|
||
| The directive looks like a string: `"use strict"` or `'use strict'`. When it is located at the top of a script, the whole script works the "modern" way. | ||
| Ez a direktíva pontosan úgy néz ki mint egy átlagos szöveg (string) objektum: `"use strict"`, vagy `'use strict'`. Mikor ezt a direktívát a szkript tetejére hejezed, akkor az a szkriptet arra utasítja, hogy a "modern módon" működjön. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ez a direktíva ránézésre egy átlagos szöveg (string): "use strict", vagy 'use strict'. A szkript tetejére helyezve azonban arra utasítja a JS motort, hogy a szkriptet modern üzemmódban futtassa.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Ez a kérdés, míg először eléggé egyértelműnek hangzik, a valóságban nem az. | ||
|
|
||
| One could recommend to start scripts with `"use strict"`... But you know what's cool? | ||
| Ugye, egyesek azt ajánlanák, hogy használd előszeretettel a `"use strict"`-et ...De tudod mi itt a menő dolog? |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okkal gondolhatnánk, hogy mindig érdemes használni a "use strict"-et, de erre nincs szükség.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Ugye, egyesek azt ajánlanák, hogy használd előszeretettel a `"use strict"`-et ...De tudod mi itt a menő dolog? | ||
|
|
||
| Modern JavaScript supports "classes" and "modules" - advanced language structures (we'll surely get to them), that enable `use strict` automatically. So we don't need to add the `"use strict"` directive, if we use them. | ||
| A modern JavaScript támogat olyanokat mint például a "class"-ek és a "module"-ok (majd azokat is tanulni fogjuk), amik automatikusan engedélyezik a `"use strict"`-et. Tehát ha ilyenek vannak a kódunkban, a `"use strict"`-et nyugodtan nélkülözhetjük. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A modern JavaScript egyes nyelvi elemei, mint az osztály (class) és a modul (module) - ezeket később részletezzük - alapértelmezetten strict üzemmódban futnak, így ezeknek a nyelvi elemeknek a használatakor a "use strict" elhagyható.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| A modern JavaScript támogat olyanokat mint például a "class"-ek és a "module"-ok (majd azokat is tanulni fogjuk), amik automatikusan engedélyezik a `"use strict"`-et. Tehát ha ilyenek vannak a kódunkban, a `"use strict"`-et nyugodtan nélkülözhetjük. | ||
|
|
||
| **So, for now `"use strict";` is a welcome guest at the top of your scripts. Later, when your code is all in classes and modules, you may omit it.** | ||
| **Tehát egyelőre a `"use strict";` az csak egy kis extra a szkriptjeink elején. Később, amikor a kódunk tele lesz modulokkal és classokkal, már nyugodtan kihagyhatjuk a `"use strict"`-et.** |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Egyelőre jó, ha használjuk a "use strict"-et, de később, amikor a kódunk modulokból és osztályokból áll, elhagyhatjuk.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| A következő fejezetekben tanulunk majd egy kicsit a nyelvi funckiókról és az új és régi módok közti különbségekről. Szerencsénkre az utóbbiakból nincsen sok, és azok amik vannak azok is csak a mi dolgunkat fogják könnyíteni. | ||
|
|
||
| All examples in this tutorial assume strict mode unless (very rarely) specified otherwise. | ||
| Az ebben a fejezetben lévő példák mind elvárják a "strict mode" használatát, hacsak ennek az állításnak hamisságát nem fejeztük ki előre. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Az ebben a fejezetben lévő példák, ha nincs másként feltüntetve, strict üzemmódot feltételeznek.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Ez a legtöbb böngészőben (mint például a Chrome vagy a Firefox) működik. | ||
|
|
||
| If it doesn't, e.g. in an old browser, there's an ugly, but reliable way to ensure `use strict`. Put it inside this kind of wrapper: | ||
| Ha esetleg mégse (például egy régi böngészőben), akkor van egy csúnya, de megbízható megoldás a `use strict` használatára. Egy ilyesmi kód blokkra lesz szükségünk: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ha ez nem működne (például régi böngészőben), akkor egy megbízható megoldás az alábbi konstrukció használata:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following through! :) I will review the other PR soon.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.