Skip to content

Commit f99c4d2

Browse files
Merge pull request #180 from fatmabadri/master
Translate modifying document
2 parents 58e1402 + 3705071 commit f99c4d2

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

2-ui/1-document/07-modifying-document/6-create-list/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ importance: 4
22

33
---
44

5-
# Bir Liste Olustur
5+
# Create a List
66

77
Kullanıcı girdisinden bir liste oluşturmak için bir arayüz yazın.
88

99
Her liste maddesi için:
1010

1111
1. 'Komut istem'(`prompt`)i kullanarak bir kullanıcıya içeriği hakkında sorun.
12-
2.Onunla `<li>`yi yarat ve onu `<ul>`ye ekle. Create the `<li>` with it and add it to `<ul>`.
12+
2.Onunla `<li>`yi yarat ve onu `<ul>`ye ekle.
1313
3. Kullanıcı girişi iptal edene kadar devam edin (komut isteminde `tuş:Esc` veya CANCEL'a basarak).
1414

15-
Tüm elenetler dinamik olarak oluşturulmalıdır.
15+
Tüm elementler dinamik olarak oluşturulmalıdır.
1616

17-
Eğer bir kullanıcı HTML etiketleri(tags) yazıyorsa, metin gibi davranılmalıdır.
17+
Eğer bir kullanıcı HTML etiketleri(tags) yazıyorsa, onlara metin gibi davranılmalıdır.
1818

1919
[demo src="solution"]

2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
}
2929

3030
function createTreeDom(obj) {
31-
// if there's no children, then the call returns undefined
32-
// and the <ul> won't be created
31+
// Hiç çocuk yoksa, o zaman çağrı dönüşleri tanımlanamaz
32+
// ve <ul> oluşturulamayacaktır
3333
if (!Object.keys(obj).length) return;
3434

3535
let ul = document.createElement('ul');

2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
container.innerHTML = createTreeText(obj);
2828
}
2929

30-
function createTreeText(obj) { // standalone recursive function
30+
function createTreeText(obj) { // bağımsız özyinelemeli fonksiyon
3131
let li = '';
3232
let ul;
3333
for (let key in obj) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The easiest way to walk the object is to use recursion.
1+
Nesneyi gezmenin en kolay yolu özyineleme kullanmaktır.
22

33
1. [The solution with innerHTML](sandbox:innerhtml).
44
2. [The solution with DOM](sandbox:build-tree-dom).

2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<div id="tree"></div>
1111

12-
<!-- The result should be:
12+
<!-- Sonuç şöyle olmalıdır:
1313
<div id="tree">
1414
<ul>
1515
<li>Fish

2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ importance: 5
44

55
# Create a tree from the object
66

7-
Write a function `createTree` that creates a nested `ul/li` list from the nested object.
7+
İçiçe geçmiş nesneden, içiçe geçmiş bir `ul/li` listesi oluşturan bir "createTree" fonksiyonu yazın.
88

9-
For instance:
9+
Örneğin:
1010

1111
```js
1212
let data = {
@@ -28,7 +28,7 @@ let data = {
2828
};
2929
```
3030

31-
The syntax:
31+
Sözdizimi (syntax):
3232

3333
```js
3434
let container = document.getElementById('container');
@@ -37,15 +37,15 @@ createTree(container, data); // creates the tree in the container
3737
*/!*
3838
```
3939

40-
The result (tree) should look like this:
40+
Sonuç (ağaç) şöyle görünmeli:
4141

4242
[iframe border=1 src="build-tree-dom"]
4343

44-
Choose one of two ways of solving this task:
44+
Bu görevi çözmenin iki yolundan birini seçin:
4545

46-
1. Create the HTML for the tree and then assign to `container.innerHTML`.
47-
2. Create tree nodes and append with DOM methods.
46+
1. Ağaç için HTML oluşturun ve ardından `container.innerHTML`ye atayın.
47+
2. Ağaç düğümleri (tree nodes) oluşturun ve DOM yöntemleriyle sonuna ekleyin.
4848

49-
Would be great if you could do both.
49+
Eğer her ikisini de yapabilirseniz harika olur.
5050

51-
P.S. The tree should not have "extra" elements like empty `<ul></ul>` for the leaves.
51+
Not: Ağacın yapraklar için boş `<ul></ul>` gibi "fazladan" öğeleri olmamalıdır.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
To append text to each `<li>` we can alter the text node `data`.
1+
Metni her bir `<li>`nin sonuna eklemek için, metin düğümü (text node) `data`sını değiştiririz.

2-ui/1-document/07-modifying-document/8-tree-count/source.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</ul>
4141

4242
<script>
43-
// ... your code ...
43+
// ... sizin kodunuz ...
4444
</script>
4545

4646
</body>

2-ui/1-document/07-modifying-document/8-tree-count/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ importance: 5
44

55
# Show descendants in a tree
66

7-
There's a tree organized as nested `ul/li`.
7+
`ul/li` olarak iç içe geçmiş bir ağaç var.
88

9-
Write the code that adds to each `<li>` the number of its descendants. Skip leaves (nodes without children).
9+
Her bir `<li>` nin neslinden gelenlerin sayısını ekleyen kodu yazın. Yaprakları geçin (çocuksuz düğümler).
1010

11-
The result:
11+
Sonuç:
1212

1313
[iframe border=1 src="solution"]

2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,46 +29,46 @@
2929
<script>
3030
function createCalendar(elem, year, month) {
3131

32-
let mon = month - 1; // months in JS are 0..11, not 1..12
32+
let mon = month - 1; // JS'da aylar 0..11'dir, 1..12 değildir
3333
let d = new Date(year, mon);
3434

3535
let table = '<table><tr><th>MO</th><th>TU</th><th>WE</th><th>TH</th><th>FR</th><th>SA</th><th>SU</th></tr><tr>';
3636

37-
// spaces for the first row
38-
// from Monday till the first day of the month
37+
// ilk satır için yer
38+
// Pazartesi'den ayın ilk gününe kadar
3939
// * * * 1 2 3 4
4040
for (let i = 0; i < getDay(d); i++) {
4141
table += '<td></td>';
4242
}
4343

44-
// <td> with actual dates
44+
// asıl tarihlerle <td>
4545
while (d.getMonth() == mon) {
4646
table += '<td>' + d.getDate() + '</td>';
4747

48-
if (getDay(d) % 7 == 6) { // sunday, last day of week - newline
48+
if (getDay(d) % 7 == 6) { // Pazar günü, haftanın son günü - yeni satır
4949
table += '</tr><tr>';
5050
}
5151

5252
d.setDate(d.getDate() + 1);
5353
}
5454

55-
// add spaces after last days of month for the last row
55+
// ayın son günlerinden sonra, son satır için boş yer ekleyin
5656
// 29 30 31 * * * *
5757
if (getDay(d) != 0) {
5858
for (let i = getDay(d); i < 7; i++) {
5959
table += '<td></td>';
6060
}
6161
}
6262

63-
// close the table
63+
// tabloyu kapat
6464
table += '</tr></table>';
6565

6666
elem.innerHTML = table;
6767
}
6868

69-
function getDay(date) { // get day number from 0 (monday) to 6 (sunday)
69+
function getDay(date) { // 0 (pazartesi günü)n'den 6 (pazar günü)'ne kadar gün numarası alın
7070
let day = date.getDay();
71-
if (day == 0) day = 7; // make Sunday (0) the last day
71+
if (day == 0) day = 7; // Pazar günü (0) son gün
7272
return day - 1;
7373
}
7474

0 commit comments

Comments
 (0)