Skip to content

Conversation

@mustafadinler
Copy link
Member

No description provided.

Copy link

@ozgunbal ozgunbal left a comment

Choose a reason for hiding this comment

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

@mustafadinler 4'ü de birleşince büyük bir commit olmuş. Okurken yoruldum :D Gördüklerimi yazdım ama gözden kaçanlar da olmuş olabilir. Bu PR özelinde bi reviewer daha olması fena olmaz diye düşünüyorum.

#### Sınıf genişletilebilirliği

People often add properties to classes from other JavaScript libraries. Here is a simple JavaScript example of this:
İnsanlar sıklıkla diğer JavaScript kitaplıklarındaki sınıflara özellikler ekler. İşte basit bir JavaScript örneği:

Choose a reason for hiding this comment

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

library için bir yerde kütüphane, bir yerde kitaplık kullanılmış. Benim gönlüm kütüphaneden yana ama yine de tartışmaya açık :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Bencede kutuphane o sekilde guncelleyecegim

@@ -1,5 +1,5 @@
#### What's up with the IIFE
The js generated for the class could have been:
#### IIFE Nedir Ne Değildir?

Choose a reason for hiding this comment

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

Bence araya virgül koymalıyız. "nedir, ne değildir?

```

The reason its wrapped in an Immediately-Invoked Function Expression (IIFE) i.e.
Sebebi Anlık-Çağrılan Fonksiyon İfadesi (Immediately-Invoked Function Expression) (IIFE) ile sarmalanmıştır, yani:

Choose a reason for hiding this comment

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

"sebebi ... ile sarmalanmıştır" olmuş çeviri. -> "Bunun sebebi ... ile sarmalanmasıdır" daha iyi


### `__extends`
You will notice that as soon as you inherit a class TypeScript also generates the following function:
Şunu farkedeceksiniz ki bir sınıftan kalıtım yaptığınız anda TypeScript ayrıca aşağıdaki fonksiyonu da oluşturur:

Choose a reason for hiding this comment

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

farkedeceksiniz -> fark edeceksiniz
"inherit" için "kalıtım yapmak" dışında bir alternatif olabilir mi acaba? Aklıma bir şey gelmedi ama okurken çok bir şey ifade etmedi kalıtım yapmak.

Copy link
Member Author

Choose a reason for hiding this comment

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

turemek veya turetmek nasil olur?

Choose a reason for hiding this comment

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

daha iyi bence.
"Şunu fark edeceksiniz ki bir sınıftan alt bir sınıf türettiğinizde Typescript...." olabilir.

1. sets up the child class function's prototype to optionally lookup members on the parent's `proto` i.e. effectively `d.prototype.__proto__ = b.prototype`
Burada `d` türetilmiş sınıfı ve `b` üst sınıfı ifade eder. Bu fonksiyon iki şey yapar:
1. `for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];` yani üst sınıfının statik elemanlarını alt sınıfının üzerine kopyalar
1. `d.prototype.__proto__ = b.prototype` yani etkin biçimde, alt sınıfının fonksiyonlarının prototiplerini isteğe bağlı olarak arama elemanlarına üst sınıfının `proto`'ları üzerinde atama yapar

Choose a reason for hiding this comment

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

Bence pek anlaşılır olmamış. Burası için önerisi olan var mı?

Copy link
Member Author

Choose a reason for hiding this comment

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

Burada cift tirnak icerisindeki esitligi acikliyor. Benimde pek icime sinmedi destek lazim:)

bird.fly();
```
Basically `bird.fly` will be looked up from `bird.__proto__.fly` (remember that `new` makes the `bird.__proto__` point to `Bird.prototype`) and `bird.walk` (an inherited member) will be looked up from `bird.__proto__.__proto__.walk` (as `bird.__proto__ == Bird.prototype` and `bird.__proto__.__proto__` == `Animal.prototype`).
Aslında `bird.fly` `bird.__proto__.fly`'da aranacaktır (remember that `new`'ın `bird.__proto__`'nun `Bird.prototype`'u işaret ettireceğini hatırlayın) ve `bird.walk` (türetilen eleman) `bird.__proto__.__proto__.walk`'da aranacaktır (`bird.__proto__ == Bird.prototype` ve `bird.__proto__.__proto__` == `Animal.prototype` gibi).

Choose a reason for hiding this comment

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

"remember that" orada kalmış.

### Sınıflar
JavaScript'teki yüksek öncelikli öğeler olan sınıflara sahip olmak şu nedenlerden ötürü önemlidir:
1. [Sınıflar, soyutlama için faydalı bir yapı sunarlar.](./tips/classesAreUseful.md)
2. Geliştiricilere, kendi sürümleriyle gelen frameworkler (emberjs,reactjs etc) yerine, sınıfları kullanabilmeleri için tutarlı bir yöntem sağlar.

Choose a reason for hiding this comment

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

framework için bir çeviri önerilebilir. Ya da glossary'de bir karşılığı en azından.

docs/classes.md Outdated
})();
```
This is a fairly idiomatic traditional JavaScript class pattern now as a first class language construct.
Şimdi bu, birinci sınıf dil yapısı olarak yeterince deyimsel bir geleneksel JavaScript sınıfı kalıbıdır.

Choose a reason for hiding this comment

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

deyimsel'i kaldırsak mı? türkçede sırıtmış sanki.

```

As always these modifiers work for both member properties and member functions.
Her zaman olduğu gibi, bu belirleyiciler hem eleman özellikleri hem de eleman fonksiyonları için çalışır.

Choose a reason for hiding this comment

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

modifier'a değiştirici desek daha iyi olmaz mı?

Copy link
Member Author

Choose a reason for hiding this comment

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

aslinda olabilir ama bu gune kadar okudugum cok turkce makalede hep erisim belirleyici olarak kullanilmisti. Ben cok benimsemis olabilrim o yuzden tartisalim.

Choose a reason for hiding this comment

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

literatürü bilmiyorum açıkçası, doğru kullanım oysa glossary'de görmek lazım 😄

docs/classes.md Outdated
```ts
class Foo {
members = []; // Initialize directly
members = []; // Direk olarak yüklenir

Choose a reason for hiding this comment

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

direk -> direkt ya da doğrudan

Copy link

@ozgunbal ozgunbal left a comment

Choose a reason for hiding this comment

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

değişiklikler güzel olmuş. yine de başka bir göz daha baksın bu çeviriye diyorum.

@Blind-Striker Blind-Striker merged commit 75ef009 into CodeFiction:master Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants