From 11494dca178c32aa2c8be0c746cf1a17b04ad187 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Tue, 10 Dec 2024 14:45:28 +0300 Subject: [PATCH 01/26] edited a few translations --- po/tr.po | 76 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/po/tr.po b/po/tr.po index ffd561f29584..50334f3ae325 100644 --- a/po/tr.po +++ b/po/tr.po @@ -34,7 +34,7 @@ msgstr "Çeviriler" #: src/SUMMARY.md src/cargo.md msgid "Using Cargo" -msgstr "Cargo Kullanımı" +msgstr "Cargo'yu Kullanmak" #: src/SUMMARY.md msgid "Rust Ecosystem" @@ -175,7 +175,7 @@ msgstr "Demetler" #: src/SUMMARY.md src/tuples-and-arrays/iteration.md msgid "Array Iteration" -msgstr "Dizi İterasyonu" +msgstr "Dizi Adımlama (Iteration)" #: src/SUMMARY.md src/tuples-and-arrays/destructuring.md msgid "Patterns and Destructuring" @@ -240,7 +240,7 @@ msgstr "Tür Eş İsimleri (Type Aliases)" #: src/SUMMARY.md src/user-defined-types/exercise.md msgid "Exercise: Elevator Events" -msgstr "Alıştırma: Asansör Etkinlikleri" +msgstr "Alıştırma: Asansör Olayları" #: src/SUMMARY.md msgid "Day 2: Morning" @@ -252,7 +252,7 @@ msgstr "Desen Eşleştirme" #: src/SUMMARY.md src/pattern-matching/match.md msgid "Matching Values" -msgstr "Değerleri Eşleştirme" +msgstr "Değerleri Eşleştirmek" #: src/SUMMARY.md src/pattern-matching/destructuring.md msgid "Destructuring" @@ -386,7 +386,7 @@ msgstr "`From` ve `Into`" #: src/SUMMARY.md src/std-traits/casting.md msgid "Casting" -msgstr "Casting" +msgstr "Tür Çevirimi" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" @@ -398,7 +398,7 @@ msgstr "`Default`, yapı (struct) güncelleme sözdizimi" #: src/SUMMARY.md src/std-traits/closures.md msgid "Closures" -msgstr "Kapanışlar (Closures)" +msgstr "Çevreleyiciler (Closures)" #: src/SUMMARY.md src/std-traits/exercise.md msgid "Exercise: ROT13" @@ -483,7 +483,7 @@ msgstr "Ödünç Alma Kontrolü" #: src/SUMMARY.md src/borrowing/interior-mutability.md msgid "Interior Mutability" -msgstr "İç (Interior) Değiştirilebilirlik" +msgstr "İç Değişebilirlik (Interior Mutability)" #: src/SUMMARY.md src/borrowing/exercise.md msgid "Exercise: Health Statistics" @@ -515,7 +515,7 @@ msgstr "Gün 4: Sabah" #: src/SUMMARY.md src/iterators.md msgid "Iterators" -msgstr "Adımlayıcıyılar (Iterators)" +msgstr "Adımlayıcılar (Iterators)" #: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md msgid "`Iterator`" @@ -567,7 +567,7 @@ msgstr "Diğer Test Türleri" #: src/SUMMARY.md src/testing/lints.md msgid "Compiler Lints and Clippy" -msgstr "Derleyicinin Tüyleri ve Clippy Aracı" +msgstr "Derleyici Tüyleri (Lint) ve Clippy Aracı" #: src/SUMMARY.md src/testing/exercise.md msgid "Exercise: Luhn Algorithm" @@ -619,7 +619,7 @@ msgstr "Ham Göstericilerinin İçeriği (Dereferencing)" #: src/SUMMARY.md src/unsafe-rust/mutable-static.md msgid "Mutable Static Variables" -msgstr "Değiştirilebilir Statik Değişkenler" +msgstr "Değişebilir Statik Değişkenler" #: src/SUMMARY.md src/unsafe-rust/unions.md msgid "Unions" @@ -635,7 +635,7 @@ msgstr "Emniyetsiz Özellikler (Traits)" #: src/SUMMARY.md msgid "Exercise: FFI Wrapper" -msgstr "Alıştırma: FFI Sarıcı" +msgstr "Alıştırma: FFI Sarmalayıcı" #: src/SUMMARY.md src/bare-metal/android.md msgid "Android" @@ -809,7 +809,7 @@ msgstr "Java ile" #: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md #: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md msgid "Exercises" -msgstr "Egzersizler" +msgstr "Alıştırmalar" #: src/SUMMARY.md msgid "Chromium" @@ -1525,8 +1525,8 @@ msgid "" "information in the standard library." msgstr "" "İnsanların alıştırmaları kendi başlarına veya küçük gruplar halinde " -"çözmelerine izin verin. Genellikle sabah ve öğleden sonra egzersizlere 30-45 " -"dakika harcıyoruz (çözümleri gözden geçirme (review) zamanı da dahil). " +"çözmelerine izin verin. Genellikle sabah ve öğleden sonra alıştırmalara " +"30-45 dakika harcıyoruz (çözümleri gözden geçirme (review) zamanı da dahil). " "İnsanlara takılıp kalmadıklarını veya yardımcı olabileceğiniz bir konu olup " "olmadığını sorduğunuzdan emin olun. Birkaç kişinin aynı sorunu yaşadığını " "gördüğünüzde bunu sınıfa söyleyin ve bir çözüm önerin; örneğin insanlara " @@ -2276,9 +2276,9 @@ msgid "" "which can be executed through your browser. This makes the setup much easier " "and ensures a consistent experience for everyone." msgstr "" -"Bu eğitimde çoğunlukla Rust dilini tarayıcınız üzerinden " -"çalıştırabileceğiniz örnekler üzerinden inceleyeceğiz. Bu, kurulumu çok daha " -"kolay hale getirir ve herkes için tutarlı bir deneyim sağlar." +"Bu eğitimde çoğunlukla Rust dilini tarayıcınız üzerinden yürütebileceğiniz " +"örnekler üzerinden inceleyeceğiz. Bu, kurulumu çok daha kolay hale getirir " +"ve herkes için tutarlı bir deneyim sağlar." #: src/cargo/code-samples.md msgid "" @@ -2286,7 +2286,7 @@ msgid "" "the exercises. On the last day, we will do a larger exercise which shows you " "how to work with dependencies and for that you need Cargo." msgstr "" -"Cargo'nun kurulumu hala teşvik edilmektedir: egzersizleri yapmanızı " +"Cargo'nun kurulumu hala teşvik edilmektedir: alıştırmaları yapmanızı " "kolaylaştıracaktır. Son gün, bağımlılıklarla nasıl çalışacağınızı ve bunun " "için Cargo'ya ihtiyacınız olduğunu gösteren daha büyük bir alıştırma " "yapacağız." @@ -2320,7 +2320,7 @@ msgid "" "The embedded playgrounds cannot execute unit tests. Copy-paste the code and " "open it in the real Playground to demonstrate unit tests." msgstr "" -"Gömülü deneme alanları (playgrounds) birim testleri gerçekleştiremez. Birim " +"Gömülü deneme alanları (playgrounds) birim testlerini yürütemez. Birim " "testlerini göstermek için kodu kopyalayıp yapıştırın ve gerçek Deneme " "Alanında (Playground) açın." @@ -2505,8 +2505,7 @@ msgstr "[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)" msgid "" "Including 10 minute breaks, this session should take about 2 hours and 5 " "minutes" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürecektir" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmeli" #: src/welcome-day-1.md msgid "Please remind the students that:" @@ -2574,7 +2573,7 @@ msgid "" msgstr "" "Eğer bunu bir sınıfta öğretiyorsanız, burası programın üzerinden geçmek için " "iyi bir yerdir. Her bölümün sonunda bir alıştırma ve ardından bir ara " -"olduğunu unutmayın. Aradan sonra egzersiz çözümünü tamamlamayı planlayın. " +"olduğunu unutmayın. Aradan sonra alıştırma çözümünü tamamlamayı planlayın. " "Burada listelenen zamanlar kursun programa uygun devam etmesi için bir " "öneridir. Esnek olmaktan ve gerektiği gibi ayarlamaktan çekinmeyin!" @@ -2601,7 +2600,7 @@ msgstr "[Deneme Alanı](./hello-world/playground.md) (2 dakika)" #: src/hello-world.md msgid "This segment should take about 15 minutes" -msgstr "Bu bölüm yaklaşık 15 dakika sürecektir" +msgstr "Bu bölüm yaklaşık 15 dakika sürmeli" #: src/hello-world/what-is-rust.md msgid "" @@ -2694,7 +2693,7 @@ msgid "" "_Compile time memory safety_ - whole classes of memory bugs are prevented at " "compile time" msgstr "" -"_Derleme zamanı bellek güvenliği_ - derleme zamanında tüm bellek hataları " +"_Derleme zamanı bellek emniyeti_ - derleme zamanında tüm bellek hataları " "sınıfları önlenir" #: src/hello-world/benefits.md @@ -2703,7 +2702,7 @@ msgstr "İlklendirilmemiş değişken yok." #: src/hello-world/benefits.md msgid "No double-frees." -msgstr "Double free ((adresi iki kez serbest bırakma)) yok." +msgstr "Adresi iki kez serbest bırakma (double free) yok." #: src/hello-world/benefits.md msgid "No use-after-free." @@ -2806,9 +2805,9 @@ msgstr "" "C veya C++ deneyimi: Rust, ödünç alma denetleyicisi (borrow checker) " "aracılığıyla tüm _çalışma zamanı hatalarını(runtime errors)_ ortadan " "kaldırır. C ve C++'daki gibi performans elde edersiniz bununla birlikte " -"bellek güvenliği sorunları yaşamazsınız. Ayrıca desen eşleştirme (pattern " -"matching) ve yerleşik bağımlılık yönetimi (dependency management) gibi " -"yapılara sahip modern bir dil elde edersiniz." +"bellek emniyetsizliği sorunları yaşamazsınız. Ayrıca desen eşleştirme " +"(pattern matching) ve yerleşik bağımlılık yönetimi (dependency management) " +"gibi yapılara sahip modern bir dil elde edersiniz." #: src/hello-world/benefits.md msgid "" @@ -2904,7 +2903,7 @@ msgstr "[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)" #: src/types-and-values.md src/control-flow-basics.md src/generics.md #: src/modules.md msgid "This segment should take about 40 minutes" -msgstr "Bu bölüm yaklaşık 40 dakika sürecektir" +msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" #: src/types-and-values/hello-world.md msgid "" @@ -2933,7 +2932,7 @@ msgstr "" #: src/types-and-values/hello-world.md msgid "The `main` function is the entry point of the program." -msgstr "'main' fonksiyon programın giriş noktasıdır (entry point)." +msgstr "`main` fonksiyon programın giriş noktasıdır (entry point)." #: src/types-and-values/hello-world.md msgid "Rust has hygienic macros, `println!` is an example of this." @@ -3009,7 +3008,7 @@ msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" msgstr "" -"Rust, statik tür özelliğine sahip olmasıyla tür güvenliği sağlar. Değişken " +"Rust, statik tür özelliğine sahip olmasıyla tür emniyeti sağlar. Değişken " "bağlamaları (binding) `let` ile yapılır:" #: src/types-and-values/variables.md src/control-flow-basics/loops/for.md @@ -6086,7 +6085,7 @@ msgstr "" #: src/std-types.md msgid "This segment should take about 1 hour and 20 minutes" -msgstr "" +msgstr "Bu bölüm yaklaşık 1 saat 20 dakika sürmeli" #: src/std-types.md msgid "" @@ -6678,7 +6677,7 @@ msgstr "" #: src/std-traits.md msgid "This segment should take about 1 hour and 40 minutes" -msgstr "" +msgstr "Bu bölüm yaklaşık 1 saat 40 dakika sürmeli" #: src/std-traits.md msgid "" @@ -8891,7 +8890,7 @@ msgstr "" #: src/iterators.md src/testing.md msgid "This segment should take about 45 minutes" -msgstr "Bu bölüm yaklaşık 45 dakika sürecektir" +msgstr "Bu bölüm yaklaşık 45 dakika sürmeli" #: src/iterators/iterator.md msgid "" @@ -10638,7 +10637,7 @@ msgstr "" #: src/unsafe-rust/exercise.md msgid "Safe FFI Wrapper" -msgstr "Güvenli FFI Sarıcı (Wrapper)" +msgstr "Emniyetli FFI Sarıcı (Wrapper)" #: src/unsafe-rust/exercise.md msgid "" @@ -20295,8 +20294,8 @@ msgstr "" #~ msgid "Day 3: Generics, traits, error handling, testing, and unsafe Rust." #~ msgstr "" -#~ "3. Gün: Jenerikler, özellikler (traits), hata işleme, testler ve güvenli " -#~ "olmayan (unsafe) Rust." +#~ "3. Gün: Jenerikler, özellikler (traits), hata işleme, testler ve " +#~ "emniyetsiz (unsafe) Rust." #~ msgid "" #~ "```rust,editable\n" @@ -20487,7 +20486,8 @@ msgstr "" #~ msgid "" #~ "It is possible to produce memory leaks in (safe) Rust. Some examples are:" #~ msgstr "" -#~ "(Güvenli) Rust'ta bellek sızıntılarının oluşması mümkündür. Bazı örnekler:" +#~ "(Emniyetli) Rust'ta bellek sızıntılarının oluşması mümkündür. Bazı " +#~ "örnekler:" #~ msgid "" #~ "You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box." From 58f1ec8717d4d3492026475726f033c0510d21ec Mon Sep 17 00:00:00 2001 From: enes1313 Date: Tue, 10 Dec 2024 18:24:18 +0300 Subject: [PATCH 02/26] updated the tr.po file --- po/tr.po | 4906 +++++++++++++++++++++++++++++------------------------- 1 file changed, 2647 insertions(+), 2259 deletions(-) diff --git a/po/tr.po b/po/tr.po index 50334f3ae325..698c29d2257a 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2024-04-07T05:11:51+03:00\n" -"PO-Revision-Date: 2024-04-09 12:31+0300\n" +"POT-Creation-Date: 2024-12-10T14:46:21+03:00\n" +"PO-Revision-Date: 2024-12-10 15:34+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -10,7 +10,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #: src/SUMMARY.md src/index.md msgid "Welcome to Comprehensive Rust 🦀" @@ -52,47 +52,52 @@ msgstr "Cargo'nun Yerel (Local) Olarak Çalıştırılması" msgid "Day 1: Morning" msgstr "Gün 1: Sabah" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md +#: src/welcome-day-4.md src/concurrency/welcome-async.md msgid "Welcome" msgstr "Hoş Geldiniz" -#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md +#: src/types-and-values/hello-world.md msgid "Hello, World" msgstr "Merhaba, Dünya" -#: src/SUMMARY.md src/hello-world/what-is-rust.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md msgid "What is Rust?" msgstr "Rust Nedir?" -#: src/SUMMARY.md src/hello-world/benefits.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md msgid "Benefits of Rust" msgstr "Rust'ın Faydaları" -#: src/SUMMARY.md src/hello-world/playground.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md msgid "Playground" msgstr "Deneme Alanı (Playground)" -#: src/SUMMARY.md src/types-and-values.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/types-and-values.md msgid "Types and Values" msgstr "Türler ve Değerler" -#: src/SUMMARY.md src/types-and-values/variables.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md msgid "Variables" msgstr "Değişkenler" -#: src/SUMMARY.md src/types-and-values/values.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md msgid "Values" msgstr "Değerler" -#: src/SUMMARY.md src/types-and-values/arithmetic.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md msgid "Arithmetic" msgstr "Aritmetik" -#: src/SUMMARY.md src/types-and-values/inference.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md msgid "Type Inference" msgstr "Tür Çıkarımı" -#: src/SUMMARY.md src/types-and-values/exercise.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md msgid "Exercise: Fibonacci" msgstr "Alıştırma: Fibonacci" @@ -109,7 +114,8 @@ msgstr "Alıştırma: Fibonacci" msgid "Solution" msgstr "Çözüm" -#: src/SUMMARY.md src/control-flow-basics.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/control-flow-basics.md msgid "Control Flow Basics" msgstr "Kontrol Akışı Temelleri" @@ -117,7 +123,7 @@ msgstr "Kontrol Akışı Temelleri" msgid "`if` Expressions" msgstr "`if` İfadeleri" -#: src/SUMMARY.md src/control-flow-basics/loops.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md msgid "Loops" msgstr "Döngüler" @@ -137,7 +143,8 @@ msgstr "`break` ve `continue`" msgid "Labels" msgstr "Etiketler" -#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/blocks-and-scopes.md msgid "Blocks and Scopes" msgstr "Bloklar ve Kapsamlar" @@ -145,15 +152,17 @@ msgstr "Bloklar ve Kapsamlar" msgid "Scopes and Shadowing" msgstr "Kapsamlar (Scopes) ve Gölgeleme (Shadowing)" -#: src/SUMMARY.md src/control-flow-basics/functions.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/functions.md msgid "Functions" msgstr "Fonksiyonlar" -#: src/SUMMARY.md src/control-flow-basics/macros.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md msgid "Macros" msgstr "Makrolar" -#: src/SUMMARY.md src/control-flow-basics/exercise.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/exercise.md msgid "Exercise: Collatz Sequence" msgstr "Alıştırma: Collatz Sekansı" @@ -161,84 +170,90 @@ msgstr "Alıştırma: Collatz Sekansı" msgid "Day 1: Afternoon" msgstr "Gün 1: Öğleden Sonra" -#: src/SUMMARY.md src/tuples-and-arrays.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md msgid "Tuples and Arrays" msgstr "Demetler (Tuples) ve Diziler (Arrays)" -#: src/SUMMARY.md src/tuples-and-arrays/arrays.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md msgid "Arrays" msgstr "Diziler" -#: src/SUMMARY.md src/tuples-and-arrays/tuples.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md msgid "Tuples" msgstr "Demetler" -#: src/SUMMARY.md src/tuples-and-arrays/iteration.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md msgid "Array Iteration" msgstr "Dizi Adımlama (Iteration)" -#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md +#: src/SUMMARY.md src/tuples-and-arrays.md +#: src/tuples-and-arrays/destructuring.md msgid "Patterns and Destructuring" msgstr "Desenler ve Çözümlenme (Destructuring)" -#: src/SUMMARY.md src/tuples-and-arrays/exercise.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md msgid "Exercise: Nested Arrays" msgstr "Alıştırma: İçiçe Diziler" -#: src/SUMMARY.md src/references.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/references.md msgid "References" msgstr "Referanslar" -#: src/SUMMARY.md src/references/shared.md +#: src/SUMMARY.md src/references.md src/references/shared.md msgid "Shared References" msgstr "Paylaşılan Referanslar" -#: src/SUMMARY.md src/references/exclusive.md +#: src/SUMMARY.md src/references.md src/references/exclusive.md msgid "Exclusive References" msgstr "Özel (Exclusive) Referanslar" -#: src/SUMMARY.md -msgid "Slices: `&[T]`" +#: src/SUMMARY.md src/references.md src/references/slices.md +msgid "Slices" msgstr "Dilimler: `&[T]`" -#: src/SUMMARY.md src/references/strings.md +#: src/SUMMARY.md src/references.md src/references/strings.md msgid "Strings" msgstr "Dizeler (Strings)" -#: src/SUMMARY.md src/references/exercise.md +#: src/SUMMARY.md src/references.md src/references/exercise.md msgid "Exercise: Geometry" msgstr "Alıştırma: Geometri" -#: src/SUMMARY.md src/user-defined-types.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/user-defined-types.md msgid "User-Defined Types" msgstr "Kullanıcı Tanımlı Türler" -#: src/SUMMARY.md src/user-defined-types/named-structs.md +#: src/SUMMARY.md src/user-defined-types.md +#: src/user-defined-types/named-structs.md msgid "Named Structs" msgstr "İsimli Yapılar" -#: src/SUMMARY.md src/user-defined-types/tuple-structs.md +#: src/SUMMARY.md src/user-defined-types.md +#: src/user-defined-types/tuple-structs.md msgid "Tuple Structs" msgstr "Demet Yapıları (Tuple Structs)" -#: src/SUMMARY.md src/user-defined-types/enums.md -#: src/pattern-matching/destructuring.md +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md +#: src/pattern-matching/destructuring-enums.md msgid "Enums" msgstr "Enumlar" -#: src/SUMMARY.md -msgid "Static" -msgstr "Static" - #: src/SUMMARY.md msgid "Const" msgstr "Const" -#: src/SUMMARY.md src/user-defined-types/aliases.md +#: src/SUMMARY.md src/user-defined-types.md +msgid "Static" +msgstr "Static" + +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md msgid "Type Aliases" msgstr "Tür Eş İsimleri (Type Aliases)" -#: src/SUMMARY.md src/user-defined-types/exercise.md +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md msgid "Exercise: Elevator Events" msgstr "Alıştırma: Asansör Olayları" @@ -246,35 +261,43 @@ msgstr "Alıştırma: Asansör Olayları" msgid "Day 2: Morning" msgstr "Gün 2: Sabah" -#: src/SUMMARY.md src/pattern-matching.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2.md src/pattern-matching.md msgid "Pattern Matching" msgstr "Desen Eşleştirme" -#: src/SUMMARY.md src/pattern-matching/match.md +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md msgid "Matching Values" msgstr "Değerleri Eşleştirmek" -#: src/SUMMARY.md src/pattern-matching/destructuring.md -msgid "Destructuring" +#: src/SUMMARY.md src/pattern-matching.md +msgid "Destructuring Structs" +msgstr "Yapıların (Struct) Çözümlenmesi" + +#: src/SUMMARY.md src/pattern-matching.md +#, fuzzy +msgid "Destructuring Enums" msgstr "Çözümlenme" -#: src/SUMMARY.md src/pattern-matching/let-control-flow.md +#: src/SUMMARY.md src/pattern-matching.md +#: src/pattern-matching/let-control-flow.md msgid "Let Control Flow" msgstr "Let'li Kontrol Akışı" -#: src/SUMMARY.md src/pattern-matching/exercise.md +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" msgstr "Alıştırma: İfade Değerlendirmesi" -#: src/SUMMARY.md src/methods-and-traits.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2.md src/methods-and-traits.md msgid "Methods and Traits" msgstr "Metotlar ve Özellikler (Traits)" -#: src/SUMMARY.md src/methods-and-traits/methods.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md msgid "Methods" msgstr "Metotlar" -#: src/SUMMARY.md src/methods-and-traits/traits.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md msgid "Traits" msgstr "Özellikler (Traits)" @@ -283,7 +306,6 @@ msgid "Implementing Traits" msgstr "Özelliklerin (Traits) Gerçekleştirimi" #: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md -#, fuzzy msgid "Supertraits" msgstr "Üstözellikler (Supertraits)" @@ -291,23 +313,28 @@ msgstr "Üstözellikler (Supertraits)" msgid "Associated Types" msgstr "İlişkili Türler" -#: src/SUMMARY.md src/methods-and-traits/deriving.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md msgid "Deriving" msgstr "Türetme" -#: src/SUMMARY.md +#: src/SUMMARY.md src/methods-and-traits.md msgid "Exercise: Generic Logger" msgstr "Alıştırma: Genel Kaydedici" -#: src/SUMMARY.md src/generics.md +#: src/SUMMARY.md +msgid "Day 2: Afternoon" +msgstr "Gün 2: Öğleden Sonra" + +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/generics.md msgid "Generics" msgstr "Jenerikler" -#: src/SUMMARY.md src/generics/generic-functions.md +#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md msgid "Generic Functions" msgstr "Jenerik Fonksiyonlar" -#: src/SUMMARY.md src/generics/generic-data.md +#: src/SUMMARY.md src/generics.md src/generics/generic-data.md msgid "Generic Data Types" msgstr "Jenerik Veri Türleri" @@ -315,7 +342,7 @@ msgstr "Jenerik Veri Türleri" msgid "Generic Traits" msgstr "Jenerik Özellikler (Traits)" -#: src/SUMMARY.md src/generics/trait-bounds.md +#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md msgid "Trait Bounds" msgstr "Özellik (Trait) Sınırları" @@ -323,23 +350,25 @@ msgstr "Özellik (Trait) Sınırları" msgid "`impl Trait`" msgstr "`impl Trait`" +#: src/SUMMARY.md src/generics/dyn-trait.md +#, fuzzy +msgid "`dyn Trait`" +msgstr "`impl Trait`" + #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" msgstr "Alıştırma: Jenerik `min`" -#: src/SUMMARY.md -msgid "Day 2: Afternoon" -msgstr "Gün 2: Öğleden Sonra" - -#: src/SUMMARY.md src/std-types.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/std-types.md msgid "Standard Library Types" msgstr "Standart Kütüphane Türleri" -#: src/SUMMARY.md src/std-types/std.md +#: src/SUMMARY.md src/std-types.md src/std-types/std.md msgid "Standard Library" msgstr "Standart Kütüphane" -#: src/SUMMARY.md src/std-types/docs.md +#: src/SUMMARY.md src/std-types.md src/std-types/docs.md msgid "Documentation" msgstr "Dokümantasyon" @@ -347,7 +376,7 @@ msgstr "Dokümantasyon" msgid "`Option`" msgstr "`Option`" -#: src/SUMMARY.md +#: src/SUMMARY.md src/error-handling/result.md msgid "`Result`" msgstr "`Result`" @@ -364,19 +393,21 @@ msgstr "`Vec`" msgid "`HashMap`" msgstr "`HashMap`" -#: src/SUMMARY.md src/std-types/exercise.md +#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md msgid "Exercise: Counter" msgstr "Alıştırma: Sayıcı" -#: src/SUMMARY.md src/std-traits.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/std-traits.md msgid "Standard Library Traits" msgstr "Standart Kütüphanedeki Özellikler (Traits)" -#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md +#: src/concurrency/welcome-async.md msgid "Comparisons" msgstr "Karşılaştırmalar" -#: src/SUMMARY.md src/std-traits/operators.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md msgid "Operators" msgstr "Operatörler" @@ -384,7 +415,7 @@ msgstr "Operatörler" msgid "`From` and `Into`" msgstr "`From` ve `Into`" -#: src/SUMMARY.md src/std-traits/casting.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md msgid "Casting" msgstr "Tür Çevirimi" @@ -396,11 +427,11 @@ msgstr "`Read` ve `Write`" msgid "`Default`, struct update syntax" msgstr "`Default`, yapı (struct) güncelleme sözdizimi" -#: src/SUMMARY.md src/std-traits/closures.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md msgid "Closures" msgstr "Çevreleyiciler (Closures)" -#: src/SUMMARY.md src/std-traits/exercise.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md msgid "Exercise: ROT13" msgstr "Alıştırma: ROT13" @@ -408,23 +439,24 @@ msgstr "Alıştırma: ROT13" msgid "Day 3: Morning" msgstr "Gün 3: Sabah" -#: src/SUMMARY.md src/memory-management.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3.md src/memory-management.md msgid "Memory Management" msgstr "Bellek Yönetimi" -#: src/SUMMARY.md src/memory-management/review.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md msgid "Review of Program Memory" msgstr "Program Belleğinin Gözden Geçirilmesi" -#: src/SUMMARY.md src/memory-management/approaches.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md msgid "Approaches to Memory Management" msgstr "Bellek Yönetimine Yaklaşımlar" -#: src/SUMMARY.md src/memory-management/ownership.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md msgid "Ownership" msgstr "Sahiplik" -#: src/SUMMARY.md src/memory-management/move.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md msgid "Move Semantics" msgstr "Taşıma Semantiği" @@ -432,7 +464,7 @@ msgstr "Taşıma Semantiği" msgid "`Clone`" msgstr "`Clone`" -#: src/SUMMARY.md src/memory-management/copy-types.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md msgid "Copy Types" msgstr "Kopyalanan Türler" @@ -440,11 +472,12 @@ msgstr "Kopyalanan Türler" msgid "`Drop`" msgstr "`Drop`" -#: src/SUMMARY.md src/memory-management/exercise.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md msgid "Exercise: Builder Type" msgstr "Alıştırma: İnşa Edici / Yapıcı Tür (Builder Type)" -#: src/SUMMARY.md src/smart-pointers.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3.md src/smart-pointers.md msgid "Smart Pointers" msgstr "Akıllı Göstericiler" @@ -457,11 +490,12 @@ msgstr "`Box`" msgid "`Rc`" msgstr "`Rc`" -#: src/SUMMARY.md src/smart-pointers/trait-objects.md -msgid "Trait Objects" +#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md +#, fuzzy +msgid "Owned Trait Objects" msgstr "Özellik Nesneleri" -#: src/SUMMARY.md src/smart-pointers/exercise.md +#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md msgid "Exercise: Binary Tree" msgstr "Alıştırma: İkili Ağaç" @@ -469,43 +503,49 @@ msgstr "Alıştırma: İkili Ağaç" msgid "Day 3: Afternoon" msgstr "Gün 3: Öğleden Sonra" -#: src/SUMMARY.md src/borrowing.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3-afternoon.md src/borrowing.md msgid "Borrowing" msgstr "Ödünç Alma" -#: src/SUMMARY.md src/borrowing/shared.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md msgid "Borrowing a Value" msgstr "Bir Değeri Ödünç Alma" -#: src/SUMMARY.md src/borrowing/borrowck.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md msgid "Borrow Checking" msgstr "Ödünç Alma Kontrolü" -#: src/SUMMARY.md src/borrowing/interior-mutability.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md +msgid "Borrow Errors" +msgstr "Ödünç Alma Hataları" + +#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md msgid "Interior Mutability" msgstr "İç Değişebilirlik (Interior Mutability)" -#: src/SUMMARY.md src/borrowing/exercise.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md msgid "Exercise: Health Statistics" msgstr "Alıştırma: Sağlık İstatistikleri" -#: src/SUMMARY.md src/lifetimes.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3-afternoon.md src/lifetimes.md msgid "Lifetimes" msgstr "Ömürler (Lifetimes)" -#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md +#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md msgid "Lifetime Annotations" msgstr "Ömür için Ek Açıklamalar (Annotations)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/lifetimes.md msgid "Lifetime Elision" msgstr "Ömür Atlaması (Elision)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/lifetimes.md msgid "Struct Lifetimes" msgstr "Yapıların Ömürleri" -#: src/SUMMARY.md src/lifetimes/exercise.md +#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md msgid "Exercise: Protobuf Parsing" msgstr "Alıştırma: Protobuf Ayrıştırma" @@ -513,7 +553,8 @@ msgstr "Alıştırma: Protobuf Ayrıştırma" msgid "Day 4: Morning" msgstr "Gün 4: Sabah" -#: src/SUMMARY.md src/iterators.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/iterators.md msgid "Iterators" msgstr "Adımlayıcılar (Iterators)" @@ -529,19 +570,20 @@ msgstr "`IntoIterator`" msgid "`FromIterator`" msgstr "`FromIterator`" -#: src/SUMMARY.md src/iterators/exercise.md +#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md msgid "Exercise: Iterator Method Chaining" msgstr "Alıştırma: Adımlayıcı Metot Zincirleme" -#: src/SUMMARY.md src/modules.md src/modules/modules.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/modules.md src/modules/modules.md msgid "Modules" msgstr "Modüller" -#: src/SUMMARY.md src/modules/filesystem.md +#: src/SUMMARY.md src/modules.md src/modules/filesystem.md msgid "Filesystem Hierarchy" msgstr "Dosya Sistemi Hiyerarşisi" -#: src/SUMMARY.md src/modules/visibility.md +#: src/SUMMARY.md src/modules.md src/modules/visibility.md msgid "Visibility" msgstr "Görünürlük" @@ -549,27 +591,28 @@ msgstr "Görünürlük" msgid "`use`, `super`, `self`" msgstr "`use`, `super`, `self`" -#: src/SUMMARY.md src/modules/exercise.md +#: src/SUMMARY.md src/modules.md src/modules/exercise.md msgid "Exercise: Modules for a GUI Library" msgstr "Alıştırma: Bir GUI Kütüphanesi için Modüller" -#: src/SUMMARY.md src/testing.md src/chromium/testing.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/testing.md src/chromium/testing.md msgid "Testing" msgstr "Test Etme" -#: src/SUMMARY.md +#: src/SUMMARY.md src/testing.md msgid "Test Modules" msgstr "Test Modülleri" -#: src/SUMMARY.md src/testing/other.md +#: src/SUMMARY.md src/testing.md src/testing/other.md msgid "Other Types of Tests" msgstr "Diğer Test Türleri" -#: src/SUMMARY.md src/testing/lints.md +#: src/SUMMARY.md src/testing.md src/testing/lints.md msgid "Compiler Lints and Clippy" msgstr "Derleyici Tüyleri (Lint) ve Clippy Aracı" -#: src/SUMMARY.md src/testing/exercise.md +#: src/SUMMARY.md src/testing.md src/testing/exercise.md msgid "Exercise: Luhn Algorithm" msgstr "Alıştırma: Luhn Algrotiması" @@ -577,19 +620,20 @@ msgstr "Alıştırma: Luhn Algrotiması" msgid "Day 4: Afternoon" msgstr "Gün 4: Öğleden Sonra" -#: src/SUMMARY.md src/error-handling.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4-afternoon.md src/error-handling.md msgid "Error Handling" msgstr "Hata İşleme" -#: src/SUMMARY.md src/error-handling/panics.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md msgid "Panics" msgstr "Panic'ler" -#: src/SUMMARY.md src/error-handling/try.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md msgid "Try Operator" msgstr "Try Operatörü" -#: src/SUMMARY.md src/error-handling/try-conversions.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md msgid "Try Conversions" msgstr "Try Dönüşümleri" @@ -597,47 +641,52 @@ msgstr "Try Dönüşümleri" msgid "`Error` Trait" msgstr "`Error` Özelliği (Trait)" -#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md -msgid "`thiserror` and `anyhow`" -msgstr "`thiserror` ve `anyhow`" +#: src/SUMMARY.md src/error-handling/thiserror.md +msgid "`thiserror`" +msgstr "" + +#: src/SUMMARY.md src/error-handling/anyhow.md +msgid "`anyhow`" +msgstr "" #: src/SUMMARY.md msgid "Exercise: Rewriting with `Result`" msgstr "Alıştırma: `Result` ile Yeniden Yazma" -#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md msgid "Unsafe Rust" msgstr "Emniyetsiz (Unsafe) Rust" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe" msgstr "Emniyetsiz" -#: src/SUMMARY.md src/unsafe-rust/dereferencing.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md msgid "Dereferencing Raw Pointers" msgstr "Ham Göstericilerinin İçeriği (Dereferencing)" -#: src/SUMMARY.md src/unsafe-rust/mutable-static.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md msgid "Mutable Static Variables" msgstr "Değişebilir Statik Değişkenler" -#: src/SUMMARY.md src/unsafe-rust/unions.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md msgid "Unions" msgstr "Birlikler (Unions)" -#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md msgid "Unsafe Functions" msgstr "Emniyetsiz Fonksiyonlar" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe Traits" msgstr "Emniyetsiz Özellikler (Traits)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Exercise: FFI Wrapper" msgstr "Alıştırma: FFI Sarmalayıcı" -#: src/SUMMARY.md src/bare-metal/android.md +#: src/SUMMARY.md msgid "Android" msgstr "Android" @@ -805,12 +854,6 @@ msgstr "Android için inşa: Rust" msgid "With Java" msgstr "Java ile" -#: src/SUMMARY.md src/exercises/android/morning.md -#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md -#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md -msgid "Exercises" -msgstr "Alıştırmalar" - #: src/SUMMARY.md msgid "Chromium" msgstr "Chromium" @@ -835,7 +878,8 @@ msgstr "Chromium C++'dan Rust Koduna Bağımlılık" msgid "Visual Studio Code" msgstr "Visual Studio Code" -#: src/SUMMARY.md src/exercises/chromium/third-party.md +#: src/SUMMARY.md src/lifetimes/exercise.md +#: src/exercises/chromium/third-party.md msgid "Exercise" msgstr "Alıştırma" @@ -998,12 +1042,22 @@ msgstr "Hata Ayıklama" msgid "Other Projects" msgstr "Diğer Projeler" +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md +msgid "Exercises" +msgstr "Alıştırmalar" + #: src/SUMMARY.md src/exercises/bare-metal/compass.md #: src/exercises/bare-metal/solutions-morning.md msgid "Compass" msgstr "Pusula" -#: src/SUMMARY.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises.md +#: src/concurrency/async-exercises/solutions.md msgid "Solutions" msgstr "Çözümler" @@ -1055,7 +1109,7 @@ msgstr "Sürücü" msgid "Using It" msgstr "Onu Kullan" -#: src/SUMMARY.md src/bare-metal/aps/exceptions.md +#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md msgid "Exceptions" msgstr "İstisnalar" @@ -1083,6 +1137,11 @@ msgstr "`tinyvec`" msgid "`spin`" msgstr "`spin`" +#: src/SUMMARY.md src/bare-metal/android.md +#, fuzzy +msgid "Bare-Metal on Android" +msgstr "Yalın Metal (Bare Metal): Sabah" + #: src/SUMMARY.md msgid "`vmbase`" msgstr "`vmbase`" @@ -1095,23 +1154,38 @@ msgstr "RTC Sürücüsü" msgid "Concurrency: Morning" msgstr "Eşzamanlılık: Sabah" -#: src/SUMMARY.md src/concurrency/threads.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/threads.md msgid "Threads" msgstr "İş Parçacıkları (Threads)" -#: src/SUMMARY.md src/concurrency/scoped-threads.md +#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md +#, fuzzy +msgid "Plain Threads" +msgstr "İş Parçacıkları (Threads)" + +#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md msgid "Scoped Threads" msgstr "Kapsamlı İş Parçacıkları (Threads)" -#: src/SUMMARY.md src/concurrency/channels.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/channels.md msgid "Channels" msgstr "Kanallar" -#: src/SUMMARY.md src/concurrency/channels/unbounded.md +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md +#, fuzzy +msgid "Senders and Receivers" +msgstr "Metot Alıcısı" + +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/unbounded.md msgid "Unbounded Channels" msgstr "Sınırsız Kanallar" -#: src/SUMMARY.md src/concurrency/channels/bounded.md +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/bounded.md msgid "Bounded Channels" msgstr "Sınırlı Kanallar" @@ -1119,6 +1193,12 @@ msgstr "Sınırlı Kanallar" msgid "`Send` and `Sync`" msgstr "`Send` ve `Sync`" +#: src/SUMMARY.md src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md +#, fuzzy +msgid "Marker Traits" +msgstr "Daha Fazla Özellik (Trait)" + #: src/SUMMARY.md src/concurrency/send-sync/send.md msgid "`Send`" msgstr "`Send`" @@ -1127,34 +1207,39 @@ msgstr "`Send`" msgid "`Sync`" msgstr "`Sync`" -#: src/SUMMARY.md src/concurrency/send-sync/examples.md +#: src/SUMMARY.md src/concurrency/send-sync.md +#: src/concurrency/send-sync/examples.md msgid "Examples" msgstr "Örnekler" -#: src/SUMMARY.md src/concurrency/shared_state.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/shared-state.md msgid "Shared State" msgstr "Paylaşımlı Durum (State)" -#: src/SUMMARY.md src/concurrency/shared_state/arc.md +#: src/SUMMARY.md src/concurrency/shared-state/arc.md msgid "`Arc`" msgstr "`Arc`" -#: src/SUMMARY.md src/concurrency/shared_state/mutex.md +#: src/SUMMARY.md src/concurrency/shared-state/mutex.md msgid "`Mutex`" msgstr "`Mutex`" #: src/SUMMARY.md src/memory-management/review.md -#: src/error-handling/try-conversions.md -#: src/concurrency/shared_state/example.md +#: src/error-handling/try-conversions.md src/concurrency/shared-state.md +#: src/concurrency/shared-state/example.md msgid "Example" msgstr "Örnek" -#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises.md msgid "Dining Philosophers" msgstr "Filozofların Akşam Yemeği" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Multi-threaded Link Checker" msgstr "Çok İş Parçacıklı Link Denetleyicisi" @@ -1162,69 +1247,80 @@ msgstr "Çok İş Parçacıklı Link Denetleyicisi" msgid "Concurrency: Afternoon" msgstr "Eşzamanlılık: Öğleden Sonra" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async.md msgid "Async Basics" msgstr "Async Temelleri" -#: src/SUMMARY.md src/async/async-await.md +#: src/SUMMARY.md src/concurrency/async/async-await.md msgid "`async`/`await`" msgstr "`async`/`await`" -#: src/SUMMARY.md src/async/futures.md +#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md msgid "Futures" msgstr "Future Özellikleri (Traits)" -#: src/SUMMARY.md src/async/runtimes.md +#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md msgid "Runtimes" msgstr "Çalışma Zamanları" -#: src/SUMMARY.md src/async/runtimes/tokio.md +#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md msgid "Tokio" msgstr "Tokio Kasası" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md -#: src/exercises/concurrency/chat-app.md +#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/async.md src/concurrency/async/tasks.md +#: src/concurrency/async-exercises/chat-app.md msgid "Tasks" msgstr "Görevler" -#: src/SUMMARY.md src/async/channels.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md +#, fuzzy +msgid "Channels and Control Flow" +msgstr "Yeni Kontrol Akışları" + +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/channels.md msgid "Async Channels" msgstr "Async Kanalları" -#: src/SUMMARY.md -msgid "Control Flow" -msgstr "Kontrol Akışı" - -#: src/SUMMARY.md src/async/control-flow/join.md +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/join.md msgid "Join" msgstr "Join" -#: src/SUMMARY.md src/async/control-flow/select.md +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/select.md msgid "Select" msgstr "Select" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md msgid "Pitfalls" msgstr "Tuzaklar" -#: src/SUMMARY.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md msgid "Blocking the Executor" msgstr "Yürütücünün/Çalıştırıcının (Executor) Engellenmesi" -#: src/SUMMARY.md src/async/pitfalls/pin.md +#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md msgid "`Pin`" msgstr "`Pin`" -#: src/SUMMARY.md src/async/pitfalls/async-traits.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "Async Traits" msgstr "Async Özellikleri (Traits)" -#: src/SUMMARY.md src/async/pitfalls/cancellation.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "Cancellation" msgstr "İptal (Cancellation)" -#: src/SUMMARY.md src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/SUMMARY.md src/concurrency/async-exercises.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "Broadcast Chat Application" msgstr "Yayımlamalı Sohbet Uygulaması" @@ -1236,6 +1332,7 @@ msgstr "Son sözler" msgid "Thanks!" msgstr "Teşekkürler!" +#. Please keep { #glossary } untranslated. #: src/SUMMARY.md src/glossary.md msgid "Glossary" msgstr "Sözlük" @@ -1288,6 +1385,13 @@ msgstr "" "adresinden ulaşılabilir. Başka bir yerde okuyorsanız, lütfen güncellemeleri " "kontrol edin." +#: src/index.md +msgid "" +"The course is available in other languages. Select your preferred language " +"in the top right corner of the page or check the [Translations](running-the-" +"course/translations.md) page for a list of all available translations." +msgstr "" + #: src/index.md #, fuzzy msgid "The course is also available [as a PDF](comprehensive-rust.pdf)." @@ -1357,11 +1461,12 @@ msgstr "" "uygulama işlemcileri kapsanmaktadır." #: src/index.md +#, fuzzy msgid "" -"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We " -"cover both classical concurrency (preemptively scheduling using threads and " -"mutexes) and async/await concurrency (cooperative multitasking using " -"futures)." +"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in " +"Rust. We cover both classical concurrency (preemptively scheduling using " +"threads and mutexes) and async/await concurrency (cooperative multitasking " +"using futures)." msgstr "" "[Eşzamanlılık](concurrency.md): Rust'ta eşzamanlılık üzerine tam günlük bir " "ders. Hem klasik eşzamanlılığı (iş parçacıkları ve mutexleri kullanarak " @@ -1574,130 +1679,129 @@ msgstr "Kurs programı:" msgid "Day 1 Morning (2 hours and 5 minutes, including breaks)" msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-1.md) (5 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-1.md) (5 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-1-afternoon.md src/welcome-day-2.md +#: src/welcome-day-2-afternoon.md src/welcome-day-3.md +#: src/welcome-day-3-afternoon.md src/welcome-day-4.md +#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md +#: src/concurrency/welcome-async.md +msgid "Segment" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "[Hello, World](../hello-world.md) (15 minutes)" -msgstr "[Merhaba, Dünya](../hello-world.md) (15 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md +#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md +#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md +#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md +#: src/std-types.md src/std-traits.md src/welcome-day-3.md +#: src/memory-management.md src/smart-pointers.md +#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md +#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md +#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md +#: src/concurrency/welcome.md src/concurrency/threads.md +#: src/concurrency/channels.md src/concurrency/send-sync.md +#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +#, fuzzy +msgid "Duration" +msgstr "numaralandırma:" -#: src/running-the-course/course-structure.md -msgid "[Types and Values](../types-and-values.md) (40 minutes)" -msgstr "[Türler ve Değerler](../types-and-values.md) (40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md +#: src/memory-management.md src/smart-pointers.md src/lifetimes.md +#: src/iterators.md src/modules.md src/testing.md src/error-handling.md +#: src/unsafe-rust.md src/concurrency/shared-state.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +msgid "5 minutes" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "[Control Flow Basics](../control-flow-basics.md) (40 minutes)" -msgstr "[Kontrol Akışı Temelleri](../control-flow-basics.md) (40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/references.md src/user-defined-types.md src/methods-and-traits.md +#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md +#: src/concurrency/shared-state.md +msgid "15 minutes" +msgstr "" + +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-4.md +msgid "40 minutes" +msgstr "" #: src/running-the-course/course-structure.md msgid "Day 1 Afternoon (2 hours and 35 minutes, including breaks)" msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)" -msgstr "[Demetler ve Diziler](../tuples-and-arrays.md) (35 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[References](../references.md) (55 minutes)" -msgstr "[Referanslar](../references.md) (55 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" -msgstr "[Kullanıcı Tanımlı Türler](../user-defined-types.md) (50 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +msgid "35 minutes" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "Day 2 Morning (2 hours and 55 minutes, including breaks)" -msgstr "2. Gün Sabah (2 saat 55 dakika, aralar dahil)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +#: src/welcome-day-3.md src/welcome-day-3-afternoon.md +#: src/concurrency/welcome-async.md +msgid "55 minutes" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-2.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-2.md) (3 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +#: src/welcome-day-2.md src/welcome-day-3-afternoon.md +msgid "50 minutes" +msgstr "" #: src/running-the-course/course-structure.md -msgid "[Pattern Matching](../pattern-matching.md) (1 hour)" -msgstr "[Desen Eşleştirme](../pattern-matching.md) (1 saat)" +msgid "Day 2 Morning (2 hours and 10 minutes, including breaks)" +msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Methods and Traits](../methods-and-traits.md) (50 minutes)" -msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" +#: src/running-the-course/course-structure.md src/hello-world.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md +#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md +#: src/testing.md src/error-handling.md +msgid "3 minutes" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "[Generics](../generics.md) (40 minutes)" -msgstr "[Jenerikler](../generics.md) (40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-2.md +#: src/welcome-day-2-afternoon.md src/welcome-day-3.md +msgid "1 hour" +msgstr "" #: src/running-the-course/course-structure.md -msgid "Day 2 Afternoon (3 hours and 10 minutes, including breaks)" -msgstr "2. Gün Öğleden Sonra (3 saat 10 dakika, aralar dahil)" +#, fuzzy +msgid "Day 2 Afternoon (3 hours and 15 minutes, including breaks)" +msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Standard Library Types](../std-types.md) (1 hour and 20 minutes)" -msgstr "[Standart Kütüphanedeki Türler](../std-types.md) (1 saat 20 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md +#: src/welcome-day-4.md +msgid "45 minutes" +msgstr "" -#: src/running-the-course/course-structure.md -msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" +#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md +#: src/concurrency/welcome.md src/concurrency/welcome-async.md +msgid "1 hour and 10 minutes" msgstr "" -"[Standart Kütüphanedeki Özellikler](../std-traits.md) (1 saat 40 dakika)" #: src/running-the-course/course-structure.md msgid "Day 3 Morning (2 hours and 20 minutes, including breaks)" msgstr "3. Gün Sabah (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-3.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-3.md) (3 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Memory Management](../memory-management.md) (1 hour)" -msgstr "[Bellek Yönetimi](../memory-management.md) (1 saat)" - -#: src/running-the-course/course-structure.md -msgid "[Smart Pointers](../smart-pointers.md) (55 minutes)" -msgstr "[Akıllı Göstericiler](../smart-pointers.md) (55 dakika)" - -#: src/running-the-course/course-structure.md -msgid "Day 3 Afternoon (1 hour and 50 minutes, including breaks)" -msgstr "3. Gün Öğleden Sonra (1 saat 50 dakika, aralar dahil)" - -#: src/running-the-course/course-structure.md -msgid "[Borrowing](../borrowing.md) (50 minutes)" -msgstr "[Ödünç Alma](../borrowing.md) (50 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Lifetimes](../lifetimes.md) (50 minutes)" -msgstr "[Ömürler](../lifetimes.md) (50 dakika)" +msgid "Day 3 Afternoon (1 hour and 55 minutes, including breaks)" +msgstr "3. Gün Öğleden Sonra (1 saat 55 dakika, aralar dahil)" #: src/running-the-course/course-structure.md msgid "Day 4 Morning (2 hours and 40 minutes, including breaks)" msgstr "4. Gün Sabah (2 saat 40 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-4.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-4.md) (3 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Iterators](../iterators.md) (45 minutes)" -msgstr "[Adımlayıcılar](../iterators.md) (45 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Modules](../modules.md) (40 minutes)" -msgstr "[Modüller](../modules.md) (40 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Testing](../testing.md) (45 minutes)" -msgstr "[Test Etme](../testing.md) (45 dakika)" - -#: src/running-the-course/course-structure.md -msgid "Day 4 Afternoon (2 hours and 10 minutes, including breaks)" +#, fuzzy +msgid "Day 4 Afternoon (2 hours and 20 minutes, including breaks)" msgstr "4. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Error Handling](../error-handling.md) (55 minutes)" -msgstr "[Hata İşleme](../error-handling.md) (55 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "[Emniyetsiz Rust](../unsafe-rust.md) (1 saat 5 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md +msgid "1 hour and 5 minutes" +msgstr "" #: src/running-the-course/course-structure.md msgid "Deep Dives" @@ -1811,9 +1915,10 @@ msgid "Concurrency in Rust" msgstr "Rust'ta Eşzamanlılık" #: src/running-the-course/course-structure.md +#, fuzzy msgid "" -"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class " -"on classical as well as `async`/`await` concurrency." +"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day " +"class on classical as well as `async`/`await` concurrency." msgstr "" "[Rust'ta Eşzamanlılık](../concurrency.md) ayrıntılı incelemesi, klasik ve " "aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir derstir." @@ -1828,6 +1933,36 @@ msgstr "" "hazır hale getirilmesine ihtiyacınız olacak. Daha sonra örnekleri denemek " "için kopyalayıp `src/main.rs` dosyasına yapıştırabilirsiniz:" +#: src/running-the-course/course-structure.md +#, fuzzy +msgid "Morning (3 hours and 20 minutes, including breaks)" +msgstr "3. Gün Sabah (2 saat 20 dakika, aralar dahil)" + +#: src/running-the-course/course-structure.md src/pattern-matching.md +#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md +#: src/testing.md src/error-handling.md src/unsafe-rust.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md +msgid "30 minutes" +msgstr "" + +#: src/running-the-course/course-structure.md src/methods-and-traits.md +#: src/std-types.md src/memory-management.md src/borrowing.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +msgid "20 minutes" +msgstr "" + +#: src/running-the-course/course-structure.md src/concurrency/welcome.md +msgid "Send and Sync" +msgstr "Send ve Sync" + +#: src/running-the-course/course-structure.md +#, fuzzy +msgid "Afternoon (3 hours and 20 minutes, including breaks)" +msgstr "4. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)" + #: src/running-the-course/course-structure.md msgid "Format" msgstr "Format" @@ -1845,35 +1980,23 @@ msgid "There are several useful keyboard shortcuts in mdBook:" msgstr "Bu mdBook'ta birkaç kullanışlı klavye kısayolu vardır:" #: src/running-the-course/keyboard-shortcuts.md -msgid "Arrow-Left" -msgstr "Yön Oku-Sol" - -#: src/running-the-course/keyboard-shortcuts.md -msgid ": Navigate to the previous page." +#, fuzzy +msgid "Arrow-Left: Navigate to the previous page." msgstr ": Önceki sayfaya gidin." #: src/running-the-course/keyboard-shortcuts.md -msgid "Arrow-Right" -msgstr "Yön Oku-Sağ" - -#: src/running-the-course/keyboard-shortcuts.md -msgid ": Navigate to the next page." +#, fuzzy +msgid "Arrow-Right: Navigate to the next page." msgstr ": Sonraki sayfaya gidin." -#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md -msgid "Ctrl + Enter" -msgstr "Ctrl + Enter" - #: src/running-the-course/keyboard-shortcuts.md -msgid ": Execute the code sample that has focus." +#, fuzzy +msgid "Ctrl + Enter: Execute the code sample that has focus." msgstr ": Odaklı kod örneğini yürütün." #: src/running-the-course/keyboard-shortcuts.md -msgid "s" -msgstr "s" - -#: src/running-the-course/keyboard-shortcuts.md -msgid ": Activate the search bar." +#, fuzzy +msgid "s: Activate the search bar." msgstr ": Arama çubuğunu etkinleştirin." #: src/running-the-course/translations.md @@ -1895,13 +2018,13 @@ msgstr "" "[@henrif75](https://github.com/henrif75)." #: src/running-the-course/translations.md +#, fuzzy msgid "" "[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) " "by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/" "wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/" "kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://" -"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]" -"(https://github.com/nodmp)." +"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp)." msgstr "" "[Çince (Basitleştirilmiş)](https://google.github.io/comprehensive-rust/zh-" "CN/) yazanlar: [@suetfei](https://github.com/suetfei), [@wnghl](https://" @@ -1924,6 +2047,33 @@ msgstr "" "[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" "(https://github.com/johnathan79717)." +#: src/running-the-course/translations.md +#, fuzzy +msgid "" +"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" +"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" +"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" +"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) " +"and [@mehrad77](https://github.com/mehrad77)." +msgstr "" +"[Çince (Geleneksel)](https://google.github.io/comprehensive-rust/zh-TW/) " +"yazanlar: [@hueich](https://github.com/hueich), [@victorhsieh](https://" +"github.com/victorhsieh), [@mingyc](https://github.com/mingyc), " +"[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" +"(https://github.com/johnathan79717)." + +#: src/running-the-course/translations.md +#, fuzzy +msgid "" +"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" +"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/" +"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) " +"and [@kantasv](https://github.com/kantasv)." +msgstr "" +"[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " +"[@CoinEZ-JPN](https://github.com/CoinEZ) ve [@momotaro1105](https://github) ." +"com/momotaro1105)." + #: src/running-the-course/translations.md msgid "" "[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]" @@ -1945,15 +2095,41 @@ msgstr "" "[@raselmandol](https://github.com/raselmandol)." #: src/running-the-course/translations.md +#, fuzzy msgid "" -"Use the language picker in the top-right corner to switch between languages." +"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-" +"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" +"yaremam) and [@reta](https://github.com/reta)." msgstr "" -"Diller arasında geçiş yapmak için sağ üst köşedeki dil seçiciyi kullanın." +"[İtalyanca](https://google.github.io/comprehensive-rust/it/) yazanlar: " +"[@henrythebuilder](https://github.com/henrythebuilder) ve [@detro](https://" +"github.com/detro)." #: src/running-the-course/translations.md -msgid "Incomplete Translations" -msgstr "Tamamlanmamış Çeviriler" - +#, fuzzy +msgid "" +"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" +"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" +"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" +"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) " +"and [@mehrad77](https://github.com/mehrad77)." +msgstr "" +"[Çince (Geleneksel)](https://google.github.io/comprehensive-rust/zh-TW/) " +"yazanlar: [@hueich](https://github.com/hueich), [@victorhsieh](https://" +"github.com/victorhsieh), [@mingyc](https://github.com/mingyc), " +"[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" +"(https://github.com/johnathan79717)." + +#: src/running-the-course/translations.md +msgid "" +"Use the language picker in the top-right corner to switch between languages." +msgstr "" +"Diller arasında geçiş yapmak için sağ üst köşedeki dil seçiciyi kullanın." + +#: src/running-the-course/translations.md +msgid "Incomplete Translations" +msgstr "Tamamlanmamış Çeviriler" + #: src/running-the-course/translations.md msgid "" "There is a large number of in-progress translations. We link to the most " @@ -1962,6 +2138,15 @@ msgstr "" "Devam eden çok sayıda çeviri var. En son güncellenen çevirilere bağlantı " "veriyoruz:" +#: src/running-the-course/translations.md +#, fuzzy +msgid "" +"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]" +"(https://github.com/younies)" +msgstr "" +"[Bengalce](https://google.github.io/comprehensive-rust/bn/) yazanlar: " +"[@raselmandol](https://github.com/raselmandol)." + #: src/running-the-course/translations.md msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" @@ -1971,9 +2156,11 @@ msgstr "" "[@raselmandol](https://github.com/raselmandol)." #: src/running-the-course/translations.md +#, fuzzy msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" -"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." +"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and " +"[@AdrienBaudemont](https://github.com/AdrienBaudemont)." msgstr "" "[Fransızca](https://google.github.io/comprehensive-rust/fr/) yazanlar: " "[@KookaS](https://github.com/KookaS) ve [@vcaen](https://github.com) /vcaen)." @@ -1987,16 +2174,6 @@ msgstr "" "[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com) /" "ronaldfw)." -#: src/running-the-course/translations.md -msgid "" -"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" -"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" -"momotaro1105)." -msgstr "" -"[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " -"[@CoinEZ-JPN](https://github.com/CoinEZ) ve [@momotaro1105](https://github) ." -"com/momotaro1105)." - #: src/running-the-course/translations.md msgid "" "[Italian](https://google.github.io/comprehensive-rust/it/) by " @@ -2007,6 +2184,14 @@ msgstr "" "[@henrythebuilder](https://github.com/henrythebuilder) ve [@detro](https://" "github.com/detro)." +#: src/running-the-course/translations.md +msgid "" +"The full list of translations with their current status is also available " +"either [as of their last update](https://google.github.io/comprehensive-rust/" +"translation-report.html) or [synced to the latest version of the course]" +"(https://google.github.io/comprehensive-rust/synced-translation-report.html)." +msgstr "" + #: src/running-the-course/translations.md msgid "" "If you want to help with this effort, please see [our instructions](https://" @@ -2072,10 +2257,11 @@ msgstr "" "IDE de mevcuttur." #: src/cargo.md +#, fuzzy msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " "formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " -"gets you an outdated rust version and may lead to unexpected behavior. The " +"gets you an outdated Rust version and may lead to unexpected behavior. The " "command would be:" msgstr "" "Debian/Ubuntu'da ayrıca Cargo'yu, Rust kaynak kodunu ve [Rust " @@ -2083,6 +2269,13 @@ msgstr "" "yükleyebilirsiniz. Ancak bu, eski bir Rust sürümüne sahip olmanızı sağlar ve " "beklenmeyen davranışlara yol açabilir. Komut şöyle olacaktır:" +#: src/cargo.md +msgid "" +"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this " +"may provide an outdated version. Therefore, it is recommended to install " +"Rust from the official site." +msgstr "" + #: src/cargo/rust-ecosystem.md msgid "The Rust Ecosystem" msgstr "Rust Ekosistemi" @@ -2130,9 +2323,9 @@ msgstr "" "yapmanıza olanak tanır." #: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md -#: src/references/exclusive.md src/pattern-matching/destructuring.md -#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md -#: src/async/async-await.md +#: src/references/exclusive.md src/memory-management/move.md +#: src/error-handling/try.md src/android/setup.md +#: src/concurrency/async/async-await.md msgid "Key points:" msgstr "Anahtar noktalar:" @@ -2300,11 +2493,10 @@ msgid "\"Edit me!\"" msgstr "\"Düzenle beni!\"" #: src/cargo/code-samples.md -msgid "You can use " -msgstr "Odak metin kutusundayken kodu yürütmek için " - -#: src/cargo/code-samples.md -msgid " to execute the code when focus is in the text box." +#, fuzzy +msgid "" +"You can use Ctrl + Enter to execute the code when focus is in the " +"text box." msgstr " kullanabilirsiniz.." #: src/cargo/code-samples.md @@ -2474,37 +2666,16 @@ msgstr "" "çözümlenmesi (destructuring)." #: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md -#: src/welcome-day-4.md +#: src/welcome-day-4.md src/concurrency/welcome.md +#: src/concurrency/welcome-async.md msgid "Schedule" msgstr "Zamanlama (Schedule)" -#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md -#: src/welcome-day-2-afternoon.md src/welcome-day-3.md -#: src/welcome-day-3-afternoon.md src/welcome-day-4.md -#: src/welcome-day-4-afternoon.md -msgid "In this session:" -msgstr "Bu oturumda:" - -#: src/welcome-day-1.md -msgid "[Welcome](./welcome-day-1.md) (5 minutes)" -msgstr "[Hoş Geldiniz](./welcome-day-1.md) (5 dakika)" - -#: src/welcome-day-1.md -msgid "[Hello, World](./hello-world.md) (15 minutes)" -msgstr "[Merhaba, Dünya](./hello-world.md) (15 dakika)" - -#: src/welcome-day-1.md -msgid "[Types and Values](./types-and-values.md) (40 minutes)" -msgstr "[Türler ve Değerler](./types-and-values.md) (40 dakika)" - -#: src/welcome-day-1.md -msgid "[Control Flow Basics](./control-flow-basics.md) (40 minutes)" -msgstr "[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)" - #: src/welcome-day-1.md +#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 5 " -"minutes" +"minutes. It contains:" msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmeli" #: src/welcome-day-1.md @@ -2577,30 +2748,40 @@ msgstr "" "Burada listelenen zamanlar kursun programa uygun devam etmesi için bir " "öneridir. Esnek olmaktan ve gerektiği gibi ayarlamaktan çekinmeyin!" +#: src/hello-world.md src/concurrency/send-sync.md +#, fuzzy +msgid "This segment should take about 15 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 15 dakika sürmeli" + #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/tuples-and-arrays.md src/references.md src/user-defined-types.md #: src/pattern-matching.md src/methods-and-traits.md src/generics.md #: src/std-types.md src/std-traits.md src/memory-management.md #: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md #: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md -msgid "In this segment:" -msgstr "Bu bölümde:" - -#: src/hello-world.md -msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" -msgstr "[Rust Nedir?](./hello-world/what-is-rust.md) (10 dakika)" - -#: src/hello-world.md -msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" -msgstr "[Rust'ın Faydaları](./hello-world/benefits.md) (3 dakika)" +#: src/concurrency/threads.md src/concurrency/channels.md +#: src/concurrency/send-sync.md src/concurrency/shared-state.md +#: src/concurrency/sync-exercises.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +msgid "Slide" +msgstr "" -#: src/hello-world.md -msgid "[Playground](./hello-world/playground.md) (2 minutes)" -msgstr "[Deneme Alanı](./hello-world/playground.md) (2 dakika)" +#: src/hello-world.md src/references.md src/user-defined-types.md +#: src/pattern-matching.md src/methods-and-traits.md src/generics.md +#: src/std-types.md src/std-traits.md src/memory-management.md +#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md +#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md +#: src/concurrency/shared-state.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +msgid "10 minutes" +msgstr "" -#: src/hello-world.md -msgid "This segment should take about 15 minutes" -msgstr "Bu bölüm yaklaşık 15 dakika sürmeli" +#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md +#: src/memory-management.md src/concurrency/channels.md +#: src/concurrency/send-sync.md +msgid "2 minutes" +msgstr "" #: src/hello-world/what-is-rust.md msgid "" @@ -2810,11 +2991,12 @@ msgstr "" "gibi yapılara sahip modern bir dil elde edersiniz." #: src/hello-world/benefits.md +#, fuzzy msgid "" "Experience with Java, Go, Python, JavaScript...: You get the same memory " "safety as in those languages, plus a similar high-level language feeling. In " "addition you get fast and predictable performance like C and C++ (no garbage " -"collector) as well as access to low-level hardware (should you need it)" +"collector) as well as access to low-level hardware (should you need it)." msgstr "" "Java, Go, Python, JavaScript... deneyimi: Bu dillerdekiyle aynı bellek " "emniyetine (safety) ve ayrıca benzer yüksek seviyeli dil hissine sahip " @@ -2876,33 +3058,9 @@ msgstr "" "oluşturulan asm kodu hakkında daha fazla bilgi edinmek isteyen ileri düzey " "öğrenciler için faydalıdır." -#: src/types-and-values.md -msgid "[Hello, World](./types-and-values/hello-world.md) (5 minutes)" -msgstr "[Merhaba, Dünya](./types-and-values/hello-world.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Variables](./types-and-values/variables.md) (5 minutes)" -msgstr "[Değişkenler](./types-and-values/variables.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Values](./types-and-values/values.md) (5 minutes)" -msgstr "[Değerler](./types-and-values/values.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)" -msgstr "[Aritmetik](./types-and-values/arithmetic.md) (3 dakika)" - -#: src/types-and-values.md -msgid "[Type Inference](./types-and-values/inference.md) (3 minutes)" -msgstr "[Tür Çıkarımı](./types-and-values/inference.md) (3 dakika)" - -#: src/types-and-values.md -msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)" -msgstr "[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)" - -#: src/types-and-values.md src/control-flow-basics.md src/generics.md -#: src/modules.md -msgid "This segment should take about 40 minutes" +#: src/types-and-values.md src/control-flow-basics.md src/modules.md +#, fuzzy +msgid "This segment should take about 40 minutes. It contains:" msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" #: src/types-and-values/hello-world.md @@ -3174,10 +3332,11 @@ msgstr "" "benzerdir." #: src/types-and-values/arithmetic.md +#, fuzzy msgid "" "What about integer overflow? In C and C++ overflow of _signed_ integers is " -"actually undefined, and might do different things on different platforms or " -"compilers. In Rust, it's defined." +"actually undefined, and might do unknown things at runtime. In Rust, it's " +"defined." msgstr "" "Peki, tamsayı taşması ne olacak? C ve C++'da _işaretli_ tamsayıların taşması " "aslında tanımsızdır (undefined) ve farklı platformlarda veya derleyicilerde " @@ -3252,9 +3411,9 @@ msgstr "" #: src/types-and-values/exercise.md msgid "" -"The first and second Fibonacci numbers are both `1`. For n>2, the n'th " -"Fibonacci number is calculated recursively as the sum of the n-1'th and " -"n-2'th Fibonacci numbers." +"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci " +"number is calculated recursively as the sum of the n-1'th and n-2'th " +"Fibonacci numbers." msgstr "" "Birinci ve ikinci Fibonacci sayılarının her ikisi de `1`'dir. n>2 için, " "n'inci Fibonacci sayısı yinelemeli olarak n-1'inci ve n-2'inci Fibonacci " @@ -3285,38 +3444,29 @@ msgid "\"fib({n}) = {}\"" msgstr "\"fib({n}) = {}\"" #: src/control-flow-basics.md -msgid "[if Expressions](./control-flow-basics/if.md) (4 minutes)" -msgstr "[if İfadeleri](./control-flow-basics/if.md) (4 dakika)" - -#: src/control-flow-basics.md -msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" -msgstr "[Döngüler](./control-flow-basics/loops.md) (5 dakika)" - -#: src/control-flow-basics.md -msgid "" -"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)" -msgstr "" -"[break ve continue](./control-flow-basics/break-continue.md) (4 dakika)" +#, fuzzy +msgid "if Expressions" +msgstr "`if` İfadeleri" -#: src/control-flow-basics.md -msgid "" -"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)" +#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md +msgid "4 minutes" msgstr "" -"[Bloklar ve Kapsamlar](./control-flow-basics/blocks-and-scopes.md) (5 dakika)" #: src/control-flow-basics.md -msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" -msgstr "[Fonksiyonlar](./control-flow-basics/functions.md) (3 dakika)" +#, fuzzy +msgid "break and continue" +msgstr "`break` ve `continue`" #: src/control-flow-basics.md -msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" -msgstr "[Makrolar](./control-flow-basics/macros.md) (2 dakika)" +msgid "We will now cover the many kinds of flow control found in Rust." +msgstr "" #: src/control-flow-basics.md msgid "" -"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)" +"Most of this will be very familiar to what you have seen in other " +"programming languages." msgstr "" -"[Alıştırma: Collatz Sekansı](./control-flow-basics/exercise.md) (15 dakika)" #: src/control-flow-basics/if.md msgid "`if` expressions" @@ -3374,10 +3524,12 @@ msgstr "" "örnekte `\"küçük\"`ten sonra `;` eklerseniz ne olacağını gösterin." #: src/control-flow-basics/if.md +#, fuzzy msgid "" -"When `if` is used in an expression, the expression must have a `;` to " -"separate it from the next statement. Remove the `;` before `println!` to see " -"the compiler error." +"An `if` expression should be used in the same way as the other expressions. " +"For example, when it is used in a `let` statement, the statement must be " +"terminated with a `;` as well. Remove the `;` before `println!` to see the " +"compiler error." msgstr "" "Bir ifadede `if` kullanıldığında, ifadeyi bir sonraki ifadeden ayırmak için " "ifadenin `;` olması gerekir. Derleyici hatasını görmek için `println!`den " @@ -3430,9 +3582,10 @@ msgstr "" "ayrıntılı olarak tartışılacaktır." #: src/control-flow-basics/loops/for.md +#, fuzzy msgid "" -"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for " -"an inclusive range." +"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax " +"for an inclusive range." msgstr "" "`for` döngüsünün yalnızca `4`'e kadar adım attığını unutmayın. Kapalı aralık " "için `1..=5` sözdizimini gösterin." @@ -3449,6 +3602,12 @@ msgstr "" msgid "\"{i}\"" msgstr "\"{i}\"" +#: src/control-flow-basics/loops/loop.md +msgid "" +"The `loop` statement works like a `while true` loop. Use it for things like " +"servers which will serve connections forever." +msgstr "" + #: src/control-flow-basics/break-continue.md msgid "" "If you want to immediately start the next iteration use [`continue`](https://" @@ -3458,9 +3617,10 @@ msgstr "" "lang.org/reference/expressions/loop-expr.html#continue-expressions) kullanın." #: src/control-flow-basics/break-continue.md +#, fuzzy msgid "" "If you want to exit any kind of loop early, use [`break`](https://doc.rust-" -"lang.org/reference/expressions/loop-expr.html#break-expressions). For " +"lang.org/reference/expressions/loop-expr.html#break-expressions). With " "`loop`, this can take an optional expression that becomes the value of the " "`loop` expression." msgstr "" @@ -3471,13 +3631,25 @@ msgstr "" #: src/control-flow-basics/break-continue.md src/std-traits/exercise.md #: src/std-traits/solution.md src/smart-pointers/trait-objects.md -#: src/modules/exercise.md src/modules/solution.md -#: src/android/build-rules/library.md +#: src/borrowing/interior-mutability.md src/modules/exercise.md +#: src/modules/solution.md src/android/build-rules/library.md #: src/android/interoperability/cpp/rust-bridge.md -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"{}\"" msgstr "\"{}\"" +#: src/control-flow-basics/break-continue.md +#, fuzzy +msgid "" +"Note that `loop` is the only looping construct which can return a non-" +"trivial value. This is because it's guaranteed to only return at a `break` " +"statement (unlike `while` and `for` loops, which can also return when the " +"condition fails)." +msgstr "" +"`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " +"olduğunu unutmayın. Bunun nedeni, en az bir kez girilmesinin (`while` ve " +"`for` döngülerinden farklı olarak) garanti altında olmasıdır ." + #: src/control-flow-basics/break-continue/labels.md msgid "" "Both `continue` and `break` can optionally take a label argument which is " @@ -3491,14 +3663,12 @@ msgid "\"elements searched: {elements_searched}\"" msgstr "\"aranan öğeler: {elements_searched}\"" #: src/control-flow-basics/break-continue/labels.md -msgid "" -"Note that `loop` is the only looping construct which returns a non-trivial " -"value. This is because it's guaranteed to be entered at least once (unlike " -"`while` and `for` loops)." +msgid "Labeled break also works on arbitrary blocks, e.g." +msgstr "" + +#: src/control-flow-basics/break-continue/labels.md +msgid "\"This line gets skipped\"" msgstr "" -"`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " -"olduğunu unutmayın. Bunun nedeni, en az bir kez girilmesinin (`while` ve " -"`for` döngülerinden farklı olarak) garanti altında olmasıdır ." #: src/control-flow-basics/blocks-and-scopes.md msgid "Blocks" @@ -3551,7 +3721,6 @@ msgstr "\"önce: {a}\"" #: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md #: src/generics/solution.md src/std-traits/from-and-into.md -#: src/lifetimes/solution.md msgid "\"hello\"" msgstr "\"merhaba\"" @@ -3577,9 +3746,10 @@ msgstr "" "olduğunu gösterin." #: src/control-flow-basics/blocks-and-scopes/scopes.md +#, fuzzy msgid "" "Shadowing is different from mutation, because after shadowing both " -"variable's memory locations exist at the same time. Both are available under " +"variables' memory locations exist at the same time. Both are available under " "the same name, depending where you use it in the code." msgstr "" "Gölgeleme mutasyondan farklıdır çünkü gölgeleme sonrasında her iki " @@ -3621,9 +3791,10 @@ msgstr "" "için `gcd`'yi yeniden düzenleyin - refactor)." #: src/control-flow-basics/functions.md +#, fuzzy msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " -"compiler will infer this if the `-> ()` return type is omitted." +"compiler will infer this if the return type is omitted." msgstr "" "Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü' " "olan `()` değerini döndürür. Eğer `->()` dönüş tipi atlanırsa derleyici bunu " @@ -3724,156 +3895,61 @@ msgstr "" "bölümde türetilmiş makroların kullanımı anlatılacaktır." #: src/control-flow-basics/exercise.md +#, fuzzy msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " -"defined as follows, for an arbitrary n" +"defined as follows, for an arbitrary n1 greater than zero:" msgstr "" "[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture) şu " "şekilde tanımlanır, keyfi bir" #: src/control-flow-basics/exercise.md -msgid "1" -msgstr "1" - -#: src/control-flow-basics/exercise.md -msgid " greater than zero:" -msgstr " sıfırdan büyük sayısı için:" - -#: src/control-flow-basics/exercise.md -msgid "If _n" -msgstr "If _n" - -#: src/control-flow-basics/exercise.md -msgid "i" -msgstr "i" - -#: src/control-flow-basics/exercise.md -msgid "_ is 1, then the sequence terminates at _n" +#, fuzzy +msgid "" +"If _ni_ is 1, then the sequence terminates at _ni_." msgstr "_ 1 ise, o zaman sekans bu sayıda sonlanır, _n" #: src/control-flow-basics/exercise.md -msgid "_." -msgstr "_." - -#: src/control-flow-basics/exercise.md -msgid "_ is even, then _n" -msgstr "_ çifttir, o zaman _n" - -#: src/control-flow-basics/exercise.md -msgid "i+1" -msgstr "i+1" - -#: src/control-flow-basics/exercise.md -msgid " = n" -msgstr " = n" - -#: src/control-flow-basics/exercise.md -msgid " / 2_." -msgstr " / 2_." - -#: src/control-flow-basics/exercise.md -msgid "_ is odd, then _n" -msgstr "_ tektir, o zaman _n" - -#: src/control-flow-basics/exercise.md -msgid " = 3 * n" -msgstr " = 3 * n" +msgid "If _ni_ is even, then _ni+1 = ni / 2_." +msgstr "" #: src/control-flow-basics/exercise.md -msgid " + 1_." -msgstr " + 1_." +msgid "" +"If _ni_ is odd, then _ni+1 = 3 * ni + 1_." +msgstr "" #: src/control-flow-basics/exercise.md -msgid "For example, beginning with _n" +#, fuzzy +msgid "For example, beginning with _n1_ = 3:" msgstr "Örneğin, başlangıcımız _n" #: src/control-flow-basics/exercise.md -msgid "_ = 3:" -msgstr "_ = 3:" - -#: src/control-flow-basics/exercise.md -msgid "3 is odd, so _n" -msgstr "3 tektir, yani _n" - -#: src/control-flow-basics/exercise.md -msgid "2" -msgstr "2" - -#: src/control-flow-basics/exercise.md -msgid "_ = 3 * 3 + 1 = 10;" -msgstr "_ = 3 * 3 + 1 = 10;" - -#: src/control-flow-basics/exercise.md -msgid "10 is even, so _n" -msgstr "10 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "3" -msgstr "3" - -#: src/control-flow-basics/exercise.md -msgid "_ = 10 / 2 = 5;" -msgstr "_ = 10 / 2 = 5;" - -#: src/control-flow-basics/exercise.md -msgid "5 is odd, so _n" -msgstr "5 tektir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "4" -msgstr "4" - -#: src/control-flow-basics/exercise.md -msgid "_ = 3 * 5 + 1 = 16;" -msgstr "_ = 3 * 5 + 1 = 16;" - -#: src/control-flow-basics/exercise.md -msgid "16 is even, so _n" -msgstr "16 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md -msgid "5" -msgstr "5" - -#: src/control-flow-basics/exercise.md -msgid "_ = 16 / 2 = 8;" -msgstr "_ = 16 / 2 = 8;" - -#: src/control-flow-basics/exercise.md -msgid "8 is even, so _n" -msgstr "8 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "6" -msgstr "6" +msgid "3 is odd, so _n2_ = 3 * 3 + 1 = 10;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "_ = 8 / 2 = 4;" -msgstr "_ = 8 / 2 = 4;" +msgid "10 is even, so _n3_ = 10 / 2 = 5;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "4 is even, so _n" -msgstr "4 çifttir, yani _n" +msgid "5 is odd, so _n4_ = 3 * 5 + 1 = 16;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "7" -msgstr "7" +msgid "16 is even, so _n5_ = 16 / 2 = 8;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "_ = 4 / 2 = 2;" -msgstr "_ = 4 / 2 = 2;" +msgid "8 is even, so _n6_ = 8 / 2 = 4;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "2 is even, so _n" -msgstr "2 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "8" -msgstr "8" +msgid "4 is even, so _n7_ = 4 / 2 = 2;" +msgstr "" #: src/control-flow-basics/exercise.md -msgid "_ = 1; and" -msgstr "_ = 1; ve" +msgid "2 is even, so _n8_ = 1; and" +msgstr "" #: src/control-flow-basics/exercise.md msgid "the sequence terminates." @@ -3891,7 +3967,8 @@ msgstr "" msgid "/// Determine the length of the collatz sequence beginning at `n`.\n" msgstr "/// `n`'den başlayan collatz sekansının uzunluğunu belirle.\n" -#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md +#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md +#: src/concurrency/threads/scoped.md msgid "\"Length: {}\"" msgstr "\"Length: {}\"" @@ -3901,48 +3978,22 @@ msgid "Welcome Back" msgstr "Tekrar Hoş Geldiniz" #: src/welcome-day-1-afternoon.md -msgid "[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)" -msgstr "[Demetler ve Diziler](./tuples-and-arrays.md) (35 dakika)" - -#: src/welcome-day-1-afternoon.md -msgid "[References](./references.md) (55 minutes)" -msgstr "[Referanslar](../references.md) (55 dakika)" - -#: src/welcome-day-1-afternoon.md -msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" -msgstr "[Kullanıcı Tanımlı Türler](./user-defined-types.md) (50 dakika)" - -#: src/welcome-day-1-afternoon.md +#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 35 " -"minutes" +"minutes. It contains:" msgstr "" "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 35 dakika sürecektir" #: src/tuples-and-arrays.md -msgid "[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" -msgstr "" +#, fuzzy +msgid "This segment should take about 35 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 35 dakika sürmelidir" #: src/tuples-and-arrays.md msgid "" -"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 " -"minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "This segment should take about 35 minutes" +"We have seen how primitive types work in Rust. Now it's time for you to " +"start building new composite types." msgstr "" #: src/tuples-and-arrays/arrays.md @@ -4011,9 +4062,10 @@ msgid "" msgstr "" #: src/tuples-and-arrays/iteration.md +#, fuzzy msgid "" "The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!" -"` macros. These are always checked while, debug-only variants like " +"` macros. These are always checked, while debug-only variants like " "`debug_assert!` compile to nothing in release builds." msgstr "" @@ -4074,14 +4126,10 @@ msgid "" "transpose a matrix (turn rows into columns):" msgstr "" -#: src/tuples-and-arrays/exercise.md -msgid "Hard-code both functions to operate on 3 × 3 matrices." -msgstr "" - #: src/tuples-and-arrays/exercise.md msgid "" "Copy the code below to and implement the " -"functions:" +"function. This function only operates on 3x3 matrices." msgstr "" #: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md @@ -4103,37 +4151,19 @@ msgstr "" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"transposed: {:#?}\"" -msgstr "" - -#: src/references.md -msgid "[Shared References](./references/shared.md) (10 minutes)" -msgstr "" - -#: src/references.md -msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" -msgstr "" - -#: src/references.md -msgid "[Slices: &\\[T\\]](./references/slices.md) (10 minutes)" -msgstr "[Dilimler: &\\[T\\]](../references/slices.md) (10 dakika)" - -#: src/references.md -msgid "[Strings](./references/strings.md) (10 minutes)" -msgstr "[Dizgeler](./references/strings.md) (10 dakika)" +msgstr "\"transposed: {:#?}\"" -#: src/references.md -msgid "[Exercise: Geometry](./references/exercise.md) (15 minutes)" -msgstr "" - -#: src/references.md src/smart-pointers.md src/error-handling.md -msgid "This segment should take about 55 minutes" -msgstr "" +#: src/references.md src/smart-pointers.md src/borrowing.md +#: src/concurrency/async-pitfalls.md +#, fuzzy +msgid "This segment should take about 55 minutes. It contains:" #: src/references/shared.md +#, fuzzy msgid "" -"A reference provides a way to access another value without taking " -"responsibility for the value, and is also called \"borrowing\". Shared " -"references are read-only, and the referenced data cannot change." +"A reference provides a way to access another value without taking ownership " +"of the value, and is also called \"borrowing\". Shared references are read-" +"only, and the referenced data cannot change." msgstr "" #: src/references/shared.md @@ -4226,10 +4256,6 @@ msgid "" "reference to a mutable value." msgstr "" -#: src/references/slices.md -msgid "Slices" -msgstr "Dilimler (Slices)" - #: src/references/slices.md msgid "A slice gives you a view into a larger collection:" msgstr "" @@ -4238,10 +4264,6 @@ msgstr "" msgid "Slices borrow data from the sliced type." msgstr "" -#: src/references/slices.md -msgid "Question: What happens if you modify `a[3]` right before printing `s`?" -msgstr "" - #: src/references/slices.md msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " @@ -4279,15 +4301,6 @@ msgid "" "'alive' (in scope) for at least as long as our slice." msgstr "" -#: src/references/slices.md -msgid "" -"The question about modifying `a[3]` can spark an interesting discussion, but " -"the answer is that for memory safety reasons you cannot do it through `a` at " -"this point in the execution, but you can read the data from both `a` and `s` " -"safely. It works before you created the slice, and again after the " -"`println`, when the slice is no longer used." -msgstr "" - #: src/references/strings.md msgid "We can now understand the two string types in Rust:" msgstr "" @@ -4297,7 +4310,9 @@ msgid "`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`." msgstr "" #: src/references/strings.md -msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." +#, fuzzy +msgid "" +"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`." msgstr "" #: src/references/strings.md src/std-traits/read-and-write.md @@ -4421,34 +4436,9 @@ msgid "" "direction.\n" msgstr "" -#: src/user-defined-types.md -msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Static](./user-defined-types/static.md) (5 minutes)" -msgstr "[Static](./user-defined-types/static.md) (5 dakika)" - -#: src/user-defined-types.md -msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "" -"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" -msgstr "" - -#: src/user-defined-types.md src/methods-and-traits.md src/borrowing.md -#: src/lifetimes.md -msgid "This segment should take about 50 minutes" +#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md +#, fuzzy +msgid "This segment should take about 50 minutes. It contains:" msgstr "" #: src/user-defined-types/named-structs.md @@ -4540,7 +4530,7 @@ msgstr "" #: src/user-defined-types/tuple-structs.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/bare-metal/microcontrollers/type-state.md -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "// ...\n" msgstr "" @@ -4601,8 +4591,8 @@ msgid "// Struct variant\n" msgstr "" #: src/user-defined-types/enums.md -msgid "\"On this turn: {:?}\"" -msgstr "" +#, fuzzy +msgid "\"On this turn: {player_move:?}\"" #: src/user-defined-types/enums.md msgid "Enumerations allow you to collect a set of values under one type." @@ -4667,7 +4657,8 @@ msgstr "" #: src/user-defined-types/enums.md src/user-defined-types/static.md #: src/memory-management/review.md src/memory-management/move.md -#: src/smart-pointers/box.md src/borrowing/shared.md +#: src/memory-management/copy-types.md src/borrowing/shared.md +#: src/error-handling/result.md src/error-handling/anyhow.md msgid "More to Explore" msgstr "" @@ -4691,6 +4682,34 @@ msgid "" "guarantees regarding this representation, therefore this is totally unsafe." msgstr "" +#: src/user-defined-types/const.md +msgid "`const`" +msgstr "`const`" + +#: src/user-defined-types/const.md +msgid "" +"Constants are evaluated at compile time and their values are inlined " +"wherever they are used:" +msgstr "" +#: src/user-defined-types/const.md +msgid "" +"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" +"vs-static.html) these are inlined upon use." +msgstr "" +#: src/user-defined-types/const.md +msgid "" +"Only functions marked `const` can be called at compile time to generate " +"`const` values. `const` functions can however be called at runtime." +msgstr "" +#: src/user-defined-types/const.md +msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" +msgstr "" +#: src/user-defined-types/const.md +msgid "" +"It isn't super common that one would need a runtime evaluated constant, but " +"it is helpful and safer than using a static." +msgstr "" + #: src/user-defined-types/static.md msgid "`static`" msgstr "" @@ -4740,38 +4759,6 @@ msgstr "" msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" -#: src/user-defined-types/const.md -msgid "`const`" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"Constants are evaluated at compile time and their values are inlined " -"wherever they are used:" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" -"vs-static.html) these are inlined upon use." -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"Only functions marked `const` can be called at compile time to generate " -"`const` values. `const` functions can however be called at runtime." -msgstr "" - -#: src/user-defined-types/const.md -msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"It isn't super common that one would need a runtime evaluated constant, but " -"it is helpful and safer than using a static." -msgstr "" - #: src/user-defined-types/aliases.md msgid "" "A type alias creates a name for another type. The two types can be used " @@ -4783,9 +4770,16 @@ msgid "// Aliases are more useful with long, complex types:\n" msgstr "" #: src/user-defined-types/aliases.md -msgid "C programmers will recognize this as similar to a `typedef`." +msgid "" +"A [newtype](tuple-structs.html) is often a better alternative since it " +"creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " +"InventoryCount = usize`." msgstr "" +#: src/user-defined-types/aliases.md +msgid "C programmers will recognize this as similar to a `typedef`." +msgstr "C programcıları bunun, `typedef`'e benzer olduğunu anlayacaklardır." + #: src/user-defined-types/exercise.md msgid "" "We will create a data structure to represent an event in an elevator control " @@ -4924,49 +4918,16 @@ msgid "" msgstr "" #: src/welcome-day-2.md -msgid "[Welcome](./welcome-day-2.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-2.md -msgid "[Pattern Matching](./pattern-matching.md) (1 hour)" -msgstr "" - -#: src/welcome-day-2.md -msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" -msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" - -#: src/welcome-day-2.md -msgid "[Generics](./generics.md) (40 minutes)" -msgstr "" - -#: src/welcome-day-2.md -msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 55 " -"minutes" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 55 dakika sürecektir" - -#: src/pattern-matching.md -msgid "[Matching Values](./pattern-matching/match.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md -msgid "[Destructuring](./pattern-matching/destructuring.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md -msgid "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md +#, fuzzy msgid "" -"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 " -"minutes)" -msgstr "" +"Including 10 minute breaks, this session should take about 2 hours and 10 " +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" -#: src/pattern-matching.md src/memory-management.md -msgid "This segment should take about 1 hour" -msgstr "" +#: src/pattern-matching.md src/std-types.md src/memory-management.md +#, fuzzy +msgid "This segment should take about 1 hour. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat sürmeli" #: src/pattern-matching/match.md msgid "" @@ -5101,102 +5062,119 @@ msgid "" "with an `|`." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "Like tuples, structs and enums can also be destructured by matching:" +#: src/pattern-matching/match.md +#, fuzzy +msgid "More To Explore" +msgstr "Daha Fazlasını Keşfedin" + +#: src/pattern-matching/match.md +msgid "" +"Another piece of pattern syntax you can show students is the `@` syntax " +"which binds a part of a pattern to a variable. For example:" +msgstr "" + +#: src/pattern-matching/match.md +msgid "\"outer: {outer:?}, inner: {inner}\"" +msgstr "" + +#: src/pattern-matching/match.md +msgid "" +"In this example `inner` has the value 123 which it pulled from the `Option` " +"via destructuring, `outer` captures the entire `Some(inner)` expression, so " +"it contains the full `Option::Some(123)`. This is rarely used but can be " +"useful in more complex patterns." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "Structs" msgstr "Yapılar (Structs)" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md +msgid "Like tuples, Struct can also be destructured by matching:" +msgstr "" + +#: src/pattern-matching/destructuring-structs.md msgid "\"x.0 = 1, b = {b}, y = {y}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "\"y = 2, x = {i:?}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "\"y = {y}, other fields were ignored\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md +msgid "Change the literal values in `foo` to match with the other patterns." +msgstr "" + +#: src/pattern-matching/destructuring-structs.md +msgid "Add a new field to `Foo` and make changes to the pattern as needed." +msgstr "" + +#: src/pattern-matching/destructuring-structs.md +msgid "" +"The distinction between a capture and a constant expression can be hard to " +"spot. Try changing the `2` in the second arm to a variable, and see that it " +"subtly doesn't work. Change it to a `const` and see it working again." +msgstr "" + +#: src/pattern-matching/destructuring-enums.md +msgid "Like tuples, enums can also be destructured by matching:" +msgstr "" + +#: src/pattern-matching/destructuring-enums.md msgid "" "Patterns can also be used to bind variables to parts of your values. This is " "how you inspect the structure of your types. Let us start with a simple " "`enum` type:" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"cannot divide {n} into two equal parts\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"{n} divided in two is {half}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"sorry, an error happened: {msg}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "Here we have used the arms to _destructure_ the `Result` value. In the first " "arm, `half` is bound to the value inside the `Ok` variant. In the second " "arm, `msg` is bound to the error message." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "Change the literal values in `foo` to match with the other patterns." -msgstr "" - -#: src/pattern-matching/destructuring.md -msgid "Add a new field to `Foo` and make changes to the pattern as needed." -msgstr "" - -#: src/pattern-matching/destructuring.md -msgid "" -"The distinction between a capture and a constant expression can be hard to " -"spot. Try changing the `2` in the second arm to a variable, and see that it " -"subtly doesn't work. Change it to a `const` and see it working again." -msgstr "" - -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "The `if`/`else` expression is returning an enum that is later unpacked with " "a `match`." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "You can try adding a third variant to the enum definition and displaying the " "errors when running the code. Point out the places where your code is now " "inexhaustive and how the compiler tries to give you hints." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "The values in the enum variants can only be accessed after being pattern " "matched." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " "the Rust compiler provides by confirming when all cases are handled." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "" -"Save the result of `divide_in_two` in the `result` variable and `match` it " -"in a loop. That won't compile because `msg` is consumed when matched. To fix " -"it, match `&result` instead of `result`. That will make `msg` a reference so " -"it won't be consumed. This [\"match ergonomics\"](https://rust-lang.github." -"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to " -"support older Rust, replace `msg` with `ref msg` in the pattern." -msgstr "" - #: src/pattern-matching/let-control-flow.md msgid "" "Rust has a few control flow constructs which differ from other languages. " @@ -5208,12 +5186,12 @@ msgid "`if let` expressions" msgstr "`if let` ifadeleri" #: src/pattern-matching/let-control-flow.md -msgid "`while let` expressions" -msgstr "`while let` ifadeleri" +msgid "`let else` expressions" +msgstr "`let else` ifadeleri" #: src/pattern-matching/let-control-flow.md -msgid "`match` expressions" -msgstr "`match` ifadeleri" +msgid "`while let` expressions" +msgstr "`while let` ifadeleri" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5223,13 +5201,9 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"slept for {:?}\"" +msgid "\"slept for {duration:?}\"" msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "`let else` expressions" -msgstr "`let else` ifadeleri" - #: src/pattern-matching/let-control-flow.md msgid "" "For the common case of matching a pattern and returning from the function, " @@ -5239,7 +5213,7 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"got None\"" +msgid "\"not a hex digit\"" msgstr "" #: src/pattern-matching/let-control-flow.md @@ -5247,7 +5221,7 @@ msgid "\"got empty string\"" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"not a hex digit\"" +msgid "\"got None\"" msgstr "" #: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md @@ -5332,33 +5306,18 @@ msgstr "" #: src/pattern-matching/exercise.md msgid "" -"The `Box` type here is a smart pointer, and will be covered in detail later " -"in the course. An expression can be \"boxed\" with `Box::new` as seen in the " -"tests. To evaluate a boxed expression, use the deref operator (`*`) to " -"\"unbox\" it: `eval(*boxed_expr)`." +"An example of a small arithmetic expression could be `10 + 20`, which " +"evaluates to `30`. We can represent the expression as a tree:" msgstr "" #: src/pattern-matching/exercise.md msgid "" -"Some expressions cannot be evaluated and will return an error. The standard " -"[`Result`](https://doc.rust-lang.org/std/result/enum.Result." -"html) type is an enum that represents either a successful value " -"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " -"later." +"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, " +"which evaluate to `85`. We represent this as a much bigger tree:" msgstr "" #: src/pattern-matching/exercise.md -msgid "" -"Copy and paste the code into the Rust playground, and begin implementing " -"`eval`. The final product should pass the tests. It may be helpful to use " -"`todo!()` and get the tests to pass one-by-one. You can also skip a test " -"temporarily with `#[ignore]`:" -msgstr "" - -#: src/pattern-matching/exercise.md -msgid "" -"If you finish early, try writing a test that results in division by zero or " -"integer overflow. How could you handle this with `Result` instead of a panic?" +msgid "In code, we will represent the tree with two types:" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md @@ -5377,29 +5336,37 @@ msgstr "" msgid "/// A literal value\n" msgstr "" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md -msgid "\"division by zero\"" +#: src/pattern-matching/exercise.md +msgid "" +"The `Box` type here is a smart pointer, and will be covered in detail later " +"in the course. An expression can be \"boxed\" with `Box::new` as seen in the " +"tests. To evaluate a boxed expression, use the deref operator (`*`) to " +"\"unbox\" it: `eval(*boxed_expr)`." msgstr "" -#: src/pattern-matching/solution.md -msgid "\"expr: {:?}\"" +#: src/pattern-matching/exercise.md +msgid "" +"Some expressions cannot be evaluated and will return an error. The standard " +"[`Result`](https://doc.rust-lang.org/std/result/enum.Result." +"html) type is an enum that represents either a successful value " +"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " +"later." msgstr "" -#: src/methods-and-traits.md -msgid "[Methods](./methods-and-traits/methods.md) (10 minutes)" +#: src/pattern-matching/exercise.md +msgid "" +"Copy and paste the code into the Rust playground, and begin implementing " +"`eval`. The final product should pass the tests. It may be helpful to use " +"`todo!()` and get the tests to pass one-by-one. You can also skip a test " +"temporarily with `#[ignore]`:" msgstr "" -#: src/methods-and-traits.md -msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" -msgstr "[Özellikler](../methods-and-traits/traits.md) (15 dakika)" - -#: src/methods-and-traits.md -msgid "[Deriving](./methods-and-traits/deriving.md) (3 minutes)" +#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +msgid "\"division by zero\"" msgstr "" -#: src/methods-and-traits.md -msgid "" -"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)" +#: src/pattern-matching/solution.md +msgid "\"expr: {expr:?}\"" msgstr "" #: src/methods-and-traits/methods.md @@ -5429,7 +5396,7 @@ msgid "\"Lap {idx}: {lap} sec\"" msgstr "" #: src/methods-and-traits/methods.md -msgid "// Exclusive ownership of self\n" +msgid "// Exclusive ownership of self (covered later)\n" msgstr "" #: src/methods-and-traits/methods.md @@ -5561,12 +5528,12 @@ msgstr "" msgid "\"Oh you're a cutie! What's your name? {}\"" msgstr "" -#: src/methods-and-traits/traits/implementing.md +#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Woof, my name is {}!\"" msgstr "" -#: src/methods-and-traits/traits/implementing.md +#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Fido\"" msgstr "" @@ -5599,7 +5566,6 @@ msgid "" msgstr "" #: src/methods-and-traits/traits/supertraits.md -#: src/async/control-flow/select.md msgid "\"Rex\"" msgstr "" @@ -5621,7 +5587,7 @@ msgid "" msgstr "" #: src/methods-and-traits/traits/associated-types.md -#: src/async/control-flow/join.md +#: src/lifetimes/lifetime-elision.md msgid "\"{:?}\"" msgstr "\"{:?}\"" @@ -5660,7 +5626,7 @@ msgid "// Debug trait adds support for printing with `{:?}`.\n" msgstr "" #: src/methods-and-traits/deriving.md -msgid "\"{:?} vs. {:?}\"" +msgid "\"{p1:?} vs. {p2:?}\"" msgstr "" #: src/methods-and-traits/deriving.md @@ -5684,7 +5650,7 @@ msgstr "" #: src/methods-and-traits/exercise.md msgid "" -"However, the `StderrLogger` given below logs all messages, regardless of " +"However, the `StdoutLogger` given below logs all messages, regardless of " "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" @@ -5704,6 +5670,10 @@ msgstr "" msgid "\"verbosity={verbosity}: {message}\"" msgstr "" +#: src/methods-and-traits/exercise.md +msgid "// TODO: Define and implement `VerbosityFilter`.\n" +msgstr "" + #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "\"FYI\"" msgstr "" @@ -5712,33 +5682,35 @@ msgstr "" msgid "\"Uhoh\"" msgstr "" -#: src/methods-and-traits/exercise.md -msgid "// TODO: Define and implement `VerbosityFilter`.\n" -msgstr "" - #: src/methods-and-traits/solution.md msgid "/// Only log messages up to the given verbosity level.\n" msgstr "" -#: src/generics.md -msgid "[Generic Functions](./generics/generic-functions.md) (5 minutes)" -msgstr "" +#: src/welcome-day-2-afternoon.md +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 15 " +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmeli" -#: src/generics.md -msgid "[Generic Data Types](./generics/generic-data.md) (10 minutes)" -msgstr "" +#: src/generics.md src/iterators.md src/testing.md +#, fuzzy +msgid "This segment should take about 45 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 45 dakika sürmeli" #: src/generics.md -msgid "[Trait Bounds](./generics/trait-bounds.md) (10 minutes)" -msgstr "" +msgid "impl Trait" +msgstr "impl Trait" #: src/generics.md -msgid "[impl Trait](./generics/impl-trait.md) (5 minutes)" -msgstr "" +#, fuzzy +msgid "dyn Trait" +msgstr "Async Özellikleri (Traits)" #: src/generics.md -msgid "[Exercise: Generic min](./generics/exercise.md) (10 minutes)" -msgstr "" +#, fuzzy +msgid "Exercise: Generic min" +msgstr "Alıştırma: Jenerik `min`" #: src/generics/generic-functions.md msgid "" @@ -5755,8 +5727,9 @@ msgid "\"picked a number: {:?}\"" msgstr "" #: src/generics/generic-functions.md -msgid "\"picked a tuple: {:?}\"" -msgstr "" +#, fuzzy +msgid "\"picked a string: {:?}\"" +msgstr "\"matrix: {:#?}\"" #: src/generics/generic-functions.md msgid "\"dog\"" @@ -5772,6 +5745,12 @@ msgid "" "value." msgstr "" +#: src/generics/generic-functions.md +msgid "" +"In this example we only use the primitive types `i32` and `&str` for `T`, " +"but we can use any type here, including user-defined types:" +msgstr "" + #: src/generics/generic-functions.md msgid "" "This is similar to C++ templates, but Rust partially compiles the generic " @@ -5792,10 +5771,6 @@ msgstr "" msgid "You can use generics to abstract over the concrete field type:" msgstr "" -#: src/generics/generic-data.md -msgid "// fn set_x(&mut self, x: T)\n" -msgstr "" - #: src/generics/generic-data.md msgid "\"{integer:?} and {float:?}\"" msgstr "" @@ -5865,7 +5840,7 @@ msgstr "" #: src/generics/generic-traits.md msgid "" "Implementations of the trait do not need to cover all possible type " -"parameters. Here, `Foo::From(\"hello\")` would not compile because there is " +"parameters. Here, `Foo::from(\"hello\")` would not compile because there is " "no `From<&str>` implementation for `Foo`." msgstr "" @@ -5892,11 +5867,11 @@ msgid "" msgstr "" #: src/generics/trait-bounds.md -msgid "You can do this with `T: Trait` or `impl Trait`:" +msgid "You can do this with `T: Trait`:" msgstr "" #: src/generics/trait-bounds.md -msgid "// struct NotClonable;\n" +msgid "// struct NotCloneable;\n" msgstr "" #: src/generics/trait-bounds.md @@ -5904,7 +5879,7 @@ msgid "\"{pair:?}\"" msgstr "" #: src/generics/trait-bounds.md -msgid "Try making a `NonClonable` and passing it to `duplicate`." +msgid "Try making a `NonCloneable` and passing it to `duplicate`." msgstr "" #: src/generics/trait-bounds.md @@ -5994,6 +5969,71 @@ msgid "" "the error message shows." msgstr "" +#: src/generics/dyn-trait.md +msgid "" +"In addition to using traits for static dispatch via generics, Rust also " +"supports using them for type-erased, dynamic dispatch via trait objects:" +msgstr "" + +#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md +msgid "\"Miau!\"" +msgstr "" + +#: src/generics/dyn-trait.md +msgid "// Uses generics and static dispatch.\n" +msgstr "" + +#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md +msgid "\"Hello, who are you? {}\"" +msgstr "\"Merhaba, nasılsın? {}\"" + +#: src/generics/dyn-trait.md +msgid "// Uses type-erasure and dynamic dispatch.\n" +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"Generics, including `impl Trait`, use monomorphization to create a " +"specialized instance of the function for each different type that the " +"generic is instantiated with. This means that calling a trait method from " +"within a generic function still uses static dispatch, as the compiler has " +"full type information and can resolve which type's trait implementation to " +"use." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual " +"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). " +"This means that there's a single version of `fn dynamic` that is used " +"regardless of what type of `Pet` is passed in." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"When using `dyn Trait`, the trait object needs to be behind some kind of " +"indirection. In this case it's a reference, though smart pointer types like " +"`Box` can also be used (this will be demonstrated on day 3)." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"At runtime, a `&dyn Pet` is represented as a \"fat pointer\", i.e. a pair of " +"two pointers: One pointer points to the concrete object that implements " +"`Pet`, and the other points to the vtable for the trait implementation for " +"that type. When calling the `talk` method on `&dyn Pet` the compiler looks " +"up the function pointer for `talk` in the vtable and then invokes the " +"function, passing the pointer to the `Dog` or `Cat` into that function. The " +"compiler doesn't need to know the concrete type of the `Pet` in order to do " +"this." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"A `dyn Trait` is considered to be \"type-erased\", because we no longer have " +"compile-time knowledge of what the concrete type is." +msgstr "" + #: src/generics/exercise.md msgid "" "In this short exercise, you will implement a generic `min` function that " @@ -6037,55 +6077,25 @@ msgid "" "Ordering.html) enum." msgstr "" -#: src/welcome-day-2-afternoon.md -msgid "[Standard Library Types](./std-types.md) (1 hour and 20 minutes)" -msgstr "" - -#: src/welcome-day-2-afternoon.md -msgid "[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)" -msgstr "" - -#: src/welcome-day-2-afternoon.md -msgid "" -"Including 10 minute breaks, this session should take about 3 hours and 10 " -"minutes" -msgstr "" - -#: src/std-types.md -msgid "[Standard Library](./std-types/std.md) (3 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Documentation](./std-types/docs.md) (5 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Option](./std-types/option.md) (10 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Result](./std-types/result.md) (10 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[String](./std-types/string.md) (10 minutes)" +#: src/std-types.md src/std-types/option.md +msgid "Option" msgstr "" -#: src/std-types.md -msgid "[Vec](./std-types/vec.md) (10 minutes)" +#: src/std-types.md src/std-types/result.md src/error-handling.md +msgid "Result" msgstr "" -#: src/std-types.md -msgid "[HashMap](./std-types/hashmap.md) (10 minutes)" -msgstr "" +#: src/std-types.md src/std-types/string.md +msgid "String" +msgstr "String" #: src/std-types.md -msgid "[Exercise: Counter](./std-types/exercise.md) (20 minutes)" -msgstr "" +msgid "Vec" +msgstr "Vec" #: src/std-types.md -msgid "This segment should take about 1 hour and 20 minutes" -msgstr "Bu bölüm yaklaşık 1 saat 20 dakika sürmeli" +msgid "HashMap" +msgstr "HashMap" #: src/std-types.md msgid "" @@ -6146,6 +6156,10 @@ msgid "" "std/collections/struct.BinaryHeap.html)." msgstr "" +#: src/std-types/docs.md +msgid "Use `rustup doc --std` or to view the documentation." +msgstr "" + #: src/std-types/docs.md msgid "In fact, you can document your own code:" msgstr "" @@ -6184,10 +6198,6 @@ msgid "" "rand>." msgstr "" -#: src/std-types/option.md -msgid "Option" -msgstr "" - #: src/std-types/option.md msgid "" "We have already seen some use of `Option`. It stores either a value of " @@ -6239,35 +6249,33 @@ msgstr "" #: src/std-types/option.md msgid "" -"The niche optimization means that `Option` often has the same size in " -"memory as `T`." -msgstr "" - -#: src/std-types/result.md -msgid "Result" +"The \"niche optimization\" means that `Option` often has the same size in " +"memory as `T`, if there is some representation that is not a valid value of " +"T. For example, a reference cannot be NULL, so `Option<&T>` automatically " +"uses NULL to represent the `None` variant, and thus can be stored in the " +"same memory as `&T`." msgstr "" #: src/std-types/result.md msgid "" "`Result` is similar to `Option`, but indicates the success or failure of an " -"operation, each with a different type. This is similar to the `Res` defined " -"in the expression exercise, but generic: `Result` where `T` is used in " -"the `Ok` variant and `E` appears in the `Err` variant." +"operation, each with a different enum variant. It is generic: `Result` " +"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant." msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"Dear diary: {contents} ({bytes} bytes)\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"Could not read file content\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"The diary could not be opened: {err}\"" msgstr "" @@ -6292,19 +6300,15 @@ msgid "" "Day 4." msgstr "" -#: src/std-types/string.md -msgid "String" -msgstr "String" - #: src/std-types/string.md msgid "" -"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the " -"standard heap-allocated growable UTF-8 string buffer:" +"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a " +"growable UTF-8 encoded string:" msgstr "" #: src/std-types/string.md src/std-traits/read-and-write.md #: src/memory-management/review.md src/testing/unit-tests.md -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "\"Hello\"" msgstr "\"Merhaba\"" @@ -6567,19 +6571,6 @@ msgid "" "value tuples." msgstr "" -#: src/std-types/hashmap.md -msgid "" -"We are showing `HashMap`, and avoid using `&str` as key to make " -"examples easier. Using references in collections can, of course, be done, " -"but it can lead into complications with the borrow checker." -msgstr "" - -#: src/std-types/hashmap.md -msgid "" -"Try removing `to_string()` from the example above and see if it still " -"compiles. Where do you think we might run into issues?" -msgstr "" - #: src/std-types/hashmap.md msgid "" "This type has several \"method-specific\" return types, such as `std::" @@ -6643,41 +6634,25 @@ msgstr "" msgid "\"got {} apples\"" msgstr "" -#: src/std-traits.md -msgid "[Comparisons](./std-traits/comparisons.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Operators](./std-traits/operators.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[From and Into](./std-traits/from-and-into.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Casting](./std-traits/casting.md) (5 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Read and Write](./std-traits/read-and-write.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Default, struct update syntax](./std-traits/default.md) (5 minutes)" -msgstr "" +#: src/std-traits.md src/concurrency/sync-exercises.md +#: src/concurrency/async-exercises.md +#, fuzzy +msgid "This segment should take about 1 hour and 10 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat 20 dakika sürmeli" #: src/std-traits.md -msgid "[Closures](./std-traits/closures.md) (20 minutes)" -msgstr "" +msgid "From and Into" +msgstr "From ve Into" #: src/std-traits.md -msgid "[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)" -msgstr "" +#, fuzzy +msgid "Read and Write" +msgstr "`Read` ve `Write`" #: src/std-traits.md -msgid "This segment should take about 1 hour and 40 minutes" -msgstr "Bu bölüm yaklaşık 1 saat 40 dakika sürmeli" +#, fuzzy +msgid "Default, struct update syntax" +msgstr "`Default`, yapı (struct) güncelleme sözdizimi" #: src/std-traits.md msgid "" @@ -6745,7 +6720,7 @@ msgid "" msgstr "" #: src/std-traits/operators.md -msgid "\"{:?} + {:?} = {:?}\"" +msgid "\"{p1:?} + {p2:?} = {:?}\"" msgstr "" #: src/std-traits/operators.md src/memory-management/drop.md @@ -6783,11 +6758,20 @@ msgid "" "i32)> for Point` would add a tuple to a `Point`." msgstr "" +#: src/std-traits/operators.md +msgid "" +"The `Not` trait (`!` operator) is notable because it does not \"boolify\" " +"like the same operator in C-family languages; instead, for integer types it " +"negates each bit of the number, which arithmetically is equivalent to " +"subtracting it from -1: `!5 == -6`." +msgstr "" + #: src/std-traits/from-and-into.md msgid "" "Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From." "html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to " -"facilitate type conversions:" +"facilitate type conversions. Unlike `as`, these traits correspond to " +"lossless, infallible conversions." msgstr "" #: src/std-traits/from-and-into.md @@ -6903,7 +6887,7 @@ msgid "\"\\n\"" msgstr "" #: src/std-traits/read-and-write.md -msgid "\"Logged: {:?}\"" +msgid "\"Logged: {buffer:?}\"" msgstr "" #: src/std-traits/default.md @@ -6932,8 +6916,7 @@ msgstr "" msgid "\"{almost_default_struct:#?}\"" msgstr "" -#: src/std-traits/default.md src/lifetimes/exercise.md -#: src/lifetimes/solution.md +#: src/std-traits/default.md msgid "\"{:#?}\"" msgstr "" @@ -6984,38 +6967,39 @@ msgid "" msgstr "" #: src/std-traits/closures.md -msgid "\"Calling function on {input}\"" +msgid "\"Calling {func_name}({input}): {}\"" msgstr "" #: src/std-traits/closures.md -msgid "\"add_3: {}\"" +msgid "\"add_3\"" msgstr "" #: src/std-traits/closures.md -msgid "\"accumulate: {}\"" +msgid "\"accumulate\"" msgstr "" #: src/std-traits/closures.md -msgid "\"multiply_sum: {}\"" +msgid "\"multiply_sum\"" msgstr "" #: src/std-traits/closures.md msgid "" -"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or " -"perhaps captures nothing at all. It can be called multiple times " -"concurrently." +"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can " +"be called needing only a shared reference to the closure, which means the " +"closure can be executed repeatedly and even concurrently." msgstr "" #: src/std-traits/closures.md msgid "" -"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it " -"multiple times, but not concurrently." +"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure " +"object is accessed via exclusive reference, so it can be called repeatedly " +"but not concurrently." msgstr "" #: src/std-traits/closures.md msgid "" -"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It " -"might consume captured values." +"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. " +"Doing so consumes the closure and any values captured by move." msgstr "" #: src/std-traits/closures.md @@ -7035,19 +7019,23 @@ msgstr "" #: src/std-traits/closures.md msgid "" "In contrast, when you have a closure, the most flexible you can have is `Fn` " -"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`." +"(which can be passed to a consumer of any of the 3 closure traits), then " +"`FnMut`, and lastly `FnOnce`." msgstr "" #: src/std-traits/closures.md msgid "" "The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. " -"`multiply_sum`), depending on what the closure captures." +"`multiply_sum`), depending on what the closure captures. Function pointers " +"(references to `fn` items) implement `Copy` and `Fn`." msgstr "" #: src/std-traits/closures.md msgid "" -"By default, closures will capture by reference if they can. The `move` " -"keyword makes them capture by value." +"By default, closures will capture each variable from an outer scope by the " +"least demanding form of access they can (by shared reference if possible, " +"then exclusive reference, then by move). The `move` keyword forces capture " +"by value." msgstr "" #: src/std-traits/closures.md src/smart-pointers/trait-objects.md @@ -7110,57 +7098,21 @@ msgstr "" msgid "Smart pointers: standard library pointer types." msgstr "" -#: src/welcome-day-3.md -msgid "[Welcome](./welcome-day-3.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-3.md -msgid "[Memory Management](./memory-management.md) (1 hour)" -msgstr "" - -#: src/welcome-day-3.md -msgid "[Smart Pointers](./smart-pointers.md) (55 minutes)" -msgstr "" - -#: src/welcome-day-3.md +#: src/welcome-day-3.md src/welcome-day-4-afternoon.md +#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 20 " -"minutes" -msgstr "" +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" -#: src/memory-management.md -msgid "[Review of Program Memory](./memory-management/review.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "" -"[Approaches to Memory Management](./memory-management/approaches.md) (10 " -"minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Ownership](./memory-management/ownership.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Move Semantics](./memory-management/move.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Clone](./memory-management/clone.md) (2 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Copy Types](./memory-management/copy-types.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Drop](./memory-management/drop.md) (10 minutes)" +#: src/memory-management.md src/memory-management/clone.md +msgid "Clone" msgstr "" #: src/memory-management.md -msgid "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" -msgstr "" +#, fuzzy +msgid "Drop" +msgstr "`Drop`" #: src/memory-management/review.md msgid "Programs allocate memory in two ways:" @@ -7282,9 +7234,9 @@ msgid "" msgstr "" #: src/memory-management/approaches.md -msgid "" -"Typically implemented with reference counting, garbage collection, or RAII." -msgstr "" +#, fuzzy +msgid "Typically implemented with reference counting or garbage collection." +msgstr "Çalışma zamanı veya çöp toplama özelliği yoktur." #: src/memory-management/approaches.md msgid "Rust offers a new mix:" @@ -7368,7 +7320,7 @@ msgstr "" msgid "An assignment will transfer _ownership_ between variables:" msgstr "" -#: src/memory-management/move.md +#: src/memory-management/move.md src/concurrency/async-control-flow/select.md msgid "\"Hello!\"" msgstr "\"Merhaba!\"" @@ -7426,11 +7378,12 @@ msgid "" "parameter. This transfers ownership:" msgstr "" -#: src/memory-management/move.md +#: src/memory-management/move.md src/memory-management/clone.md msgid "\"Hello {name}\"" msgstr "\"Merhaba {name}\"" -#: src/memory-management/move.md src/android/interoperability/java.md +#: src/memory-management/move.md src/memory-management/clone.md +#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md msgid "\"Alice\"" msgstr "\"Alice\"" @@ -7549,10 +7502,6 @@ msgid "" "which is being copied or moved." msgstr "" -#: src/memory-management/clone.md -msgid "Clone" -msgstr "" - #: src/memory-management/clone.md msgid "" "Sometimes you _want_ to make a copy of a value. The `Clone` trait " @@ -7562,8 +7511,7 @@ msgstr "" #: src/memory-management/clone.md msgid "" "The idea of `Clone` is to make it easy to spot where heap allocations are " -"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::" -"new`." +"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`." msgstr "" #: src/memory-management/clone.md @@ -7572,6 +7520,18 @@ msgid "" "and return later to try to optimize those clones away." msgstr "" +#: src/memory-management/clone.md +msgid "" +"`clone` generally performs a deep copy of the value, meaning that if you e." +"g. clone an array, all of the elements of the array are cloned as well." +msgstr "" + +#: src/memory-management/clone.md +msgid "" +"The behavior for `clone` is user-defined, so it can perform custom cloning " +"logic if needed." +msgstr "" + #: src/memory-management/copy-types.md msgid "" "While move semantics are the default, certain types are copied by default:" @@ -7638,6 +7598,14 @@ msgstr "" msgid "Show that it works if you clone `p1` instead." msgstr "" +#: src/memory-management/copy-types.md +msgid "" +"Shared references are `Copy`/`Clone`, mutable references are not. This is " +"because Rust requires that mutable references be exclusive, so while it's " +"valid to make a copy of a shared reference, creating a copy of a mutable " +"reference would violate Rust's borrowing rules." +msgstr "" + #: src/memory-management/drop.md msgid "The `Drop` Trait" msgstr "" @@ -7652,8 +7620,8 @@ msgstr "" msgid "\"Dropping {}\"" msgstr "" -#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"a\"" msgstr "" @@ -7835,24 +7803,13 @@ msgid "\"0.1\"" msgstr "" #: src/smart-pointers.md -msgid "[Box" -msgstr "" - -#: src/smart-pointers.md -msgid "](./smart-pointers/box.md) (10 minutes)" -msgstr "" - -#: src/smart-pointers.md -msgid "[Rc](./smart-pointers/rc.md) (5 minutes)" -msgstr "" - -#: src/smart-pointers.md -msgid "[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)" -msgstr "" +#, fuzzy +msgid "Box" +msgstr "`Box`" #: src/smart-pointers.md -msgid "[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)" -msgstr "" +msgid "Rc" +msgstr "Rc" #: src/smart-pointers/box.md msgid "" @@ -7873,7 +7830,8 @@ msgstr "" #: src/smart-pointers/box.md msgid "" -"Recursive data types or data types with dynamic sizes need to use a `Box`:" +"Recursive data types or data types with dynamic sizes cannot be stored " +"inline without a pointer indirection. `Box` accomplishes that indirection:" msgstr "" #: src/smart-pointers/box.md @@ -7922,8 +7880,8 @@ msgstr "" #: src/smart-pointers/box.md msgid "" -"have a type whose size that can't be known at compile time, but the Rust " -"compiler wants to know an exact size." +"have a type whose size can't be known at compile time, but the Rust compiler " +"wants to know an exact size." msgstr "" #: src/smart-pointers/box.md @@ -7954,43 +7912,11 @@ msgid "" "storing the value directly." msgstr "" -#: src/smart-pointers/box.md -msgid "Niche Optimization" -msgstr "Niche Optimizasyonu" - #: src/smart-pointers/box.md msgid "" "Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. " "This makes `Box` one of the types that allow the compiler to optimize " -"storage of some enums." -msgstr "" - -#: src/smart-pointers/box.md -msgid "" -"For example, `Option>` has the same size, as just `Box`, because " -"compiler uses NULL-value to discriminate variants instead of using explicit " -"tag ([\"Null Pointer Optimization\"](https://doc.rust-lang.org/std/option/" -"#representation)):" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Just box\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Optional box\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of just_box: {}\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of optional_box: {}\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of none: {}\"" +"storage of some enums (the \"niche optimization\")." msgstr "" #: src/smart-pointers/rc.md @@ -8010,7 +7936,7 @@ msgstr "" #: src/smart-pointers/rc.md msgid "" -"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc." +"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc." "rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded " "context." msgstr "" @@ -8056,18 +7982,11 @@ msgstr "" #: src/smart-pointers/trait-objects.md msgid "" -"Trait objects allow for values of different types, for instance in a " -"collection:" -msgstr "" - -#: src/smart-pointers/trait-objects.md -msgid "\"Miau!\"" +"We previously saw how trait objects can be used with references, e.g `&dyn " +"Pet`. However, we can also use trait objects with smart pointers like `Box` " +"to create an owned trait object: `Box`." msgstr "" -#: src/smart-pointers/trait-objects.md -msgid "\"Hello, who are you? {}\"" -msgstr "\"Merhaba, nasılsın? {}\"" - #: src/smart-pointers/trait-objects.md msgid "Memory layout after allocating `pets`:" msgstr "" @@ -8202,7 +8121,7 @@ msgid "" msgstr "" #: src/smart-pointers/exercise.md -msgid "// Implement `new`, `insert`, `len`, and `has`.\n" +msgid "// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\n" msgstr "" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md @@ -8214,35 +8133,11 @@ msgid "\"bar\"" msgstr "" #: src/welcome-day-3-afternoon.md -msgid "[Borrowing](./borrowing.md) (50 minutes)" -msgstr "" - -#: src/welcome-day-3-afternoon.md -msgid "[Lifetimes](./lifetimes.md) (50 minutes)" -msgstr "[Ömürler](./lifetimes.md) (50 dakika)" - -#: src/welcome-day-3-afternoon.md +#, fuzzy msgid "" -"Including 10 minute breaks, this session should take about 1 hour and 50 " -"minutes" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 50 dakika sürecektir" - -#: src/borrowing.md -msgid "[Borrowing a Value](./borrowing/shared.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Borrow Checking](./borrowing/borrowck.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)" -msgstr "" +"Including 10 minute breaks, this session should take about 1 hour and 55 " +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 55 dakika sürmeli" #: src/borrowing/shared.md msgid "" @@ -8265,14 +8160,15 @@ msgid "" msgstr "" #: src/borrowing/shared.md -msgid "Notes on stack returns:" +msgid "Notes on stack returns and inlining:" msgstr "" #: src/borrowing/shared.md msgid "" "Demonstrate that the return from `add` is cheap because the compiler can " -"eliminate the copy operation. Change the above code to print stack addresses " -"and run it on the [Playground](https://play.rust-lang.org/?" +"eliminate the copy operation, by inlining the call to add into main. Change " +"the above code to print stack addresses and run it on the [Playground]" +"(https://play.rust-lang.org/?" "version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) " "or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the " "\"DEBUG\" optimization level, the addresses should change, while they stay " @@ -8280,15 +8176,17 @@ msgid "" msgstr "" #: src/borrowing/shared.md -msgid "The Rust compiler can do return value optimization (RVO)." +msgid "" +"The Rust compiler can do automatic inlining, that can be disabled on a " +"function level with `#[inline(never)]`." msgstr "" #: src/borrowing/shared.md msgid "" -"In C++, copy elision has to be defined in the language specification because " -"constructors can have side effects. In Rust, this is not an issue at all. If " -"RVO did not happen, Rust will always perform a simple and efficient `memcpy` " -"copy." +"Once disabled, the printed address will change on all optimization levels. " +"Looking at Godbolt or Playground, one can see that in this case, the return " +"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up " +"the point will be returned in 2 registers (eax and edx)." msgstr "" #: src/borrowing/borrowck.md @@ -8346,18 +8244,56 @@ msgid "" "this often results in \"fighting with the borrow checker.\"" msgstr "" +#: src/borrowing/examples.md +msgid "" +"As a concrete example of how these borrowing rules prevent memory errors, " +"consider the case of modifying a collection while there are references to " +"its elements:" +msgstr "" + +#: src/borrowing/examples.md +msgid "\"{elem}\"" +msgstr "\"{elem}\"" + +#: src/borrowing/examples.md +msgid "Similarly, consider the case of iterator invalidation:" +msgstr "" + +#: src/borrowing/examples.md +msgid "" +"In both of these cases, modifying the collection by pushing new elements " +"into it can potentially invalidate existing references to the collection's " +"elements if the collection has to reallocate." +msgstr "" + +#: src/borrowing/interior-mutability.md +msgid "" +"In some situations, it's necessary to modify data behind a shared (read-" +"only) reference. For example, a shared data structure might have an internal " +"cache, and wish to update that cache from read-only methods." +msgstr "" + +#: src/borrowing/interior-mutability.md +msgid "" +"The \"interior mutability\" pattern allows exclusive (mutable) access behind " +"a shared reference. The standard library provides several ways to do this, " +"all while still ensuring safety, typically by performing a runtime check." +msgstr "" + +#: src/borrowing/interior-mutability.md +msgid "`Cell`" +msgstr "" + #: src/borrowing/interior-mutability.md msgid "" -"In some situations, it's necessary to modify data behind a shared (read-" -"only) reference. For example, a shared data structure might have an internal " -"cache, and wish to update that cache from read-only methods." +"`Cell` wraps a value and allows getting or setting the value using only a " +"shared reference to the `Cell`. However, it does not allow any references to " +"the inner value. Since there are no references, borrowing rules cannot be " +"broken." msgstr "" #: src/borrowing/interior-mutability.md -msgid "" -"The \"interior mutability\" pattern allows exclusive (mutable) access behind " -"a shared reference. The standard library provides several ways to do this, " -"all while still ensuring safety, typically by performing a runtime check." +msgid "// Note that `cell` is NOT declared as mutable.\n" msgstr "" #: src/borrowing/interior-mutability.md @@ -8365,24 +8301,35 @@ msgid "`RefCell`" msgstr "`RefCell`" #: src/borrowing/interior-mutability.md -msgid "\"graph: {root:#?}\"" +msgid "" +"`RefCell` allows accessing and mutating a wrapped value by providing " +"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without " +"actually being Rust references." msgstr "" #: src/borrowing/interior-mutability.md -msgid "\"graph sum: {}\"" +msgid "" +"These types perform dynamic checks using a counter in the `RefCell` to " +"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`." msgstr "" #: src/borrowing/interior-mutability.md -msgid "`Cell`" +msgid "" +"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow " +"calling methods on the inner value without allowing references to escape." msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"`Cell` wraps a value and allows getting or setting the value, even with a " -"shared reference to the `Cell`. However, it does not allow any references to " -"the value. Since there are no references, borrowing rules cannot be broken." +"// This triggers an error at runtime.\n" +" // let other = cell.borrow();\n" +" // println!(\"{}\", *other);\n" msgstr "" +#: src/borrowing/interior-mutability.md +msgid "\"{cell:?}\"" +msgstr "\"{cell:?}\"" + #: src/borrowing/interior-mutability.md msgid "" "The main thing to take away from this slide is that Rust provides _safe_ " @@ -8400,9 +8347,9 @@ msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"`Rc` only allows shared (read-only) access to its contents, since its " -"purpose is to allow (and count) many references. But we want to modify the " -"value, so we need interior mutability." +"The extra block in the `RefCell` example is to end the borrow created by the " +"call to `borrow_mut` before we print the cell. Trying to print a borrowed " +"`RefCell` just shows the message `\"{borrowed}\"`." msgstr "" #: src/borrowing/interior-mutability.md @@ -8414,16 +8361,9 @@ msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"Demonstrate that reference loops can be created by adding `root` to `subtree." -"children`." -msgstr "" - -#: src/borrowing/interior-mutability.md -msgid "" -"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments " -"`self.value` and calls the same method on its children. This will panic in " -"the presence of the reference loop, with `thread 'main' panicked at 'already " -"borrowed: BorrowMutError'`." +"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` " +"can't be passed between threads. This prevents two threads trying to access " +"the cell at once." msgstr "" #: src/borrowing/exercise.md @@ -8461,24 +8401,6 @@ msgstr "" msgid "\"I'm {} and my age is {}\"" msgstr "" -#: src/lifetimes.md -msgid "" -"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)" -msgstr "" -"[Ömür için Ek Açıklamalar](./lifetimes/lifetime-annotations.md) (10 dakika)" - -#: src/lifetimes.md -msgid "[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)" -msgstr "[Ömür Atlaması (Elision)](./lifetimes/lifetime-elision.md) (5 dakika)" - -#: src/lifetimes.md -msgid "[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)" -msgstr "[Yapı Ömürleri](./lifetimes/struct-lifetimes.md) (5 dakika)" - -#: src/lifetimes.md -msgid "[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)" -msgstr "[Alıştırma: Protobuf Ayrıştırma](./lifetimes/exercise.md) (30 dakika)" - #: src/lifetimes/lifetime-annotations.md msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " @@ -8677,50 +8599,65 @@ msgstr "" msgid "We'll use the following proto:" msgstr "" +#: src/lifetimes/exercise.md +msgid "Messages" +msgstr "" + #: src/lifetimes/exercise.md msgid "" "A proto message is encoded as a series of fields, one after the next. Each " "is implemented as a \"tag\" followed by the value. The tag contains a field " "number (e.g., `2` for the `id` field of a `Person` message) and a wire type " -"defining how the payload should be determined from the byte stream." +"defining how the payload should be determined from the byte stream. These " +"are combined into a single integer, as decoded in `unpack_tag` below." msgstr "" #: src/lifetimes/exercise.md -msgid "" -"Integers, including the tag, are represented with a variable-length encoding " -"called VARINT. Luckily, `parse_varint` is defined for you below. The given " -"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and " -"to parse a message into a series of calls to those callbacks." +msgid "Varint" msgstr "" #: src/lifetimes/exercise.md msgid "" -"What remains for you is to implement the `parse_field` function and the " -"`ProtoMessage` trait for `Person` and `PhoneNumber`." +"Integers, including the tag, are represented with a variable-length encoding " +"called VARINT. Luckily, `parse_varint` is defined for you below." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid varint\"" -msgstr "" +#: src/lifetimes/exercise.md +#, fuzzy +msgid "Wire Types" +msgstr "Paylaşılan (Shared) Türler" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid wire-type\"" +#: src/lifetimes/exercise.md +msgid "" +"Proto defines several wire types, only two of which are used in this " +"exercise." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Unexpected EOF\"" +#: src/lifetimes/exercise.md +msgid "" +"The `Varint` wire type contains a single varint, and is used to encode proto " +"values of type `int32` such as `Person.id`." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid length\"" +#: src/lifetimes/exercise.md +msgid "" +"The `Len` wire type contains a length expressed as a varint, followed by a " +"payload of that number of bytes. This is used to encode proto values of type " +"`string` such as `Person.name`. It is also used to encode proto values " +"containing sub-messages such as `Person.phones`, where the payload contains " +"an encoding of the sub-message." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Unexpected wire-type)\"" +#: src/lifetimes/exercise.md +msgid "" +"The given code also defines callbacks to handle `Person` and `PhoneNumber` " +"fields, and to parse a message into a series of calls to those callbacks." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid string (not UTF-8)\"" +#: src/lifetimes/exercise.md +msgid "" +"What remains for you is to implement the `parse_field` function and the " +"`ProtoMessage` trait for `Person` and `PhoneNumber`." msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -8733,7 +8670,10 @@ msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" -"//I64, -- not needed for this exercise\n" +"// The I64 WireType indicates that the value is precisely 8 bytes in\n" +" // little-endian order containing a 64-bit signed integer or double " +"type.\n" +" //I64, -- not needed for this exercise\n" " /// The Len WireType indicates that the value is a length represented as " "a\n" " /// VARINT followed by exactly that number of bytes.\n" @@ -8741,8 +8681,10 @@ msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" -"/// The I32 WireType indicates that the value is precisely 4 bytes in\n" -" /// little-endian order containing a 32-bit signed integer.\n" +"// The I32 WireType indicates that the value is precisely 4 bytes in\n" +" // little-endian order containing a 32-bit signed integer or float " +"type.\n" +" //I32, -- not needed for this exercise\n" msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -8753,6 +8695,10 @@ msgstr "" msgid "//I64(i64), -- not needed for this exercise\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "//I32(i32), -- not needed for this exercise\n" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "/// A field, containing the field number and its value.\n" msgstr "" @@ -8761,11 +8707,39 @@ msgstr "" msgid "//1 => WireType::I64, -- not needed for this exercise\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "//5 => WireType::I32, -- not needed for this exercise\n" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Invalid wire type: {value}\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected string to be a `Len` field\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Invalid string\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected bytes to be a `Len` field\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected `u64` to be a `Varint` field\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" "/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Not enough bytes for varint\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" "// This is the last byte of the VARINT, so convert it to\n" @@ -8776,6 +8750,10 @@ msgstr "" msgid "// More than 7 bytes is invalid.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Too many bytes for varint\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "/// Convert a tag into a field number and a WireType.\n" msgstr "" @@ -8807,17 +8785,68 @@ msgstr "" msgid "// TODO: Implement ProtoMessage for Person and PhoneNumber.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md src/modules/exercise.md +#: src/modules/solution.md src/testing/unit-tests.md src/testing/solution.md +msgid "\"\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +#, fuzzy +msgid "\"beautiful name\"" +msgstr "\"Merhaba {name}\"" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Evan\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1234-777-9090\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"home\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "// Put that all together into a single parse.\n" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"maxwell\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1202-555-1212\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1800-867-5308\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"mobile\"" +msgstr "" + +#: src/lifetimes/exercise.md +msgid "" +"In this exercise there are various cases where protobuf parsing might fail, " +"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in " +"the data buffer. In normal Rust code we'd handle this with the `Result` " +"enum, but for simplicity in this exercise we panic if any errors are " +"encountered. On day 4 we'll cover error handling in Rust in more detail." +msgstr "" + #: src/lifetimes/solution.md -msgid "// Unwrap error because `value` is definitely 4 bytes long.\n" +msgid "\"len not a valid `usize`\"" msgstr "" #: src/lifetimes/solution.md -msgid "// skip everything else\n" +msgid "\"Unexpected EOF\"" msgstr "" #: src/lifetimes/solution.md -msgid "b\"hello\"" -msgstr "b\"merhaba\"" +msgid "// skip everything else\n" +msgstr "" #: src/welcome-day-4.md msgid "Welcome to Day 4" @@ -8850,47 +8879,24 @@ msgid "" msgstr "" #: src/welcome-day-4.md -msgid "[Welcome](./welcome-day-4.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Iterators](./iterators.md) (45 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Modules](./modules.md) (40 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Testing](./testing.md) (45 minutes)" -msgstr "" - -#: src/welcome-day-4.md +#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 40 " -"minutes" -msgstr "" +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" #: src/iterators.md -msgid "[Iterator](./iterators/iterator.md) (5 minutes)" -msgstr "" - -#: src/iterators.md -msgid "[IntoIterator](./iterators/intoiterator.md) (5 minutes)" -msgstr "" +msgid "Iterator" +msgstr "Iterator" #: src/iterators.md -msgid "[FromIterator](./iterators/fromiterator.md) (5 minutes)" -msgstr "" - -#: src/iterators.md -msgid "" -"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)" -msgstr "" +#, fuzzy +msgid "IntoIterator" +msgstr "`IntoIterator`" -#: src/iterators.md src/testing.md -msgid "This segment should take about 45 minutes" -msgstr "Bu bölüm yaklaşık 45 dakika sürmeli" +#: src/iterators.md src/iterators/fromiterator.md +msgid "FromIterator" +msgstr "FromIterator" #: src/iterators/iterator.md msgid "" @@ -8977,10 +8983,6 @@ msgid "" "over references to elements of `some_vector`." msgstr "" -#: src/iterators/fromiterator.md -msgid "FromIterator" -msgstr "FromIterator" - #: src/iterators/fromiterator.md msgid "" "[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " @@ -9043,25 +9045,8 @@ msgid "" "/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\n" msgstr "" -#: src/modules.md -msgid "[Modules](./modules/modules.md) (3 minutes)" -msgstr "" - -#: src/modules.md -msgid "[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)" -msgstr "" - -#: src/modules.md -msgid "[Visibility](./modules/visibility.md) (5 minutes)" -msgstr "" - -#: src/modules.md -msgid "[use, super, self](./modules/paths.md) (10 minutes)" -msgstr "" - -#: src/modules.md -msgid "" -"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)" +#: src/modules.md src/modules/paths.md +msgid "use, super, self" msgstr "" #: src/modules/modules.md @@ -9103,7 +9088,7 @@ msgstr "" #: src/modules/filesystem.md msgid "" -"This tells rust that the `garden` module content is found at `src/garden." +"This tells Rust that the `garden` module content is found at `src/garden." "rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/" "vegetables.rs`." msgstr "" @@ -9242,10 +9227,6 @@ msgid "" "its descendants)." msgstr "" -#: src/modules/paths.md -msgid "use, super, self" -msgstr "" - #: src/modules/paths.md msgid "" "A module can bring symbols from another module into scope with `use`. You " @@ -9380,11 +9361,6 @@ msgstr "" msgid "\"+-{:-`, `Display`, and the `Error` trait." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"`thiserror` is often used in libraries to create custom error types that " -"implement `From`." +#: src/error-handling/thiserror.md +msgid "\"I/O error: {0}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"`anyhow` is often used by applications to help with error handling in " -"functions, including adding contextual information to your errors." +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Found no username in {0}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Found no username in {0}\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "//fs::write(\"config.dat\", \"\").unwrap();\n" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Failed to open {path}\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Username: {username}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Failed to read\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Error: {err:?}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Username: {username}\"" +#: src/error-handling/thiserror.md +msgid "" +"The `Error` derive macro is provided by `thiserror`, and has lots of useful " +"attributes to help define error types in a compact way." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Error: {err:?}\"" +#: src/error-handling/thiserror.md +msgid "The message from `#[error]` is used to derive the `Display` trait." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "`thiserror`" +#: src/error-handling/thiserror.md +msgid "" +"Note that the (`thiserror::`)`Error` derive macro, while it has the effect " +"of implementing the (`std::error::`)`Error` trait, is not the same this; " +"traits and macros do not share a namespace." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" -"The `Error` derive macro is provided by `thiserror`, and has lots of useful " -"attributes to help define error types in a compact way." +"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type " +"with support for carrying additional contextual information, which can be " +"used to provide a semantic trace of what the program was doing leading up to " +"the error." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "The `std::error::Error` trait is derived automatically." +#: src/error-handling/anyhow.md +msgid "" +"This can be combined with the convenience macros from [`thiserror`](https://" +"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom " +"error types." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "The message from `#[error]` is used to derive the `Display` trait." +#: src/error-handling/anyhow.md +msgid "\"Failed to open {path}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "`anyhow`" +#: src/error-handling/anyhow.md +msgid "\"Failed to read\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" "`anyhow::Error` is essentially a wrapper around `Box`. As such " "it's again generally not a good choice for the public API of a library, but " "is widely used in applications." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "`anyhow::Result` is a type alias for `Result`." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"Actual error type inside of it can be extracted for examination if necessary." -msgstr "" - -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" -"Functionality provided by `anyhow::Result` may be familiar to Go " -"developers, as it provides similar usage patterns and ergonomics to `(T, " -"error)` from Go." +"Functionality provided by `anyhow::Error` may be familiar to Go developers, " +"as it provides similar behavior to the Go `error` type and `Result` is much like a Go `(T, error)` (with the convention that " +"only one element of the pair is meaningful)." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" "`anyhow::Context` is a trait implemented for the standard `Result` and " "`Option` types. `use anyhow::Context` is necessary to enable `.context()` " "and `.with_context()` on those types." msgstr "" -#: src/error-handling/exercise.md -msgid "Exercise: Rewriting with Result" +#: src/error-handling/anyhow.md +msgid "" +"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the " +"specific error type stored inside can be extracted for examination if " +"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct." +"Error.html#method.downcast)." msgstr "" #: src/error-handling/exercise.md @@ -10138,13 +10163,14 @@ msgid "" "The following implements a very simple parser for an expression language. " "However, it handles errors by panicking. Rewrite it to instead use idiomatic " "error handling and propagate errors to a return from `main`. Feel free to " -"use `thiserror` and `anyhow`." +"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/" +"anyhow)." msgstr "" #: src/error-handling/exercise.md msgid "" -"HINT: start by fixing error handling in the `parse` function. Once that is " -"working correctly, update `Tokenizer` to implement " +"**Hint:** start by fixing error handling in the `parse` function. Once that " +"is working correctly, update `Tokenizer` to implement " "`Iterator>` and handle that in the parser." msgstr "" @@ -10193,7 +10219,7 @@ msgid "\"Unexpected end of input\"" msgstr "" #: src/error-handling/exercise.md -msgid "\"Invalid 32-bit integer'\"" +msgid "\"Invalid 32-bit integer\"" msgstr "" #: src/error-handling/exercise.md @@ -10228,39 +10254,6 @@ msgstr "" msgid "\"Invalid number\"" msgstr "" -#: src/unsafe-rust.md -msgid "[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "" -"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unions](./unsafe-rust/unions.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "This segment should take about 1 hour and 5 minutes" -msgstr "" - #: src/unsafe-rust/unsafe.md msgid "The Rust language has two parts:" msgstr "" @@ -10336,12 +10329,12 @@ msgstr "" #: src/unsafe-rust/dereferencing.md msgid "" -"// Safe because r1 and r2 were obtained from references and so are\n" -" // guaranteed to be non-null and properly aligned, the objects " -"underlying\n" -" // the references from which they were obtained are live throughout the\n" -" // whole unsafe block, and they are not accessed either through the\n" -" // references or concurrently through any other pointers.\n" +"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\n" +" // be non-null and properly aligned, the objects underlying the " +"references\n" +" // from which they were obtained are live throughout the whole unsafe\n" +" // block, and they are not accessed either through the references or\n" +" // concurrently through any other pointers.\n" msgstr "" #: src/unsafe-rust/dereferencing.md @@ -10432,6 +10425,11 @@ msgid "" "static variables:" msgstr "" +#: src/unsafe-rust/mutable-static.md +msgid "" +"// SAFETY: There are no other threads which could be accessing `COUNTER`.\n" +msgstr "" + #: src/unsafe-rust/mutable-static.md msgid "\"COUNTER: {COUNTER}\"" msgstr "" @@ -10507,8 +10505,8 @@ msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "" -"// Safe because the indices are in the correct order, within the bounds of\n" -" // the string slice, and lie on UTF-8 sequence boundaries.\n" +"// SAFETY: The indices are in the correct order, within the bounds of the\n" +" // string slice, and lie on UTF-8 sequence boundaries.\n" msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10520,8 +10518,10 @@ msgid "\"char count: {}\"" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "// Undefined behavior if abs misbehaves.\n" -msgstr "// Undefined behavior if abs misbehaves.\n" +msgid "" +"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\n" +" // requirements.\n" +msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "\"Absolute value of -3 according to C: {}\"" @@ -10555,7 +10555,7 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "// Safe because ...\n" +msgid "// SAFETY: ...\n" msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10565,11 +10565,11 @@ msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "" "`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can " -"create UB if the range is incorrect. `abs` is incorrect for a different " -"reason: it is an external function (FFI). Calling external functions is " -"usually only a problem when those functions do things with pointers which " -"might violate Rust's memory model, but in general any C function might have " -"undefined behaviour under any arbitrary circumstances." +"create UB if the range is incorrect. `abs` is unsafe for a different reason: " +"it is an external function (FFI). Calling external functions is usually only " +"a problem when those functions do things with pointers which might violate " +"Rust's memory model, but in general any C function might have undefined " +"behaviour under any arbitrary circumstances." msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10605,7 +10605,7 @@ msgstr "" #: src/unsafe-rust/unsafe-traits.md msgid "" "For example, the `zerocopy` crate has an unsafe trait that looks [something " -"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):" +"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):" msgstr "" #: src/unsafe-rust/unsafe-traits.md @@ -10616,7 +10616,7 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-traits.md -msgid "// Safe because u32 has a defined representation and no padding.\n" +msgid "// SAFETY: `u32` has a defined representation and no padding.\n" msgstr "" #: src/unsafe-rust/unsafe-traits.md @@ -10627,7 +10627,7 @@ msgstr "" #: src/unsafe-rust/unsafe-traits.md msgid "" -"The actual safety section for `AsBytes` is rather longer and more " +"The actual safety section for `IntoBytes` is rather longer and more " "complicated." msgstr "" @@ -10817,7 +10817,7 @@ msgstr "" msgid "// Keep calling readdir until we get a NULL pointer back.\n" msgstr "" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md msgid "// Call closedir as needed.\n" msgstr "" @@ -10839,7 +10839,7 @@ msgid "// SAFETY: path.as_ptr() cannot be NULL.\n" msgstr "" #: src/unsafe-rust/solution.md -msgid "\"Could not open {:?}\"" +msgid "\"Could not open {path:?}\"" msgstr "" #: src/unsafe-rust/solution.md @@ -10859,7 +10859,9 @@ msgid "" msgstr "" #: src/unsafe-rust/solution.md -msgid "// SAFETY: self.dir is not NULL.\n" +msgid "" +"// Call closedir as needed.\n" +" // SAFETY: self.dir is never NULL.\n" msgstr "" #: src/unsafe-rust/solution.md @@ -10913,14 +10915,6 @@ msgid "" "existing code as needed)." msgstr "" -#: src/android.md -msgid "" -"We will attempt to call Rust from one of your own projects today. So try to " -"find a little corner of your code base where we can move some lines of code " -"to Rust. The fewer dependencies and \"exotic\" types the better. Something " -"that parses some raw bytes would be ideal." -msgstr "" - #: src/android.md msgid "" "The speaker may mention any of the following given the increased use of Rust " @@ -10930,25 +10924,25 @@ msgstr "" #: src/android.md msgid "" "Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-" -"over-http3-in-android.html)" +"over-http3-in-android.html)." msgstr "" #: src/android.md msgid "" "Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" -"appendix/rutabaga_gfx.html)" +"appendix/rutabaga_gfx.html)." msgstr "" #: src/android.md msgid "" "Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" -"rust-binder-v1-0-08ba9197f637@google.com/)" +"rust-binder-v1-0-08ba9197f637@google.com/)." msgstr "" #: src/android.md msgid "" "Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-" -"rust-in-android.html)" +"rust-in-android.html)." msgstr "" #: src/android/setup.md @@ -10963,6 +10957,14 @@ msgid "" "setup/start) for details." msgstr "" +#: src/android/setup.md +msgid "" +"The code on the following pages can be found in the [`src/android/` " +"directory](https://github.com/google/comprehensive-rust/tree/main/src/" +"android) of the course material. Please `git clone` the repository to follow " +"along." +msgstr "" + #: src/android/setup.md msgid "" "Cuttlefish is a reference Android device designed to work on generic Linux " @@ -11081,20 +11083,8 @@ msgstr "" #: src/android/build-rules.md msgid "" -"Soong has many similarities to Bazel, which is the open-source variant of " -"Blaze (used in google3)." -msgstr "" - -#: src/android/build-rules.md -msgid "" -"There is a plan to transition [Android](https://source.android.com/docs/" -"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource." -"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/" -"build/bazel/introduction) to Bazel." -msgstr "" - -#: src/android/build-rules.md -msgid "Learning Bazel-like build rules is useful for all Rust OS developers." +"Soong has many similarities to [Bazel](https://bazel.build/), which is the " +"open-source variant of Blaze (used in google3)." msgstr "" #: src/android/build-rules.md @@ -11246,6 +11236,16 @@ msgstr "" msgid "You can create new AIDL servers in Rust." msgstr "" +#: src/android/aidl.md +msgid "AIDL is what enables Android apps to interact with each other." +msgstr "" + +#: src/android/aidl.md +msgid "" +"Since Rust is supported as a first-class citizen in this ecosystem, Rust " +"services can be called by any other process on the phone." +msgstr "" + #: src/android/aidl/birthday-service.md msgid "" "To illustrate how to use Rust with Binder, we're going to walk through the " @@ -11263,6 +11263,8 @@ msgstr "" #: src/android/aidl/example-service/interface.md #: src/android/aidl/example-service/service-bindings.md +#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md +#: src/android/aidl/types/file-descriptor.md msgid "" "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" msgstr "" @@ -11307,14 +11309,12 @@ msgid "Generated Service API" msgstr "" #: src/android/aidl/example-service/service-bindings.md -msgid "" -"Binder generates a trait corresponding to the interface definition. trait to " -"talk to the service." +msgid "Binder generates a trait for each interface definition." msgstr "" #: src/android/aidl/example-service/service-bindings.md -msgid "_Generated trait_:" -msgstr "_Generated trait_:" +msgid "_out/soong/.intermediates/.../birthdayservice/IBirthdayService.rs_:" +msgstr "" #: src/android/aidl/example-service/service-bindings.md msgid "" @@ -11322,12 +11322,6 @@ msgid "" "this trait to talk to the service." msgstr "" -#: src/android/aidl/example-service/service-bindings.md -msgid "" -"The generated bindings can be found at `out/soong/.intermediates//`." -msgstr "" - #: src/android/aidl/example-service/service-bindings.md msgid "" "Point out how the generated function signature, specifically the argument " @@ -11350,9 +11344,14 @@ msgstr "" #: src/android/aidl/example-service/service.md #: src/android/aidl/example-service/changing-implementation.md +#: src/android/aidl/types/file-descriptor.md msgid "_birthday_service/src/lib.rs_:" msgstr "" +#: src/android/aidl/example-service/service.md +msgid "//! Implementation of the `IBirthdayService` AIDL interface.\n" +msgstr "" + #: src/android/aidl/example-service/service.md msgid "/// The `IBirthdayService` implementation.\n" msgstr "" @@ -11508,6 +11507,8 @@ msgstr "" #: src/android/aidl/example-service/client.md #: src/android/aidl/example-service/changing-implementation.md +#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md +#: src/android/aidl/types/file-descriptor.md msgid "_birthday_service/src/client.rs_:" msgstr "" @@ -11776,8 +11777,8 @@ msgstr "`Vec`" msgid "" "In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` " "becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. " -"int\\[3\\]\\[4\\]). In the Java backend, fixed-size arrays are represented " -"as array types." +"`int[3][4]`). In the Java backend, fixed-size arrays are represented as " +"array types." msgstr "" #: src/android/aidl/types/arrays.md @@ -11792,14 +11793,8 @@ msgstr "" #: src/android/aidl/types/objects.md msgid "" -"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." -"aidl**:" -msgstr "" - -#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md -#: src/android/aidl/types/file-descriptor.md -msgid "" -"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:" +"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." +"aidl_:" msgstr "" #: src/android/aidl/types/objects.md @@ -11810,11 +11805,6 @@ msgstr "" msgid "/** The same thing, but using `IBinder`. */" msgstr "" -#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md -#: src/android/aidl/types/file-descriptor.md -msgid "**birthday_service/src/client.rs**:" -msgstr "" - #: src/android/aidl/types/objects.md msgid "/// Rust struct implementing the `IBirthdayInfoProvider` interface.\n" msgstr "" @@ -11843,8 +11833,7 @@ msgid "Binder for Rust supports sending parcelables directly:" msgstr "" #: src/android/aidl/types/parcelables.md -msgid "" -"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:" +msgid "_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:" msgstr "" #: src/android/aidl/types/parcelables.md @@ -11881,10 +11870,6 @@ msgstr "" msgid "// Create a `ParcelFileDescriptor` from the file and send it.\n" msgstr "" -#: src/android/aidl/types/file-descriptor.md -msgid "**birthday_service/src/lib.rs**:" -msgstr "" - #: src/android/aidl/types/file-descriptor.md msgid "" "// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\n" @@ -12031,7 +12016,13 @@ msgid "" msgstr "" #: src/android/testing/googletest.md -msgid "This just scratches the surface, there are many builtin matchers." +msgid "" +"This just scratches the surface, there are many builtin matchers. Consider " +"going through the first chapter of [\"Advanced testing for Rust " +"applications\"](https://rust-exercises.com/advanced-testing/), a self-guided " +"Rust course: it provides a guided introduction to the library, with " +"exercises to help you get comfortable with `googletest` macros, its matchers " +"and its overall philosophy." msgstr "" #: src/android/testing/googletest.md @@ -12193,6 +12184,12 @@ msgstr "" msgid "The logs show up in `adb logcat`:" msgstr "" +#: src/android/logging.md +msgid "" +"The logger implementation in `liblogger` is only needed in the final binary, " +"if you're logging from a library you only need the `log` facade crate." +msgstr "" + #: src/android/interoperability.md msgid "" "Rust has excellent support for interoperability with other languages. This " @@ -12233,8 +12230,8 @@ msgstr "" #: src/android/interoperability/with-c.md msgid "" -"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/" -"safe-ffi-wrapper.md)." +"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/" +"exercise.md)." msgstr "" #: src/android/interoperability/with-c.md @@ -12356,7 +12353,13 @@ msgid "//! Bindgen demo.\n" msgstr "" #: src/android/interoperability/with-c/bindgen.md -msgid "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" +msgid "" +"// SAFETY: The pointer we pass is valid because it came from a Rust\n" +" // reference, and the `name` it contains refers to `name` above which " +"also\n" +" // remains valid. `print_card` doesn't store either pointer to use " +"later\n" +" // after it returns.\n" msgstr "" #: src/android/interoperability/with-c/bindgen.md @@ -12406,7 +12409,9 @@ msgid "//! Rust FFI demo.\n" msgstr "" #: src/android/interoperability/with-c/rust.md -msgid "/// Analyze the numbers.\n" +msgid "" +"/// Analyze the numbers.\n" +"// SAFETY: There is no other global function of this name.\n" msgstr "" #: src/android/interoperability/with-c/rust.md @@ -12473,9 +12478,9 @@ msgstr "" #: src/android/interoperability/with-c/rust.md msgid "" -"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol " -"will just be the name of the function. You can also use `#[export_name = " -"\"some_name\"]` to specify whatever name you want." +"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported " +"symbol will just be the name of the function. You can also use " +"`#[unsafe(export_name = \"some_name\")]` to specify whatever name you want." msgstr "" #: src/android/interoperability/cpp.md @@ -12935,7 +12940,9 @@ msgid "//! Rust <-> Java FFI demo.\n" msgstr "" #: src/android/interoperability/java.md -msgid "/// HelloWorld::hello method implementation.\n" +msgid "" +"/// HelloWorld::hello method implementation.\n" +"// SAFETY: There is no other global function of this name.\n" msgstr "" #: src/android/interoperability/java.md @@ -12986,24 +12993,17 @@ msgstr "\"HelloWorld\"" msgid "Finally, you can build, sync, and run the binary:" msgstr "" -#: src/exercises/android/morning.md +#: src/android/interoperability/java.md msgid "" -"This is a group exercise: We will look at one of the projects you work with " -"and try to integrate some Rust into it. Some suggestions:" -msgstr "" - -#: src/exercises/android/morning.md -msgid "Call your AIDL service with a client written in Rust." +"The `unsafe(no_mangle)` attribute instructs Rust to emit the " +"`Java_HelloWorld_hello` symbol exactly as written. This is important so that " +"Java can recognize the symbol as a `hello` method on the `HelloWorld` class." msgstr "" -#: src/exercises/android/morning.md -msgid "Move a function from your project to Rust and call it." -msgstr "" - -#: src/exercises/android/morning.md +#: src/android/interoperability/java.md msgid "" -"No solution is provided here since this is open-ended: it relies on someone " -"in the class having a piece of code which you can turn in to Rust on the fly." +"By default, Rust will mangle (rename) symbols so that a binary can link in " +"two versions of the same Rust crate." msgstr "" #: src/chromium.md @@ -13522,7 +13522,7 @@ msgstr "" #: src/chromium/build-rules/vscode.md msgid "" -"Demo **type annotations** (there are quote a few nice examples in the " +"Demo **type annotations** (there are quite a few nice examples in the " "`QrCode::with_bits` method)" msgstr "" @@ -13543,6 +13543,12 @@ msgid "" "containing:" msgstr "" +#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "// SAFETY: There is no other global function of this name.\n" +msgstr "" + #: src/exercises/chromium/build-rules.md msgid "" "**Important**: note that `no_mangle` here is considered a type of unsafety " @@ -13586,8 +13592,8 @@ msgstr "" #: src/exercises/chromium/build-rules.md msgid "" -"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/" -"abi.html#the-no_mangle-attribute)" +"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/" +"reference/abi.html#the-no_mangle-attribute)" msgstr "" #: src/exercises/chromium/build-rules.md @@ -13618,9 +13624,9 @@ msgstr "" #: src/exercises/chromium/build-rules.md msgid "" -"`allow_unsafe = true` is required here because `#[no_mangle]` might allow " -"Rust to generate two functions with the same name, and Rust can no longer " -"guarantee that the right one is called." +"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might " +"allow Rust to generate two functions with the same name, and Rust can no " +"longer guarantee that the right one is called." msgstr "" #: src/exercises/chromium/build-rules.md @@ -14222,7 +14228,7 @@ msgstr "" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" "Modify your previous `hello_from_rust` function to remove `extern \"C\"` and " -"`#[no_mangle]`. This is now just a standard Rust function." +"`#[unsafe(no_mangle)]`. This is now just a standard Rust function." msgstr "" #: src/exercises/chromium/interoperability-with-cpp.md @@ -15090,7 +15096,7 @@ msgstr "" msgid "" "For the microcontroller part of the course we will use the [BBC micro:bit]" "(https://microbit.org/) v2 as an example. It's a [development board](https://" -"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller " +"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller " "with some LEDs and buttons, an I2C-connected accelerometer and compass, and " "an on-board SWD debugger." msgstr "" @@ -15133,6 +15139,10 @@ msgstr "" msgid "`Display`, `Debug`, `write!`..." msgstr "" +#: src/bare-metal/no_std.md +msgid "`Error`" +msgstr "" + #: src/bare-metal/no_std.md msgid "`panic!`, `assert_eq!`..." msgstr "" @@ -15165,10 +15175,6 @@ msgstr "" msgid "`String`, `CString`, `format!`" msgstr "" -#: src/bare-metal/no_std.md -msgid "`Error`" -msgstr "" - #: src/bare-metal/no_std.md msgid "`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`" msgstr "" @@ -15245,8 +15251,7 @@ msgid "" msgstr "" #: src/bare-metal/alloc.md -msgid "" -"// Safe because `HEAP` is only used here and `entry` is only called once.\n" +msgid "// SAFETY: `HEAP` is only used here and `entry` is only called once.\n" msgstr "" #: src/bare-metal/alloc.md @@ -15339,8 +15344,8 @@ msgstr "" #: src/bare-metal/microcontrollers/mmio.md msgid "" -"// Safe because the pointers are to valid peripheral control registers, and\n" -" // no aliases exist.\n" +"// SAFETY: The pointers are to valid peripheral control registers, and no\n" +" // aliases exist.\n" msgstr "" #: src/bare-metal/microcontrollers/mmio.md @@ -15501,7 +15506,7 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" "The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a " -"number of traits covering common microcontroller peripherals." +"number of traits covering common microcontroller peripherals:" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md @@ -15509,30 +15514,37 @@ msgid "GPIO" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "ADC" +msgid "PWM" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "I2C, SPI, UART, CAN" +msgid "Delay timers" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "RNG" +msgid "I2C and SPI buses and devices" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "Timers" +msgid "" +"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken " +"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-" +"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://" +"crates.io/crates/rand_core) respectively." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "Watchdogs" +msgid "" +"Other crates then implement [drivers](https://github.com/rust-embedded/" +"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an " +"accelerometer driver might need an I2C or SPI device instance." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"Other crates then implement [drivers](https://github.com/rust-embedded/" -"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an " -"accelerometer driver might need an I2C or SPI bus implementation." +"The traits cover using the peripherals but not initialising or configuring " +"them, as initialisation and configuration is usually highly platform-" +"specific." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md @@ -15543,8 +15555,15 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"There is work in progress on an `async` version of `embedded-hal`, but it " -"isn't stable yet." +"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides " +"async versions of the traits." +msgstr "" + +#: src/bare-metal/microcontrollers/embedded-hal.md +msgid "" +"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides " +"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/" +"crates/nb) crate." msgstr "" #: src/bare-metal/microcontrollers/probe-rs.md @@ -15646,12 +15665,12 @@ msgid "[RTIC](https://rtic.rs/)" msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "\"Real-Time Interrupt-driven Concurrency\"" +msgid "\"Real-Time Interrupt-driven Concurrency\"." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" -"Shared resource management, message passing, task scheduling, timer queue" +"Shared resource management, message passing, task scheduling, timer queue." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15659,7 +15678,7 @@ msgid "[Embassy](https://embassy.dev/)" msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "`async` executors with priorities, timers, networking, USB" +msgid "`async` executors with priorities, timers, networking, USB." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15669,7 +15688,7 @@ msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" "Security-focused RTOS with preemptive scheduling and Memory Protection Unit " -"support" +"support." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15679,11 +15698,11 @@ msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" "Microkernel RTOS from Oxide Computer Company with memory protection, " -"unprivileged drivers, IPC" +"unprivileged drivers, IPC." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)" +msgid "[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15727,7 +15746,7 @@ msgid "" "serial port." msgstr "" -#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md +#: src/exercises/bare-metal/morning.md msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "morning.md) provided." @@ -15764,9 +15783,9 @@ msgstr "" #: src/exercises/bare-metal/compass.md msgid "" -"The LSM303AGR driver needs something implementing the `embedded_hal::" -"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/" -"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this." +"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::" +"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/" +"microbit/hal/struct.Twim.html) struct implements this." msgstr "" #: src/exercises/bare-metal/compass.md @@ -15902,9 +15921,8 @@ msgid "" ".global entry\n" "entry:\n" " /*\n" -" * Load and apply the memory management configuration, ready to enable " -"MMU and\n" -" * caches.\n" +" * Load and apply the memory management configuration, ready to\n" +" * enable MMU and caches.\n" " */\n" " adrp x30, idmap\n" " msr ttbr0_el1, x30\n" @@ -15922,9 +15940,9 @@ msgid "" " mov_i x30, .Lsctlrval\n" "\n" " /*\n" -" * Ensure everything before this point has completed, then invalidate " -"any\n" -" * potentially stale local TLB entries before they start being used.\n" +" * Ensure everything before this point has completed, then\n" +" * invalidate any potentially stale local TLB entries before they\n" +" * start being used.\n" " */\n" " isb\n" " tlbi vmalle1\n" @@ -15933,9 +15951,8 @@ msgid "" " isb\n" "\n" " /*\n" -" * Configure sctlr_el1 to enable MMU and cache and don't proceed until " -"this\n" -" * has completed.\n" +" * Configure sctlr_el1 to enable MMU and cache and don't proceed\n" +" * until this has completed.\n" " */\n" " msr sctlr_el1, x30\n" " isb\n" @@ -16051,8 +16068,8 @@ msgstr "" #: src/bare-metal/aps/inline-assembly.md msgid "" -"// Safe because this only uses the declared registers and doesn't do\n" -" // anything with memory.\n" +"// SAFETY: this only uses the declared registers and doesn't do anything\n" +" // with memory.\n" msgstr "" #: src/bare-metal/aps/inline-assembly.md @@ -16114,8 +16131,8 @@ msgstr "" #: src/bare-metal/aps/inline-assembly.md msgid "" -"This `main` function needs to be `#[no_mangle]` and `extern \"C\"` because " -"it is called from our entry point in `entry.S`." +"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \"C\"` " +"because it is called from our entry point in `entry.S`." msgstr "" #: src/bare-metal/aps/inline-assembly.md @@ -16139,7 +16156,11 @@ msgid "Volatile memory access for MMIO" msgstr "" #: src/bare-metal/aps/mmio.md -msgid "Use `pointer::read_volatile` and `pointer::write_volatile`." +msgid "" +"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/" +"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]" +"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method." +"write_volatile)." msgstr "" #: src/bare-metal/aps/mmio.md @@ -16148,7 +16169,7 @@ msgstr "" #: src/bare-metal/aps/mmio.md msgid "" -"`addr_of!` lets you get fields of structs without creating an intermediate " +"Use `&raw` to get fields of structs without creating an intermediate " "reference." msgstr "" @@ -16172,10 +16193,14 @@ msgid "" "dereference it." msgstr "" +#: src/bare-metal/aps/mmio.md +msgid "Use `&raw` to get struct field pointers from a pointer to the struct." +msgstr "" + #: src/bare-metal/aps/mmio.md msgid "" -"Use the `addr_of!` macro to get struct field pointers from a pointer to the " -"struct." +"For compatibility with old versions of Rust you can use the [`addr_of!`]" +"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead." msgstr "" #: src/bare-metal/aps/uart.md @@ -16216,7 +16241,7 @@ msgstr "" #: src/bare-metal/aps/uart.md msgid "" -"// Safe because we know that the base address points to the control\n" +"// SAFETY: We know that the base address points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" @@ -16263,9 +16288,8 @@ msgid "" msgstr "" #: src/bare-metal/aps/uart/traits.md -#: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because it just contains a pointer to device memory, which can be\n" +"// SAFETY: `Uart` just contains a pointer to device memory, which can be\n" "// accessed from any context.\n" msgstr "" @@ -16326,6 +16350,10 @@ msgstr "" msgid "RSR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "4" +msgstr "4" + #: src/bare-metal/aps/better-uart.md msgid "0x18" msgstr "" @@ -16346,6 +16374,10 @@ msgstr "" msgid "ILPR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "8" +msgstr "8" + #: src/bare-metal/aps/better-uart.md msgid "0x24" msgstr "" @@ -16366,6 +16398,10 @@ msgstr "" msgid "FBRD" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "6" +msgstr "6" + #: src/bare-metal/aps/better-uart.md msgid "0x2c" msgstr "" @@ -16434,6 +16470,10 @@ msgstr "" msgid "DMACR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "3" +msgstr "3" + #: src/bare-metal/aps/better-uart.md msgid "There are also some ID registers which have been omitted for brevity." msgstr "" @@ -16518,8 +16558,8 @@ msgstr "" #: src/bare-metal/aps/better-uart/driver.md msgid "" -"// Safe because we know that self.registers points to the control\n" -" // registers of a PL011 device which is appropriately mapped.\n" +"// SAFETY: We know that self.registers points to the control registers\n" +" // of a PL011 device which is appropriately mapped.\n" msgstr "" #: src/bare-metal/aps/better-uart/driver.md @@ -16528,13 +16568,19 @@ msgid "" " /// received.\n" msgstr "" +#: src/bare-metal/aps/better-uart/driver.md +msgid "" +"// SAFETY: We know that self.registers points to the control\n" +" // registers of a PL011 device which is appropriately mapped.\n" +msgstr "" + #: src/bare-metal/aps/better-uart/driver.md msgid "// TODO: Check for error conditions in bits 8-11.\n" msgstr "" #: src/bare-metal/aps/better-uart/driver.md msgid "" -"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual " +"Note the use of `&raw const` / `&raw mut` to get pointers to individual " "fields without creating an intermediate reference, which would be unsound." msgstr "" @@ -16556,8 +16602,8 @@ msgstr "" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\n" -" // and nothing else accesses that address range.\n" +"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\n" +" // nothing else accesses that address range.\n" msgstr "" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md @@ -16568,7 +16614,8 @@ msgstr "" msgid "b'\\r'" msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md +#: src/bare-metal/aps/better-uart/using.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "b'\\n'" msgstr "" @@ -16577,7 +16624,7 @@ msgid "b'q'" msgstr "" #: src/bare-metal/aps/better-uart/using.md -msgid "\"Bye!\"" +msgid "\"\\n\\nBye!\"" msgstr "" #: src/bare-metal/aps/better-uart/using.md @@ -16672,7 +16719,7 @@ msgid "[oreboot](https://github.com/oreboot/oreboot)" msgstr "" #: src/bare-metal/aps/other-projects.md -msgid "\"coreboot without the C\"" +msgid "\"coreboot without the C\"." msgstr "" #: src/bare-metal/aps/other-projects.md @@ -16692,7 +16739,7 @@ msgstr "" #: src/bare-metal/aps/other-projects.md msgid "" "Initialisation, UART driver, simple bootloader, JTAG, exception levels, " -"exception handling, page tables" +"exception handling, page tables." msgstr "" #: src/bare-metal/aps/other-projects.md @@ -16914,9 +16961,9 @@ msgstr "vmbase" #: src/bare-metal/android/vmbase.md msgid "" "For VMs running under crosvm on aarch64, the [vmbase](https://android." -"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/" -"master/vmbase/) library provides a linker script and useful defaults for the " -"build rules, along with an entry point, UART console logging and more." +"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/" +"libs/libvmbase/) library provides a linker script and useful defaults for " +"the build rules, along with an entry point, UART console logging and more." msgstr "" #: src/bare-metal/android/vmbase.md @@ -16935,7 +16982,7 @@ msgstr "" msgid "We will write a driver for the PL031 real-time clock device." msgstr "" -#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md +#: src/exercises/bare-metal/afternoon.md msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "afternoon.md) provided." @@ -17061,15 +17108,15 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\n" +"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\n" " // addresses of a GICv3 distributor and redistributor respectively, and\n" " // nothing else accesses those address ranges.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\n" -" // and nothing else accesses that address range.\n" +"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\n" +" // nothing else accesses that address range.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md @@ -17156,8 +17203,8 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because we know that self.registers points to the control\n" -" // registers of a PL031 device which is appropriately mapped.\n" +"// SAFETY: We know that self.registers points to the control registers\n" +" // of a PL031 device which is appropriately mapped.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md @@ -17194,235 +17241,265 @@ msgstr "" msgid "/// Clears a pending interrupt, if any.\n" msgstr "" -#: src/concurrency.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "" +"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\n" +"// accessed from any context.\n" +msgstr "" + +#: src/concurrency/welcome.md msgid "Welcome to Concurrency in Rust" msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "Rust has full support for concurrency using OS threads with mutexes and " "channels." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The Rust type system plays an important role in making many concurrency bugs " "compile time bugs. This is often referred to as _fearless concurrency_ since " "you can rely on the compiler to ensure correctness at runtime." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md src/concurrency/welcome-async.md +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 20 " +"minutes. It contains:" +msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" + +#: src/concurrency/welcome.md msgid "" "Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The type system gives us safety for concurrency without any special features." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The same tools that help with \"concurrent\" access in a single thread (e." "g., a called function that might mutate an argument or save references to it " "to read later) save us from multi-threading issues." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads.md src/concurrency/shared-state.md +#: src/concurrency/async.md +#, fuzzy +msgid "This segment should take about 30 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" + +#: src/concurrency/threads/plain.md msgid "Rust threads work similarly to threads in other languages:" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "\"Count in thread: {i}!\"" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "\"Main thread: {i}\"" msgstr "" -#: src/concurrency/threads.md -msgid "Threads are all daemon threads, the main thread does not wait for them." +#: src/concurrency/threads/plain.md +msgid "" +"Spawning new threads does not automatically delay program termination at the " +"end of `main`." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Thread panics are independent of each other." msgstr "" -#: src/concurrency/threads.md -msgid "Panics can carry a payload, which can be unpacked with `downcast_ref`." -msgstr "" - -#: src/concurrency/threads.md -msgid "Rust thread APIs look not too different from e.g. C++ ones." +#: src/concurrency/threads/plain.md +msgid "" +"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]" +"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref)." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Run the example." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "5ms timing is loose enough that main and spawned threads stay mostly in " "lockstep." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Notice that the program ends before the spawned thread reaches 10!" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" -"This is because main ends the program and spawned threads do not make it " +"This is because `main` ends the program and spawned threads do not make it " "persist." msgstr "" -#: src/concurrency/threads.md -msgid "Compare to pthreads/C++ std::thread/boost::thread if desired." +#: src/concurrency/threads/plain.md +msgid "Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "How do we wait around for the spawned thread to complete?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) " "returns a `JoinHandle`. Look at the docs." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct." "JoinHandle.html#method.join) method that blocks." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for " "the thread to finish and have the program count all the way to 10." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Now what if we want to return a value?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Look at docs again:" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s " "closure returns `T`" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct." "JoinHandle.html#method.join) returns `thread::Result`" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Use the `Result` return value from `handle.join()` to get access to the " "returned value." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Ok, what about the other case?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Trigger a panic in the thread. Note that this doesn't panic `main`." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Access the panic payload. This is a good time to talk about [`Any`](https://" "doc.rust-lang.org/std/any/index.html)." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Now we can return values from threads! What about taking inputs?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Capture something by reference in the thread closure." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "An error message indicates we must move it." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Move it in, see we can compute and then return a derived value." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "If we want to borrow?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Main kills child threads when it returns, but another function would just " "return and leave them running." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "That would be stack use-after-return, which violates memory safety!" msgstr "" -#: src/concurrency/threads.md -msgid "How do we avoid this? see next slide." +#: src/concurrency/threads/plain.md +msgid "How do we avoid this? See next slide." msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "Normal threads cannot borrow from their environment:" msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/" "fn.scope.html) for this:" msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "The reason for that is that when the `thread::scope` function completes, all " "the threads are guaranteed to be joined, so they can return borrowed data." msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "Normal Rust borrowing rules apply: you can either borrow mutably by one " "thread, or immutably by any number of threads." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels.md src/concurrency/async-control-flow.md +#, fuzzy +msgid "This segment should take about 20 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" + +#: src/concurrency/channels/senders-receivers.md msgid "" -"Rust channels have two parts: a `Sender` and a `Receiver`. The two " -"parts are connected via the channel, but you only see the end-points." +"Rust channels have two parts: a [`Sender`](https://doc.rust-lang.org/std/" +"sync/mpsc/struct.Sender.html) and a [`Receiver`](https://doc.rust-lang." +"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the " +"channel, but you only see the end-points." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "\"Received: {:?}\"" msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "" -"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` " -"implement `Clone` (so you can make multiple producers) but `Receiver` does " -"not." +"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for " +"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` " +"(so you can make multiple producers) but `Receiver` does not." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "" -"`send()` and `recv()` return `Result`. If they return `Err`, it means the " +"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method." +"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver." +"html#method.recv) return `Result`. If they return `Err`, it means the " "counterpart `Sender` or `Receiver` is dropped and the channel is closed." msgstr "" #: src/concurrency/channels/unbounded.md -msgid "You get an unbounded and asynchronous channel with `mpsc::channel()`:" +msgid "" +"You get an unbounded and asynchronous channel with [`mpsc::channel()`]" +"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):" msgstr "" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md @@ -17441,63 +17518,88 @@ msgstr "" msgid "\"Main: got {msg}\"" msgstr "" +#: src/concurrency/channels/unbounded.md +msgid "" +"An unbounded channel will allocate as much space as is necessary to store " +"pending messages. The `send()` method will not block the calling thread." +msgstr "" + +#: src/concurrency/channels/unbounded.md +msgid "" +"A call to `send()` will abort with an error (that is why it returns " +"`Result`) if the channel is closed. A channel is closed when the receiver is " +"dropped." +msgstr "" + #: src/concurrency/channels/bounded.md msgid "" -"With bounded (synchronous) channels, `send` can block the current thread:" +"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/" +"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current " +"thread:" msgstr "" #: src/concurrency/channels/bounded.md msgid "" -"Calling `send` will block the current thread until there is space in the " +"Calling `send()` will block the current thread until there is space in the " "channel for the new message. The thread can be blocked indefinitely if there " "is nobody who reads from the channel." msgstr "" #: src/concurrency/channels/bounded.md msgid "" -"A call to `send` will abort with an error (that is why it returns `Result`) " -"if the channel is closed. A channel is closed when the receiver is dropped." +"Like unbounded channels, a call to `send()` will abort with an error if the " +"channel is closed." msgstr "" #: src/concurrency/channels/bounded.md msgid "" "A bounded channel with a size of zero is called a \"rendezvous channel\". " -"Every send will block the current thread until another thread calls `recv`." +"Every send will block the current thread until another thread calls " +"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver." +"html#method.recv)." msgstr "" #: src/concurrency/send-sync.md +msgid "Send" +msgstr "Send" + +#: src/concurrency/send-sync.md +msgid "Sync" +msgstr "Sync" + +#: src/concurrency/send-sync/marker-traits.md msgid "" "How does Rust know to forbid shared access across threads? The answer is in " "two traits:" msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` " "is `Send` if it is safe to move a `T` across a thread boundary." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` " "is `Sync` if it is safe to move a `&T` across a thread boundary." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" -"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The " -"compiler will automatically derive them for your types as long as they only " -"contain `Send` and `Sync` types. You can also implement them manually when " -"you know it is valid." +"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). " +"The compiler will automatically derive them for your types as long as they " +"only contain `Send` and `Sync` types. You can also implement them manually " +"when you know it is valid." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "One can think of these traits as markers that the type has certain thread-" "safety properties." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "They can be used in the generic constraints as normal traits." msgstr "" @@ -17620,13 +17722,15 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "" -"These types are thread-safe, but they cannot be moved to another thread:" +"These types are safe to access (via shared references) from multiple " +"threads, but they cannot be moved to another thread:" msgstr "" #: src/concurrency/send-sync/examples.md msgid "" "`MutexGuard`: Uses OS level primitives which must be deallocated on " -"the thread which created them." +"the thread which created them. However, an already-locked mutex can have its " +"guarded variable read by any thread with which the guard is shared." msgstr "" #: src/concurrency/send-sync/examples.md @@ -17649,119 +17753,108 @@ msgid "" "considerations." msgstr "" -#: src/concurrency/shared_state.md -msgid "" -"Rust uses the type system to enforce synchronization of shared data. This is " -"primarily done via two types:" -msgstr "" - -#: src/concurrency/shared_state.md -msgid "" -"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic " -"reference counted `T`: handles sharing between threads and takes care to " -"deallocate `T` when the last reference is dropped," -msgstr "" +#: src/concurrency/shared-state.md +msgid "Arc" +msgstr "Arc" -#: src/concurrency/shared_state.md -msgid "" -"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures " -"mutually exclusive access to the `T` value." -msgstr "" +#: src/concurrency/shared-state.md +msgid "Mutex" +msgstr "Mutex" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared " "read-only access via `Arc::clone`:" msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "\"{thread_id:?}: {v:?}\"" msgstr "" -#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md msgid "\"v: {v:?}\"" msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc` stands for \"Atomic Reference Counted\", a thread safe version of `Rc` " "that uses atomic operations." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc` implements `Clone` whether or not `T` does. It implements `Send` " "and `Sync` if and only if `T` implements them both." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc::clone()` has the cost of atomic operations that get executed, but " "after that the use of the `T` is free." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "Beware of reference cycles, `Arc` does not use a garbage collector to detect " "them." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "`std::sync::Weak` can help." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures " "mutual exclusion _and_ allows mutable access to `T` behind a read-only " "interface (another form of [interior mutability](../../borrowing/interior-" -"mutability)):" +"mutability.md)):" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "\"v: {:?}\"" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "Notice how we have a [`impl Sync for Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket " "implementation." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "`Mutex` in Rust looks like a collection with just one element --- the " "protected data." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "It is not possible to forget to acquire the mutex before accessing the " "protected data." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "You can get an `&mut T` from an `&Mutex` by taking the lock. The " "`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" -"`Mutex` implements both `Send` and `Sync` iff (if and only if) `T` " -"implements `Send`." +"`Mutex` implements both `Send` and `Sync` if and only if `T` implements " +"`Send`." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "A read-write lock counterpart: `RwLock`." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "Why does `lock()` return a `Result`?" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "If the thread that held the `Mutex` panicked, the `Mutex` becomes " "\"poisoned\" to signal that the data it protected might be in an " @@ -17770,65 +17863,51 @@ msgid "" "You can call `into_inner()` on the error to recover the data regardless." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Let us see `Arc` and `Mutex` in action:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "// use std::sync::{Arc, Mutex};\n" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Possible solution:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Notable parts:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "`v` is wrapped in both `Arc` and `Mutex`, because their concerns are " "orthogonal." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state " "between threads." msgstr "" -#: src/concurrency/shared_state/example.md -msgid "" -"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " -"thread. Note `move` was added to the lambda signature." -msgstr "" - -#: src/concurrency/shared_state/example.md -msgid "" -"Blocks are introduced to narrow the scope of the `LockGuard` as much as " -"possible." -msgstr "" - -#: src/exercises/concurrency/morning.md -msgid "Let us practice our new concurrency skills with" -msgstr "" - -#: src/exercises/concurrency/morning.md -msgid "Dining philosophers: a classic problem in concurrency." +#: src/concurrency/shared-state/example.md +msgid "" +"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " +"thread. Note `move` was added to the lambda signature." msgstr "" -#: src/exercises/concurrency/morning.md +#: src/concurrency/shared-state/example.md msgid "" -"Multi-threaded link checker: a larger project where you'll use Cargo to " -"download dependencies and then check links in parallel." +"Blocks are introduced to narrow the scope of the `LockGuard` as much as " +"possible." msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "The dining philosophers problem is a classic problem in concurrency:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "Five philosophers dine together at the same table. Each philosopher has " "their own place at the table. There is a fork between each plate. The dish " @@ -17840,102 +17919,101 @@ msgid "" "down both forks." msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "You will need a local [Cargo installation](../../cargo/running-locally.md) " "for this exercise. Copy the code below to a file called `src/main.rs`, fill " "out the blanks, and test that `cargo run` does not deadlock:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "// left_fork: ...\n" " // right_fork: ...\n" " // thoughts: ...\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Eureka! {} has a new idea!\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "// Pick up forks...\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"{} is eating...\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Socrates\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Hypatia\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Plato\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Aristotle\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Pythagoras\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Create forks\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Create philosophers\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "// Make each of them think and eat 100 times\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Output their thoughts\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "You can use the following `Cargo.toml`:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "```toml\n" "[package]\n" @@ -17945,7 +18023,19 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/dining-philosophers.md +msgid "" +"Encourage students to focus first on implementing a solution that \"mostly\" " +"works." +msgstr "" + +#: src/concurrency/sync-exercises/dining-philosophers.md +msgid "" +"The deadlock in the simplest solution is a general concurrency problem and " +"highlights that Rust does not automatically prevent this sort of bug." +msgstr "" + +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Let us use our new knowledge to create a multi-threaded link checker. It " "should start at a webpage and check that links on the page are valid. It " @@ -17953,7 +18043,7 @@ msgid "" "until all pages have been validated." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/" "reqwest/). You will also need a way to find links, we can use [`scraper`]" @@ -17961,22 +18051,22 @@ msgid "" "we will use [`thiserror`](https://docs.rs/thiserror/)." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Create a new Cargo project and `reqwest` it as a dependency with:" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "If `cargo add` fails with `error: no such subcommand`, then please edit the " "`Cargo.toml` file by hand. Add the dependencies listed below." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "The `cargo add` calls will update the `Cargo.toml` file to look like this:" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "```toml\n" "[package]\n" @@ -17993,130 +18083,122 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "You can now download the start page. Try with a small site such as `https://" "www.google.org/`." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Your `src/main.rs` file should look something like this:" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"request error: {0}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"bad http response: {0}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Checking {:#}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"href\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"https://www.google.org\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "\"Links: {links:#?}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "\"Could not extract links: {err:#}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Run the code in `src/main.rs` with" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Use threads to check the links in parallel: send the URLs to be checked to a " "channel and let a few threads check the URLs in parallel." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Extend this to recursively extract links from all pages on the `www.google." "org` domain. Put an upper limit of 100 pages or so so that you don't end up " "being blocked by the site." msgstr "" -#: src/exercises/concurrency/solutions-morning.md -msgid "Concurrency Morning Exercise" -msgstr "" - -#: src/exercises/concurrency/solutions-morning.md -msgid "([back to exercise](dining-philosophers.md))" +#: src/concurrency/sync-exercises/link-checker.md +msgid "" +"This is a complex exercise and intended to give students an opportunity to " +"work on a larger project than others. A success condition for this exercise " +"is to get stuck on some \"real\" issue and work through it with the support " +"of other students or the instructor." msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"{} is trying to eat\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "// To avoid a deadlock, we have to break the symmetry\n" " // somewhere. This will swap the forks without deinitializing\n" " // either of them.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"{thought}\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "Link Checker" msgstr "" -#: src/exercises/concurrency/solutions-morning.md -msgid "([back to exercise](link-checker.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "/// Determine whether links within the given page should be extracted.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "/// Mark the given page as visited, returning false if it had already\n" " /// been visited.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "// The sender got dropped. No more commands coming in.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Got crawling error: {:#}\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Bad URLs: {:#?}\"" msgstr "" -#: src/async.md -msgid "Async Rust" -msgstr "" - -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "\"Async\" is a concurrency model where multiple tasks are executed " "concurrently by executing each task until it would block, then switching to " @@ -18126,88 +18208,84 @@ msgid "" "primitives for efficiently identifying I/O that is able to proceed." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Rust's asynchronous operation is based on \"futures\", which represent work " "that may be completed in the future. Futures are \"polled\" until they " "signal that they are complete." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Futures are polled by an async runtime, and several different runtimes are " "available." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Python has a similar model in its `asyncio`. However, its `Future` type is " "callback-based, and not polled. Async Python programs require a \"loop\", " "similar to a runtime in Rust." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "JavaScript's `Promise` is similar, but again callback-based. The language " "runtime implements the event loop, so many of the details of Promise " "resolution are hidden." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async.md +msgid "async/await" +msgstr "async/await" + +#: src/concurrency/async/async-await.md msgid "" "At a high level, async Rust code looks very much like \"normal\" sequential " "code:" msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "\"Count is: {i}!\"" msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "Note that this is a simplified example to show the syntax. There is no long " "running operation or any real concurrency in it!" msgstr "" -#: src/async/async-await.md -msgid "What is the return type of an async call?" -msgstr "" - -#: src/async/async-await.md -msgid "Use `let future: () = async_main(10);` in `main` to see the type." -msgstr "" - -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "The \"async\" keyword is syntactic sugar. The compiler replaces the return " "type with a future." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "You cannot make `main` async, without additional instructions to the " "compiler on how to use the returned future." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "You need an executor to run async code. `block_on` blocks the current thread " "until the provided future has run to completion." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "`.await` asynchronously waits for the completion of another operation. " "Unlike `block_on`, `.await` doesn't block the current thread." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "`.await` can only be used inside an `async` function (or block; these are " "introduced later)." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a " "trait, implemented by objects that represent an operation that may not be " @@ -18215,7 +18293,7 @@ msgid "" "doc.rust-lang.org/std/task/enum.Poll.html)." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "An async function returns an `impl Future`. It's also possible (but " "uncommon) to implement `Future` for your own types. For example, the " @@ -18223,76 +18301,76 @@ msgid "" "joining to it." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "The `.await` keyword, applied to a Future, causes the current async function " "to pause until that Future is ready, and then evaluates to its output." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "The `Future` and `Poll` types are implemented exactly as shown; click the " "links to show the implementations in the docs." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "We will not get to `Pin` and `Context`, as we will focus on writing async " "code, rather than building new async primitives. Briefly:" msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "`Context` allows a Future to schedule itself to be polled again when an " "event occurs." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "`Pin` ensures that the Future isn't moved in memory, so that pointers into " "that future remain valid. This is required to allow references to remain " "valid after an `.await`." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "A _runtime_ provides support for performing operations asynchronously (a " "_reactor_) and is responsible for executing futures (an _executor_). Rust " "does not have a \"built-in\" runtime, but several options are available:" msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of " "functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://" "github.com/hyperium/tonic) for gRPC." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "[async-std](https://async.rs/): aims to be a \"std for async\", and includes " "a basic runtime in `async::task`." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "[smol](https://docs.rs/smol/latest/smol/): simple and lightweight" msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Several larger applications have their own runtimes. For example, [Fuchsia]" "(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-" "async/src/lib.rs) already has one." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Note that of the listed runtimes, only Tokio is supported in the Rust " "playground. The playground also does not permit any I/O, so most interesting " "async things can't run in the playground." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Futures are \"inert\" in that they do not do anything (not even start an I/O " "operation) unless there is an executor polling them. This differs from JS " @@ -18300,66 +18378,66 @@ msgid "" "used." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Tokio provides:" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "A multi-threaded runtime for executing asynchronous code." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "An asynchronous version of the standard library." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "A large ecosystem of libraries." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "\"Count in task: {i}!\"" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "\"Main task: {i}\"" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "With the `tokio::main` macro we can now make `main` async." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "The `spawn` function creates a new, concurrent \"task\"." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "**Further exploration:**" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "" "Why does `count_to` not (usually) get to 10? This is an example of async " "cancellation. `tokio::spawn` returns a handle which can be awaited to wait " "until it finishes." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Try `count_to(10).await` instead of spawning." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Try awaiting the task returned from `tokio::spawn`." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "Rust has a task system, which is a form of lightweight threading." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "A task has a single top-level future which the executor polls to make " "progress. That future may have one or more nested futures that its `poll` " @@ -18368,170 +18446,155 @@ msgid "" "and an I/O operation." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"127.0.0.1:0\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"listening on port {}\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"connection from {addr:?}\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "b\"Who are you?\\n\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"socket error\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"Thanks for dialing in, {name}!\\n\"" msgstr "" -#: src/async/tasks.md src/async/control-flow/join.md +#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md msgid "" "Copy this example into your prepared `src/main.rs` and run it from there." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Try connecting to it with a TCP connection tool like [nc](https://www.unix." "com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/" "telnet/)." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Ask students to visualize what the state of the example server would be with " "a few connected clients. What tasks exist? What are their Futures?" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "This is the first time we've seen an `async` block. This is similar to a " "closure, but does not take any arguments. Its return value is a Future, " "similar to an `async fn`." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Refactor the async block into a function, and improve the error handling " "using `?`." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "Several crates have support for asynchronous channels. For instance `tokio`:" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Received {count} pings so far.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"ping_handler complete\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Failed to send ping.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Sent {} pings so far.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Something went wrong in ping handler task.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "Change the channel size to `3` and see how it affects the execution." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "Overall, the interface is similar to the `sync` channels as seen in the " -"[morning class](concurrency/channels.md)." +"[morning class](../channels.md)." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "Try removing the `std::mem::drop` call. What happens? Why?" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that " "implement both `sync` and `async` `send` and `recv`. This can be convenient " "for complex applications with both IO and heavy CPU processing tasks." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "What makes working with `async` channels preferable is the ability to " "combine them with other `future`s to combine them and create complex control " "flow." msgstr "" -#: src/async/control-flow.md -msgid "Futures Control Flow" -msgstr "" - -#: src/async/control-flow.md -msgid "" -"Futures can be combined together to produce concurrent compute flow graphs. " -"We have already seen tasks, that function as independent threads of " -"execution." -msgstr "" - -#: src/async/control-flow.md -msgid "[Join](control-flow/join.md)" -msgstr "" - -#: src/async/control-flow.md -msgid "[Select](control-flow/select.md)" -msgstr "" - -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "A join operation waits until all of a set of futures are ready, and returns " "a collection of their results. This is similar to `Promise.all` in " "JavaScript or `asyncio.gather` in Python." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://google.com\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://httpbin.org/ip\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://play.rust-lang.org/\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"BAD_URL\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md +msgid "\"{page_sizes_dict:?}\"" +msgstr "" + +#: src/concurrency/async-control-flow/join.md msgid "" "For multiple futures of disjoint types, you can use `std::future::join!` but " "you must know how many futures you will have at compile time. This is " "currently in the `futures` crate, soon to be stabilised in `std::future`." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "The risk of `join` is that one of the futures may never resolve, this would " "cause your program to stall." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "You can also combine `join_all` with `join!` for instance to join all " "requests to an http service as well as a database query. Try adding a " @@ -18540,7 +18603,7 @@ msgid "" "demonstrates `join!`." msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" "A select operation waits until any of a set of futures is ready, and " "responds to that future's result. In JavaScript, this is similar to `Promise." @@ -18548,7 +18611,7 @@ msgid "" "FIRST_COMPLETED)`." msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" "Similar to a match statement, the body of `select!` has a number of arms, " "each of the form `pattern = future => statement`. When a `future` is ready, " @@ -18557,91 +18620,53 @@ msgid "" "of the `select!` macro." msgstr "" -#: src/async/control-flow/select.md -msgid "\"Felix\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to send cat.\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to send dog.\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to receive winner\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Winner is {winner:?}\"" +#: src/concurrency/async-control-flow/select.md +msgid "\"got: {msg}\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"In this example, we have a race between a cat and a dog. " -"`first_animal_to_finish_race` listens to both channels and will pick " -"whichever arrives first. Since the dog takes 50ms, it wins against the cat " -"that take 500ms." +#: src/concurrency/async-control-flow/select.md +msgid "\"timeout\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"You can use `oneshot` channels in this example as the channels are supposed " -"to receive only one `send`." +#: src/concurrency/async-control-flow/select.md +msgid "\"Failed to send greeting\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"Try adding a deadline to the race, demonstrating selecting different sorts " -"of futures." +#: src/concurrency/async-control-flow/select.md +msgid "\"Listener failed\"" msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" -"Note that `select!` drops unmatched branches, which cancels their futures. " -"It is easiest to use when every execution of `select!` creates new futures." +"The `listener` async block here is a common form: wait for some async event, " +"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why " +"does the `send` also fail in this situation?" msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" -"An alternative is to pass `&mut future` instead of the future itself, but " -"this can lead to issues, further discussed in the pinning slide." -msgstr "" - -#: src/async/pitfalls.md -msgid "Pitfalls of async/await" +"`select!` is also often used in a loop in \"actor\" architectures, where a " +"task reacts to events in a loop. That has some pitfalls, which will be " +"discussed in the next segment." msgstr "" -#: src/async/pitfalls.md +#: src/concurrency/async-pitfalls.md msgid "" "Async / await provides convenient and efficient abstraction for concurrent " "asynchronous programming. However, the async/await model in Rust also comes " "with its share of pitfalls and footguns. We illustrate some of them in this " -"chapter:" +"chapter." msgstr "" -#: src/async/pitfalls.md -msgid "[Blocking the Executor](pitfalls/blocking-executor.md)" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Pin](pitfalls/pin.md)" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Async Traits](pitfalls/async-traits.md)" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Cancellation](pitfalls/cancellation.md)" -msgstr "" +#: src/concurrency/async-pitfalls.md +msgid "Pin" +msgstr "Pin" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "Blocking the executor" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Most async runtimes only allow IO tasks to run concurrently. This means that " "CPU blocking tasks will block the executor and prevent other tasks from " @@ -18649,39 +18674,39 @@ msgid "" "possible." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "\"current_thread\"" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Run the code and see that the sleeps happen consecutively rather than " "concurrently." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "The `\"current_thread\"` flavor puts all tasks on a single thread. This " "makes the effect more obvious, but the bug is still present in the multi-" "threaded flavor." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Another fix would be to `tokio::task::spawn_blocking` which spawns an actual " "thread and transforms its handle into a future without blocking the executor." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "You should not think of tasks as OS threads. They do not map 1 to 1 and most " "executors will allow many tasks to run on a single OS thread. This is " @@ -18691,27 +18716,27 @@ msgid "" "situations." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Use sync mutexes with care. Holding a mutex over an `.await` may cause " "another task to block, and that task may be running on the same thread." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Async blocks and functions return types implementing the `Future` trait. The " "type returned is the result of a compiler transformation which turns local " "variables into data stored inside the future." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Some of those variables can hold pointers to other local variables. Because " "of that, the future should never be moved to a different memory location, as " "it would invalidate those pointers." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "To prevent moving the future type in memory, it can only be polled through a " "pinned pointer. `Pin` is a wrapper around a reference that disallows all " @@ -18719,95 +18744,95 @@ msgid "" "location." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "// A work item. In this case, just sleep for the given time and respond\n" "// with a message on the `respond_on` channel.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// A worker which listens for work on a queue and performs it.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// Pretend to work.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed to send response\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// TODO: report number of iterations every 100ms\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// A requester which requests work and waits for it to complete.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed to send on work queue\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed waiting for response\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"work result for iteration {i}: {resp}\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "You may recognize this as an example of the actor pattern. Actors typically " "call `select!` in a loop." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This serves as a summation of a few of the previous lessons, so take your " "time with it." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to " "the `select!`. This will never execute. Why?" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Instead, add a `timeout_fut` containing that future outside of the `loop`:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This still doesn't work. Follow the compiler errors, adding `&mut` to the " "`timeout_fut` in the `select!` to work around the move, then using `Box::" "pin`:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This compiles, but once the timeout expires it is `Poll::Ready` on every " "iteration (a fused future would help with this). Update to reset " -"`timeout_fut` every time it expires." +"`timeout_fut` every time it expires:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Box allocates on the heap. In some cases, `std::pin::pin!` (only recently " "stabilized, with older code often using `tokio::pin!`) is also an option, " "but that is difficult to use for a future that is reassigned." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Another alternative is to not use `pin` at all but spawn another task that " "will send to a `oneshot` channel every 100ms." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Data that contains pointers to itself is called self-referential. Normally, " "the Rust borrow checker would prevent self-referential data from being " @@ -18816,83 +18841,94 @@ msgid "" "borrow checker." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "`Pin` is a wrapper around a reference. An object cannot be moved from its " "place using a pinned pointer. However, it can still be moved through an " "unpinned pointer." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of " "`&mut Self` to refer to the instance. That's why it can only be called on a " "pinned pointer." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Async methods in traits are were stabilized only recently, in the 1.75 " -"release. This required support for using return-position `impl Trait` (RPIT) " -"in traits, as the desugaring for `async fn` includes `-> impl Future`." +"Async methods in traits are were stabilized in the 1.75 release. This " +"required support for using return-position `impl Trait` in traits, as the " +"desugaring for `async fn` includes `-> impl Future`." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"However, even with the native support today there are some pitfalls around " -"`async fn` and RPIT in traits:" +"However, even with the native support, there are some pitfalls around `async " +"fn`:" msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Return-position impl Trait captures all in-scope lifetimes (so some patterns " -"of borrowing cannot be expressed)" +"Return-position `impl Trait` captures all in-scope lifetimes (so some " +"patterns of borrowing cannot be expressed)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Traits whose methods use return-position `impl trait` or `async` are not " -"`dyn` compatible." +"Async traits cannot be used with [trait objects](../../smart-pointers/trait-" +"objects.md) (`dyn Trait` support)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-" -"trait/latest/async_trait/) provides a workaround through a macro, with some " -"caveats:" +"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround " +"for `dyn` support through a macro, with some caveats:" msgstr "" -#: src/async/pitfalls/async-traits.md -msgid "\"running all sleepers..\"" +#: src/concurrency/async-pitfalls/async-traits.md +msgid "\"Running all sleepers...\"" msgstr "" -#: src/async/pitfalls/async-traits.md -msgid "\"slept for {}ms\"" +#: src/concurrency/async-pitfalls/async-traits.md +msgid "\"Slept for {} ms\"" msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" "`async_trait` is easy to use, but note that it's using heap allocations to " "achieve this. This heap allocation has performance overhead." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md +msgid "" +"The challenges in language support for `async trait` are too deep to " +"describe in-depth in this class. See [this blog post](https://" +"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-" +"hard/) by Niko Matsakis if you are interested in digging deeper. See also " +"these keywords:" +msgstr "" + +#: src/concurrency/async-pitfalls/async-traits.md +msgid "" +"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-" +"return-types): short for [return-position `impl Trait`](../../generics/impl-" +"trait.md)." +msgstr "" + +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"The challenges in language support for `async trait` are deep Rust and " -"probably not worth describing in-depth. Niko Matsakis did a good job of " -"explaining them in [this post](https://smallcultfollowing.com/babysteps/" -"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in " -"digging deeper." +"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits." +"html): short for return-position `impl Trait` in trait (RPIT in trait)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" "Try creating a new sleeper struct that will sleep for a random amount of " -"time and adding it to the Vec." +"time and adding it to the `Vec`." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Dropping a future implies it can never be polled again. This is called " "_cancellation_ and it can occur at any `await` point. Care is needed to " @@ -18900,123 +18936,105 @@ msgid "" "example, it shouldn't deadlock or lose data." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"not UTF-8\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"hi\\nthere\\n\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"tick!\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "The compiler doesn't help with cancellation-safety. You need to read API " "documentation and consider what state your `async fn` holds." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Unlike `panic` and `?`, cancellation is part of normal control flow (vs " "error-handling)." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "The example loses parts of the string." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Whenever the `tick()` branch finishes first, `next()` and its `buf` are " "dropped." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "`LinesReader` can be made cancellation-safe by making `buf` part of the " "struct:" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "// prefix buf and bytes with self.\n" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval." "html#method.tick) is cancellation-safe because it keeps track of whether a " "tick has been 'delivered'." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait." "AsyncReadExt.html#method.read) is cancellation-safe because it either " "returns or doesn't read data." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait." "AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ " "cancellation-safe. See its documentation for details and alternatives." msgstr "" -#: src/exercises/concurrency/afternoon.md -msgid "" -"To practice your Async Rust skills, we have again two exercises for you:" -msgstr "" - -#: src/exercises/concurrency/afternoon.md -msgid "" -"Dining philosophers: we already saw this problem in the morning. This time " -"you are going to implement it with Async Rust." -msgstr "" - -#: src/exercises/concurrency/afternoon.md -msgid "" -"A Broadcast Chat Application: this is a larger project that allows you " -"experiment with more advanced Async Rust features." -msgstr "" - -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "Dining Philosophers --- Async" msgstr "Filozofların Akşam Yemeği --- Async" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" -"See [dining philosophers](dining-philosophers.md) for a description of the " -"problem." +"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a " +"description of the problem." msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "As before, you will need a local [Cargo installation](../../cargo/running-" "locally.md) for this exercise. Copy the code below to a file called `src/" "main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "// Keep trying until we have both forks\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Make them think and eat\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "Since this time you are using Async Rust, you'll need a `tokio` dependency. " "You can use the following `Cargo.toml`:" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "```toml\n" "[package]\n" @@ -19030,17 +19048,17 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "Also note that this time you have to use the `Mutex` and the `mpsc` module " "from the `tokio` crate." msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "Can you make your implementation single-threaded?" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "In this exercise, we want to use our new knowledge to implement a broadcast " "chat application. We have a chat server that the clients connect to and " @@ -19049,7 +19067,7 @@ msgid "" "that it receives to all the clients." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/" "sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]" @@ -19057,15 +19075,15 @@ msgid "" "and the server." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Create a new Cargo project and add the following dependencies:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "_Cargo.toml_:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "```toml\n" "[package]\n" @@ -19074,57 +19092,57 @@ msgid "" "edition = \"2021\"\n" "\n" "[dependencies]\n" -"futures-util = { version = \"0.3.30\", features = [\"sink\"] }\n" +"futures-util = { version = \"0.3.31\", features = [\"sink\"] }\n" "http = \"1.1.0\"\n" -"tokio = { version = \"1.37.0\", features = [\"full\"] }\n" -"tokio-websockets = { version = \"0.7.0\", features = [\"client\", " +"tokio = { version = \"1.41.1\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.10.1\", features = [\"client\", " "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "The required APIs" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "You are going to need the following functions from `tokio` and " "[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes " "to familiarize yourself with the API." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/" "trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for " "asynchronously reading messages from a Websocket Stream." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/" "trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for " "asynchronously sending messages on a Websocket Stream." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines." "html#method.next_line): for asynchronously reading user messages from the " "standard input." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/" "struct.Sender.html#method.subscribe): for subscribing to a broadcast channel." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Two binaries" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Normally in a Cargo project, you can have only one binary, and one `src/main." "rs` file. In this project, we need two binaries. One for the client, and one " @@ -19135,80 +19153,80 @@ msgid "" "targets.html#binaries))." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Copy the following server and client code into `src/bin/server.rs` and `src/" "bin/client.rs`, respectively. Your task is to complete these files as " "described below." msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "_src/bin/server.rs_:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "// TODO: For a hint, see the description of the task below.\n" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"127.0.0.1:2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"listening on port 2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"New connection from {addr:?}\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "// Wrap the raw TCP stream into a websocket.\n" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "_src/bin/client.rs_:" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"ws://127.0.0.1:2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Running the binaries" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Run the server with:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "and the client with:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Implement the `handle_connection` function in `src/bin/server.rs`." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Hint: Use `tokio::select!` for concurrently performing two tasks in a " "continuous loop. One task receives messages from the client and broadcasts " "them. The other sends messages received by the server to the client." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Complete the main function in `src/bin/client.rs`." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Hint: As before, use `tokio::select!` in a continuous loop for concurrently " "performing two tasks: (1) reading user messages from standard input and " @@ -19216,68 +19234,50 @@ msgid "" "displaying them for the user." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Optional: Once you are done, change the code to broadcast messages to all " "clients, but the sender of the message." msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md -msgid "Concurrency Afternoon Exercise" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md -msgid "([back to exercise](dining-philosophers-async.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md -msgid "" -"// If we didn't get the left fork, drop the right fork if we\n" -" // have it and let other tasks make progress.\n" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "" -"// If we didn't get the right fork, drop the left fork and let\n" -" // other tasks make progress.\n" +"// Keep trying until we have both forks\n" +" // Pick up forks...\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// The locks are dropped here\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// tx is dropped here, so we don't need to explicitly drop it later\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Here is a thought: {thought}\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md -msgid "([back to exercise](chat-app.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Welcome to chat! Type a message\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "" "// A continuous loop for concurrently performing two tasks: (1) receiving\n" " // messages from `ws_stream` and broadcasting them, and (2) receiving\n" " // messages on `bcast_rx` and sending them to the client.\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"From client {addr:?} {text:?}\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// Continuous loop for concurrently sending and receiving messages.\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"From server: {}\"" msgstr "" @@ -19295,6 +19295,14 @@ msgid "" "comprehensive-rust/discussions). We would love to hear from you." msgstr "" +#: src/thanks.md +msgid "" +"Thank you for reading the speaker notes! We hope they have been useful. If " +"you find pages without notes, please send us a PR and link it to [issue " +"#1083](https://github.com/google/comprehensive-rust/issues/1083). We are " +"also very grateful for fixes and improvements to the existing notes." +msgstr "" + #: src/glossary.md msgid "" "The following is a glossary which aims to give a short definition of many " @@ -19302,10 +19310,11 @@ msgid "" "the English original." msgstr "" +#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting. #: src/glossary.md msgid "" "allocate: \n" -"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md)." +"Dynamic memory allocation on [the heap](memory-management/review.md)." msgstr "" #: src/glossary.md @@ -19314,6 +19323,13 @@ msgid "" "Information that is passed into a function or method." msgstr "" +#: src/glossary.md +msgid "" +"associated type: \n" +"A type associated with a specific trait. Useful for defining the " +"relationship between types." +msgstr "" + #: src/glossary.md msgid "" "Bare-metal Rust: \n" @@ -19322,15 +19338,17 @@ msgid "" msgstr "" #: src/glossary.md +#, fuzzy msgid "" "block: \n" -"See [Blocks](control-flow/blocks.md) and _scope_." +"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_." msgstr "" +"[Bloklar ve Kapsamlar](./control-flow-basics/blocks-and-scopes.md) (5 dakika)" #: src/glossary.md msgid "" "borrow: \n" -"See [Borrowing](ownership/borrowing.md)." +"See [Borrowing](borrowing/shared.md)." msgstr "" #: src/glossary.md @@ -19379,7 +19397,7 @@ msgstr "" #: src/glossary.md msgid "" "Concurrency in Rust: \n" -"See [Concurrency in Rust](concurrency.md)." +"See [Concurrency in Rust](concurrency/welcome.md)." msgstr "" #: src/glossary.md @@ -19647,8 +19665,8 @@ msgstr "" #: src/glossary.md msgid "" "string: \n" -"A data type storing textual data. See [`String` vs `str`](basic-syntax/" -"string-slices.html) for more." +"A data type storing textual data. See [Strings](references/strings.html) for " +"more." msgstr "" #: src/glossary.md @@ -19743,7 +19761,7 @@ msgstr "" msgid "" "unsafe: \n" "The subset of Rust which allows you to trigger _undefined behavior_. See " -"[Unsafe Rust](unsafe.html)." +"[Unsafe Rust](unsafe-rust/unsafe.md)." msgstr "" #: src/glossary.md @@ -19838,9 +19856,9 @@ msgstr "" #: src/other-resources.md msgid "" -"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/" -"rust_for_c/): covers Rust from the perspective of developers who write " -"firmware in C." +"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/" +"rust_for_c_devs.html): covers Rust from the perspective of developers who " +"write firmware in C." msgstr "" #: src/other-resources.md @@ -19864,6 +19882,14 @@ msgid "" "and async/await are also covered." msgstr "" +#: src/other-resources.md +msgid "" +"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-" +"testing/): a self-paced workshop that goes beyond Rust's built-in testing " +"framework. It covers `googletest`, snapshot testing, mocking as well as how " +"to write your own custom test harness." +msgstr "" + #: src/other-resources.md msgid "" "[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-" @@ -19934,6 +19960,419 @@ msgid "" "directory for details, including the license terms." msgstr "" +#~ msgid "Slices: `&[T]`" +#~ msgstr "Dilimler: `&[T]`" + +#~ msgid "`thiserror` and `anyhow`" +#~ msgstr "`thiserror` ve `anyhow`" + +#~ msgid "Control Flow" +#~ msgstr "Kontrol Akışı" + +#~ msgid "[Welcome](../welcome-day-1.md) (5 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-1.md) (5 dakika)" + +#~ msgid "[Hello, World](../hello-world.md) (15 minutes)" +#~ msgstr "[Merhaba, Dünya](../hello-world.md) (15 dakika)" + +#~ msgid "[Types and Values](../types-and-values.md) (40 minutes)" +#~ msgstr "[Türler ve Değerler](../types-and-values.md) (40 dakika)" + +#~ msgid "[Control Flow Basics](../control-flow-basics.md) (40 minutes)" +#~ msgstr "[Kontrol Akışı Temelleri](../control-flow-basics.md) (40 dakika)" + +#~ msgid "[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)" +#~ msgstr "[Demetler ve Diziler](../tuples-and-arrays.md) (35 dakika)" + +#~ msgid "[References](../references.md) (55 minutes)" +#~ msgstr "[Referanslar](../references.md) (55 dakika)" + +#~ msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" +#~ msgstr "[Kullanıcı Tanımlı Türler](../user-defined-types.md) (50 dakika)" + +#~ msgid "[Welcome](../welcome-day-2.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-2.md) (3 dakika)" + +#~ msgid "[Pattern Matching](../pattern-matching.md) (1 hour)" +#~ msgstr "[Desen Eşleştirme](../pattern-matching.md) (1 saat)" + +#~ msgid "[Methods and Traits](../methods-and-traits.md) (50 minutes)" +#~ msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" + +#~ msgid "Day 2 Afternoon (4 hours, including breaks)" +#~ msgstr "2. Gün Öğleden Sonra (4 saat, aralar dahil)" + +#~ msgid "[Generics](../generics.md) (40 minutes)" +#~ msgstr "[Jenerikler](../generics.md) (40 dakika)" + +#~ msgid "[Standard Library Types](../std-types.md) (1 hour and 20 minutes)" +#~ msgstr "[Standart Kütüphanedeki Türler](../std-types.md) (1 saat 20 dakika)" + +#~ msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" +#~ msgstr "" +#~ "[Standart Kütüphanedeki Özellikler](../std-traits.md) (1 saat 40 dakika)" + +#~ msgid "[Welcome](../welcome-day-3.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-3.md) (3 dakika)" + +#~ msgid "[Memory Management](../memory-management.md) (1 hour)" +#~ msgstr "[Bellek Yönetimi](../memory-management.md) (1 saat)" + +#~ msgid "[Smart Pointers](../smart-pointers.md) (55 minutes)" +#~ msgstr "[Akıllı Göstericiler](../smart-pointers.md) (55 dakika)" + +#~ msgid "[Borrowing](../borrowing.md) (55 minutes)" +#~ msgstr "[Ödünç Alma](../borrowing.md) (55 dakika)" + +#~ msgid "[Lifetimes](../lifetimes.md) (50 minutes)" +#~ msgstr "[Ömürler](../lifetimes.md) (50 dakika)" + +#~ msgid "[Welcome](../welcome-day-4.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-4.md) (3 dakika)" + +#~ msgid "[Iterators](../iterators.md) (45 minutes)" +#~ msgstr "[Adımlayıcılar](../iterators.md) (45 dakika)" + +#~ msgid "[Modules](../modules.md) (40 minutes)" +#~ msgstr "[Modüller](../modules.md) (40 dakika)" + +#~ msgid "[Testing](../testing.md) (45 minutes)" +#~ msgstr "[Test Etme](../testing.md) (45 dakika)" + +#~ msgid "[Error Handling](../error-handling.md) (55 minutes)" +#~ msgstr "[Hata İşleme](../error-handling.md) (55 dakika)" + +#~ msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" +#~ msgstr "[Emniyetsiz Rust](../unsafe-rust.md) (1 saat 5 dakika)" + +#~ msgid "Arrow-Left" +#~ msgstr "Yön Oku-Sol" + +#~ msgid "Arrow-Right" +#~ msgstr "Yön Oku-Sağ" + +#~ msgid "Ctrl + Enter" +#~ msgstr "Ctrl + Enter" + +#~ msgid "s" +#~ msgstr "s" + +#~ msgid "You can use " +#~ msgstr "Odak metin kutusundayken kodu yürütmek için " + +#~ msgid "In this session:" +#~ msgstr "Bu oturumda:" + +#~ msgid "[Welcome](./welcome-day-1.md) (5 minutes)" +#~ msgstr "[Hoş Geldiniz](./welcome-day-1.md) (5 dakika)" + +#~ msgid "[Hello, World](./hello-world.md) (15 minutes)" +#~ msgstr "[Merhaba, Dünya](./hello-world.md) (15 dakika)" + +#~ msgid "[Types and Values](./types-and-values.md) (40 minutes)" +#~ msgstr "[Türler ve Değerler](./types-and-values.md) (40 dakika)" + +#~ msgid "[Control Flow Basics](./control-flow-basics.md) (40 minutes)" +#~ msgstr "[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)" + +#~ msgid "In this segment:" +#~ msgstr "Bu bölümde:" + +#~ msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" +#~ msgstr "[Rust Nedir?](./hello-world/what-is-rust.md) (10 dakika)" + +#~ msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" +#~ msgstr "[Rust'ın Faydaları](./hello-world/benefits.md) (3 dakika)" + +#~ msgid "[Playground](./hello-world/playground.md) (2 minutes)" +#~ msgstr "[Deneme Alanı](./hello-world/playground.md) (2 dakika)" + +#~ msgid "[Hello, World](./types-and-values/hello-world.md) (5 minutes)" +#~ msgstr "[Merhaba, Dünya](./types-and-values/hello-world.md) (5 dakika)" + +#~ msgid "[Variables](./types-and-values/variables.md) (5 minutes)" +#~ msgstr "[Değişkenler](./types-and-values/variables.md) (5 dakika)" + +#~ msgid "[Values](./types-and-values/values.md) (5 minutes)" +#~ msgstr "[Değerler](./types-and-values/values.md) (5 dakika)" + +#~ msgid "[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)" +#~ msgstr "[Aritmetik](./types-and-values/arithmetic.md) (3 dakika)" + +#~ msgid "[Type Inference](./types-and-values/inference.md) (3 minutes)" +#~ msgstr "[Tür Çıkarımı](./types-and-values/inference.md) (3 dakika)" + +#~ msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)" +#~ msgstr "[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)" + +#~ msgid "[if Expressions](./control-flow-basics/if.md) (4 minutes)" +#~ msgstr "[if İfadeleri](./control-flow-basics/if.md) (4 dakika)" + +#~ msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" +#~ msgstr "[Döngüler](./control-flow-basics/loops.md) (5 dakika)" + +#~ msgid "" +#~ "[break and continue](./control-flow-basics/break-continue.md) (4 minutes)" +#~ msgstr "" +#~ "[break ve continue](./control-flow-basics/break-continue.md) (4 dakika)" + +#~ msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" +#~ msgstr "[Fonksiyonlar](./control-flow-basics/functions.md) (3 dakika)" + +#~ msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" +#~ msgstr "[Makrolar](./control-flow-basics/macros.md) (2 dakika)" + +#~ msgid "" +#~ "[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 " +#~ "minutes)" +#~ msgstr "" +#~ "[Alıştırma: Collatz Sekansı](./control-flow-basics/exercise.md) (15 " +#~ "dakika)" + +#~ msgid "1" +#~ msgstr "1" + +#~ msgid " greater than zero:" +#~ msgstr " sıfırdan büyük sayısı için:" + +#~ msgid "If _n" +#~ msgstr "If _n" + +#~ msgid "i" +#~ msgstr "i" + +#~ msgid "_." +#~ msgstr "_." + +#~ msgid "_ is even, then _n" +#~ msgstr "_ çifttir, o zaman _n" + +#~ msgid "i+1" +#~ msgstr "i+1" + +#~ msgid " = n" +#~ msgstr " = n" + +#~ msgid " / 2_." +#~ msgstr " / 2_." + +#~ msgid "_ is odd, then _n" +#~ msgstr "_ tektir, o zaman _n" + +#~ msgid " = 3 * n" +#~ msgstr " = 3 * n" + +#~ msgid " + 1_." +#~ msgstr " + 1_." + +#~ msgid "_ = 3:" +#~ msgstr "_ = 3:" + +#~ msgid "3 is odd, so _n" +#~ msgstr "3 tektir, yani _n" + +#~ msgid "2" +#~ msgstr "2" + +#~ msgid "_ = 3 * 3 + 1 = 10;" +#~ msgstr "_ = 3 * 3 + 1 = 10;" + +#~ msgid "10 is even, so _n" +#~ msgstr "10 çifttir, yani _n" + +#~ msgid "_ = 10 / 2 = 5;" +#~ msgstr "_ = 10 / 2 = 5;" + +#~ msgid "5 is odd, so _n" +#~ msgstr "5 tektir, yani _n" + +#~ msgid "_ = 3 * 5 + 1 = 16;" +#~ msgstr "_ = 3 * 5 + 1 = 16;" + +#~ msgid "16 is even, so _n" +#~ msgstr "16 çifttir, yani _n" + +#~ msgid "5" +#~ msgstr "5" + +#~ msgid "_ = 16 / 2 = 8;" +#~ msgstr "_ = 16 / 2 = 8;" + +#~ msgid "8 is even, so _n" +#~ msgstr "8 çifttir, yani _n" + +#~ msgid "_ = 8 / 2 = 4;" +#~ msgstr "_ = 8 / 2 = 4;" + +#~ msgid "4 is even, so _n" +#~ msgstr "4 çifttir, yani _n" + +#~ msgid "7" +#~ msgstr "7" + +#~ msgid "_ = 4 / 2 = 2;" +#~ msgstr "_ = 4 / 2 = 2;" + +#~ msgid "2 is even, so _n" +#~ msgstr "2 çifttir, yani _n" + +#~ msgid "_ = 1; and" +#~ msgstr "_ = 1; ve" + +#~ msgid "[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)" +#~ msgstr "[Demetler ve Diziler](./tuples-and-arrays.md) (35 dakika)" + +#~ msgid "[References](./references.md) (55 minutes)" +#~ msgstr "[Referanslar](../references.md) (55 dakika)" + +#~ msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" +#~ msgstr "[Kullanıcı Tanımlı Türler](./user-defined-types.md) (50 dakika)" + +#~ msgid "[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)" +#~ msgstr "[Diziler](./tuples-and-arrays/arrays.md) (5 dakika)" + +#~ msgid "[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)" +#~ msgstr "[Demetler](./tuples-and-arrays/tuples.md) (5 dakika)" + +#~ msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" +#~ msgstr "[Dizide Dolaşma](./tuples-and-arrays/iteration.md) (3 dakika)" + +#~ msgid "" +#~ "[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 " +#~ "minutes)" +#~ msgstr "" +#~ "[Desenler ve Çözümleme](./tuples-and-arrays/destructuring.md) (5 dakika)" + +#~ msgid "" +#~ "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)" +#~ msgstr "" +#~ "[Alıştırma: İç İçe Diziler](./tuples-and-arrays/exercise.md) (15 dakika)" + +#~ msgid "[Shared References](./references/shared.md) (10 minutes)" +#~ msgstr "[Paylaşılan Referanslar](./references/shared.md) (10 dakika)" + +#~ msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" +#~ msgstr "[Özel Referanslar](./references/exclusive.md) (10 dakika)" + +#~ msgid "[Slices: &\\[T\\]](./references/slices.md) (10 minutes)" +#~ msgstr "[Dilimler: &\\[T\\]](../references/slices.md) (10 dakika)" + +#~ msgid "[Strings](./references/strings.md) (10 minutes)" +#~ msgstr "[Dizgeler](./references/strings.md) (10 dakika)" + +#~ msgid "[Exercise: Geometry](./references/exercise.md) (15 minutes)" +#~ msgstr "[Alıştırma: Geometri](./references/exercise.md) (15 dakika)" + +#~ msgid "" +#~ "Question: What happens if you modify `a[3]` right before printing `s`?" +#~ msgstr "" +#~ "Soru: `a[3]`'ü `s`'yi yazdırmadan hemen önce değiştirirseniz (modify) ne " +#~ "olur?" + +#~ msgid "" +#~ "The question about modifying `a[3]` can spark an interesting discussion, " +#~ "but the answer is that for memory safety reasons you cannot do it through " +#~ "`a` at this point in the execution, but you can read the data from both " +#~ "`a` and `s` safely. It works before you created the slice, and again " +#~ "after the `println`, when the slice is no longer used." +#~ msgstr "" +#~ "`a[3]`'ün değiştirilmesiyle (modify) ilgili soru ilginç bir tartışmayı " +#~ "ateşleyebilir, ancak cevap şu ki, bellek emniyeti nedenleriyle yürütmenin " +#~ "(execution) bu noktasında bunu `a` aracılığıyla yapamazsınız, ancak " +#~ "verileri hem `a`'dan hem de `s`'den emniyetli bir şekilde " +#~ "okuyabilirsiniz. Dilim (slice) oluşturulmadan önce ve dilim " +#~ "kullanılmayacaksa`println`'den sonra `a[3]` değiştirilebilir." + +#~ msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." +#~ msgstr "" +#~ "`String`, UTF-8 olarak kodlanmış baytların dinamik bellekten tahsis " +#~ "edildiği (heap-allocated) arabellektir (buffer), sahip olan / sahipli " +#~ "(owned) bir türdür." + +#~ msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" +#~ msgstr "[İsimli Yapılar](./user-defined-types/named-structs.md) (10 dakika)" + +#~ msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" +#~ msgstr "[Demet Yapıları](./user-defined-types/tuple-structs.md) (10 dakika)" + +#~ msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" +#~ msgstr "[Enum'lar](./user-defined-types/enums.md) (5 dakika)" + +#~ msgid "[Static](./user-defined-types/static.md) (5 minutes)" +#~ msgstr "[Static](./user-defined-types/static.md) (5 dakika)" + +#~ msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" +#~ msgstr "[Tür Eş İsimleri](./user-defined-types/aliases.md) (2 minutes)" + +#~ msgid "" +#~ "[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" +#~ msgstr "" +#~ "[Alıştırma: Asansör Olayları](./user-Definition-types/exercise.md) (15 " +#~ "dakika)" + +#~ msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" +#~ msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" + +#~ msgid "`match` expressions" +#~ msgstr "`match` ifadeleri" + +#~ msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" +#~ msgstr "[Özellikler](../methods-and-traits/traits.md) (15 dakika)" + +#~ msgid "Including 10 minute breaks, this session should take about 4 hours" +#~ msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 4 saat sürmelidir" + +#~ msgid "This segment should take about 1 hour and 40 minutes" +#~ msgstr "Bu bölüm yaklaşık 1 saat 40 dakika sürmeli" + +#~ msgid "Niche Optimization" +#~ msgstr "Niche Optimizasyonu" + +#~ msgid "[Borrowing](./borrowing.md) (55 minutes)" +#~ msgstr "[Ödünç Alma](../borrowing.md) (55 dakika)" + +#~ msgid "[Lifetimes](./lifetimes.md) (50 minutes)" +#~ msgstr "[Ömürler](./lifetimes.md) (50 dakika)" + +#~ msgid "" +#~ "[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)" +#~ msgstr "" +#~ "[Ömür için Ek Açıklamalar](./lifetimes/lifetime-annotations.md) (10 " +#~ "dakika)" + +#~ msgid "[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)" +#~ msgstr "" +#~ "[Ömür Atlaması (Elision)](./lifetimes/lifetime-elision.md) (5 dakika)" + +#~ msgid "[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)" +#~ msgstr "[Yapı Ömürleri](./lifetimes/struct-lifetimes.md) (5 dakika)" + +#~ msgid "[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)" +#~ msgstr "" +#~ "[Alıştırma: Protobuf Ayrıştırma](./lifetimes/exercise.md) (30 dakika)" + +#~ msgid "b\"hello\"" +#~ msgstr "b\"merhaba\"" + +#~ msgid "Luhn Algorithm" +#~ msgstr "Luhn Algrotiması" + +#~ msgid "_Generated trait_:" +#~ msgstr "_Generated trait_:" + +#~ msgid "" +#~ "Including 10 minute breaks, this session should take about 2 hours and 55 " +#~ "minutes" +#~ msgstr "" +#~ "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 55 dakika sürmeli" + +#~ msgid "Hard-code both functions to operate on 3 × 3 matrices." +#~ msgstr "" +#~ "Her iki işlevi de 3 × 3 matris üzerinde çalışacak şekilde sabit kodlayın." + +#~ msgid "// Undefined behavior if abs misbehaves.\n" +#~ msgstr "// Undefined behavior if abs misbehaves.\n" + #~ msgid "Static and Const" #~ msgstr "Static ve Const" @@ -20064,9 +20503,6 @@ msgstr "" #~ msgid "Enum Sizes" #~ msgstr "Enum Boyutları" -#~ msgid "Novel Control Flow" -#~ msgstr "Yeni Kontrol Akışları" - #~ msgid "if let expressions" #~ msgstr "if let İfadeleri" @@ -20076,9 +20512,6 @@ msgstr "" #~ msgid "match expressions" #~ msgstr "match ifadeleri" -#~ msgid "Destructuring Structs" -#~ msgstr "Yapıların (Struct) Çözümlenmesi" - #~ msgid "Destructuring Arrays" #~ msgstr "Dizilerin Çözümlenmesi" @@ -20121,30 +20554,18 @@ msgstr "" #~ msgid "Field Shorthand Syntax" #~ msgstr "Alanlara İlk Değer Verme Kısaltması'nın Sözdizimi (Syntax)" -#~ msgid "Method Receiver" -#~ msgstr "Metot Alıcısı" - #~ msgid "Storing Books" #~ msgstr "Kitapların Saklanması" #~ msgid "Option and Result" #~ msgstr "Option ve Result" -#~ msgid "Vec" -#~ msgstr "Vec" - -#~ msgid "HashMap" -#~ msgstr "HashMap" - #~ msgid "Box" #~ msgstr "Box" #~ msgid "Recursive Data Types" #~ msgstr "Özyinelemeli Veri Türleri" -#~ msgid "Rc" -#~ msgstr "Rc" - #~ msgid "Iterators and Ownership" #~ msgstr "Adımlayıcılar (Iterators) ve Sahiplik" @@ -20160,18 +20581,9 @@ msgstr "" #~ msgid "Default Methods" #~ msgstr "Varsayılan Metotlar" -#~ msgid "impl Trait" -#~ msgstr "impl Trait" - #~ msgid "Important Traits" #~ msgstr "Önemli Özellikler (Traits)" -#~ msgid "Iterator" -#~ msgstr "Iterator" - -#~ msgid "From and Into" -#~ msgstr "From ve Into" - #~ msgid "Default" #~ msgstr "Default" @@ -20232,27 +20644,6 @@ msgstr "" #~ msgid "spin" #~ msgstr "spin" -#~ msgid "Send and Sync" -#~ msgstr "Send ve Sync" - -#~ msgid "Send" -#~ msgstr "Send" - -#~ msgid "Sync" -#~ msgstr "Sync" - -#~ msgid "Arc" -#~ msgstr "Arc" - -#~ msgid "Mutex" -#~ msgstr "Mutex" - -#~ msgid "async/await" -#~ msgstr "async/await" - -#~ msgid "Pin" -#~ msgstr "Pin" - #~ msgid "Day 1 Morning" #~ msgstr "1. Gün Sabah" @@ -20770,9 +21161,6 @@ msgstr "" #~ msgid "control flow:" #~ msgstr "kontrol akışı:" -#~ msgid "enumeration:" -#~ msgstr "numaralandırma:" - #~ msgid "error handling:" #~ msgstr "hata işleme:" From 419a2a0ec6429140adcf260e56ab3f621d626ed1 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Wed, 11 Dec 2024 13:51:52 +0300 Subject: [PATCH 03/26] translations in some places after update --- po/tr.po | 399 +++++++++++++++++++++++++------------------------------ 1 file changed, 182 insertions(+), 217 deletions(-) diff --git a/po/tr.po b/po/tr.po index 698c29d2257a..f2f91a37c3a3 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: 2024-12-10T14:46:21+03:00\n" -"PO-Revision-Date: 2024-12-10 15:34+0300\n" +"PO-Revision-Date: 2024-12-11 13:44+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -211,7 +211,7 @@ msgstr "Özel (Exclusive) Referanslar" #: src/SUMMARY.md src/references.md src/references/slices.md msgid "Slices" -msgstr "Dilimler: `&[T]`" +msgstr "Dilimler (Slices)" #: src/SUMMARY.md src/references.md src/references/strings.md msgid "Strings" @@ -275,9 +275,8 @@ msgid "Destructuring Structs" msgstr "Yapıların (Struct) Çözümlenmesi" #: src/SUMMARY.md src/pattern-matching.md -#, fuzzy msgid "Destructuring Enums" -msgstr "Çözümlenme" +msgstr "Enum'ların (Struct) Çözümlenmesi" #: src/SUMMARY.md src/pattern-matching.md #: src/pattern-matching/let-control-flow.md @@ -351,9 +350,8 @@ msgid "`impl Trait`" msgstr "`impl Trait`" #: src/SUMMARY.md src/generics/dyn-trait.md -#, fuzzy msgid "`dyn Trait`" -msgstr "`impl Trait`" +msgstr "`dyn Trait`" #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" @@ -491,9 +489,8 @@ msgid "`Rc`" msgstr "`Rc`" #: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md -#, fuzzy msgid "Owned Trait Objects" -msgstr "Özellik Nesneleri" +msgstr "Sahipli Özellik Nesneleri (Owned Trait Objects)" #: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md msgid "Exercise: Binary Tree" @@ -643,11 +640,11 @@ msgstr "`Error` Özelliği (Trait)" #: src/SUMMARY.md src/error-handling/thiserror.md msgid "`thiserror`" -msgstr "" +msgstr "`thiserror`" #: src/SUMMARY.md src/error-handling/anyhow.md msgid "`anyhow`" -msgstr "" +msgstr "`anyhow`" #: src/SUMMARY.md msgid "Exercise: Rewriting with `Result`" @@ -988,7 +985,7 @@ msgstr "Alıştırma Çözümleri" #: src/SUMMARY.md msgid "Bare Metal: Morning" -msgstr "Yalın Metal (Bare Metal): Sabah" +msgstr "Yalın Sistem (Bare Metal): Sabah" #: src/SUMMARY.md src/bare-metal/no_std.md msgid "`no_std`" @@ -1063,7 +1060,7 @@ msgstr "Çözümler" #: src/SUMMARY.md msgid "Bare Metal: Afternoon" -msgstr "Yalın Metal (Bare Metal): Öğleden Sonra" +msgstr "Yalın Sistem (Bare Metal): Öğleden Sonra" #: src/SUMMARY.md msgid "Application Processors" @@ -1138,9 +1135,8 @@ msgid "`spin`" msgstr "`spin`" #: src/SUMMARY.md src/bare-metal/android.md -#, fuzzy msgid "Bare-Metal on Android" -msgstr "Yalın Metal (Bare Metal): Sabah" +msgstr "Android'de Yalın Sistem (Bare Metal)" #: src/SUMMARY.md msgid "`vmbase`" @@ -1160,9 +1156,8 @@ msgid "Threads" msgstr "İş Parçacıkları (Threads)" #: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md -#, fuzzy msgid "Plain Threads" -msgstr "İş Parçacıkları (Threads)" +msgstr "Temel İş Parçacıkları (Plain Threads)" #: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md msgid "Scoped Threads" @@ -1175,9 +1170,8 @@ msgstr "Kanallar" #: src/SUMMARY.md src/concurrency/channels.md #: src/concurrency/channels/senders-receivers.md -#, fuzzy msgid "Senders and Receivers" -msgstr "Metot Alıcısı" +msgstr "Vericiler ve Alıcılar" #: src/SUMMARY.md src/concurrency/channels.md #: src/concurrency/channels/unbounded.md @@ -1195,9 +1189,8 @@ msgstr "`Send` ve `Sync`" #: src/SUMMARY.md src/concurrency/send-sync.md #: src/concurrency/send-sync/marker-traits.md -#, fuzzy msgid "Marker Traits" -msgstr "Daha Fazla Özellik (Trait)" +msgstr "Marker Özellikleri (Traits)" #: src/SUMMARY.md src/concurrency/send-sync/send.md msgid "`Send`" @@ -1276,9 +1269,8 @@ msgstr "Görevler" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md -#, fuzzy msgid "Channels and Control Flow" -msgstr "Yeni Kontrol Akışları" +msgstr "Kanallar ve Kontrol Akışı" #: src/SUMMARY.md src/concurrency/async-control-flow.md #: src/concurrency/async-control-flow/channels.md @@ -1391,6 +1383,9 @@ msgid "" "in the top right corner of the page or check the [Translations](running-the-" "course/translations.md) page for a list of all available translations." msgstr "" +"Kurs diğer dillerde de mevcuttur. Sayfanın sağ üst köşesinden tercih " +"ettiğiniz dili seçin veya tüm mevcut çevirilerin listesi için [Çeviriler]" +"(running-the-course/translations.md) sayfasını kontrol edin." #: src/index.md #, fuzzy @@ -1456,12 +1451,11 @@ msgid "" "(embedded) development. Both microcontrollers and application processors are " "covered." msgstr "" -"[Yalın-metal](bare-metal.md): Yalın metal (gömülü) geliştirme için Rust'ın " +"[Yalın-metal](bare-metal.md): Yalın sistem (gömülü) geliştirme için Rust'ın " "kullanımına ilişkin tam günlük bir ders. Hem mikrodenetleyiciler hem de " "uygulama işlemcileri kapsanmaktadır." #: src/index.md -#, fuzzy msgid "" "[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in " "Rust. We cover both classical concurrency (preemptively scheduling using " @@ -1469,7 +1463,7 @@ msgid "" "using futures)." msgstr "" "[Eşzamanlılık](concurrency.md): Rust'ta eşzamanlılık üzerine tam günlük bir " -"ders. Hem klasik eşzamanlılığı (iş parçacıkları ve mutexleri kullanarak " +"ders. Hem klasik eşzamanlılığı (iş parçacıkları ve muteksleri kullanarak " "kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını (future " "özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz." @@ -1686,7 +1680,7 @@ msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" #: src/welcome-day-4-afternoon.md src/concurrency/welcome.md #: src/concurrency/welcome-async.md msgid "Segment" -msgstr "" +msgstr "Bölüm" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md @@ -1704,9 +1698,8 @@ msgstr "" #: src/concurrency/welcome-async.md src/concurrency/async.md #: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md #: src/concurrency/async-exercises.md -#, fuzzy msgid "Duration" -msgstr "numaralandırma:" +msgstr "Süre" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md @@ -1716,7 +1709,7 @@ msgstr "numaralandırma:" #: src/unsafe-rust.md src/concurrency/shared-state.md #: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md msgid "5 minutes" -msgstr "" +msgstr "5 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md @@ -1724,12 +1717,12 @@ msgstr "" #: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md #: src/concurrency/shared-state.md msgid "15 minutes" -msgstr "" +msgstr "15 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/welcome-day-4.md msgid "40 minutes" -msgstr "" +msgstr "40 dakika" #: src/running-the-course/course-structure.md msgid "Day 1 Afternoon (2 hours and 35 minutes, including breaks)" @@ -1737,18 +1730,18 @@ msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md msgid "35 minutes" -msgstr "" +msgstr "35 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md #: src/welcome-day-3.md src/welcome-day-3-afternoon.md #: src/concurrency/welcome-async.md msgid "55 minutes" -msgstr "" +msgstr "55 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md #: src/welcome-day-2.md src/welcome-day-3-afternoon.md msgid "50 minutes" -msgstr "" +msgstr "50 dakika" #: src/running-the-course/course-structure.md msgid "Day 2 Morning (2 hours and 10 minutes, including breaks)" @@ -1760,27 +1753,26 @@ msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" #: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md #: src/testing.md src/error-handling.md msgid "3 minutes" -msgstr "" +msgstr "3 dakika" #: src/running-the-course/course-structure.md src/welcome-day-2.md #: src/welcome-day-2-afternoon.md src/welcome-day-3.md msgid "1 hour" -msgstr "" +msgstr "1 saat" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 2 Afternoon (3 hours and 15 minutes, including breaks)" -msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" +msgstr "2. Gün Öğleden Sonra (3 saat 15 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md #: src/welcome-day-4.md msgid "45 minutes" -msgstr "" +msgstr "45 dakika" #: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md #: src/concurrency/welcome.md src/concurrency/welcome-async.md msgid "1 hour and 10 minutes" -msgstr "" +msgstr "1 saat 10 dakika" #: src/running-the-course/course-structure.md msgid "Day 3 Morning (2 hours and 20 minutes, including breaks)" @@ -1795,13 +1787,12 @@ msgid "Day 4 Morning (2 hours and 40 minutes, including breaks)" msgstr "4. Gün Sabah (2 saat 40 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 4 Afternoon (2 hours and 20 minutes, including breaks)" -msgstr "4. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)" +msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md msgid "1 hour and 5 minutes" -msgstr "" +msgstr "1 saat 5 dakika" #: src/running-the-course/course-structure.md msgid "Deep Dives" @@ -1886,7 +1877,7 @@ msgstr "" #: src/running-the-course/course-structure.md msgid "Bare-Metal Rust" -msgstr "Yalın-Metal (Bare-metal) Rust" +msgstr "Yalın-Sistem (Bare-metal) Rust" #: src/running-the-course/course-structure.md msgid "" @@ -1894,7 +1885,7 @@ msgid "" "using Rust for bare-metal (embedded) development. Both microcontrollers and " "application processors are covered." msgstr "" -"[Yalın-Metal Rust](../bare-metal.md) ayrıntılı incelemesi, yalın metal " +"[Yalın-Sistem Rust](../bare-metal.md) ayrıntılı incelemesi, yalın sistem " "(gömülü) geliştirme için Rust kullanımına ilişkin tam günlük bir derstir. " "Hem mikrodenetleyiciler hem de uygulama işlemcileri kapsanmaktadır." @@ -1915,7 +1906,6 @@ msgid "Concurrency in Rust" msgstr "Rust'ta Eşzamanlılık" #: src/running-the-course/course-structure.md -#, fuzzy msgid "" "The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day " "class on classical as well as `async`/`await` concurrency." @@ -1934,9 +1924,8 @@ msgstr "" "için kopyalayıp `src/main.rs` dosyasına yapıştırabilirsiniz:" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Morning (3 hours and 20 minutes, including breaks)" -msgstr "3. Gün Sabah (2 saat 20 dakika, aralar dahil)" +msgstr "Sabah (3 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/pattern-matching.md #: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md @@ -1944,7 +1933,7 @@ msgstr "3. Gün Sabah (2 saat 20 dakika, aralar dahil)" #: src/concurrency/welcome.md src/concurrency/sync-exercises.md #: src/concurrency/welcome-async.md src/concurrency/async-exercises.md msgid "30 minutes" -msgstr "" +msgstr "30 dakika" #: src/running-the-course/course-structure.md src/methods-and-traits.md #: src/std-types.md src/memory-management.md src/borrowing.md @@ -1952,16 +1941,15 @@ msgstr "" #: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md #: src/concurrency/async-exercises.md msgid "20 minutes" -msgstr "" +msgstr "20 dakika" #: src/running-the-course/course-structure.md src/concurrency/welcome.md msgid "Send and Sync" msgstr "Send ve Sync" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Afternoon (3 hours and 20 minutes, including breaks)" -msgstr "4. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)" +msgstr "Öğleden Sonra (3 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md msgid "Format" @@ -1980,24 +1968,20 @@ msgid "There are several useful keyboard shortcuts in mdBook:" msgstr "Bu mdBook'ta birkaç kullanışlı klavye kısayolu vardır:" #: src/running-the-course/keyboard-shortcuts.md -#, fuzzy msgid "Arrow-Left: Navigate to the previous page." -msgstr ": Önceki sayfaya gidin." +msgstr "Arrow-Left: Önceki sayfaya gidin." #: src/running-the-course/keyboard-shortcuts.md -#, fuzzy msgid "Arrow-Right: Navigate to the next page." -msgstr ": Sonraki sayfaya gidin." +msgstr "Arrow-Right: Sonraki sayfaya gidin." #: src/running-the-course/keyboard-shortcuts.md -#, fuzzy msgid "Ctrl + Enter: Execute the code sample that has focus." -msgstr ": Odaklı kod örneğini yürütün." +msgstr "Ctrl + Enter: Odaklı kod örneğini yürütün." #: src/running-the-course/keyboard-shortcuts.md -#, fuzzy msgid "s: Activate the search bar." -msgstr ": Arama çubuğunu etkinleştirin." +msgstr "s: Arama çubuğunu etkinleştirin." #: src/running-the-course/translations.md msgid "" @@ -2018,7 +2002,6 @@ msgstr "" "[@henrif75](https://github.com/henrif75)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) " "by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/" @@ -2048,7 +2031,6 @@ msgstr "" "(https://github.com/johnathan79717)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" "(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" @@ -2056,14 +2038,13 @@ msgid "" "github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) " "and [@mehrad77](https://github.com/mehrad77)." msgstr "" -"[Çince (Geleneksel)](https://google.github.io/comprehensive-rust/zh-TW/) " -"yazanlar: [@hueich](https://github.com/hueich), [@victorhsieh](https://" -"github.com/victorhsieh), [@mingyc](https://github.com/mingyc), " -"[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" -"(https://github.com/johnathan79717)." +"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " +"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github." +"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" +"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" +"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" "(https://github.com/CoinEZ), [@momotaro1105](https://github.com/" @@ -2071,8 +2052,9 @@ msgid "" "and [@kantasv](https://github.com/kantasv)." msgstr "" "[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " -"[@CoinEZ-JPN](https://github.com/CoinEZ) ve [@momotaro1105](https://github) ." -"com/momotaro1105)." +"[@CoinEZ-JPN](https://github.com/CoinEZ), [@momotaro1105](https://github) ." +"com/momotaro1105), [@HidenoriKobayashi](https://github.com/" +"HidenoriKobayashi) ve [@kantasv](https://github.com/kantasv)." #: src/running-the-course/translations.md msgid "" @@ -2095,18 +2077,16 @@ msgstr "" "[@raselmandol](https://github.com/raselmandol)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-" "cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" "yaremam) and [@reta](https://github.com/reta)." msgstr "" -"[İtalyanca](https://google.github.io/comprehensive-rust/it/) yazanlar: " -"[@henrythebuilder](https://github.com/henrythebuilder) ve [@detro](https://" -"github.com/detro)." +"[Ukraynaca](https://google.github.io/comprehensive-rust/uk/) yazanlar: [@git-" +"user-cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" +"yaremam) ve [@reta](https://github.com/reta)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" "(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" @@ -2114,11 +2094,11 @@ msgid "" "github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) " "and [@mehrad77](https://github.com/mehrad77)." msgstr "" -"[Çince (Geleneksel)](https://google.github.io/comprehensive-rust/zh-TW/) " -"yazanlar: [@hueich](https://github.com/hueich), [@victorhsieh](https://" -"github.com/victorhsieh), [@mingyc](https://github.com/mingyc), " -"[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" -"(https://github.com/johnathan79717)." +"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " +"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github." +"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" +"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" +"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77)." #: src/running-the-course/translations.md msgid "" @@ -2139,13 +2119,12 @@ msgstr "" "veriyoruz:" #: src/running-the-course/translations.md -#, fuzzy msgid "" "[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]" "(https://github.com/younies)" msgstr "" -"[Bengalce](https://google.github.io/comprehensive-rust/bn/) yazanlar: " -"[@raselmandol](https://github.com/raselmandol)." +"[Arapça](https://google.github.io/comprehensive-rust/ar/) yazanlar: " +"[@younies](https://github.com/younies)" #: src/running-the-course/translations.md msgid "" @@ -2156,14 +2135,14 @@ msgstr "" "[@raselmandol](https://github.com/raselmandol)." #: src/running-the-course/translations.md -#, fuzzy msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" "(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and " "[@AdrienBaudemont](https://github.com/AdrienBaudemont)." msgstr "" "[Fransızca](https://google.github.io/comprehensive-rust/fr/) yazanlar: " -"[@KookaS](https://github.com/KookaS) ve [@vcaen](https://github.com) /vcaen)." +"[@KookaS](https://github.com/KookaS), [@vcaen](https://github.com) /vcaen) " +"ve [@AdrienBaudemont](https://github.com/AdrienBaudemont)." #: src/running-the-course/translations.md msgid "" @@ -2191,6 +2170,11 @@ msgid "" "translation-report.html) or [synced to the latest version of the course]" "(https://google.github.io/comprehensive-rust/synced-translation-report.html)." msgstr "" +"Çevirilerin tam listesi ve güncel durumları [son güncelleme tarihi " +"itibarıyla](https://google.github.io/comprehensive-rust/translation-report." +"html) veya [kursun en son sürümüyle senkronize edilmiş olarak](https://" +"google.github.io/comprehensive-rust/synced-translation-report.html) da " +"mevcuttur." #: src/running-the-course/translations.md msgid "" @@ -2257,17 +2241,16 @@ msgstr "" "IDE de mevcuttur." #: src/cargo.md -#, fuzzy msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " "formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " "gets you an outdated Rust version and may lead to unexpected behavior. The " "command would be:" msgstr "" -"Debian/Ubuntu'da ayrıca Cargo'yu, Rust kaynak kodunu ve [Rust " -"biçimlendiriciyi](https://github.com/rust-lang/rustfmt) `apt` aracılığıyla " -"yükleyebilirsiniz. Ancak bu, eski bir Rust sürümüne sahip olmanızı sağlar ve " -"beklenmeyen davranışlara yol açabilir. Komut şöyle olacaktır:" +"Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu ve " +"[Rust biçimlendiricisini](https://github.com/rust-lang/rustfmt) " +"kurabilirsiniz. Ancak bu size eski bir Rust sürümü verir ve beklenmeyen " +"davranışlara yol açabilir. Komut şu şekilde olacaktır:" #: src/cargo.md msgid "" @@ -2275,6 +2258,9 @@ msgid "" "may provide an outdated version. Therefore, it is recommended to install " "Rust from the official site." msgstr "" +"Mac işletim sisteminde Rust'ı yüklemek için [Homebrew](https://brew.sh/)'i " +"kullanabilirsiniz, ancak bu eski bir sürüm sağlayabilir. Bu nedenle Rust'ı " +"resmi sitesinden kurmanız önerilir." #: src/cargo/rust-ecosystem.md msgid "The Rust Ecosystem" @@ -2493,11 +2479,12 @@ msgid "\"Edit me!\"" msgstr "\"Düzenle beni!\"" #: src/cargo/code-samples.md -#, fuzzy msgid "" "You can use Ctrl + Enter to execute the code when focus is in the " "text box." -msgstr " kullanabilirsiniz.." +msgstr "" +"Metin kutusu odaklanmışken kodu çalıştırmak için Ctrl + Enter " +"tuşlarını kullanabilirsiniz." #: src/cargo/code-samples.md msgid "" @@ -2672,11 +2659,12 @@ msgid "Schedule" msgstr "Zamanlama (Schedule)" #: src/welcome-day-1.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 5 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"İçeriği:" #: src/welcome-day-1.md msgid "Please remind the students that:" @@ -2749,9 +2737,8 @@ msgstr "" "öneridir. Esnek olmaktan ve gerektiği gibi ayarlamaktan çekinmeyin!" #: src/hello-world.md src/concurrency/send-sync.md -#, fuzzy msgid "This segment should take about 15 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 15 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:" #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/tuples-and-arrays.md src/references.md src/user-defined-types.md @@ -2765,7 +2752,7 @@ msgstr "Bu bölüm yaklaşık 15 dakika sürmeli" #: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md #: src/concurrency/async-exercises.md msgid "Slide" -msgstr "" +msgstr "Slayt" #: src/hello-world.md src/references.md src/user-defined-types.md #: src/pattern-matching.md src/methods-and-traits.md src/generics.md @@ -2775,13 +2762,13 @@ msgstr "" #: src/concurrency/shared-state.md src/concurrency/async.md #: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md msgid "10 minutes" -msgstr "" +msgstr "10 dakika" #: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md #: src/memory-management.md src/concurrency/channels.md #: src/concurrency/send-sync.md msgid "2 minutes" -msgstr "" +msgstr "2 dakika" #: src/hello-world/what-is-rust.md msgid "" @@ -2991,18 +2978,17 @@ msgstr "" "gibi yapılara sahip modern bir dil elde edersiniz." #: src/hello-world/benefits.md -#, fuzzy msgid "" "Experience with Java, Go, Python, JavaScript...: You get the same memory " "safety as in those languages, plus a similar high-level language feeling. In " "addition you get fast and predictable performance like C and C++ (no garbage " "collector) as well as access to low-level hardware (should you need it)." msgstr "" -"Java, Go, Python, JavaScript... deneyimi: Bu dillerdekiyle aynı bellek " -"emniyetine (safety) ve ayrıca benzer yüksek seviyeli dil hissine sahip " -"olursunuz. Ayrıca, C ve C++ (çöp toplayıcı yok) gibi hızlı ve öngörülebilir " -"performansın yanı sıra düşük seviyeli donanıma erişim (ihtiyaç duymanız " -"halinde) elde edersiniz." +"Java, Go, Python, JavaScript... ile deneyim: Bu dillerdekiyle aynı bellek " +"emniyetine (safety) ve benzer bir yüksek seviyeli dil hissini elde " +"edersiniz. Ayrıca C ve C++ gibi hızlı ve öngörülebilir performans (çöp " +"toplayıcı yok) ve düşük seviyeli donanıma erişim (ihtiyaç duymanız halinde) " +"elde edersiniz." #: src/hello-world/playground.md msgid "" @@ -3059,9 +3045,8 @@ msgstr "" "öğrenciler için faydalıdır." #: src/types-and-values.md src/control-flow-basics.md src/modules.md -#, fuzzy msgid "This segment should take about 40 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 40 dakika sürmelidir. İçeriği:" #: src/types-and-values/hello-world.md msgid "" @@ -3187,9 +3172,9 @@ msgid "" "Uncomment the `x = 20` to demonstrate that variables are immutable by " "default. Add the `mut` keyword to allow changes." msgstr "" -"Değişkenlerin varsayılan olarak değişmez (immutable) olduğunu göstermek için " -"`x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için `mut` " -"anahtar kelimesini ekleyin." +"Değişkenlerin varsayılan olarak değişemez (immutable) olduğunu göstermek " +"için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için " +"`mut` anahtar kelimesini ekleyin." #: src/types-and-values/variables.md msgid "" @@ -3332,15 +3317,14 @@ msgstr "" "benzerdir." #: src/types-and-values/arithmetic.md -#, fuzzy msgid "" "What about integer overflow? In C and C++ overflow of _signed_ integers is " "actually undefined, and might do unknown things at runtime. In Rust, it's " "defined." msgstr "" "Peki, tamsayı taşması ne olacak? C ve C++'da _işaretli_ tamsayıların taşması " -"aslında tanımsızdır (undefined) ve farklı platformlarda veya derleyicilerde " -"farklı şeyler olabilir. Rust'ta bu tanımlanmıştır." +"aslında tanımsızdır (undefined) ve çalışma zamanında bilinmeyen şeyler " +"olabilir. Rust'ta ise bu tanımlıdır." #: src/types-and-values/arithmetic.md msgid "" @@ -3415,9 +3399,9 @@ msgid "" "number is calculated recursively as the sum of the n-1'th and n-2'th " "Fibonacci numbers." msgstr "" -"Birinci ve ikinci Fibonacci sayılarının her ikisi de `1`'dir. n>2 için, " -"n'inci Fibonacci sayısı yinelemeli olarak n-1'inci ve n-2'inci Fibonacci " -"sayılarının toplamı olarak hesaplanır." +"Fibonacci dizisi `[0,1]` ile başlar. n>1 için, n'inci Fibonacci sayısı " +"yinelemeli olarak n-1'inci ve n-2'inci Fibonacci sayılarının toplamı olarak " +"hesaplanır." #: src/types-and-values/exercise.md msgid "" @@ -3444,29 +3428,29 @@ msgid "\"fib({n}) = {}\"" msgstr "\"fib({n}) = {}\"" #: src/control-flow-basics.md -#, fuzzy msgid "if Expressions" -msgstr "`if` İfadeleri" +msgstr "if İfadeleri" #: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md #: src/concurrency/async-control-flow.md msgid "4 minutes" -msgstr "" +msgstr "4 dakika" #: src/control-flow-basics.md -#, fuzzy msgid "break and continue" -msgstr "`break` ve `continue`" +msgstr "break ve continue" #: src/control-flow-basics.md msgid "We will now cover the many kinds of flow control found in Rust." -msgstr "" +msgstr "Şimdi, Rust'ta bulunan birçok akış kontrol çeşitlerini ele alacağız." #: src/control-flow-basics.md msgid "" "Most of this will be very familiar to what you have seen in other " "programming languages." msgstr "" +"Bunların çoğu diğer programlama dillerinde gördüklerinize çok tanıdık " +"gelecektir." #: src/control-flow-basics/if.md msgid "`if` expressions" @@ -3524,16 +3508,16 @@ msgstr "" "örnekte `\"küçük\"`ten sonra `;` eklerseniz ne olacağını gösterin." #: src/control-flow-basics/if.md -#, fuzzy msgid "" "An `if` expression should be used in the same way as the other expressions. " "For example, when it is used in a `let` statement, the statement must be " "terminated with a `;` as well. Remove the `;` before `println!` to see the " "compiler error." msgstr "" -"Bir ifadede `if` kullanıldığında, ifadeyi bir sonraki ifadeden ayırmak için " -"ifadenin `;` olması gerekir. Derleyici hatasını görmek için `println!`den " -"önceki `;` işaretini kaldırın." +"Bir `if` ifadesi diğer ifadelerle aynı şekilde kullanılmalıdır. Örneğin, bir " +"`let` ifadesinde kullanıldığında, ifadenin `;` ile de sonlandırılması " +"gerekir. Derleyici hatasını görmek için `println!`'den önceki `;`'yi " +"kaldırın." #: src/control-flow-basics/loops.md msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" @@ -3552,7 +3536,7 @@ msgid "" msgstr "" "[`while` anahtar kelimesi](https://doc.rust-lang.org/reference/expressions/" "loop-expr.html#predicate-loops) diğer dillerdeki gibi işler ve koşul doğru " -"olduğu sürece döngü gövdesini çalıştırır." +"olduğu sürece döngü gövdesini yürütür (execute)." #: src/control-flow-basics/loops.md msgid "\"Final x: {x}\"" @@ -3582,13 +3566,12 @@ msgstr "" "ayrıntılı olarak tartışılacaktır." #: src/control-flow-basics/loops/for.md -#, fuzzy msgid "" "Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax " "for an inclusive range." msgstr "" -"`for` döngüsünün yalnızca `4`'e kadar adım attığını unutmayın. Kapalı aralık " -"için `1..=5` sözdizimini gösterin." +"İlk `for` döngüsünün yalnızca `4`e kadar adım attığını unutmayın. Kapalı bir " +"aralık için `1..=5` sözdizimini gösterin." #: src/control-flow-basics/loops/loop.md msgid "" @@ -3607,6 +3590,8 @@ msgid "" "The `loop` statement works like a `while true` loop. Use it for things like " "servers which will serve connections forever." msgstr "" +"`loop` deyimi `while true` döngüsü gibi çalışır. Bağlantılara sonsuza kadar " +"hizmet edecek sunucular gibi şeyler için kullanın." #: src/control-flow-basics/break-continue.md msgid "" @@ -3617,17 +3602,16 @@ msgstr "" "lang.org/reference/expressions/loop-expr.html#continue-expressions) kullanın." #: src/control-flow-basics/break-continue.md -#, fuzzy msgid "" "If you want to exit any kind of loop early, use [`break`](https://doc.rust-" "lang.org/reference/expressions/loop-expr.html#break-expressions). With " "`loop`, this can take an optional expression that becomes the value of the " "`loop` expression." msgstr "" -"Bir döngüden erken çıkmak istiyorsanız [`break`](https://doc.rust-lang.org/" -"reference/expressions/loop-expr.html#break-expressions) kullanın. `loop` " -"için bu, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifadeyi " -"(optional expression) alabilir." +"Herhangi bir döngüden erken çıkmak istiyorsanız, [`break`](https://doc.rust-" +"lang.org/reference/expressions/loop-expr.html#break-expressions) kullanın. " +"`loop` ile, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifade " +"alabilir." #: src/control-flow-basics/break-continue.md src/std-traits/exercise.md #: src/std-traits/solution.md src/smart-pointers/trait-objects.md @@ -3639,7 +3623,6 @@ msgid "\"{}\"" msgstr "\"{}\"" #: src/control-flow-basics/break-continue.md -#, fuzzy msgid "" "Note that `loop` is the only looping construct which can return a non-" "trivial value. This is because it's guaranteed to only return at a `break` " @@ -3647,8 +3630,9 @@ msgid "" "condition fails)." msgstr "" "`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " -"olduğunu unutmayın. Bunun nedeni, en az bir kez girilmesinin (`while` ve " -"`for` döngülerinden farklı olarak) garanti altında olmasıdır ." +"olduğunu unutmayın. Bunun nedeni, en az bir `break` ifadesinde sonlanmasının " +"garantili olmasıdır (koşul başarısız olduğunda da sonlanabilen `while` ve " +"`for` döngülerinin aksine)." #: src/control-flow-basics/break-continue/labels.md msgid "" @@ -3664,11 +3648,11 @@ msgstr "\"aranan öğeler: {elements_searched}\"" #: src/control-flow-basics/break-continue/labels.md msgid "Labeled break also works on arbitrary blocks, e.g." -msgstr "" +msgstr "Etiketli break, keyfi olarak yazılan bloklarda da çalışır, örneğin." #: src/control-flow-basics/break-continue/labels.md msgid "\"This line gets skipped\"" -msgstr "" +msgstr "\"Bu satır geçilece\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "Blocks" @@ -3746,15 +3730,14 @@ msgstr "" "olduğunu gösterin." #: src/control-flow-basics/blocks-and-scopes/scopes.md -#, fuzzy msgid "" "Shadowing is different from mutation, because after shadowing both " "variables' memory locations exist at the same time. Both are available under " "the same name, depending where you use it in the code." msgstr "" -"Gölgeleme mutasyondan farklıdır çünkü gölgeleme sonrasında her iki " -"değişkenin hafıza konumları aynı anda mevcuttur. Her ikisi de kodda nerede " -"kullandığınıza bağlı olarak aynı ad altında mevcuttur." +"Gölgeleme (shadowing) mutasyondan (mutation) farklıdır çünkü gölgeleme " +"sonrasında her iki değişkenin de bellek konumları aynı anda mevcuttur. Her " +"ikisi de kodda nerede kullandığınıza bağlı olarak aynı ad altında mevcuttur." #: src/control-flow-basics/blocks-and-scopes/scopes.md msgid "A shadowing variable can have a different type." @@ -3791,14 +3774,13 @@ msgstr "" "için `gcd`'yi yeniden düzenleyin - refactor)." #: src/control-flow-basics/functions.md -#, fuzzy msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the return type is omitted." msgstr "" -"Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü' " -"olan `()` değerini döndürür. Eğer `->()` dönüş tipi atlanırsa derleyici bunu " -"anlayacaktır." +"Bazı fonksiyonların dönüş değeri (return value) yoktur ve 'birim türü (unit " +"type)', `()` döndürürler. Eğer dönüş türü yazılmazsa, derleyici birim türünü " +"çıkarım (infer) yapacaktır." #: src/control-flow-basics/functions.md msgid "" @@ -3862,7 +3844,7 @@ msgid "" "panic." msgstr "" "`todo!()` kodun bir kısmını henüz uygulanmamış (not-yet-implemented) olarak " -"işaretler. Eğer çalıştırılırsa, paniğe neden olur." +"işaretler. Eğer yürütülürse (execute), paniğe neden olur." #: src/control-flow-basics/macros.md msgid "" @@ -3870,7 +3852,7 @@ msgid "" "panic." msgstr "" "`unreachable!()` kodun bir kısmını erişilemez (unreachable) olarak " -"işaretler. Eğer çalıştırılırsa, paniğe neden olur." +"işaretler. Eğer yürütülürse, paniğe neden olur." #: src/control-flow-basics/macros.md msgid "\"{n}! = {}\"" @@ -3895,61 +3877,60 @@ msgstr "" "bölümde türetilmiş makroların kullanımı anlatılacaktır." #: src/control-flow-basics/exercise.md -#, fuzzy msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " "defined as follows, for an arbitrary n1 greater than zero:" msgstr "" -"[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture) şu " -"şekilde tanımlanır, keyfi bir" +"[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture), sıfırdan " +"büyük herhangi bir n1 için aşağıdaki şekilde tanımlanır:" #: src/control-flow-basics/exercise.md -#, fuzzy msgid "" "If _ni_ is 1, then the sequence terminates at _ni_." -msgstr "_ 1 ise, o zaman sekans bu sayıda sonlanır, _n" +msgstr "Eğer _ni_ 1 ise, dizi _ni_'de sonlanır." #: src/control-flow-basics/exercise.md msgid "If _ni_ is even, then _ni+1 = ni / 2_." msgstr "" +"Eğer _ni_ çift ise, o zaman _ni+1 = ni / 2_." #: src/control-flow-basics/exercise.md msgid "" "If _ni_ is odd, then _ni+1 = 3 * ni + 1_." msgstr "" +"Eğer _ni_ tek sayı ise _ni+1 = 3 * ni + 1_." #: src/control-flow-basics/exercise.md -#, fuzzy msgid "For example, beginning with _n1_ = 3:" -msgstr "Örneğin, başlangıcımız _n" +msgstr "Örneğin, _n1_ = 3 ile başalrsak:" #: src/control-flow-basics/exercise.md msgid "3 is odd, so _n2_ = 3 * 3 + 1 = 10;" -msgstr "" +msgstr "3 tek sayıdır, dolayısıyla _n2_ = 3 * 3 + 1 = 10;" #: src/control-flow-basics/exercise.md msgid "10 is even, so _n3_ = 10 / 2 = 5;" -msgstr "" +msgstr "10 çift sayıdır, dolayısıyla _n3_ = 10 / 2 = 5;" #: src/control-flow-basics/exercise.md msgid "5 is odd, so _n4_ = 3 * 5 + 1 = 16;" -msgstr "" +msgstr "5 tek sayıdır, dolayısıyla _n4_ = 3 * 5 + 1 = 16;" #: src/control-flow-basics/exercise.md msgid "16 is even, so _n5_ = 16 / 2 = 8;" -msgstr "" +msgstr "16 çift sayıdır, dolayısıyla _n5_ = 16 / 2 = 8;" #: src/control-flow-basics/exercise.md msgid "8 is even, so _n6_ = 8 / 2 = 4;" -msgstr "" +msgstr "8 çift sayıdır, dolayısıyla _n6_ = 8 / 2 = 4;" #: src/control-flow-basics/exercise.md msgid "4 is even, so _n7_ = 4 / 2 = 2;" -msgstr "" +msgstr "4 çift sayıdır, dolayısıyla _n7_ = 4 / 2 = 2;" #: src/control-flow-basics/exercise.md msgid "2 is even, so _n8_ = 1; and" -msgstr "" +msgstr "2 çifttir, bu yüzden _n8_ = 1; ve" #: src/control-flow-basics/exercise.md msgid "the sequence terminates." @@ -4918,16 +4899,16 @@ msgid "" msgstr "" #: src/welcome-day-2.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 10 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmelidir. " +"İçeriği:" #: src/pattern-matching.md src/std-types.md src/memory-management.md -#, fuzzy msgid "This segment should take about 1 hour. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat sürmeli" +msgstr "Bu bölüm yaklaşık 1 saat sürmelidir. İçeriği:" #: src/pattern-matching/match.md msgid "" @@ -5063,7 +5044,6 @@ msgid "" msgstr "" #: src/pattern-matching/match.md -#, fuzzy msgid "More To Explore" msgstr "Daha Fazlasını Keşfedin" @@ -5687,30 +5667,28 @@ msgid "/// Only log messages up to the given verbosity level.\n" msgstr "" #: src/welcome-day-2-afternoon.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 3 hours and 15 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 15 dakika sürmelidir. " +"İçeriği:" #: src/generics.md src/iterators.md src/testing.md -#, fuzzy msgid "This segment should take about 45 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 45 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:" #: src/generics.md msgid "impl Trait" msgstr "impl Trait" #: src/generics.md -#, fuzzy msgid "dyn Trait" -msgstr "Async Özellikleri (Traits)" +msgstr "dyn Trait" #: src/generics.md -#, fuzzy msgid "Exercise: Generic min" -msgstr "Alıştırma: Jenerik `min`" +msgstr "Alıştırma: Jenerik min" #: src/generics/generic-functions.md msgid "" @@ -5727,9 +5705,8 @@ msgid "\"picked a number: {:?}\"" msgstr "" #: src/generics/generic-functions.md -#, fuzzy msgid "\"picked a string: {:?}\"" -msgstr "\"matrix: {:#?}\"" +msgstr "" #: src/generics/generic-functions.md msgid "\"dog\"" @@ -6636,23 +6613,20 @@ msgstr "" #: src/std-traits.md src/concurrency/sync-exercises.md #: src/concurrency/async-exercises.md -#, fuzzy msgid "This segment should take about 1 hour and 10 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat 20 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 1 saat 10 dakika sürmelidir. İçeriği:" #: src/std-traits.md msgid "From and Into" msgstr "From ve Into" #: src/std-traits.md -#, fuzzy msgid "Read and Write" -msgstr "`Read` ve `Write`" +msgstr "Read ve Write" #: src/std-traits.md -#, fuzzy msgid "Default, struct update syntax" -msgstr "`Default`, yapı (struct) güncelleme sözdizimi" +msgstr "Varsayılan, yapı (struct) güncelleme sözdizimi" #: src/std-traits.md msgid "" @@ -7099,20 +7073,20 @@ msgid "Smart pointers: standard library pointer types." msgstr "" #: src/welcome-day-3.md src/welcome-day-4-afternoon.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 20 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 20 dakika sürmelidir. " +"İçeriği:" #: src/memory-management.md src/memory-management/clone.md msgid "Clone" msgstr "" #: src/memory-management.md -#, fuzzy msgid "Drop" -msgstr "`Drop`" +msgstr "Drop" #: src/memory-management/review.md msgid "Programs allocate memory in two ways:" @@ -7234,9 +7208,8 @@ msgid "" msgstr "" #: src/memory-management/approaches.md -#, fuzzy msgid "Typically implemented with reference counting or garbage collection." -msgstr "Çalışma zamanı veya çöp toplama özelliği yoktur." +msgstr "Genellikle referans sayımı veya çöp toplama ile uygulanır." #: src/memory-management/approaches.md msgid "Rust offers a new mix:" @@ -7803,9 +7776,8 @@ msgid "\"0.1\"" msgstr "" #: src/smart-pointers.md -#, fuzzy msgid "Box" -msgstr "`Box`" +msgstr "Box" #: src/smart-pointers.md msgid "Rc" @@ -8133,11 +8105,12 @@ msgid "\"bar\"" msgstr "" #: src/welcome-day-3-afternoon.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 1 hour and 55 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 55 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 55 dakika sürmelidir. " +"İçeriği:" #: src/borrowing/shared.md msgid "" @@ -8623,9 +8596,8 @@ msgid "" msgstr "" #: src/lifetimes/exercise.md -#, fuzzy msgid "Wire Types" -msgstr "Paylaşılan (Shared) Türler" +msgstr "" #: src/lifetimes/exercise.md msgid "" @@ -8791,9 +8763,8 @@ msgid "\"\"" msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md -#, fuzzy msgid "\"beautiful name\"" -msgstr "\"Merhaba {name}\"" +msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "\"Evan\"" @@ -8879,20 +8850,20 @@ msgid "" msgstr "" #: src/welcome-day-4.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 40 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 40 dakika sürmelidir. " +"İçeriği:" #: src/iterators.md msgid "Iterator" msgstr "Iterator" #: src/iterators.md -#, fuzzy msgid "IntoIterator" -msgstr "`IntoIterator`" +msgstr "IntoIterator" #: src/iterators.md src/iterators/fromiterator.md msgid "FromIterator" @@ -9728,14 +9699,12 @@ msgid "\" 0 0 \"" msgstr "" #: src/error-handling.md src/unsafe-rust.md -#, fuzzy msgid "This segment should take about 1 hour and 5 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat 5 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 1 saat 5 dakika sürmelidir. İçeriği:" #: src/error-handling.md -#, fuzzy msgid "Error Trait" -msgstr "`Error` Özelliği (Trait)" +msgstr "Error Özelliği (Trait)" #: src/error-handling.md msgid "thiserror" @@ -17265,11 +17234,12 @@ msgid "" msgstr "" #: src/concurrency/welcome.md src/concurrency/welcome-async.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 3 hours and 20 " "minutes. It contains:" -msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmeli" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 20 dakika sürmelidir. " +"İçeriği:" #: src/concurrency/welcome.md msgid "" @@ -17290,9 +17260,8 @@ msgstr "" #: src/concurrency/threads.md src/concurrency/shared-state.md #: src/concurrency/async.md -#, fuzzy msgid "This segment should take about 30 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:" #: src/concurrency/threads/plain.md msgid "Rust threads work similarly to threads in other languages:" @@ -17465,9 +17434,8 @@ msgid "" msgstr "" #: src/concurrency/channels.md src/concurrency/async-control-flow.md -#, fuzzy msgid "This segment should take about 20 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 40 dakika sürmeli" +msgstr "Bu bölüm yaklaşık 20 dakika sürmelidir. İçeriği:" #: src/concurrency/channels/senders-receivers.md msgid "" @@ -19338,12 +19306,10 @@ msgid "" msgstr "" #: src/glossary.md -#, fuzzy msgid "" "block: \n" "See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_." msgstr "" -"[Bloklar ve Kapsamlar](./control-flow-basics/blocks-and-scopes.md) (5 dakika)" #: src/glossary.md msgid "" @@ -20286,8 +20252,7 @@ msgstr "" #~ msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." #~ msgstr "" #~ "`String`, UTF-8 olarak kodlanmış baytların dinamik bellekten tahsis " -#~ "edildiği (heap-allocated) arabellektir (buffer), sahip olan / sahipli " -#~ "(owned) bir türdür." +#~ "edildiği (heap-allocated) sahipli (owned) bir arabellektir (buffer)" #~ msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" #~ msgstr "[İsimli Yapılar](./user-defined-types/named-structs.md) (10 dakika)" From c5fc8edf0683052d0292729299668c98b27dd81d Mon Sep 17 00:00:00 2001 From: enes1313 Date: Wed, 11 Dec 2024 13:55:03 +0300 Subject: [PATCH 04/26] day-1-afternoon is fully translated into Turkish --- po/tr.po | 426 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 354 insertions(+), 72 deletions(-) diff --git a/po/tr.po b/po/tr.po index f2f91a37c3a3..82ca53a7e17d 100644 --- a/po/tr.po +++ b/po/tr.po @@ -3959,17 +3959,15 @@ msgid "Welcome Back" msgstr "Tekrar Hoş Geldiniz" #: src/welcome-day-1-afternoon.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 35 " "minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 35 dakika sürecektir" +"10 dakikalık aralar, bu oturum yaklaşık 2 saat 35 dakika sürmelidir. İçeriği:" #: src/tuples-and-arrays.md -#, fuzzy msgid "This segment should take about 35 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 35 dakika sürmelidir" +msgstr "Bu bölüm yaklaşık 35 dakika sürmelidir. İçeriği:" #: src/tuples-and-arrays.md msgid "" @@ -3985,6 +3983,11 @@ msgid "" "different types. Slices, which have a size determined at runtime, are " "covered later." msgstr "" +"Bir `[T; N]` dizi türünün değeri , aynı `T` türdeki `N` (derleme zamanı " +"sabiti) öğelerini/elemanlarını tutar. Dizinin uzunluğunun _türünün parçası_ " +"olduğuna dikkat edin, bu da `[u8; 3]' ve '[u8; 4]` dizilerinin iki farklı " +"tür olarak kabul edildiği anlamına gelir. Dilimler (slices), ki çalışma " +"zamanında belirlenen bir boyuta sahiptir, daha sonra ele alınacaktır." #: src/tuples-and-arrays/arrays.md msgid "" @@ -3992,10 +3995,14 @@ msgid "" "runtime. Rust can usually optimize these checks away, and they can be " "avoided using unsafe Rust." msgstr "" +"Sınırların dışında bir dizi öğesine erişmeyi deneyin. Dizi erişimleri " +"çalışma zamanında (runtime) kontrol edilir. Rust genellikle bu kontrolleri " +"optimize edebilir ve emniyetsiz Rust (unsafe Rust) kullanılarak bu " +"kontrollerden kaçınılabilir." #: src/tuples-and-arrays/arrays.md msgid "We can use literals to assign values to arrays." -msgstr "" +msgstr "Dizilere değer atamak için değişmezleri (literals) kullanabiliriz." #: src/tuples-and-arrays/arrays.md msgid "" @@ -4005,50 +4012,73 @@ msgid "" "only implement the debug output. This means that we must use debug output " "here." msgstr "" +"`println!` makrosu `?` biçim (format) parametresiyle hata ayıklama " +"gerçekleştirimini/uyarlamasını (implementation) ister: `{}` varsayılan " +"çıktıyı verir, `{:?}` hata ayıklama çıktısını verir. Tamsayılar (integer) ve " +"dizeler (string) gibi türler varsayılan çıktıyı uygular (default output), " +"ancak diziler (arrays) yalnızca hata ayıklama çıktısını (debug output) " +"uygular. Bu, bahsi geçen kodda hata ayıklama çıktısını kullanmamız gerektiği " +"anlamına gelir." #: src/tuples-and-arrays/arrays.md msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." msgstr "" +"`#` eklemek, örneğin `{a:#?}`, okunması daha kolay olabilecek \"güzel " +"yazdırma (pretty printing)\" biçimini (format) çağırır." #: src/tuples-and-arrays/tuples.md msgid "Like arrays, tuples have a fixed length." -msgstr "" +msgstr "Diziler gibi, demetlerin (tuple) de sabit bir uzunluğu vardır." #: src/tuples-and-arrays/tuples.md msgid "Tuples group together values of different types into a compound type." msgstr "" +"Demetler farklı türdeki değerleri bir bileşik tür (compound type) halinde " +"gruplandırır." #: src/tuples-and-arrays/tuples.md msgid "" "Fields of a tuple can be accessed by the period and the index of the value, " "e.g. `t.0`, `t.1`." msgstr "" +"Bir demetin alanlarına (fields) nokta ve değerin indeksi ile erişilebilir, " +"örneğin `t.0`, `t.1`." #: src/tuples-and-arrays/tuples.md msgid "" "The empty tuple `()` is referred to as the \"unit type\" and signifies " "absence of a return value, akin to `void` in other languages." msgstr "" +"Boş demet `()`, \"birim türü (unit type)\" olarak anılır ve, diğer " +"dillerdeki `void`'e benzer şekilde, bir geri dönüş değerinin (return value) " +"bulunmadığını belirtir." #: src/tuples-and-arrays/iteration.md msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" +"'for' deyimi diziler üzerinde adımlamayı/dolaşmayı destekler (ancak demetler " +"(tuples) üzerinde desteklemez)." #: src/tuples-and-arrays/iteration.md msgid "" "This functionality uses the `IntoIterator` trait, but we haven't covered " "that yet." msgstr "" +"Bu fonksiyonellik `IntoIterator` özelliğini (trait) kullanıyor, ancak bunu " +"henüz ele almadık." #: src/tuples-and-arrays/iteration.md -#, fuzzy msgid "" "The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!" "` macros. These are always checked, while debug-only variants like " "`debug_assert!` compile to nothing in release builds." msgstr "" +"`assert_ne!` makrosu burada yenidir. Ayrıca `assert_eq!` ve `assert!` " +"makroları da vardır. Bunlar her zaman kontrol edilirken, `debug_assert!` " +"gibi yalnızca hata ayıklama varyantları sürüm inşasında (release build) " +"hiçbir şeye derlenmez." #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4056,16 +4086,22 @@ msgid "" "extract the inner values into local variables. This can be done manually by " "directly accessing the inner values:" msgstr "" +"Demetler (tuples) ve diğer yapılandırılmış değerlerle (structured values) " +"çalışırken, içteki değerleri yerel (local) değişkenlere çıkarmayı istemek " +"yaygındır. Bu, doğrudan iç değerlere erişilerek elle yapılabilir:" #: src/tuples-and-arrays/destructuring.md msgid "\"left: {left}, right: {right}\"" -msgstr "" +msgstr "\"sol: {left}, sağ: {right}\"" #: src/tuples-and-arrays/destructuring.md msgid "" "However, Rust also supports using pattern matching to destructure a larger " "value into its constituent parts:" msgstr "" +"Ancak, Rust daha büyük bir değeri kendisini oluşturan parçalara çözümlemek " +"(destructure) için desen eşleştirmeyi (pattern matching) kullanmayı da " +"destekliyor:" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4073,12 +4109,18 @@ msgid "" "statically verify that the value on the right of `=` has the same structure " "as the pattern." msgstr "" +"Burada kullanılan desenler \"reddedilemez (irrefutable)\"dir, yani derleyici " +"`=` sağındaki değerin desenle aynı yapıya sahip olduğunu statik olarak " +"doğrulayabilir." #: src/tuples-and-arrays/destructuring.md msgid "" "A variable name is an irrefutable pattern that always matches any value, " "hence why we can also use `let` to declare a single variable." msgstr "" +"Bir değişken adı, her zaman herhangi bir değerle eşleşen reddedilemez " +"(irrefutable) bir desendir, bu nedenle tek bir değişkeni bildirmek için " +"`let`'i kullanabiliriz." #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4086,49 +4128,61 @@ msgid "" "comparison and destructuring to happen at the same time. This form of " "pattern matching will be discussed in more detail later." msgstr "" +"Rust ayrıca koşullu ifadelerde desenlerin (patterns) kullanılmasını " +"destekleyerek eşitlik karşılaştırmasının (comparison) ve çözümlenmenin " +"(destructuring) aynı anda gerçekleşmesine olanak tanır. Bu desen eşleştirme " +"stili daha sonra daha ayrıntılı olarak tartışılacaktır." #: src/tuples-and-arrays/destructuring.md msgid "" "Edit the examples above to show the compiler error when the pattern doesn't " "match the value being matched on." msgstr "" +"Desenin (pattern) eşleştirilen değerle eşleşmediğinde oluşacak derleyici " +"hatasını göstermek için yukarıdaki örnekleri düzenleyin." #: src/tuples-and-arrays/exercise.md msgid "Arrays can contain other arrays:" -msgstr "" +msgstr "Diziler başka diziler de içerebilir:" #: src/tuples-and-arrays/exercise.md msgid "What is the type of this variable?" -msgstr "" +msgstr "Bu değişkenin türü nedir?" #: src/tuples-and-arrays/exercise.md msgid "" "Use an array such as the above to write a function `transpose` which will " "transpose a matrix (turn rows into columns):" msgstr "" +"Bir matrisin devrini yapacak (satırları sütunlara çevirecek) `transpose` " +"fonksiyonu yazmak için yukarıdaki gibi bir dizi kullanın:" #: src/tuples-and-arrays/exercise.md msgid "" "Copy the code below to and implement the " "function. This function only operates on 3x3 matrices." msgstr "" +"Aşağıdaki kodu adresine kopyalayın ve " +"fonksiyonu uygulayın (implement). Bu fonksiyon yalnızca 3x3'lük matrislerde " +"çalışır." #: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md #: src/unsafe-rust/exercise.md msgid "// TODO: remove this when you're done with your implementation.\n" msgstr "" +"// TODO: uyarlamanız (implementation) bittiğinde bu yorum satırını silin.\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "//\n" -msgstr "" +msgstr "//\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "// <-- the comment makes rustfmt add a newline\n" -msgstr "" +msgstr "// <-- bu yorum, rustfmt'nin yeni satır eklemesini sağlar\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"matrix: {:#?}\"" -msgstr "" +msgstr "\"matrix: {:#?}\"" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"transposed: {:#?}\"" @@ -4136,16 +4190,19 @@ msgstr "\"transposed: {:#?}\"" #: src/references.md src/smart-pointers.md src/borrowing.md #: src/concurrency/async-pitfalls.md -#, fuzzy msgid "This segment should take about 55 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 55 dakika sürmelidir. İçerir:" #: src/references/shared.md -#, fuzzy msgid "" "A reference provides a way to access another value without taking ownership " "of the value, and is also called \"borrowing\". Shared references are read-" "only, and the referenced data cannot change." msgstr "" +"Bir referans, değerin sahipliğini almadan başka bir değere erişmenin bir " +"yolunu sağlar ve \"ödünç alma (borrowing)\" olarak da adlandırılır. " +"Paylaşılan referanslar (shared reference) salt okunurdur (read-only) ve " +"referans edilen veriler değiştirilemez." #: src/references/shared.md msgid "" @@ -4153,10 +4210,22 @@ msgid "" "with the `&` operator. The `*` operator \"dereferences\" a reference, " "yielding its value." msgstr "" +"`T` türüne yönelik paylaşılan referansın türü `&T`'dir. `&` operatörüyle bir " +"referans değeri (reference value) oluşturulur. `*` operatörü bir referansın " +"içeriğine eriştirir (dereference) ve onun değerini verir." #: src/references/shared.md msgid "Rust will statically forbid dangling references:" msgstr "" +"Rust, boşa düşen referansları (dangling references) statik olarak " +"yasaklayacaktır:" + +#: src/references/shared.md +msgid "" +"References can never be null in Rust, so null checking is not necessary." +msgstr "" +"Rust'ta referanslar hiçbir zaman null olamaz, bu yüzden null kontrolü (null " +"checking) gerekli değildir." #: src/references/shared.md msgid "" @@ -4165,6 +4234,11 @@ msgid "" "access the value, but is still \"owned\" by the original variable. The " "course will get into more detail on ownership in day 3." msgstr "" +"Bir referansın, atıfta bulunduğu (refer) değeri \"ödünç aldığı (barrow)\" " +"söylenir ve bu, göstericilere aşina olmayan öğrenciler için iyi bir " +"modeldir: kod, değere erişmek için referansı kullanabilir, ancak değer yine " +"de orijinal değişken tarafından \"sahiplidir (owned)\". Kurs, 3. günde " +"sahiplik (ownership) konusunda daha ayrıntılı bilgi verecektir." #: src/references/shared.md msgid "" @@ -4174,12 +4248,20 @@ msgid "" "cover how Rust prevents the memory-safety bugs that come from using raw " "pointers." msgstr "" +"Referanslar göstericiler (pointers) olarak uyarlanır/uygulanır (implement) " +"ve önemli bir avantaj şudur ki, gösterdikleri şeyin boyutundan çok daha " +"küçük olabilmeleridir. C veya C++'a aşina olan öğrenciler referansları " +"göstericiler olarak tanıyacaklardır. Kursun ilerleyen bölümlerinde Rust'ın, " +"ham göstericilerin (raw pointers) kullanılmasından kaynaklanan bellek " +"emniyeti hatalarını (memory-safety bugs) nasıl önlediği ele alınacaktır." #: src/references/shared.md msgid "" "Rust does not automatically create references for you - the `&` is always " "required." msgstr "" +"Rust sizin için otomatik olarak referans oluşturmaz. `&` her zaman " +"gereklidir." #: src/references/shared.md msgid "" @@ -4187,6 +4269,9 @@ msgid "" "methods (try `r.is_ascii()`). There is no need for an `->` operator like in " "C++." msgstr "" +"Rust bazı durumlarda, özellikle de metotları çağırırken (`r.is_ascii()`'i " +"deneyin) otomatik olarak referansın içeriğine erişecektir (auto-" +"dereference). C++'daki gibi `->` operatörüne gerek yoktur." #: src/references/shared.md msgid "" @@ -4195,12 +4280,20 @@ msgid "" "different from C++, where assignment to a reference changes the referenced " "value." msgstr "" +"Bu örnekte, `r` değiştirilebilir (mutable) olduğundan ona tekrar atama " +"yapılabilir (reassigned) (`r = &b`). Bunun `r`'yi yeniden bağladığını (re-" +"bind) ve böylece başka bir şeye atıfta bulunduğunu (refer) unutmayın. Bu C++ " +"dilinden, bir referansa atamanın (assignment) referans verilenin değerini " +"değiştirmesinden, farklıdır." #: src/references/shared.md msgid "" "A shared reference does not allow modifying the value it refers to, even if " "that value was mutable. Try `*r = 'X'`." msgstr "" +"Paylaşılan bir referans (shared reference), atıfta bulunduğu (refer) değerin " +"değiştirilmesine (modify), bu değer değiştirilebilir (mutable) olsa bile, " +"izin vermez. `*r = 'X'`'i deneyin." #: src/references/shared.md msgid "" @@ -4209,16 +4302,26 @@ msgid "" "a reference to `point`, but `point` will be deallocated when the function " "returns, so this will not compile." msgstr "" +"Rust, yeterince uzun süre hayatta olmalarını sağlamak için tüm referansların " +"ömrülerini (lifetime) takip eder. Emniyetli Rust'ta boşa çıkan referanslar " +"(dangling reference) oluşamaz. `x_axis` fonksiyonu, `point`'e bir referans " +"geri döndürecekti, ancak fonksiyon geri döndüğünde `point` için tahsis " +"edilen alan geri verileceğinden (deallocation) bu kod derlenmeyecektir." #: src/references/shared.md msgid "We will talk more about borrowing when we get to ownership." msgstr "" +"Sahipliğe (ownership) geçince ödünç alma (borrowing) konusunu daha detaylı " +"konuşacağız." #: src/references/exclusive.md msgid "" "Exclusive references, also known as mutable references, allow changing the " "value they refer to. They have type `&mut T`." msgstr "" +"Değiştirilebilir referanslar (mutable reference) olarak da bilinen özel " +"(exclusive) referanslar, atıfta bulundukları (refer) değerin " +"değiştirilmesine olanak tanır. `&mut T` türüne sahiplerdir." #: src/references/exclusive.md msgid "" @@ -4228,6 +4331,11 @@ msgid "" "exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " "alive." msgstr "" +"\"Özel (exclusive)\", değere erişmek için yalnızca bu referansın " +"kullanılabileceği anlamına gelir. Aynı anda başka hiçbir referans " +"(paylaşılan veya özel olsun farketmez) mevcut olamaz ve özel referans " +"(exclusive) varken atıfta bulunan değere erişilemez. `x_coord` hayattayken " +"bir `&point.0` oluşturmayı veya `point.0`'ı değiştirmeyi deneyin." #: src/references/exclusive.md msgid "" @@ -4236,20 +4344,28 @@ msgid "" "bound to different values, while the second represents an exclusive " "reference to a mutable value." msgstr "" +"`let mut x_coord: &i32` ve `let x_coord: &mut i32` arasındaki farka dikkat " +"ettiğinizden emin olun. Birincisi, farklı değerlere bağlanabilen (bind) " +"paylaşılan bir referansı (shared reference) temsil ederken, ikincisi, " +"değiştirilebilir bir değere (mutable value) özel bir referansı (exclusive " +"reference) temsil eder (represent)." #: src/references/slices.md msgid "A slice gives you a view into a larger collection:" msgstr "" +"Bir dilim (slice) size daha büyük bir koleksiyonun içinden bir görüntü verir:" #: src/references/slices.md msgid "Slices borrow data from the sliced type." -msgstr "" +msgstr "Dilimler (slice), dilimlenmiş türden verileri ödünç alır (borrowing)." #: src/references/slices.md msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " "indexes in brackets." msgstr "" +"`a`'yı ödünç alıp (borrowing) başlangıç ​​ve bitiş indekslerini köşeli " +"parantez içinde belirterek bir dilim (slice) oluşturuyoruz." #: src/references/slices.md msgid "" @@ -4257,17 +4373,24 @@ msgid "" "starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " "identical." msgstr "" +"Dilim (slice) indeks 0'da başlıyorsa, Rust'ın aralık sözdizimi (range " +"syntax) başlangıç indeksini kullanmamaya izin verir; bu, `&a[0..a.len()]` ve " +"`&a[..a.len()]`dilimlerinin aynı olduğu anlamına gelir." #: src/references/slices.md msgid "" "The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " "identical." msgstr "" +"Aynı şey bitiş indeksi için de geçerlidir, dolayısıyla `&a[2..a.len()]` ve " +"`&a[2..]` aynıdır." #: src/references/slices.md msgid "" "To easily create a slice of the full array, we can therefore use `&a[..]`." msgstr "" +"Tüm bir dizinin dilimini (slice) kolayca oluşturmak için `&a[..]`'ı " +"kullanabiliriz." #: src/references/slices.md msgid "" @@ -4275,26 +4398,35 @@ msgid "" "(`&[i32]`) no longer mentions the array length. This allows us to perform " "computation on slices of different sizes." msgstr "" +"`s`,`i32`'lerin bir dilimine (slice) referanstır. `s` (`&[i32]`) türünün " +"artık dizi uzunluğundan bahsetmediğine dikkat edin. Bu bize farklı " +"boyutlardaki dilimler üzerinde hesaplama yapmamızı sağlar." #: src/references/slices.md msgid "" "Slices always borrow from another object. In this example, `a` has to remain " "'alive' (in scope) for at least as long as our slice." msgstr "" +"Dilimler (slice) her zaman başka bir nesneden ödünç alır (borrow). Bu " +"örnekte `a`'nın en azından dilimimiz (slice) kadar 'canlı " +"(alive)' (kapsamında) kalması gerekiyor." #: src/references/strings.md msgid "We can now understand the two string types in Rust:" -msgstr "" +msgstr "Artık Rust'taki iki dize (string) türünü anlayabiliyoruz:" #: src/references/strings.md msgid "`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`." msgstr "" +"`&str`, `&[u8]`e benzer şekilde, UTF-8 olarak kodlanmış baytların bir " +"dilimidir (slice)." #: src/references/strings.md -#, fuzzy msgid "" "`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`." msgstr "" +"`String`, `Vec`ye benzer şekildedir, UTF-8 olarak kodlanmış baytlardan " +"oluşan sahipli bir arabellektir." #: src/references/strings.md src/std-traits/read-and-write.md msgid "\"World\"" @@ -4302,7 +4434,7 @@ msgstr "\"Dünya\"" #: src/references/strings.md msgid "\"s1: {s1}\"" -msgstr "" +msgstr "\"s1: {s1}\"" #: src/references/strings.md msgid "\"Hello \"" @@ -4310,11 +4442,11 @@ msgstr "\"Merhaba \"" #: src/references/strings.md src/memory-management/move.md msgid "\"s2: {s2}\"" -msgstr "" +msgstr "\"s2: {s2}\"" #: src/references/strings.md msgid "\"s3: {s3}\"" -msgstr "" +msgstr "\"s3: {s3}\"" #: src/references/strings.md msgid "" @@ -4322,12 +4454,19 @@ msgid "" "encoded string data stored in a block of memory. String literals " "(`\"Hello\"`), are stored in the program’s binary." msgstr "" +"`&str`, bir bellek bloğunda saklanan UTF-8 olarak kodlanmış dize (string) " +"verilerine değiştirilemez (immutable) referans olan bir dize dilimi (string " +"slice) sunar. Dize değişmezleri (string literals) (`\"Hello\"`), programın " +"ikili (binary) dosyasında saklanır." #: src/references/strings.md msgid "" "Rust's `String` type is a wrapper around a vector of bytes. As with a " "`Vec`, it is owned." msgstr "" +"Rust'ın `String` türü, baytlardan oluşan bir vektörün bir sarmalayıcı " +"türüdür. Bir `Vec` gibi, bu türden veri `String` türü tarafından " +"sahiplidir (owned)." #: src/references/strings.md msgid "" @@ -4335,12 +4474,19 @@ msgid "" "literal; `String::new()` creates a new empty string, to which string data " "can be added using the `push()` and `push_str()` methods." msgstr "" +"Diğer birçok türde olduğu gibi, `String::from()` bir dize değişmezinden " +"(string literal) bir string oluşturur; `String::new()` yeni bir boş dize " +"oluşturur ve dizeye veriler `push()` ve `push_str()` metotları kullanılarak " +"eklenebilir." #: src/references/strings.md msgid "" "The `format!()` macro is a convenient way to generate an owned string from " "dynamic values. It accepts the same format specification as `println!()`." msgstr "" +"`format!()` makrosu, dinamik değerlerden sahipli bir dize oluşturmak için " +"uygun bir yoldur. Aynı biçimin `println!()` makrosundaki gibi aynı biçim " +"tanımlamasını kabul eder." #: src/references/strings.md msgid "" @@ -4349,6 +4495,12 @@ msgid "" "boundaries, the expression will panic. The `chars` iterator iterates over " "characters and is preferred over trying to get character boundaries right." msgstr "" +"`String`'den `&str` dilimlerini (slices) `&` ve isteğe bağlı olarak aralık " +"seçimi (range selection) ile ödünç alabilirsiniz (barrow). Karakter " +"sınırlarının dışını da kapsayacak bir bayt aralığı seçerseniz, ifade " +"(expression) paniğe neden olacaktır. `chars` adımlayıcısı, karakterler " +"üzerinde adımlama yapar ve karakter sınırlarını doğru bulmaya çalışmak " +"yerine tercih edilir." #: src/references/strings.md msgid "" @@ -4357,10 +4509,17 @@ msgid "" "equivalent of `std::string` from C++ (main difference: it can only contain " "UTF-8 encoded bytes and will never use a small-string optimization)." msgstr "" +"C++ programcıları için: `&str`'yi C++'daki `std::string_view` olarak " +"düşünün, ancak her zaman bellekteki geçerli bir dizeye işaret eder. Rust " +"dilindeki `String`, C++'daki `std::string`'in kabaca eşdeğeridir (ana fark: " +"yalnızca UTF-8 olarak kodlanmış baytlar içerebilir ve asla küçük dize " +"optimizasyonu / small-string optimization kullanmaz)." #: src/references/strings.md msgid "Byte strings literals allow you to create a `&[u8]` value directly:" msgstr "" +"Bayt dizelerinden değişmezler (Byte strings literals), doğrudan bir `&[u8]` " +"değeri oluşturmanıza olanak tanır:" #: src/references/strings.md msgid "" @@ -4368,6 +4527,10 @@ msgid "" "`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " "amount of `#` on either side of the quotes:" msgstr "" +"Ham (raw) dizeler, kaçış karakterlerininin devre dışı bırakıldığı bir `&str` " +"değeri oluşturmanıza olanak tanır: `r\"\\n\" == \"\\\\n\"`. Dizenin içindeki " +"çift tırnakları, dizeyi oluşturan tırnakların her iki tarafınaa eşit sayıda " +"`#` karakteri koyarak görebilirsiniz:" #: src/references/exercise.md msgid "" @@ -4375,6 +4538,9 @@ msgid "" "representing a point as `[f64;3]`. It is up to you to determine the function " "signatures." msgstr "" +"3 boyutlu geometri için, bir noktayı `[f64;3]` olarak temsil eden birkaç " +"yardımcı fonksiyon oluşturacağız. Fonksiyon imzalarını belirlemek size " +"kalmış." #: src/references/exercise.md msgid "" @@ -4384,87 +4550,100 @@ msgid "" "square\n" "// root, like `v.sqrt()`.\n" msgstr "" +"// Bir vektörün büyüklüğünü, koordinatlarının karelerini toplayarak " +"hesaplayın\n" +"// ve karekökünü alın. Karekökü hesaplamak için `sqrt()` metodunu kullanın,\n" +"// örneğin `v.sqrt()` gibi.\n" #: src/references/exercise.md msgid "" "// Normalize a vector by calculating its magnitude and dividing all of its\n" "// coordinates by that magnitude.\n" msgstr "" +"// Bir vektörü, büyüklüğünü hesaplayarak ve tüm koordinatlarını bu " +"büyüklüğe\n" +"// bölererek normalize edin.\n" #: src/references/exercise.md msgid "// Use the following `main` to test your work.\n" msgstr "" +"// Çalışmanızı test etmek için aşağıdaki `main` fonksiyonunu kullanın.\n" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of a unit vector: {}\"" -msgstr "" +msgstr "\"Birim vektörünün büyüklüğü: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?}: {}\"" -msgstr "" +msgstr "\"{v:?} vektörünün büyüklüğü: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?} after normalization: {}\"" -msgstr "" +msgstr "\"Normalize edildikten sonra {v:?} vektörünün büyüklüğü: {}\"" #: src/references/solution.md msgid "/// Calculate the magnitude of the given vector.\n" -msgstr "" +msgstr "/// Verilen vektörün büyüklüğünü hesaplayın.\n" #: src/references/solution.md msgid "" "/// Change the magnitude of the vector to 1.0 without changing its " "direction.\n" -msgstr "" +msgstr "/// Vektörün büyüklüğünü, yönünü değiştirmeden 1.0'a değiştirin.\n" #: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md -#, fuzzy msgid "This segment should take about 50 minutes. It contains:" -msgstr "" +msgstr "Bu bölüm yaklaşık 50 dakika sürmelidir. İçeriği:" #: src/user-defined-types/named-structs.md msgid "Like C and C++, Rust has support for custom structs:" msgstr "" +"C ve C++ dillerindeki gibi Rust'ın da özel (kullanıcı tanımlı) yapılara " +"desteği vardır:" #: src/user-defined-types/named-structs.md msgid "\"{} is {} years old\"" -msgstr "" +msgstr "\"{} {} yaşında\"" #: src/user-defined-types/named-structs.md #: src/android/interoperability/with-c/bindgen.md msgid "\"Peter\"" -msgstr "" +msgstr "\"Peter\"" #: src/user-defined-types/named-structs.md msgid "\"Avery\"" -msgstr "" +msgstr "\"Avery\"" #: src/user-defined-types/named-structs.md msgid "\"Jackie\"" -msgstr "" +msgstr "\"Jackie\"" #: src/user-defined-types/named-structs.md src/user-defined-types/enums.md #: src/pattern-matching/match.md src/methods-and-traits/methods.md msgid "Key Points:" -msgstr "" +msgstr "Önemli Noktalar:" #: src/user-defined-types/named-structs.md msgid "Structs work like in C or C++." -msgstr "" +msgstr "Yapılar C veya C++'daki gibi çalışır." #: src/user-defined-types/named-structs.md msgid "Like in C++, and unlike in C, no typedef is needed to define a type." msgstr "" +"C++'daki gibi ve C'den farklı olarak, bir türü tanımlamak için typedef'e " +"gerek yoktur." #: src/user-defined-types/named-structs.md msgid "Unlike in C++, there is no inheritance between structs." -msgstr "" +msgstr "C++'dan farklı olarak yapılar arasında kalıtım (inheritance) yoktur." #: src/user-defined-types/named-structs.md msgid "" "This may be a good time to let people know there are different types of " "structs." msgstr "" +"Bu, insanlara farklı yapı türleri olduğunu duyurmak için iyi bir zaman " +"olabilir." #: src/user-defined-types/named-structs.md msgid "" @@ -4472,18 +4651,25 @@ msgid "" "trait on some type but don’t have any data that you want to store in the " "value itself." msgstr "" +"Sıfır boyutlu (zero-sized) yapılar (örn. `struct Foo;'), bir özelliği " +"(trait) bazı türlere uygularken kullanılabilir, ancak değerin kendisinde " +"saklamak istediğiniz herhangi bir veri yoktur." #: src/user-defined-types/named-structs.md msgid "" "The next slide will introduce Tuple structs, used when the field names are " "not important." msgstr "" +"Sonraki slaytta alan adları (field names) önemli olmadığında kullanılan " +"Demet (Tupe) yapıları tanıtılacaktır." #: src/user-defined-types/named-structs.md msgid "" "If you already have variables with the right names, then you can create the " "struct using a shorthand." msgstr "" +"Eğer zaten doğru adlara sahip değişkenleriniz varsa, o zaman yapıyı bir " +"kısaltma kullanarak oluşturabilirsiniz." #: src/user-defined-types/named-structs.md msgid "" @@ -4491,99 +4677,123 @@ msgid "" "old struct without having to explicitly type it all out. It must always be " "the last element." msgstr "" +"`..avery` sözdizimi, eski yapıdaki alanların çoğunu, hepsini açıkça " +"yazmamıza gerek kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe " +"olmalıdır." #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" msgstr "" +"Alan adları (field names) önemsizse demet (tuple) yapısını kullanabilirsiniz:" #: src/user-defined-types/tuple-structs.md msgid "\"({}, {})\"" -msgstr "" +msgstr "\"({}, {})\"" #: src/user-defined-types/tuple-structs.md msgid "This is often used for single-field wrappers (called newtypes):" msgstr "" +"Bu genellikle tek alanlı sarmalayıcılar (single-field wrappers - newtype " +"deseni olarak adlandırılır) için kullanılır:" #: src/user-defined-types/tuple-structs.md msgid "\"Ask a rocket scientist at NASA\"" -msgstr "" +msgstr "\"NASA'daki bir roket bilim adamına sorun\"" #: src/user-defined-types/tuple-structs.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/bare-metal/microcontrollers/type-state.md #: src/concurrency/async-pitfalls/cancellation.md msgid "// ...\n" -msgstr "" +msgstr "// ...\n" #: src/user-defined-types/tuple-structs.md msgid "" "Newtypes are a great way to encode additional information about the value in " "a primitive type, for example:" msgstr "" +"Yeni tür (newtype) deseni, ilkel (primitive) bir türdeki değer hakkındaki ek " +"bilgileri kodlamanın harika bir yoludur, örneğin:" #: src/user-defined-types/tuple-structs.md msgid "The number is measured in some units: `Newtons` in the example above." -msgstr "" +msgstr "Sayı bazı birimlerde ölçülür: Yukarıdaki örnekte `Newtons`." #: src/user-defined-types/tuple-structs.md msgid "" "The value passed some validation when it was created, so you no longer have " "to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`." msgstr "" +"Değer, oluşturulduğunda bir miktar doğrulamadan geçti, bu nedenle artık onu " +"her kullanımda yeniden doğrulamanız gerekmiyor: `PhoneNumber(String)` veya " +"`OddNumber(u32)`." #: src/user-defined-types/tuple-structs.md msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " "single field in the newtype." msgstr "" +"Yeni türde desenindeki tek alana erişerek bir `Newtons` türüne `f64` " +"değerinin nasıl ekleneceğini gösterin." #: src/user-defined-types/tuple-structs.md msgid "" "Rust generally doesn’t like inexplicit things, like automatic unwrapping or " "for instance using booleans as integers." msgstr "" +"Rust genellikle bir nesnenin değerinin otomatik çözülmesini (automatic " +"unwrapping) veya boole değerlerini tamsayı olarak kullanmak gibi açık " +"olmayan şeylerden hoşlanmaz." #: src/user-defined-types/tuple-structs.md msgid "Operator overloading is discussed on Day 3 (generics)." -msgstr "" +msgstr "Operatör yüklemesi 3. günde (jenerikler) tartışıldı." #: src/user-defined-types/tuple-structs.md msgid "" "The example is a subtle reference to the [Mars Climate Orbiter](https://en." "wikipedia.org/wiki/Mars_Climate_Orbiter) failure." msgstr "" +"Örnek, [Mars İklim Yörünge Aracı](https://en.wikipedia.org/wiki/" +"Mars_Climate_Orbiter) hatasına incelikli bir göndermedir." #: src/user-defined-types/enums.md msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" msgstr "" +"'enum' anahtar sözcüğü birkaç farklı varyanta sahip bir türün yaratılmasına " +"olanak sağlar:" #: src/user-defined-types/enums.md msgid "// Simple variant\n" -msgstr "" +msgstr "// Basit (simple) varyant\n" #: src/user-defined-types/enums.md msgid "// Tuple variant\n" -msgstr "" +msgstr "// Demet (Tuple) varyantı\n" #: src/user-defined-types/enums.md msgid "// Struct variant\n" -msgstr "" +msgstr "// Yapı (Struct) varyantı\n" #: src/user-defined-types/enums.md -#, fuzzy msgid "\"On this turn: {player_move:?}\"" +msgstr "\"Sıradaki hamle: {player_move:?}\"" #: src/user-defined-types/enums.md msgid "Enumerations allow you to collect a set of values under one type." msgstr "" +"Numaralandırmalar, bir dizi değeri tek bir tür altında toplamanıza olanak " +"tanır." #: src/user-defined-types/enums.md msgid "" "`Direction` is a type with variants. There are two values of `Direction`: " "`Direction::Left` and `Direction::Right`." msgstr "" +"`Direction`, varyantları olan bir türdür. `Direction`'ın iki değeri vardır: " +"`Direction::Left` ve `Direction::Right`." #: src/user-defined-types/enums.md msgid "" @@ -4591,16 +4801,24 @@ msgid "" "Rust will store a discriminant so that it knows at runtime which variant is " "in a `PlayerMove` value." msgstr "" +"`PlayerMove` üç varyantı olan bir türdür. Rust, varyant değerlerine (variant " +"payloads) ek olarak, çalışma zamanında hangi varyantın `PlayerMove` " +"değerinde olduğunu bilmesi için bir ayırıcı (discriminant) da depolayacaktır." #: src/user-defined-types/enums.md msgid "This might be a good time to compare structs and enums:" msgstr "" +"Bu, yapıları ve numaralandırmaları karşılaştırmak için iyi bir zaman " +"olabilir:" #: src/user-defined-types/enums.md msgid "" "In both, you can have a simple version without fields (unit struct) or one " "with different types of fields (variant payloads)." msgstr "" +"Her ikisinde de, alanları olmayan basit bir versiyona (birim yapı) veya " +"farklı alan türlerine sahip bir versiyona (varyant yükleri) sahip " +"olabilirsiniz." #: src/user-defined-types/enums.md msgid "" @@ -4608,14 +4826,17 @@ msgid "" "structs but then they wouldn’t be the same type as they would if they were " "all defined in an enum." msgstr "" +"Bir enum'ın farklı varyantlarını ayrı yapılarla bile uygulayabilirsiniz " +"ancak o zaman da hepsi bir enum'da tanımlanmış olduğunda olacağı gibi aynı " +"türde olmazlardı." #: src/user-defined-types/enums.md msgid "Rust uses minimal space to store the discriminant." -msgstr "" +msgstr "Rust, ayırıcıyı (discriminant) depolamak için minimum alan kullanır." #: src/user-defined-types/enums.md msgid "If necessary, it stores an integer of the smallest required size" -msgstr "" +msgstr "Gerekirse, gereken en küçük boyuttaki bir tam sayıyı depolar" #: src/user-defined-types/enums.md msgid "" @@ -4624,30 +4845,37 @@ msgid "" "optimization\"). For example, `Option<&u8>` stores either a pointer to an " "integer or `NULL` for the `None` variant." msgstr "" +"İzin verilen varyant değerleri tüm bit desenlerini kapsamıyorsa, ayırıcıyı " +"kodlamak için geçersiz bit desenleri kullanır (\"niş/oyuk/niche " +"optimizasyonu\"). Örneğin, `Option<&u8>`, `None` varyantı için bir tamsayıya " +"gösterici veya `NULL` depolar." #: src/user-defined-types/enums.md msgid "" "You can control the discriminant if needed (e.g., for compatibility with C):" msgstr "" +"Gerekirse ayırıcıyı kontrol edebilirsiniz (örneğin, C ile uyumluluk için):" #: src/user-defined-types/enums.md msgid "" "Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " "bytes." -msgstr "" +msgstr "`repr` olmadan, ayırıcı tür 2 baytlık olur, çünkü 10001 2 bayta sığar." #: src/user-defined-types/enums.md src/user-defined-types/static.md #: src/memory-management/review.md src/memory-management/move.md #: src/memory-management/copy-types.md src/borrowing/shared.md #: src/error-handling/result.md src/error-handling/anyhow.md msgid "More to Explore" -msgstr "" +msgstr "Daha Fazlasını Keşfedin" #: src/user-defined-types/enums.md msgid "" "Rust has several optimizations it can employ to make enums take up less " "space." msgstr "" +"Rust, enum'ların daha az yer kaplamasını sağlamak için kullanabileceği " +"çeşitli optimizasyonlara sahiptir." #: src/user-defined-types/enums.md msgid "" @@ -4655,6 +4883,9 @@ msgid "" "option/#representation), Rust guarantees that `size_of::()` equals " "`size_of::>()`." msgstr "" +"Null gösterici optimizasyonu: [Bazı türler](https://doc.rust-lang.org/std/" +"option/#representation) için, Rust `size_of::()`'nin `size_of::" +">()`'ye eşit olduğunu garanti eder." #: src/user-defined-types/enums.md msgid "" @@ -4662,6 +4893,10 @@ msgid "" "like in practice. It's important to note that the compiler provides no " "guarantees regarding this representation, therefore this is totally unsafe." msgstr "" +"Bitsel gösterimin pratikte nasıl _görünebileceğini_ göstermek istiyorsanız " +"örnek kod aşağıdadır. Derleyicinin bu gösterimle (representation) ilgili " +"hiçbir garanti sağlamadığını, dolayısıyla bunun tamamen emniyetsiz olduğunu " +"belirtmek önemlidir." #: src/user-defined-types/const.md msgid "`const`" @@ -4672,34 +4907,52 @@ msgid "" "Constants are evaluated at compile time and their values are inlined " "wherever they are used:" msgstr "" +"Sabitler (constants) derleme zamanında (compile-time) değerlendirilir ve " +"değerleri kullanıldıkları her yerde satır içi (inline) olarak belirtilir:" + #: src/user-defined-types/const.md msgid "" "According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" "vs-static.html) these are inlined upon use." msgstr "" +"[Rust RFC Book'a](https://rust-lang.github.io/rfcs/0246-const-vs-static." +"html) göre bunlar kullanım sırasında satır içidir (inline)." + #: src/user-defined-types/const.md msgid "" "Only functions marked `const` can be called at compile time to generate " "`const` values. `const` functions can however be called at runtime." msgstr "" +"Sadece `const` olarak işaretlenen fonksiyonlar derleme zamanında çağrılarak " +"`const` değerler üretilebilir. Ancak `const` fonksiyonlar çalışma zamanında " +"da çağrılabilir." + #: src/user-defined-types/const.md msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" msgstr "" +"`const`'un C++'ın `constexpr`'ına anlamsal olarak benzer davrandığını " +"belirtin" + #: src/user-defined-types/const.md msgid "" "It isn't super common that one would need a runtime evaluated constant, but " "it is helpful and safer than using a static." msgstr "" +"Çalışma zamanında değerlendirilen (evaluate) bir sabite (constant) ihtiyaç " +"duyulması çok yaygın bir durum değildir, ancak statik kullanmaktan daha " +"yararlı ve daha emniyetlidir." #: src/user-defined-types/static.md msgid "`static`" -msgstr "" +msgstr "`static`" #: src/user-defined-types/static.md msgid "" "Static variables will live during the whole execution of the program, and " "therefore will not move:" msgstr "" +"Statik değişkenler programın tüm yürütmesi (execution) boyunca yaşayacak ve " +"bu nedenle taşınmayacaklar:" #: src/user-defined-types/static.md msgid "\"Welcome to RustOS 3.14\"" @@ -4707,7 +4960,7 @@ msgstr "\"RustOS 3.14'e Hoş Geldiniz\"" #: src/user-defined-types/static.md msgid "\"{BANNER}\"" -msgstr "" +msgstr "\"{BANNER}\"" #: src/user-defined-types/static.md msgid "" @@ -4718,16 +4971,24 @@ msgid "" "globally-scoped value does not have a reason to need object identity, " "`const` is generally preferred." msgstr "" +"[Rust RFC Kitabında](https://rust-lang.github.io/rfcs/0246-const-vs-static." +"html) belirtildiği gibi, statik kullanımı satır içi (inline) özelliği vermez " +"ve gerçek bir ilişkili bellek konumuna sahiptir. Bu, emniyetsiz ve gömülü " +"kod için yararlıdır ve değişken, program yürütmesinin tamamı boyunca yaşar. " +"Global kapsamlı (globally-scoped) bir değerin nesne kimliğine ihtiyaç " +"duyması için bir nedeni olmadığında, genellikle `const` tercih edilir." #: src/user-defined-types/static.md msgid "`static` is similar to mutable global variables in C++." -msgstr "" +msgstr "`statik`, C++'daki değişebilir olan global değişkenlere benzer." #: src/user-defined-types/static.md msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." msgstr "" +"`static`, `Mutex` gibi iç değişebilirliğe sahip türlerin gerektirdiği " +"şekilde bellekteki bir adres ve durumu nesneye kimlik olarak sağlar." #: src/user-defined-types/static.md msgid "" @@ -4735,20 +4996,29 @@ msgid "" "`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html), atomic or similar." msgstr "" +"Çünkü `static` değişkenlere herhangi bir iş parçacığından " +"erişilebildiğinden, bunların `Sync` olması gerekir. İç değişebilirlik " +"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), atomik veya " +"benzer yöntemlerle mümkündür." #: src/user-defined-types/static.md msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" +"İş parçacığı için yerel (thread-local) veriler `std::thread_local` makrosu " +"ile oluşturulabilir." #: src/user-defined-types/aliases.md msgid "" "A type alias creates a name for another type. The two types can be used " "interchangeably." msgstr "" +"Bir tür eş ismi, başka bir tür için bir isim oluşturur. Her iki tür de " +"birbirinin yerine kullanılabilir." #: src/user-defined-types/aliases.md msgid "// Aliases are more useful with long, complex types:\n" msgstr "" +"// Eş isimler (aliases) uzun ve karmaşık türlerde daha kullanışlıdır:\n" #: src/user-defined-types/aliases.md msgid "" @@ -4756,6 +5026,9 @@ msgid "" "creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " "InventoryCount = usize`." msgstr "" +"[Bir yeni tür deseni (newtype)](tuple-structs.html) genellikle farklı bir " +"tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` " +"yerine `struct InventoryCount(usize)`'ı tercih edin." #: src/user-defined-types/aliases.md msgid "C programmers will recognize this as similar to a `typedef`." @@ -4768,6 +5041,10 @@ msgid "" "various events. Use `#[derive(Debug)]` to allow the types to be formatted " "with `{:?}`." msgstr "" +"Bir asansör kontrol sistemindeki bir olayı temsil etmek için bir veri yapısı " +"oluşturacağız. Çeşitli olayları yapılandırmak için türleri ve fonksiyonları " +"tanımlamak size kalmış. Türlerin `{:?}` ile biçimlendirilmesine izin vermek " +"için `#[derive(Debug)]` kullanın." #: src/user-defined-types/exercise.md msgid "" @@ -4775,97 +5052,102 @@ msgid "" "`main` runs without errors. The next part of the course will cover getting " "data out of these structures." msgstr "" +"Bu alıştırma yalnızca, `main`'in hatasız çalışması için veri yapıları " +"oluşturmayı ve doldurmayı gerektirir. Kursun bir sonraki kısmı bu yapılardan " +"veri almayı kapsayacaktır." #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// An event in the elevator system that the controller must react to.\n" -msgstr "" +msgstr "/// Asansör sisteminde kontrolörün tepki vermesi gereken bir olay.\n" #: src/user-defined-types/exercise.md msgid "// TODO: add required variants\n" -msgstr "" +msgstr "// TODO: gerekli değişkeleri (variant) ekle\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A direction of travel.\n" msgstr "" +"/// Bir seyahat yönü.\n" +"\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car has arrived on the given floor.\n" -msgstr "" +msgstr "/// Araba verilen kata ulaşmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have opened.\n" -msgstr "" +msgstr "/// Araba kapıları açılmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have closed.\n" -msgstr "" +msgstr "/// Araba kapıları kapanmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// A directional button was pressed in an elevator lobby on the given " "floor.\n" -msgstr "" +msgstr "/// Verilen kattaki asansör lobisinde yön düğmesine basıldı.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A floor button was pressed in the elevator car.\n" -msgstr "" +msgstr "/// Asansör kabininde bir kat düğmesine basıldı.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A ground floor passenger has pressed the up button: {:?}\"" -msgstr "" +msgstr "\"Zemin kattaki bir yolcu yukarı düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the ground floor: {:?}\"" -msgstr "" +msgstr "\"Araba zemin kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door opened: {:?}\"" -msgstr "" +msgstr "\"Araba kapısı açıldı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A passenger has pressed the 3rd floor button: {:?}\"" -msgstr "" +msgstr "\"Bir yolcu 3. katın düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door closed: {:?}\"" -msgstr "" +msgstr "\"Araba kapısı kapandı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the 3rd floor: {:?}\"" -msgstr "" +msgstr "\"Araba 3. kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/solution.md msgid "/// A button was pressed.\n" -msgstr "" +msgstr "/// Bir düğmeye basıldı.\n" #: src/user-defined-types/solution.md msgid "/// The car has arrived at the given floor.\n" -msgstr "" +msgstr "/// Araba verilen kata ulaşmış durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have opened.\n" -msgstr "" +msgstr "/// Arabanın kapıları açık durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have closed.\n" -msgstr "" +msgstr "/// Arabanın kapıları kapalı durumda.\n" #: src/user-defined-types/solution.md msgid "/// A floor is represented as an integer.\n" -msgstr "" +msgstr "/// Bir kat tamsayı olarak temsil edilir.\n" #: src/user-defined-types/solution.md msgid "/// A user-accessible button.\n" -msgstr "" +msgstr "/// Kullanıcının erişebileceği bir düğme.\n" #: src/user-defined-types/solution.md msgid "/// A button in the elevator lobby on the given floor.\n" -msgstr "" +msgstr "/// Verilem katta asansör lobisinde bulunan bir düğme.\n" #: src/user-defined-types/solution.md msgid "/// A floor button within the car.\n" -msgstr "" +msgstr "/// Arabanın içindeki bir kat düğmesi.\n" #: src/welcome-day-2.md msgid "Welcome to Day 2" From d083abc13d3f12914fd51f3c00ce8f77dd41cc77 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Wed, 11 Dec 2024 16:38:42 +0300 Subject: [PATCH 05/26] a few bug and translation fixes --- po/tr.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/po/tr.po b/po/tr.po index 82ca53a7e17d..1f039406b49a 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1388,7 +1388,6 @@ msgstr "" "(running-the-course/translations.md) sayfasını kontrol edin." #: src/index.md -#, fuzzy msgid "The course is also available [as a PDF](comprehensive-rust.pdf)." msgstr "Kurs ayrıca [PDF olarak](comprehensive-rust.pdf) da mevcuttur." @@ -1462,10 +1461,10 @@ msgid "" "threads and mutexes) and async/await concurrency (cooperative multitasking " "using futures)." msgstr "" -"[Eşzamanlılık](concurrency.md): Rust'ta eşzamanlılık üzerine tam günlük bir " -"ders. Hem klasik eşzamanlılığı (iş parçacıkları ve muteksleri kullanarak " -"kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını (future " -"özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz." +"[Eşzamanlılık](concurrency/welcome.md): Rust'ta eşzamanlılık üzerine tam " +"günlük bir ders. Hem klasik eşzamanlılığı (iş parçacıkları ve muteksleri " +"kullanarak kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını " +"(future özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz." #: src/index.md msgid "Non-Goals" @@ -1910,8 +1909,9 @@ msgid "" "The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day " "class on classical as well as `async`/`await` concurrency." msgstr "" -"[Rust'ta Eşzamanlılık](../concurrency.md) ayrıntılı incelemesi, klasik ve " -"aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir derstir." +"[Rust'ta Eşzamanlılık](../concurrency/welcome.md) ayrıntılı incelemesi, " +"klasik ve aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir " +"derstir." #: src/running-the-course/course-structure.md msgid "" @@ -2933,7 +2933,7 @@ msgstr "Sıfır maliyetli soyutlamalar." #: src/hello-world/benefits.md msgid "Great compiler errors." -msgstr "Mükemmel derleyici hatala mesajları." +msgstr "Mükemmel derleyici hata mesajları." #: src/hello-world/benefits.md msgid "Built-in dependency manager." @@ -3192,7 +3192,7 @@ msgid "" "each type." msgstr "" "Burada bazı temel yerleşik türler ve her türün değişmez değerlerinin " -"sözdizimi (syntax) verilmiştir." +"(literal values) sözdizimi (syntax) verilmiştir." #: src/types-and-values/values.md src/unsafe-rust/exercise.md msgid "Types" From 89397e938d1dec019af3f0f5e843ffc5085f8866 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Wed, 11 Dec 2024 21:44:06 +0300 Subject: [PATCH 06/26] a forgotten text translated --- po/tr.po | 2 ++ 1 file changed, 2 insertions(+) diff --git a/po/tr.po b/po/tr.po index 1f039406b49a..4277fa52ea51 100644 --- a/po/tr.po +++ b/po/tr.po @@ -3974,6 +3974,8 @@ msgid "" "We have seen how primitive types work in Rust. Now it's time for you to " "start building new composite types." msgstr "" +"Rust'ta (primitive) ilkel türlerin nasıl çalıştığını gördük. Şimdi yeni " +"bileşik (composite) türler oluşturmaya başlamanın zamanı geldi." #: src/tuples-and-arrays/arrays.md msgid "" From d44b48f9fe6ce58746d017ce78a9fbf346fafff6 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Wed, 11 Dec 2024 22:00:42 +0300 Subject: [PATCH 07/26] some translators' account links have been edited --- po/tr.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/tr.po b/po/tr.po index 4277fa52ea51..c4a031b4cb90 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2052,9 +2052,9 @@ msgid "" "and [@kantasv](https://github.com/kantasv)." msgstr "" "[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " -"[@CoinEZ-JPN](https://github.com/CoinEZ), [@momotaro1105](https://github) ." -"com/momotaro1105), [@HidenoriKobayashi](https://github.com/" -"HidenoriKobayashi) ve [@kantasv](https://github.com/kantasv)." +"[@CoinEZ-JPN](https://github.com/CoinEZ), [@momotaro1105](https://github.com/" +"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) ve " +"[@kantasv](https://github.com/kantasv)." #: src/running-the-course/translations.md msgid "" @@ -2064,7 +2064,7 @@ msgid "" "com/namhyung)." msgstr "" "[Korece](https://google.github.io/comprehensive-rust/ko/) yazanlar: " -"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com) /" +"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com/" "jiyongp), [@jooyunghan](https://github.com/jooyunghan) ve [@namhyung]" "(https://github.com/namhyung)." @@ -2141,8 +2141,8 @@ msgid "" "[@AdrienBaudemont](https://github.com/AdrienBaudemont)." msgstr "" "[Fransızca](https://google.github.io/comprehensive-rust/fr/) yazanlar: " -"[@KookaS](https://github.com/KookaS), [@vcaen](https://github.com) /vcaen) " -"ve [@AdrienBaudemont](https://github.com/AdrienBaudemont)." +"[@KookaS](https://github.com/KookaS), [@vcaen](https://github.com/vcaen) ve " +"[@AdrienBaudemont](https://github.com/AdrienBaudemont)." #: src/running-the-course/translations.md msgid "" @@ -2150,7 +2150,7 @@ msgid "" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." msgstr "" "[Almanca](https://google.github.io/comprehensive-rust/de/) yazanlar: " -"[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com) /" +"[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com/" "ronaldfw)." #: src/running-the-course/translations.md From 175eaa756e68500af2a7d95a5a22b3b3346e209a Mon Sep 17 00:00:00 2001 From: enes1313 Date: Fri, 4 Jul 2025 22:53:50 +0300 Subject: [PATCH 08/26] updated the tr.po file after merging --- po/tr.po | 4570 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 2993 insertions(+), 1577 deletions(-) diff --git a/po/tr.po b/po/tr.po index c4a031b4cb90..0544fb0a9a73 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2024-12-10T14:46:21+03:00\n" +"POT-Creation-Date: 2025-07-04T11:43:49+03:00\n" "PO-Revision-Date: 2024-12-11 13:44+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" @@ -105,7 +105,7 @@ msgstr "Alıştırma: Fibonacci" #: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md #: src/references/solution.md src/user-defined-types/solution.md #: src/pattern-matching/solution.md src/methods-and-traits/solution.md -#: src/generics/solution.md src/std-types/solution.md +#: src/generics/solution.md src/std-types/solution.md src/closures/solution.md #: src/std-traits/solution.md src/memory-management/solution.md #: src/smart-pointers/solution.md src/borrowing/solution.md #: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md @@ -119,10 +119,20 @@ msgstr "Çözüm" msgid "Control Flow Basics" msgstr "Kontrol Akışı Temelleri" +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/blocks-and-scopes.md +msgid "Blocks and Scopes" +msgstr "Bloklar ve Kapsamlar" + #: src/SUMMARY.md msgid "`if` Expressions" msgstr "`if` İfadeleri" +#: src/SUMMARY.md src/control-flow-basics/match.md +#, fuzzy +msgid "`match` Expressions" +msgstr "`match` ifadeleri" + #: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md msgid "Loops" msgstr "Döngüler" @@ -143,15 +153,6 @@ msgstr "`break` ve `continue`" msgid "Labels" msgstr "Etiketler" -#: src/SUMMARY.md src/control-flow-basics.md -#: src/control-flow-basics/blocks-and-scopes.md -msgid "Blocks and Scopes" -msgstr "Bloklar ve Kapsamlar" - -#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "Scopes and Shadowing" -msgstr "Kapsamlar (Scopes) ve Gölgeleme (Shadowing)" - #: src/SUMMARY.md src/control-flow-basics.md #: src/control-flow-basics/functions.md msgid "Functions" @@ -217,6 +218,11 @@ msgstr "Dilimler (Slices)" msgid "Strings" msgstr "Dizeler (Strings)" +#: src/SUMMARY.md src/references.md src/references/dangling.md +#, fuzzy +msgid "Reference Validity" +msgstr "Referanslar" + #: src/SUMMARY.md src/references.md src/references/exercise.md msgid "Exercise: Geometry" msgstr "Alıştırma: Geometri" @@ -241,7 +247,11 @@ msgstr "Demet Yapıları (Tuple Structs)" msgid "Enums" msgstr "Enumlar" -#: src/SUMMARY.md +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md +msgid "Type Aliases" +msgstr "Tür Eş İsimleri (Type Aliases)" + +#: src/SUMMARY.md src/user-defined-types.md msgid "Const" msgstr "Const" @@ -249,10 +259,6 @@ msgstr "Const" msgid "Static" msgstr "Static" -#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md -msgid "Type Aliases" -msgstr "Tür Eş İsimleri (Type Aliases)" - #: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md msgid "Exercise: Elevator Events" msgstr "Alıştırma: Asansör Olayları" @@ -266,6 +272,10 @@ msgstr "Gün 2: Sabah" msgid "Pattern Matching" msgstr "Desen Eşleştirme" +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/infallible.md +msgid "Irrefutable Patterns" +msgstr "" + #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md msgid "Matching Values" msgstr "Değerleri Eşleştirmek" @@ -283,6 +293,21 @@ msgstr "Enum'ların (Struct) Çözümlenmesi" msgid "Let Control Flow" msgstr "Let'li Kontrol Akışı" +#: src/SUMMARY.md src/pattern-matching/let-control-flow/if-let.md +#, fuzzy +msgid "`if let` Expressions" +msgstr "`if let` ifadeleri" + +#: src/SUMMARY.md src/pattern-matching/let-control-flow/while-let.md +#, fuzzy +msgid "`while let` Statements" +msgstr "`while let` ifadeleri" + +#: src/SUMMARY.md +#, fuzzy +msgid "`let else`" +msgstr "`let else` ifadeleri" + #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" msgstr "Alıştırma: İfade Değerlendirmesi" @@ -320,12 +345,8 @@ msgstr "Türetme" msgid "Exercise: Generic Logger" msgstr "Alıştırma: Genel Kaydedici" -#: src/SUMMARY.md -msgid "Day 2: Afternoon" -msgstr "Gün 2: Öğleden Sonra" - #: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-2-afternoon.md src/generics.md +#: src/welcome-day-2.md src/generics.md msgid "Generics" msgstr "Jenerikler" @@ -333,6 +354,10 @@ msgstr "Jenerikler" msgid "Generic Functions" msgstr "Jenerik Fonksiyonlar" +#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md +msgid "Trait Bounds" +msgstr "Özellik (Trait) Sınırları" + #: src/SUMMARY.md src/generics.md src/generics/generic-data.md msgid "Generic Data Types" msgstr "Jenerik Veri Türleri" @@ -341,10 +366,6 @@ msgstr "Jenerik Veri Türleri" msgid "Generic Traits" msgstr "Jenerik Özellikler (Traits)" -#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md -msgid "Trait Bounds" -msgstr "Özellik (Trait) Sınırları" - #: src/SUMMARY.md src/generics/impl-trait.md msgid "`impl Trait`" msgstr "`impl Trait`" @@ -357,6 +378,10 @@ msgstr "`dyn Trait`" msgid "Exercise: Generic `min`" msgstr "Alıştırma: Jenerik `min`" +#: src/SUMMARY.md +msgid "Day 2: Afternoon" +msgstr "Gün 2: Öğleden Sonra" + #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-types.md msgid "Standard Library Types" @@ -395,6 +420,31 @@ msgstr "`HashMap`" msgid "Exercise: Counter" msgstr "Alıştırma: Sayıcı" +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/closures.md +msgid "Closures" +msgstr "Çevreleyiciler (Closures)" + +#: src/SUMMARY.md src/closures.md src/closures/syntax.md +#, fuzzy +msgid "Closure Syntax" +msgstr "Çevreleyiciler (Closures)" + +#: src/SUMMARY.md src/closures.md src/closures/capturing.md +#, fuzzy +msgid "Capturing" +msgstr "String" + +#: src/SUMMARY.md src/closures.md +#, fuzzy +msgid "Closure Traits" +msgstr "Daha Fazla Özellik (Trait)" + +#: src/SUMMARY.md src/closures.md src/closures/exercise.md +#, fuzzy +msgid "Exercise: Log Filter" +msgstr "Alıştırma: Kaydedici Özellik" + #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-traits.md msgid "Standard Library Traits" @@ -425,10 +475,6 @@ msgstr "`Read` ve `Write`" msgid "`Default`, struct update syntax" msgstr "`Default`, yapı (struct) güncelleme sözdizimi" -#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md -msgid "Closures" -msgstr "Çevreleyiciler (Closures)" - #: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md msgid "Exercise: ROT13" msgstr "Alıştırma: ROT13" @@ -521,6 +567,14 @@ msgstr "Ödünç Alma Hataları" msgid "Interior Mutability" msgstr "İç Değişebilirlik (Interior Mutability)" +#: src/SUMMARY.md src/borrowing/interior-mutability/cell.md +msgid "`Cell`" +msgstr "" + +#: src/SUMMARY.md src/borrowing/interior-mutability/refcell.md +msgid "`RefCell`" +msgstr "`RefCell`" + #: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md msgid "Exercise: Health Statistics" msgstr "Alıştırma: Sağlık İstatistikleri" @@ -538,9 +592,9 @@ msgstr "Ömür için Ek Açıklamalar (Annotations)" msgid "Lifetime Elision" msgstr "Ömür Atlaması (Elision)" -#: src/SUMMARY.md src/lifetimes.md -msgid "Struct Lifetimes" -msgstr "Yapıların Ömürleri" +#: src/SUMMARY.md src/lifetimes.md src/lifetimes/struct-lifetimes.md +msgid "Lifetimes in Data Structures" +msgstr "Veri Yapılarında Ömürler" #: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md msgid "Exercise: Protobuf Parsing" @@ -555,18 +609,28 @@ msgstr "Gün 4: Sabah" msgid "Iterators" msgstr "Adımlayıcılar (Iterators)" -#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md -msgid "`Iterator`" +#: src/SUMMARY.md src/iterators.md +#, fuzzy +msgid "Motivation" +msgstr "Monomorfizasyon" + +#: src/SUMMARY.md src/iterators/iterator.md +#, fuzzy +msgid "`Iterator` Trait" msgstr "`Iterator`" +#: src/SUMMARY.md src/iterators/helpers.md +msgid "`Iterator` Helper Methods" +msgstr "" + +#: src/SUMMARY.md src/iterators/collect.md +msgid "`collect`" +msgstr "" + #: src/SUMMARY.md src/iterators/intoiterator.md msgid "`IntoIterator`" msgstr "`IntoIterator`" -#: src/SUMMARY.md -msgid "`FromIterator`" -msgstr "`FromIterator`" - #: src/SUMMARY.md src/iterators.md src/iterators/exercise.md msgid "Exercise: Iterator Method Chaining" msgstr "Alıştırma: Adımlayıcı Metot Zincirleme" @@ -584,6 +648,11 @@ msgstr "Dosya Sistemi Hiyerarşisi" msgid "Visibility" msgstr "Görünürlük" +#: src/SUMMARY.md src/modules.md +#, fuzzy +msgid "Encapsulation" +msgstr "Çeviriler" + #: src/SUMMARY.md msgid "`use`, `super`, `self`" msgstr "`use`, `super`, `self`" @@ -597,9 +666,9 @@ msgstr "Alıştırma: Bir GUI Kütüphanesi için Modüller" msgid "Testing" msgstr "Test Etme" -#: src/SUMMARY.md src/testing.md -msgid "Test Modules" -msgstr "Test Modülleri" +#: src/SUMMARY.md src/testing.md src/testing/unit-tests.md +msgid "Unit Tests" +msgstr "Birim Testleri" #: src/SUMMARY.md src/testing.md src/testing/other.md msgid "Other Types of Tests" @@ -675,6 +744,20 @@ msgstr "Birlikler (Unions)" msgid "Unsafe Functions" msgstr "Emniyetsiz Fonksiyonlar" +#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/rust.md +#, fuzzy +msgid "Unsafe Rust Functions" +msgstr "Emniyetsiz Fonksiyonlar" + +#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/extern-c.md +#, fuzzy +msgid "Unsafe External Functions" +msgstr "Emniyetsiz Fonksiyonlar" + +#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/calling.md +msgid "Calling Unsafe Functions" +msgstr "Emniyetsiz (Unsafe) Fonksiyonları Çağırma" + #: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe Traits" msgstr "Emniyetsiz Özellikler (Traits)" @@ -787,9 +870,24 @@ msgstr "Birlikte Çalışabilirlik" msgid "With C" msgstr "C ile" +#: src/SUMMARY.md src/android/interoperability/with-c/c-library.md +#, fuzzy +msgid "A Simple C Library" +msgstr "Basit bir GUI Kütüphanesi" + #: src/SUMMARY.md -msgid "Calling C with Bindgen" -msgstr "Bindgen ile Rust Tarafından C'yi Kullanma" +msgid "Bindgen" +msgstr "" + +#: src/SUMMARY.md src/android/interoperability/with-c/run-our-binary.md +#, fuzzy +msgid "Running Our Binary" +msgstr "Cargo'nun Yerel (Local) Olarak Çalıştırılması" + +#: src/SUMMARY.md src/android/interoperability/with-c/rust-library.md +#, fuzzy +msgid "A Simple Rust Library" +msgstr "Basit bir GUI Kütüphanesi" #: src/SUMMARY.md msgid "Calling Rust from C" @@ -835,14 +933,14 @@ msgstr "C++ Hata İşleme" msgid "Additional Types" msgstr "Ek Türler" -#: src/SUMMARY.md -msgid "Building for Android: C++" -msgstr "Android için inşa: C++" - #: src/SUMMARY.md msgid "Building for Android: Genrules" msgstr "Android için inşa: Genrules" +#: src/SUMMARY.md +msgid "Building for Android: C++" +msgstr "Android için inşa: C++" + #: src/SUMMARY.md msgid "Building for Android: Rust" msgstr "Android için inşa: Rust" @@ -1086,6 +1184,10 @@ msgstr "Bir UART Sürücü Yazalım" msgid "More Traits" msgstr "Daha Fazla Özellik (Trait)" +#: src/SUMMARY.md src/bare-metal/aps/safemmio/using.md +msgid "Using It" +msgstr "Onu Kullan" + #: src/SUMMARY.md msgid "A Better UART Driver" msgstr "Daha İyi Bir UART Sürücüsü" @@ -1099,17 +1201,23 @@ msgid "Multiple Registers" msgstr "Çoklu Yazmaçlar (Registers)" #: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "Driver" msgstr "Sürücü" -#: src/SUMMARY.md -msgid "Using It" -msgstr "Onu Kullan" +#: src/SUMMARY.md src/bare-metal/aps/safemmio/registers.md +msgid "safe-mmio" +msgstr "" #: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md msgid "Exceptions" msgstr "İstisnalar" +#: src/SUMMARY.md src/bare-metal/aps/aarch64-rt.md +#, fuzzy +msgid "aarch64-rt" +msgstr "aarch64-paging" + #: src/SUMMARY.md msgid "Useful Crates" msgstr "Kullanışlı Kasalar (Crates)" @@ -1253,6 +1361,12 @@ msgstr "`async`/`await`" msgid "Futures" msgstr "Future Özellikleri (Traits)" +#: src/SUMMARY.md src/concurrency/async.md +#: src/concurrency/async/state-machine.md +#, fuzzy +msgid "State Machine" +msgstr "Desen Eşleştirme" + #: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md msgid "Runtimes" msgstr "Çalışma Zamanları" @@ -1479,10 +1593,11 @@ msgstr "" "olmayacak. Aşağıdakiler bu kursun amaçları dışında kalır:" #: src/index.md +#, fuzzy msgid "" -"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]" -"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]" -"(https://doc.rust-lang.org/rust-by-example/macros.html) instead." +"Learning how to develop macros: please see [the Rust Book](https://doc.rust-" +"lang.org/book/) and [Rust by Example](https://doc.rust-lang.org/rust-by-" +"example/macros.html) instead." msgstr "" "Makroların nasıl geliştirileceğini öğrenmek: lütfen bunun yerine [Rust " "Book'ta Bölüm 19.5](https://doc.rust-lang.org/book/ch19-06-macros.html) ve " @@ -1669,8 +1784,9 @@ msgid "Course schedule:" msgstr "Kurs programı:" #: src/running-the-course/course-structure.md -msgid "Day 1 Morning (2 hours and 5 minutes, including breaks)" -msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" +#, fuzzy +msgid "Day 1 Morning (2 hours and 10 minutes, including breaks)" +msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/welcome-day-1-afternoon.md src/welcome-day-2.md @@ -1685,8 +1801,8 @@ msgstr "Bölüm" #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md #: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md -#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md -#: src/std-types.md src/std-traits.md src/welcome-day-3.md +#: src/methods-and-traits.md src/generics.md src/welcome-day-2-afternoon.md +#: src/std-types.md src/closures.md src/std-traits.md src/welcome-day-3.md #: src/memory-management.md src/smart-pointers.md #: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md #: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md @@ -1702,7 +1818,8 @@ msgstr "Süre" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md -#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md +#: src/references.md src/user-defined-types.md src/pattern-matching.md +#: src/generics.md src/std-types.md src/closures.md src/std-traits.md #: src/memory-management.md src/smart-pointers.md src/lifetimes.md #: src/iterators.md src/modules.md src/testing.md src/error-handling.md #: src/unsafe-rust.md src/concurrency/shared-state.md @@ -1712,19 +1829,25 @@ msgstr "5 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md -#: src/references.md src/user-defined-types.md src/methods-and-traits.md -#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md -#: src/concurrency/shared-state.md +#: src/user-defined-types.md src/pattern-matching.md src/methods-and-traits.md +#: src/modules.md src/unsafe-rust.md src/concurrency/welcome.md +#: src/concurrency/threads.md src/concurrency/shared-state.md msgid "15 minutes" msgstr "15 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1.md -#: src/welcome-day-4.md +#: src/concurrency/welcome-async.md msgid "40 minutes" msgstr "40 dakika" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-2.md src/welcome-day-4.md +msgid "45 minutes" +msgstr "45 dakika" + #: src/running-the-course/course-structure.md -msgid "Day 1 Afternoon (2 hours and 35 minutes, including breaks)" +#, fuzzy +msgid "Day 1 Afternoon (2 hours and 45 minutes, including breaks)" msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md @@ -1732,46 +1855,46 @@ msgid "35 minutes" msgstr "35 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md -#: src/welcome-day-3.md src/welcome-day-3-afternoon.md -#: src/concurrency/welcome-async.md +#: src/welcome-day-3.md src/welcome-day-3-afternoon.md src/welcome-day-4.md +#: src/welcome-day-4-afternoon.md src/concurrency/welcome-async.md msgid "55 minutes" msgstr "55 dakika" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md -#: src/welcome-day-2.md src/welcome-day-3-afternoon.md -msgid "50 minutes" -msgstr "50 dakika" +#: src/welcome-day-2-afternoon.md src/welcome-day-3.md +msgid "1 hour" +msgstr "1 saat" #: src/running-the-course/course-structure.md -msgid "Day 2 Morning (2 hours and 10 minutes, including breaks)" -msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" +#, fuzzy +msgid "Day 2 Morning (2 hours and 45 minutes, including breaks)" +msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/hello-world.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md -#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md -#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md -#: src/testing.md src/error-handling.md +#: src/references.md src/welcome-day-2.md src/methods-and-traits.md +#: src/std-types.md src/closures.md src/welcome-day-3.md src/borrowing.md +#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md +#: src/error-handling.md msgid "3 minutes" msgstr "3 dakika" #: src/running-the-course/course-structure.md src/welcome-day-2.md -#: src/welcome-day-2-afternoon.md src/welcome-day-3.md -msgid "1 hour" -msgstr "1 saat" +#: src/welcome-day-3-afternoon.md +msgid "50 minutes" +msgstr "50 dakika" #: src/running-the-course/course-structure.md -msgid "Day 2 Afternoon (3 hours and 15 minutes, including breaks)" -msgstr "2. Gün Öğleden Sonra (3 saat 15 dakika, aralar dahil)" - -#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md -#: src/welcome-day-4.md -msgid "45 minutes" -msgstr "45 dakika" +#, fuzzy +msgid "Day 2 Afternoon (2 hours and 50 minutes, including breaks)" +msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md -#: src/concurrency/welcome.md src/concurrency/welcome-async.md -msgid "1 hour and 10 minutes" -msgstr "1 saat 10 dakika" +#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md +#: src/testing.md src/unsafe-rust.md src/concurrency/welcome.md +#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md +msgid "30 minutes" +msgstr "30 dakika" #: src/running-the-course/course-structure.md msgid "Day 3 Morning (2 hours and 20 minutes, including breaks)" @@ -1782,7 +1905,8 @@ msgid "Day 3 Afternoon (1 hour and 55 minutes, including breaks)" msgstr "3. Gün Öğleden Sonra (1 saat 55 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -msgid "Day 4 Morning (2 hours and 40 minutes, including breaks)" +#, fuzzy +msgid "Day 4 Morning (2 hours and 50 minutes, including breaks)" msgstr "4. Gün Sabah (2 saat 40 dakika, aralar dahil)" #: src/running-the-course/course-structure.md @@ -1790,7 +1914,8 @@ msgid "Day 4 Afternoon (2 hours and 20 minutes, including breaks)" msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md -msgid "1 hour and 5 minutes" +#, fuzzy +msgid "1 hour and 15 minutes" msgstr "1 saat 5 dakika" #: src/running-the-course/course-structure.md @@ -1927,19 +2052,11 @@ msgstr "" msgid "Morning (3 hours and 20 minutes, including breaks)" msgstr "Sabah (3 saat 20 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md src/pattern-matching.md -#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md -#: src/testing.md src/error-handling.md src/unsafe-rust.md -#: src/concurrency/welcome.md src/concurrency/sync-exercises.md -#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md -msgid "30 minutes" -msgstr "30 dakika" - -#: src/running-the-course/course-structure.md src/methods-and-traits.md +#: src/running-the-course/course-structure.md src/references.md #: src/std-types.md src/memory-management.md src/borrowing.md -#: src/concurrency/welcome.md src/concurrency/sync-exercises.md -#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md -#: src/concurrency/async-exercises.md +#: src/error-handling.md src/concurrency/welcome.md +#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md +#: src/concurrency/async-pitfalls.md src/concurrency/async-exercises.md msgid "20 minutes" msgstr "20 dakika" @@ -1947,8 +2064,14 @@ msgstr "20 dakika" msgid "Send and Sync" msgstr "Send ve Sync" +#: src/running-the-course/course-structure.md src/concurrency/welcome.md +#: src/concurrency/welcome-async.md +msgid "1 hour and 10 minutes" +msgstr "1 saat 10 dakika" + #: src/running-the-course/course-structure.md -msgid "Afternoon (3 hours and 20 minutes, including breaks)" +#, fuzzy +msgid "Afternoon (3 hours and 30 minutes, including breaks)" msgstr "Öğleden Sonra (3 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md @@ -2086,20 +2209,6 @@ msgstr "" "user-cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" "yaremam) ve [@reta](https://github.com/reta)." -#: src/running-the-course/translations.md -msgid "" -"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" -"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" -"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" -"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) " -"and [@mehrad77](https://github.com/mehrad77)." -msgstr "" -"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " -"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github." -"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" -"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" -"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77)." - #: src/running-the-course/translations.md msgid "" "Use the language picker in the top-right corner to switch between languages." @@ -2310,8 +2419,8 @@ msgstr "" #: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md #: src/references/exclusive.md src/memory-management/move.md -#: src/error-handling/try.md src/android/setup.md -#: src/concurrency/async/async-await.md +#: src/error-handling/try.md src/unsafe-rust/unsafe-functions/calling.md +#: src/android/setup.md src/concurrency/async/async-await.md msgid "Key points:" msgstr "Anahtar noktalar:" @@ -2350,9 +2459,11 @@ msgstr "" "fazlasından çözülebilir." #: src/cargo/rust-ecosystem.md +#, fuzzy msgid "" "Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the " -"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018." +"current edition is Rust 2024. Previous editions were Rust 2015, Rust 2018 " +"and Rust 2021." msgstr "" "Rust'ın ayrıca [yayınları](https://doc.rust-lang.org/edition-guide/) " "(editions) vardır: mevcut yayın (edition) Rust 2021'dir. Önceki yayınlar " @@ -2646,12 +2757,6 @@ msgid "User-defined types: structs and enums." msgstr "" "Kullanıcı tanımlı türler: yapılar (structs) ve numaralandırmalar (enums)" -#: src/welcome-day-1.md -msgid "Pattern matching: destructuring enums, structs, and arrays." -msgstr "" -"Desen eşleştirme: numaralandırmaların (enums), yapıların ve dizilerin " -"çözümlenmesi (destructuring)." - #: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md #: src/welcome-day-4.md src/concurrency/welcome.md #: src/concurrency/welcome-async.md @@ -2660,10 +2765,10 @@ msgstr "Zamanlama (Schedule)" #: src/welcome-day-1.md msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 5 " +"Including 10 minute breaks, this session should take about 2 hours and 10 " "minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmelidir. " "İçeriği:" #: src/welcome-day-1.md @@ -2743,7 +2848,7 @@ msgstr "Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:" #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/tuples-and-arrays.md src/references.md src/user-defined-types.md #: src/pattern-matching.md src/methods-and-traits.md src/generics.md -#: src/std-types.md src/std-traits.md src/memory-management.md +#: src/std-types.md src/closures.md src/std-traits.md src/memory-management.md #: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md #: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md #: src/concurrency/threads.md src/concurrency/channels.md @@ -2756,7 +2861,7 @@ msgstr "Slayt" #: src/hello-world.md src/references.md src/user-defined-types.md #: src/pattern-matching.md src/methods-and-traits.md src/generics.md -#: src/std-types.md src/std-traits.md src/memory-management.md +#: src/std-types.md src/closures.md src/memory-management.md #: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md #: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md #: src/concurrency/shared-state.md src/concurrency/async.md @@ -3044,7 +3149,7 @@ msgstr "" "oluşturulan asm kodu hakkında daha fazla bilgi edinmek isteyen ileri düzey " "öğrenciler için faydalıdır." -#: src/types-and-values.md src/control-flow-basics.md src/modules.md +#: src/types-and-values.md src/concurrency/async.md msgid "This segment should take about 40 minutes. It contains:" msgstr "Bu bölüm yaklaşık 40 dakika sürmelidir. İçeriği:" @@ -3068,14 +3173,18 @@ msgstr "Ne görüyorsunuz:" msgid "Functions are introduced with `fn`." msgstr "Fonksiyonlar `fn` ile tanıtılır." +#: src/types-and-values/hello-world.md +msgid "The `main` function is the entry point of the program." +msgstr "`main` fonksiyon programın giriş noktasıdır (entry point)." + #: src/types-and-values/hello-world.md msgid "Blocks are delimited by curly braces like in C and C++." msgstr "" "Bloklar, C ve C++'daki gibi küme parantezleriyle sınırları belirlenmiştir." #: src/types-and-values/hello-world.md -msgid "The `main` function is the entry point of the program." -msgstr "`main` fonksiyon programın giriş noktasıdır (entry point)." +msgid "Statements end with `;`." +msgstr "" #: src/types-and-values/hello-world.md msgid "Rust has hygienic macros, `println!` is an example of this." @@ -3154,8 +3263,7 @@ msgstr "" "Rust, statik tür özelliğine sahip olmasıyla tür emniyeti sağlar. Değişken " "bağlamaları (binding) `let` ile yapılır:" -#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md -#: src/control-flow-basics/blocks-and-scopes.md +#: src/types-and-values/variables.md msgid "\"x: {x}\"" msgstr "\"x: {x}\"" @@ -3176,6 +3284,13 @@ msgstr "" "için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için " "`mut` anahtar kelimesini ekleyin." +#: src/types-and-values/variables.md +msgid "" +"Warnings are enabled for this slide, such as for unused variables or " +"unnecessary `mut`. These are omitted in most slides to avoid distracting " +"warnings. Try removing the mutation but leaving the `mut` keyword in place." +msgstr "" + #: src/types-and-values/variables.md msgid "" "The `i32` here is the type of the variable. This must be known at compile " @@ -3427,6 +3542,11 @@ msgstr "// Özyinelemeli durum.\n" msgid "\"fib({n}) = {}\"" msgstr "\"fib({n}) = {}\"" +#: src/control-flow-basics.md src/methods-and-traits.md src/generics.md +#: src/modules.md src/testing.md +msgid "This segment should take about 45 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:" + #: src/control-flow-basics.md msgid "if Expressions" msgstr "if İfadeleri" @@ -3436,6 +3556,11 @@ msgstr "if İfadeleri" msgid "4 minutes" msgstr "4 dakika" +#: src/control-flow-basics.md +#, fuzzy +msgid "match Expressions" +msgstr "match ifadeleri" + #: src/control-flow-basics.md msgid "break and continue" msgstr "break ve continue" @@ -3452,24 +3577,74 @@ msgstr "" "Bunların çoğu diğer programlama dillerinde gördüklerinize çok tanıdık " "gelecektir." -#: src/control-flow-basics/if.md -msgid "`if` expressions" -msgstr "`if` ifadeleri" - -#: src/control-flow-basics/if.md +#: src/control-flow-basics/blocks-and-scopes.md msgid "" -"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/" -"if-expr.html#if-expressions) exactly like `if` statements in other languages:" +"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. " +"Each block has a value and a type, which are those of the last expression of " +"the block:" msgstr "" -"[`if` ifadelerini](https://doc.rust-lang.org/reference/expressions/if-expr." -"html#if-expressions) tam olarak diğer dillerdeki `if` deyimleri (statement) " -"gibi kullanabilirsiniz:" +"Rust dilindeki bir blok, `{}` parantezleri içine alınmış bir ifadeler dizisi " +"(sequence of expressions) içerir. Her bloğun, bloğun son ifadesine ait olan " +"bir değeri ve türü vardır:" -#: src/control-flow-basics/if.md -msgid "\"zero!\"" -msgstr "\"sıfır!\"" +#: src/control-flow-basics/blocks-and-scopes.md +msgid "// dbg!(y);\n" +msgstr "" -#: src/control-flow-basics/if.md +#: src/control-flow-basics/blocks-and-scopes.md +msgid "" +"If the last expression ends with `;`, then the resulting value and type is " +"`()`." +msgstr "Son ifade `;` ile bitiyorsa, ortaya çıkan değer ve tür `()` olur." + +#: src/control-flow-basics/blocks-and-scopes.md +msgid "A variable's scope is limited to the enclosing block." +msgstr "Bir değişkenin kapsamı (scope) onu çevreleyen blokla sınırlıdır." + +#: src/control-flow-basics/blocks-and-scopes.md +msgid "" +"You can explain that dbg! is a Rust macro that prints and returns the value " +"of a given expression for quick and dirty debugging." +msgstr "" + +#: src/control-flow-basics/blocks-and-scopes.md +msgid "" +"You can show how the value of the block changes by changing the last line in " +"the block. For instance, adding/removing a semicolon or using a `return`." +msgstr "" +"Bloktaki son satırı değiştirerek bloğun değerinin nasıl değiştiğini " +"gösterebilirsiniz. Örneğin, noktalı virgül eklemek/kaldırmak veya bir " +"`return` kullanmak." + +#: src/control-flow-basics/blocks-and-scopes.md +msgid "" +"Demonstrate that attempting to access `y` outside of its scope won't compile." +msgstr "" + +#: src/control-flow-basics/blocks-and-scopes.md +msgid "" +"Values are effectively \"deallocated\" when they go out of their scope, even " +"if their data on the stack is still there." +msgstr "" + +#: src/control-flow-basics/if.md +msgid "`if` expressions" +msgstr "`if` ifadeleri" + +#: src/control-flow-basics/if.md +msgid "" +"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/" +"if-expr.html#if-expressions) exactly like `if` statements in other languages:" +msgstr "" +"[`if` ifadelerini](https://doc.rust-lang.org/reference/expressions/if-expr." +"html#if-expressions) tam olarak diğer dillerdeki `if` deyimleri (statement) " +"gibi kullanabilirsiniz:" + +#: src/control-flow-basics/if.md +msgid "\"zero!\"" +msgstr "\"sıfır!\"" + +#: src/control-flow-basics/if.md msgid "\"biggish\"" msgstr "\"büyükçe\"" @@ -3519,6 +3694,102 @@ msgstr "" "gerekir. Derleyici hatasını görmek için `println!`'den önceki `;`'yi " "kaldırın." +#: src/control-flow-basics/match.md +msgid "`match` can be used to check a value against one or more options:" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "\"one\"" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "\"ten\"" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "\"one hundred\"" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "\"something else\"" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "Like `if` expressions, `match` can also return a value;" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "\"The value of {flag} is {val}\"" +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"`match` arms are evaluated from top to bottom, and the first one that " +"matches has its corresponding body executed." +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"There is no fall-through between cases the way that `switch` works in other " +"languages." +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"The body of a `match` arm can be a single expression or a block. Technically " +"this is the same thing, since blocks are also expressions, but students may " +"not fully understand that symmetry at this point." +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"`match` expressions need to be exhaustive, meaning they either need to cover " +"all possible values or they need to have a default case such as `_`. " +"Exhaustiveness is easiest to demonstrate with enums, but enums haven't been " +"introduced yet. Instead we demonstrate matching on a `bool`, which is the " +"simplest primitive type." +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"This slide introduces `match` without talking about pattern matching, giving " +"students a chance to get familiar with the syntax without front-loading too " +"much information. We'll be talking about pattern matching in more detail " +"tomorrow, so try not to go into too much detail here." +msgstr "" + +#: src/control-flow-basics/match.md src/references/dangling.md +#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md +#: src/user-defined-types/static.md src/pattern-matching/infallible.md +#: src/pattern-matching/destructuring-structs.md +#: src/pattern-matching/let-control-flow/let-else.md src/closures/syntax.md +#: src/memory-management/review.md src/memory-management/move.md +#: src/memory-management/copy-types.md src/borrowing/shared.md +#: src/borrowing/borrowck.md src/borrowing/interior-mutability/refcell.md +#: src/iterators/motivation.md src/iterators/iterator.md +#: src/iterators/helpers.md src/iterators/collect.md +#: src/modules/encapsulation.md src/error-handling/result.md +#: src/error-handling/anyhow.md src/concurrency/async/state-machine.md +msgid "More to Explore" +msgstr "Daha Fazlasını Keşfedin" + +#: src/control-flow-basics/match.md +msgid "" +"To further motivate the usage of `match`, you can compare the examples to " +"their equivalents written with `if`. In the second case matching on a `bool` " +"an `if {} else {}` block is pretty similar. But in the first example that " +"checks multiple cases, a `match` expression can be more concise than `if {} " +"else if {} else if {} else`." +msgstr "" + +#: src/control-flow-basics/match.md +msgid "" +"`match` also supports match guards, which allow you to add an arbitrary " +"logical condition that will get evaluated to determine if the match arm " +"should be taken. However talking about match guards requires explaining " +"about pattern matching, which we're trying to avoid on this slide." +msgstr "" + #: src/control-flow-basics/loops.md msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" msgstr "" @@ -3538,10 +3809,6 @@ msgstr "" "loop-expr.html#predicate-loops) diğer dillerdeki gibi işler ve koşul doğru " "olduğu sürece döngü gövdesini yürütür (execute)." -#: src/control-flow-basics/loops.md -msgid "\"Final x: {x}\"" -msgstr "\"Son x: {x}\"" - #: src/control-flow-basics/loops/for.md msgid "" "The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates " @@ -3550,10 +3817,6 @@ msgstr "" "[`for` döngüsü](https://doc.rust-lang.org/std/keyword.for.html) değer " "aralıkları veya bir koleksiyondaki öğeler üzerinde tekrarlar:" -#: src/control-flow-basics/loops/for.md -msgid "\"elem: {elem}\"" -msgstr "\"elem: {elem}\"" - #: src/control-flow-basics/loops/for.md msgid "" "Under the hood `for` loops use a concept called \"iterators\" to handle " @@ -3581,10 +3844,6 @@ msgstr "" "[`loop` deyimi](https://doc.rust-lang.org/std/keyword.loop.html), bir " "`break`'e kadar sonsuz döner." -#: src/control-flow-basics/loops/loop.md -msgid "\"{i}\"" -msgstr "\"{i}\"" - #: src/control-flow-basics/loops/loop.md msgid "" "The `loop` statement works like a `while true` loop. Use it for things like " @@ -3613,15 +3872,6 @@ msgstr "" "`loop` ile, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifade " "alabilir." -#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md -#: src/std-traits/solution.md src/smart-pointers/trait-objects.md -#: src/borrowing/interior-mutability.md src/modules/exercise.md -#: src/modules/solution.md src/android/build-rules/library.md -#: src/android/interoperability/cpp/rust-bridge.md -#: src/concurrency/async-pitfalls/cancellation.md -msgid "\"{}\"" -msgstr "\"{}\"" - #: src/control-flow-basics/break-continue.md msgid "" "Note that `loop` is the only looping construct which can return a non-" @@ -3642,10 +3892,6 @@ msgstr "" "Hem `continue` ve `break` isteğe bağlı olarak iç içe geçmiş döngülerden " "çıkmak için kullanılan bir etiket (label) argümanını alabilir:" -#: src/control-flow-basics/break-continue/labels.md -msgid "\"elements searched: {elements_searched}\"" -msgstr "\"aranan öğeler: {elements_searched}\"" - #: src/control-flow-basics/break-continue/labels.md msgid "Labeled break also works on arbitrary blocks, e.g." msgstr "Etiketli break, keyfi olarak yazılan bloklarda da çalışır, örneğin." @@ -3654,103 +3900,6 @@ msgstr "Etiketli break, keyfi olarak yazılan bloklarda da çalışır, örneği msgid "\"This line gets skipped\"" msgstr "\"Bu satır geçilece\"" -#: src/control-flow-basics/blocks-and-scopes.md -msgid "Blocks" -msgstr "Bloklar" - -#: src/control-flow-basics/blocks-and-scopes.md -msgid "" -"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. " -"Each block has a value and a type, which are those of the last expression of " -"the block:" -msgstr "" -"Rust dilindeki bir blok, `{}` parantezleri içine alınmış bir ifadeler dizisi " -"(sequence of expressions) içerir. Her bloğun, bloğun son ifadesine ait olan " -"bir değeri ve türü vardır:" - -#: src/control-flow-basics/blocks-and-scopes.md -msgid "\"y: {y}\"" -msgstr "\"y: {y}\"" - -#: src/control-flow-basics/blocks-and-scopes.md -msgid "" -"If the last expression ends with `;`, then the resulting value and type is " -"`()`." -msgstr "Son ifade `;` ile bitiyorsa, ortaya çıkan değer ve tür `()` olur." - -#: src/control-flow-basics/blocks-and-scopes.md -msgid "" -"You can show how the value of the block changes by changing the last line in " -"the block. For instance, adding/removing a semicolon or using a `return`." -msgstr "" -"Bloktaki son satırı değiştirerek bloğun değerinin nasıl değiştiğini " -"gösterebilirsiniz. Örneğin, noktalı virgül eklemek/kaldırmak veya bir " -"`return` kullanmak." - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "A variable's scope is limited to the enclosing block." -msgstr "Bir değişkenin kapsamı (scope) onu çevreleyen blokla sınırlıdır." - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "" -"You can shadow variables, both those from outer scopes and variables from " -"the same scope:" -msgstr "" -"Hem dış kapsamlardaki (outer scopes) değişkenleri hem de aynı kapsamdaki " -"değişkenleri gölgeleyebilirsiniz (shadow):" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "\"before: {a}\"" -msgstr "\"önce: {a}\"" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md -#: src/generics/solution.md src/std-traits/from-and-into.md -msgid "\"hello\"" -msgstr "\"merhaba\"" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "\"inner scope: {a}\"" -msgstr "\"iç kapsam: {a}\"" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "\"shadowed in inner scope: {a}\"" -msgstr "\"iç kapsamda gölgelendi: {a}\"" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "\"after: {a}\"" -msgstr "\"sonra: {a}\"" - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "" -"Show that a variable's scope is limited by adding a `b` in the inner block " -"in the last example, and then trying to access it outside that block." -msgstr "" -"Son örnekte iç bloğa (inner block) bir `b` ekleyerek ve ardından bu bloğun " -"dışından ona erişmeye çalışarak bir değişkenin kapsamının (scope) sınırlı " -"olduğunu gösterin." - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "" -"Shadowing is different from mutation, because after shadowing both " -"variables' memory locations exist at the same time. Both are available under " -"the same name, depending where you use it in the code." -msgstr "" -"Gölgeleme (shadowing) mutasyondan (mutation) farklıdır çünkü gölgeleme " -"sonrasında her iki değişkenin de bellek konumları aynı anda mevcuttur. Her " -"ikisi de kodda nerede kullandığınıza bağlı olarak aynı ad altında mevcuttur." - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "A shadowing variable can have a different type." -msgstr "Bir gölgeleme (shadowing) değişkeni farklı bir türe sahip olabilir." - -#: src/control-flow-basics/blocks-and-scopes/scopes.md -msgid "" -"Shadowing looks obscure at first, but is convenient for holding on to values " -"after `.unwrap()`." -msgstr "" -"Gölgelendirme ilk başta anlaşılmaz görünebilir, ancak `.unwrap()` " -"sonrasındaki değerleri korumak için kullanışlıdır." - #: src/control-flow-basics/functions.md msgid "" "Declaration parameters are followed by a type (the reverse of some " @@ -3846,14 +3995,6 @@ msgstr "" "`todo!()` kodun bir kısmını henüz uygulanmamış (not-yet-implemented) olarak " "işaretler. Eğer yürütülürse (execute), paniğe neden olur." -#: src/control-flow-basics/macros.md -msgid "" -"`unreachable!()` marks a bit of code as unreachable. If executed, it will " -"panic." -msgstr "" -"`unreachable!()` kodun bir kısmını erişilemez (unreachable) olarak " -"işaretler. Eğer yürütülürse, paniğe neden olur." - #: src/control-flow-basics/macros.md msgid "\"{n}! = {}\"" msgstr "\"{n}! = {}\"" @@ -3876,6 +4017,35 @@ msgstr "" "Kurs, makroların tanımlanmasını (define) kapsamaz, ancak daha sonraki bir " "bölümde türetilmiş makroların kullanımı anlatılacaktır." +#: src/control-flow-basics/macros.md src/pattern-matching/match.md +msgid "More To Explore" +msgstr "Daha Fazlasını Keşfedin" + +#: src/control-flow-basics/macros.md +msgid "" +"There are a number of other useful macros provided by the standard library. " +"Some other examples you can share with students if they want to know more:" +msgstr "" + +#: src/control-flow-basics/macros.md +msgid "" +"[`assert!`](https://doc.rust-lang.org/stable/std/macro.assert.html) and " +"related macros can be used to add assertions to your code. These are used " +"heavily in writing tests." +msgstr "" + +#: src/control-flow-basics/macros.md +msgid "" +"[`unreachable!`](https://doc.rust-lang.org/stable/std/macro.unreachable." +"html) is used to mark a branch of control flow that should never be hit." +msgstr "" + +#: src/control-flow-basics/macros.md +msgid "" +"[`eprintln!`](https://doc.rust-lang.org/stable/std/macro.eprintln.html) " +"allows you to print to stderr." +msgstr "" + #: src/control-flow-basics/exercise.md msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " @@ -3949,21 +4119,26 @@ msgid "/// Determine the length of the collatz sequence beginning at `n`.\n" msgstr "/// `n`'den başlayan collatz sekansının uzunluğunu belirle.\n" #: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md -#: src/concurrency/threads/scoped.md msgid "\"Length: {}\"" msgstr "\"Length: {}\"" +#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md +msgid "// should be 15\n" +msgstr "" + #: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md #: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md msgid "Welcome Back" msgstr "Tekrar Hoş Geldiniz" -#: src/welcome-day-1-afternoon.md +#: src/welcome-day-1-afternoon.md src/welcome-day-2.md +#, fuzzy msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 35 " +"Including 10 minute breaks, this session should take about 2 hours and 45 " "minutes. It contains:" msgstr "" -"10 dakikalık aralar, bu oturum yaklaşık 2 saat 35 dakika sürmelidir. İçeriği:" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"İçeriği:" #: src/tuples-and-arrays.md msgid "This segment should take about 35 minutes. It contains:" @@ -3977,6 +4152,14 @@ msgstr "" "Rust'ta (primitive) ilkel türlerin nasıl çalıştığını gördük. Şimdi yeni " "bileşik (composite) türler oluşturmaya başlamanın zamanı geldi." +#: src/tuples-and-arrays/arrays.md +msgid "" +"Arrays can also be initialized using the shorthand syntax, e.g. `[0; 1024]`. " +"This can be useful when you want to initialize all elements to the same " +"value, or if you have a large array that would be hard to initialize " +"manually." +msgstr "" + #: src/tuples-and-arrays/arrays.md msgid "" "A value of the array type `[T; N]` holds `N` (a compile-time constant) " @@ -3993,14 +4176,24 @@ msgstr "" #: src/tuples-and-arrays/arrays.md msgid "" -"Try accessing an out-of-bounds array element. Array accesses are checked at " -"runtime. Rust can usually optimize these checks away, and they can be " -"avoided using unsafe Rust." +"Try accessing an out-of-bounds array element. The compiler is able to " +"determine that the index is unsafe, and will not compile the code:" +msgstr "" + +#: src/tuples-and-arrays/arrays.md +#, fuzzy +msgid "\"a: {a:?}\"" +msgstr "\"{:?}\"" + +#: src/tuples-and-arrays/arrays.md +msgid "" +"Array accesses are checked at runtime. Rust can usually optimize these " +"checks away; meaning if the compiler can prove the access is safe, it " +"removes the runtime check for better performance. They can be avoided using " +"unsafe Rust. The optimization is so good that it's hard to give an example " +"of runtime checks failing. The following code will compile but panic at " +"runtime:" msgstr "" -"Sınırların dışında bir dizi öğesine erişmeyi deneyin. Dizi erişimleri " -"çalışma zamanında (runtime) kontrol edilir. Rust genellikle bu kontrolleri " -"optimize edebilir ve emniyetsiz Rust (unsafe Rust) kullanılarak bu " -"kontrollerden kaçınılabilir." #: src/tuples-and-arrays/arrays.md msgid "We can use literals to assign values to arrays." @@ -4083,27 +4276,27 @@ msgstr "" "hiçbir şeye derlenmez." #: src/tuples-and-arrays/destructuring.md +#, fuzzy msgid "" -"When working with tuples and other structured values it's common to want to " -"extract the inner values into local variables. This can be done manually by " -"directly accessing the inner values:" +"Rust supports using pattern matching to destructure a larger value like a " +"tuple into its constituent parts:" msgstr "" -"Demetler (tuples) ve diğer yapılandırılmış değerlerle (structured values) " -"çalışırken, içteki değerleri yerel (local) değişkenlere çıkarmayı istemek " -"yaygındır. Bu, doğrudan iç değerlere erişilerek elle yapılabilir:" +"Ancak, Rust daha büyük bir değeri kendisini oluşturan parçalara çözümlemek " +"(destructure) için desen eşleştirmeyi (pattern matching) kullanmayı da " +"destekliyor:" + +#: src/tuples-and-arrays/destructuring.md +#, fuzzy +msgid "\"{tuple:?}: {}\"" +msgstr "\"{v:?} vektörünün büyüklüğü: {}\"" #: src/tuples-and-arrays/destructuring.md -msgid "\"left: {left}, right: {right}\"" -msgstr "\"sol: {left}, sağ: {right}\"" +msgid "\"ordered\"" +msgstr "" #: src/tuples-and-arrays/destructuring.md -msgid "" -"However, Rust also supports using pattern matching to destructure a larger " -"value into its constituent parts:" +msgid "\"unordered\"" msgstr "" -"Ancak, Rust daha büyük bir değeri kendisini oluşturan parçalara çözümlemek " -"(destructure) için desen eşleştirmeyi (pattern matching) kullanmayı da " -"destekliyor:" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4168,30 +4361,12 @@ msgstr "" "fonksiyonu uygulayın (implement). Bu fonksiyon yalnızca 3x3'lük matrislerde " "çalışır." -#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md -#: src/unsafe-rust/exercise.md -msgid "// TODO: remove this when you're done with your implementation.\n" -msgstr "" -"// TODO: uyarlamanız (implementation) bittiğinde bu yorum satırını silin.\n" - -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "//\n" -msgstr "//\n" - #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "// <-- the comment makes rustfmt add a newline\n" msgstr "// <-- bu yorum, rustfmt'nin yeni satır eklemesini sağlar\n" -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "\"matrix: {:#?}\"" -msgstr "\"matrix: {:#?}\"" - -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "\"transposed: {:#?}\"" -msgstr "\"transposed: {:#?}\"" - -#: src/references.md src/smart-pointers.md src/borrowing.md -#: src/concurrency/async-pitfalls.md +#: src/references.md src/smart-pointers.md src/borrowing.md src/iterators.md +#: src/error-handling.md src/concurrency/async-pitfalls.md msgid "This segment should take about 55 minutes. It contains:" msgstr "Bu bölüm yaklaşık 55 dakika sürmelidir. İçerir:" @@ -4206,6 +4381,14 @@ msgstr "" "Paylaşılan referanslar (shared reference) salt okunurdur (read-only) ve " "referans edilen veriler değiştirilemez." +#: src/references/shared.md src/std-traits/solution.md +msgid "'A'" +msgstr "" + +#: src/references/shared.md +msgid "'B'" +msgstr "" + #: src/references/shared.md msgid "" "A shared reference to a type `T` has type `&T`. A reference value is made " @@ -4216,12 +4399,6 @@ msgstr "" "referans değeri (reference value) oluşturulur. `*` operatörü bir referansın " "içeriğine eriştirir (dereference) ve onun değerini verir." -#: src/references/shared.md -msgid "Rust will statically forbid dangling references:" -msgstr "" -"Rust, boşa düşen referansları (dangling references) statik olarak " -"yasaklayacaktır:" - #: src/references/shared.md msgid "" "References can never be null in Rust, so null checking is not necessary." @@ -4259,11 +4436,9 @@ msgstr "" #: src/references/shared.md msgid "" -"Rust does not automatically create references for you - the `&` is always " -"required." +"Explicit referencing with `&` is usually required. However, Rust performs " +"automatic referencing and dereferencing when invoking methods." msgstr "" -"Rust sizin için otomatik olarak referans oluşturmaz. `&` her zaman " -"gereklidir." #: src/references/shared.md msgid "" @@ -4298,11 +4473,10 @@ msgstr "" "izin vermez. `*r = 'X'`'i deneyin." #: src/references/shared.md +#, fuzzy msgid "" "Rust is tracking the lifetimes of all references to ensure they live long " -"enough. Dangling references cannot occur in safe Rust. `x_axis` would return " -"a reference to `point`, but `point` will be deallocated when the function " -"returns, so this will not compile." +"enough. Dangling references cannot occur in safe Rust." msgstr "" "Rust, yeterince uzun süre hayatta olmalarını sağlamak için tüm referansların " "ömrülerini (lifetime) takip eder. Emniyetli Rust'ta boşa çıkan referanslar " @@ -4311,7 +4485,10 @@ msgstr "" "edilen alan geri verileceğinden (deallocation) bu kod derlenmeyecektir." #: src/references/shared.md -msgid "We will talk more about borrowing when we get to ownership." +#, fuzzy +msgid "" +"We will talk more about borrowing and preventing dangling references when we " +"get to ownership." msgstr "" "Sahipliğe (ownership) geçince ödünç alma (borrowing) konusunu daha detaylı " "konuşacağız." @@ -4413,6 +4590,29 @@ msgstr "" "örnekte `a`'nın en azından dilimimiz (slice) kadar 'canlı " "(alive)' (kapsamında) kalması gerekiyor." +#: src/references/slices.md +msgid "You can't \"grow\" a slice once it's created:" +msgstr "" + +#: src/references/slices.md +msgid "" +"You can't append elements of the slice, since it doesn't own the backing " +"buffer." +msgstr "" + +#: src/references/slices.md +msgid "" +"You can't grow a slice to point to a larger section of the backing buffer. " +"The slice loses information about the underlying buffer and so you can't " +"know how larger the slice can be grown." +msgstr "" + +#: src/references/slices.md +msgid "" +"To get a larger slice you have to back to the original buffer and create a " +"larger slice from there." +msgstr "" + #: src/references/strings.md msgid "We can now understand the two string types in Rust:" msgstr "Artık Rust'taki iki dize (string) türünü anlayabiliyoruz:" @@ -4442,7 +4642,7 @@ msgstr "\"s1: {s1}\"" msgid "\"Hello \"" msgstr "\"Merhaba \"" -#: src/references/strings.md src/memory-management/move.md +#: src/references/strings.md msgid "\"s2: {s2}\"" msgstr "\"s2: {s2}\"" @@ -4534,7 +4734,35 @@ msgstr "" "çift tırnakları, dizeyi oluşturan tırnakların her iki tarafınaa eşit sayıda " "`#` karakteri koyarak görebilirsiniz:" -#: src/references/exercise.md +#: src/references/dangling.md +msgid "" +"Rust enforces a number of rules for references that make them always safe to " +"use. One rule is that references can never be `null`, making them safe to " +"use without `null` checks. The other rule we'll look at for now is that " +"references can't _outlive_ the data they point to." +msgstr "" + +#: src/references/dangling.md +msgid "" +"This slide gets students thinking about references as not simply being " +"pointers, since Rust has different rules for references than other languages." +msgstr "" + +#: src/references/dangling.md +msgid "" +"We'll look at the rest of Rust's borrowing rules on day 3 when we talk about " +"Rust's ownership system." +msgstr "" + +#: src/references/dangling.md +msgid "" +"Rust's equivalent of nullability is the `Option` type, which can be used to " +"make any type \"nullable\" (not just references/pointers). We haven't yet " +"introduced enums or pattern matching, though, so try not to go into too much " +"detail about this here." +msgstr "" + +#: src/references/exercise.md msgid "" "We will create a few utility functions for 3-dimensional geometry, " "representing a point as `[f64;3]`. It is up to you to determine the function " @@ -4593,9 +4821,18 @@ msgid "" "direction.\n" msgstr "/// Vektörün büyüklüğünü, yönünü değiştirmeden 1.0'a değiştirin.\n" -#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md -msgid "This segment should take about 50 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 50 dakika sürmelidir. İçeriği:" +#: src/references/solution.md +msgid "" +"Note that in `normalize` we were able to do `*item /= mag` to modify each " +"element. This is because we're iterating using a mutable reference to an " +"array, which causes the `for` loop to give mutable references to each " +"element." +msgstr "" + +#: src/user-defined-types.md src/std-types.md src/std-traits.md +#: src/memory-management.md +msgid "This segment should take about 1 hour. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat sürmelidir. İçeriği:" #: src/user-defined-types/named-structs.md msgid "Like C and C++, Rust has support for custom structs:" @@ -4616,10 +4853,6 @@ msgstr "\"Peter\"" msgid "\"Avery\"" msgstr "\"Avery\"" -#: src/user-defined-types/named-structs.md -msgid "\"Jackie\"" -msgstr "\"Jackie\"" - #: src/user-defined-types/named-structs.md src/user-defined-types/enums.md #: src/pattern-matching/match.md src/methods-and-traits/methods.md msgid "Key Points:" @@ -4675,14 +4908,35 @@ msgstr "" #: src/user-defined-types/named-structs.md msgid "" -"The syntax `..avery` allows us to copy the majority of the fields from the " -"old struct without having to explicitly type it all out. It must always be " -"the last element." +"Struct fields do not support default values. Default values are specified by " +"implementing the `Default` trait which we will cover later." +msgstr "" + +#: src/user-defined-types/named-structs.md +msgid "You can also demonstrate the struct update syntax here:" +msgstr "" + +#: src/user-defined-types/named-structs.md +msgid "\"Jackie\"" +msgstr "\"Jackie\"" + +#: src/user-defined-types/named-structs.md +#, fuzzy +msgid "" +"It allows us to copy the majority of the fields from the old struct without " +"having to explicitly type it all out. It must always be the last element." msgstr "" "`..avery` sözdizimi, eski yapıdaki alanların çoğunu, hepsini açıkça " "yazmamıza gerek kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe " "olmalıdır." +#: src/user-defined-types/named-structs.md +msgid "" +"It is mainly used in combination with the `Default` trait. We will talk " +"about struct update syntax in more detail on the slide on the `Default` " +"trait, so we don't need to talk about it here unless students ask about it." +msgstr "" + #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" msgstr "" @@ -4751,6 +5005,20 @@ msgstr "" msgid "Operator overloading is discussed on Day 3 (generics)." msgstr "Operatör yüklemesi 3. günde (jenerikler) tartışıldı." +#: src/user-defined-types/tuple-structs.md +msgid "" +"When a tuple struct has zero fields, the `()` can be omitted. The result is " +"a zero-sized type (ZST), of which there is only one value (the name of the " +"type)." +msgstr "" + +#: src/user-defined-types/tuple-structs.md +msgid "" +"This is common for types that implement some behavior but have no data " +"(imagine a `NullReader` that implements some reader behavior by always " +"returning EOF)." +msgstr "" + #: src/user-defined-types/tuple-structs.md msgid "" "The example is a subtle reference to the [Mars Climate Orbiter](https://en." @@ -4864,13 +5132,6 @@ msgid "" "bytes." msgstr "`repr` olmadan, ayırıcı tür 2 baytlık olur, çünkü 10001 2 bayta sığar." -#: src/user-defined-types/enums.md src/user-defined-types/static.md -#: src/memory-management/review.md src/memory-management/move.md -#: src/memory-management/copy-types.md src/borrowing/shared.md -#: src/error-handling/result.md src/error-handling/anyhow.md -msgid "More to Explore" -msgstr "Daha Fazlasını Keşfedin" - #: src/user-defined-types/enums.md msgid "" "Rust has several optimizations it can employ to make enums take up less " @@ -4900,6 +5161,33 @@ msgstr "" "hiçbir garanti sağlamadığını, dolayısıyla bunun tamamen emniyetsiz olduğunu " "belirtmek önemlidir." +#: src/user-defined-types/aliases.md +msgid "" +"A type alias creates a name for another type. The two types can be used " +"interchangeably." +msgstr "" +"Bir tür eş ismi, başka bir tür için bir isim oluşturur. Her iki tür de " +"birbirinin yerine kullanılabilir." + +#: src/user-defined-types/aliases.md +msgid "// Aliases are more useful with long, complex types:\n" +msgstr "" +"// Eş isimler (aliases) uzun ve karmaşık türlerde daha kullanışlıdır:\n" + +#: src/user-defined-types/aliases.md +msgid "" +"A [newtype](tuple-structs.html) is often a better alternative since it " +"creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " +"InventoryCount = usize`." +msgstr "" +"[Bir yeni tür deseni (newtype)](tuple-structs.html) genellikle farklı bir " +"tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` " +"yerine `struct InventoryCount(usize)`'ı tercih edin." + +#: src/user-defined-types/aliases.md +msgid "C programmers will recognize this as similar to a `typedef`." +msgstr "C programcıları bunun, `typedef`'e benzer olduğunu anlayacaklardır." + #: src/user-defined-types/const.md msgid "`const`" msgstr "`const`" @@ -4935,15 +5223,6 @@ msgstr "" "`const`'un C++'ın `constexpr`'ına anlamsal olarak benzer davrandığını " "belirtin" -#: src/user-defined-types/const.md -msgid "" -"It isn't super common that one would need a runtime evaluated constant, but " -"it is helpful and safer than using a static." -msgstr "" -"Çalışma zamanında değerlendirilen (evaluate) bir sabite (constant) ihtiyaç " -"duyulması çok yaygın bir durum değildir, ancak statik kullanmaktan daha " -"yararlı ve daha emniyetlidir." - #: src/user-defined-types/static.md msgid "`static`" msgstr "`static`" @@ -5004,37 +5283,17 @@ msgstr "" "benzer yöntemlerle mümkündür." #: src/user-defined-types/static.md -msgid "Thread-local data can be created with the macro `std::thread_local`." -msgstr "" -"İş parçacığı için yerel (thread-local) veriler `std::thread_local` makrosu " -"ile oluşturulabilir." - -#: src/user-defined-types/aliases.md msgid "" -"A type alias creates a name for another type. The two types can be used " -"interchangeably." -msgstr "" -"Bir tür eş ismi, başka bir tür için bir isim oluşturur. Her iki tür de " -"birbirinin yerine kullanılabilir." - -#: src/user-defined-types/aliases.md -msgid "// Aliases are more useful with long, complex types:\n" +"It is common to use `OnceLock` in a static as a way to support " +"initialization on first use. `OnceCell` is not `Sync` and thus cannot be " +"used in this context." msgstr "" -"// Eş isimler (aliases) uzun ve karmaşık türlerde daha kullanışlıdır:\n" -#: src/user-defined-types/aliases.md -msgid "" -"A [newtype](tuple-structs.html) is often a better alternative since it " -"creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " -"InventoryCount = usize`." +#: src/user-defined-types/static.md +msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" -"[Bir yeni tür deseni (newtype)](tuple-structs.html) genellikle farklı bir " -"tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` " -"yerine `struct InventoryCount(usize)`'ı tercih edin." - -#: src/user-defined-types/aliases.md -msgid "C programmers will recognize this as similar to a `typedef`." -msgstr "C programcıları bunun, `typedef`'e benzer olduğunu anlayacaklardır." +"İş parçacığı için yerel (thread-local) veriler `std::thread_local` makrosu " +"ile oluşturulabilir." #: src/user-defined-types/exercise.md msgid "" @@ -5119,6 +5378,15 @@ msgstr "\"Araba kapısı kapandı: {:?}\"" msgid "\"The car has arrived on the 3rd floor: {:?}\"" msgstr "\"Araba 3. kata ulaşmış durumda: {:?}\"" +#: src/user-defined-types/exercise.md +msgid "" +"If students ask about `#![allow(dead_code)]` at the top of the exercise, " +"it's necessary because the only thing we do with the `Event` type is print " +"it out. Due to a nuance of how the compiler checks for dead code this causes " +"it to think that the code is unused. They can ignore it for the purpose of " +"this exercise." +msgstr "" + #: src/user-defined-types/solution.md msgid "/// A button was pressed.\n" msgstr "/// Bir düğmeye basıldı.\n" @@ -5183,25 +5451,83 @@ msgid "" msgstr "" #: src/welcome-day-2.md +msgid "Closures: function pointers with data." +msgstr "" + +#: src/pattern-matching.md src/lifetimes.md +msgid "This segment should take about 50 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 50 dakika sürmelidir. İçeriği:" + +#: src/pattern-matching/infallible.md msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 10 " -"minutes. It contains:" +"In day 1 we briefly saw how patterns can be used to _destructure_ compound " +"values. Let's review that and talk about a few other things patterns can " +"express:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmelidir. " -"İçeriği:" -#: src/pattern-matching.md src/std-types.md src/memory-management.md -msgid "This segment should take about 1 hour. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat sürmelidir. İçeriği:" +#: src/pattern-matching/infallible.md +msgid "// This does the same thing as above.\n" +msgstr "" -#: src/pattern-matching/match.md +#: src/pattern-matching/infallible.md +msgid "// Ignore the first element, only bind the second and third.\n" +msgstr "" + +#: src/pattern-matching/infallible.md +msgid "// Ignore everything but the last element.\n" +msgstr "" + +#: src/pattern-matching/infallible.md src/pattern-matching/match.md +#: src/generics/exercise.md src/generics/solution.md src/std-traits/solution.md +msgid "'a'" +msgstr "" + +#: src/pattern-matching/infallible.md msgid "" -"The `match` keyword lets you match a value against one or more _patterns_. " -"The comparisons are done from top to bottom and the first match wins." +"All of the demonstrated patterns are _irrefutable_, meaning that they will " +"always match the value on the right hand side." +msgstr "" + +#: src/pattern-matching/infallible.md +msgid "" +"Patterns are type-specific, including irrefutable patterns. Try adding or " +"removing an element to the tuple and look at the resulting compiler errors." +msgstr "" + +#: src/pattern-matching/infallible.md +#, fuzzy +msgid "" +"Variable names are patterns that always match and which bind the matched " +"value into a new variable with that name." +msgstr "" +"Bir değişken adı, her zaman herhangi bir değerle eşleşen reddedilemez " +"(irrefutable) bir desendir, bu nedenle tek bir değişkeni bildirmek için " +"`let`'i kullanabiliriz." + +#: src/pattern-matching/infallible.md +msgid "" +"`_` is a pattern that always matches any value, discarding the matched value." +msgstr "" + +#: src/pattern-matching/infallible.md +msgid "`..` allows you to ignore multiple values at once." +msgstr "" + +#: src/pattern-matching/infallible.md +msgid "" +"You can also demonstrate more advanced usages of `..`, such as ignoring the " +"middle elements of a tuple." +msgstr "" + +#: src/pattern-matching/infallible.md +msgid "All of these patterns work with arrays as well:" msgstr "" #: src/pattern-matching/match.md -msgid "The patterns can be simple values, similarly to `switch` in C and C++:" +msgid "" +"The `match` keyword lets you match a value against one or more _patterns_. " +"The patterns can be simple values, similarly to `switch` in C and C++, but " +"they can also be used to express more complex conditions:" msgstr "" #: src/pattern-matching/match.md @@ -5216,12 +5542,6 @@ msgstr "" msgid "\"Quitting\"" msgstr "" -#: src/pattern-matching/match.md src/generics/exercise.md -#: src/generics/solution.md src/std-traits/solution.md -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'a'" -msgstr "" - #: src/pattern-matching/match.md msgid "'s'" msgstr "" @@ -5238,13 +5558,11 @@ msgstr "" msgid "\"Moving around\"" msgstr "" -#: src/pattern-matching/match.md src/error-handling/exercise.md -#: src/error-handling/solution.md +#: src/pattern-matching/match.md msgid "'0'" msgstr "" -#: src/pattern-matching/match.md src/error-handling/exercise.md -#: src/error-handling/solution.md +#: src/pattern-matching/match.md msgid "'9'" msgstr "" @@ -5260,28 +5578,17 @@ msgstr "" msgid "\"Something else\"" msgstr "" -#: src/pattern-matching/match.md -msgid "" -"The `_` pattern is a wildcard pattern which matches any value. The " -"expressions _must_ be exhaustive, meaning that it covers every possibility, " -"so `_` is often used as the final catch-all case." -msgstr "" - -#: src/pattern-matching/match.md -msgid "" -"Match can be used as an expression. Just like `if`, each match arm must have " -"the same type. The type is the last expression of the block, if any. In the " -"example above, the type is `()`." -msgstr "" - #: src/pattern-matching/match.md msgid "" "A variable in the pattern (`key` in this example) will create a binding that " -"can be used within the match arm." +"can be used within the match arm. We will learn more about this on the next " +"slide." msgstr "" #: src/pattern-matching/match.md -msgid "A match guard causes the arm to match only if the condition is true." +msgid "" +"A match guard causes the arm to match only if the condition is true. If the " +"condition is false the match will continue checking later cases." msgstr "" #: src/pattern-matching/match.md @@ -5328,8 +5635,28 @@ msgid "" msgstr "" #: src/pattern-matching/match.md -msgid "More To Explore" -msgstr "Daha Fazlasını Keşfedin" +msgid "" +"Note that you can't use an existing variable as the condition in a match " +"arm, as it will instead be interpreted as a variable name pattern, which " +"creates a new variable that will shadow the existing one. For example:" +msgstr "" + +#: src/pattern-matching/match.md +msgid "\"Expected value is 5, actual is {expected}\"" +msgstr "" + +#: src/pattern-matching/match.md +msgid "\"Value was something else\"" +msgstr "" + +#: src/pattern-matching/match.md +msgid "" +"Here we're trying to match on the number 123, where we want the first case " +"to check if the value is 5. The naive expectation is that the first case " +"won't match because the value isn't 5, but instead this is interpreted as a " +"variable pattern which always matches, meaning the first branch will always " +"be taken. If a constant is used instead this will then work as expected." +msgstr "" #: src/pattern-matching/match.md msgid "" @@ -5358,11 +5685,11 @@ msgid "Like tuples, Struct can also be destructured by matching:" msgstr "" #: src/pattern-matching/destructuring-structs.md -msgid "\"x.0 = 1, b = {b}, y = {y}\"" +msgid "\"y = 2, x = {i:?}\"" msgstr "" #: src/pattern-matching/destructuring-structs.md -msgid "\"y = 2, x = {i:?}\"" +msgid "\"x.0 = 1, b = {b}, y = {y}\"" msgstr "" #: src/pattern-matching/destructuring-structs.md @@ -5377,6 +5704,20 @@ msgstr "" msgid "Add a new field to `Foo` and make changes to the pattern as needed." msgstr "" +#: src/pattern-matching/destructuring-structs.md +msgid "" +"Try `match &foo` and check the type of captures. The pattern syntax remains " +"the same, but the captures become shared references. This is [match " +"ergonomics](https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) and " +"is often useful with `match self` when implementing methods on an enum." +msgstr "" + +#: src/pattern-matching/destructuring-structs.md +msgid "" +"The same effect occurs with `match &mut foo`: the captures become exclusive " +"references." +msgstr "" + #: src/pattern-matching/destructuring-structs.md msgid "" "The distinction between a capture and a constant expression can be hard to " @@ -5439,6 +5780,13 @@ msgid "" "the Rust compiler provides by confirming when all cases are handled." msgstr "" +#: src/pattern-matching/destructuring-enums.md +msgid "" +"Demonstrate the syntax for a struct-style variant by adding one to the enum " +"definition and the `match`. Point out how this is syntactically similar to " +"matching on a struct." +msgstr "" + #: src/pattern-matching/let-control-flow.md msgid "" "Rust has a few control flow constructs which differ from other languages. " @@ -5449,63 +5797,61 @@ msgstr "" msgid "`if let` expressions" msgstr "`if let` ifadeleri" -#: src/pattern-matching/let-control-flow.md -msgid "`let else` expressions" -msgstr "`let else` ifadeleri" - #: src/pattern-matching/let-control-flow.md msgid "`while let` expressions" msgstr "`while let` ifadeleri" #: src/pattern-matching/let-control-flow.md +msgid "`let else` expressions" +msgstr "`let else` ifadeleri" + +#: src/pattern-matching/let-control-flow/if-let.md msgid "" "The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-" "expr.html#if-let-expressions) lets you execute different code depending on " "whether a value matches a pattern:" msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/if-let.md msgid "\"slept for {duration:?}\"" msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/if-let.md msgid "" -"For the common case of matching a pattern and returning from the function, " -"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/" -"let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " -"- anything but falling off the end of the block)." -msgstr "" - -#: src/pattern-matching/let-control-flow.md -msgid "\"not a hex digit\"" -msgstr "" - -#: src/pattern-matching/let-control-flow.md -msgid "\"got empty string\"" +"Unlike `match`, `if let` does not have to cover all branches. This can make " +"it more concise than `match`." msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "\"got None\"" +#: src/pattern-matching/let-control-flow/if-let.md +msgid "A common usage is handling `Some` values when working with `Option`." msgstr "" -#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md -msgid "\"result: {:?}\"" +#: src/pattern-matching/let-control-flow/if-let.md +msgid "" +"Unlike `match`, `if let` does not support guard clauses for pattern matching." msgstr "" -#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md -#: src/smart-pointers/solution.md src/testing/solution.md -#: src/android/testing.md src/android/testing/googletest.md -msgid "\"foo\"" +#: src/pattern-matching/let-control-flow/if-let.md +msgid "With an `else` clause, this can be used as an expression." msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/while-let.md msgid "" "Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/" "reference/expressions/loop-expr.html#predicate-pattern-loops) variant which " "repeatedly tests a value against a pattern:" msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/while-let.md +#, fuzzy +msgid "\"Comprehensive Rust 🦀\"" +msgstr "Comprehensive Rust'a Hoş Geldiniz 🦀" + +#: src/pattern-matching/let-control-flow/while-let.md +msgid "// (There are more efficient ways to reverse a string!)\n" +msgstr "" + +#: src/pattern-matching/let-control-flow/while-let.md msgid "" "Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." "String.html#method.pop) returns `Some(c)` until the string is empty, after " @@ -5513,55 +5859,71 @@ msgid "" "all items." msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "if-let" +#: src/pattern-matching/let-control-flow/while-let.md +msgid "" +"Point out that the `while let` loop will keep going as long as the value " +"matches the pattern." msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/while-let.md msgid "" -"Unlike `match`, `if let` does not have to cover all branches. This can make " -"it more concise than `match`." +"You could rewrite the `while let` loop as an infinite loop with an if " +"statement that breaks when there is no value to unwrap for `name.pop()`. The " +"`while let` provides syntactic sugar for the above scenario." msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "A common usage is handling `Some` values when working with `Option`." +#: src/pattern-matching/let-control-flow/while-let.md +msgid "" +"This form cannot be used as an expression, because it may have no value if " +"the condition is false." msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/let-else.md +#, fuzzy +msgid "`let else` Statements" +msgstr "`let else` ifadeleri" + +#: src/pattern-matching/let-control-flow/let-else.md msgid "" -"Unlike `match`, `if let` does not support guard clauses for pattern matching." +"For the common case of matching a pattern and returning from the function, " +"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/" +"let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " +"- anything but falling off the end of the block)." msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "let-else" +#: src/pattern-matching/let-control-flow/let-else.md +msgid "\"got None\"" msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "" -"`if-let`s can pile up, as shown. The `let-else` construct supports " -"flattening this nested code. Rewrite the awkward version for students, so " -"they can see the transformation." +#: src/pattern-matching/let-control-flow/let-else.md +msgid "\"got empty string\"" msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "The rewritten version is:" +#: src/pattern-matching/let-control-flow/let-else.md +msgid "\"not a hex digit\"" msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "while-let" -msgstr "while-let" +#: src/pattern-matching/let-control-flow/let-else.md +msgid "\"result: {:?}\"" +msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/let-else.md +#: src/generics/trait-bounds.md src/testing/solution.md src/android/testing.md +#: src/android/testing/googletest.md +msgid "\"foo\"" +msgstr "" + +#: src/pattern-matching/let-control-flow/let-else.md msgid "" -"Point out that the `while let` loop will keep going as long as the value " -"matches the pattern." +"This early return-based control flow is common in Rust error handling code, " +"where you try to get a value out of a `Result`, returning an error if the " +"`Result` was `Err`." msgstr "" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow/let-else.md msgid "" -"You could rewrite the `while let` loop as an infinite loop with an if " -"statement that breaks when there is no value to unwrap for `name.pop()`. The " -"`while let` provides syntactic sugar for the above scenario." +"If students ask, you can also demonstrate how real error handling code would " +"be written with `?`." msgstr "" #: src/pattern-matching/exercise.md @@ -5585,18 +5947,22 @@ msgid "In code, we will represent the tree with two types:" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An operation to perform on two subexpressions.\n" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An expression, in tree form.\n" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An operation on two subexpressions.\n" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// A literal value\n" msgstr "" @@ -5608,15 +5974,6 @@ msgid "" "\"unbox\" it: `eval(*boxed_expr)`." msgstr "" -#: src/pattern-matching/exercise.md -msgid "" -"Some expressions cannot be evaluated and will return an error. The standard " -"[`Result`](https://doc.rust-lang.org/std/result/enum.Result." -"html) type is an enum that represents either a successful value " -"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " -"later." -msgstr "" - #: src/pattern-matching/exercise.md msgid "" "Copy and paste the code into the Rust playground, and begin implementing " @@ -5625,14 +5982,6 @@ msgid "" "temporarily with `#[ignore]`:" msgstr "" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md -msgid "\"division by zero\"" -msgstr "" - -#: src/pattern-matching/solution.md -msgid "\"expr: {expr:?}\"" -msgstr "" - #: src/methods-and-traits/methods.md msgid "" "Rust allows you to associate functions with your new types. You do this with " @@ -5728,6 +6077,12 @@ msgid "" "all the implementation code in one predictable place." msgstr "" +#: src/methods-and-traits/methods.md +msgid "" +"Note that methods can also be called like associated functions by explicitly " +"passing the receiver in, e.g. `CarRace::add_lap(&mut race, 20)`." +msgstr "" + #: src/methods-and-traits/methods.md msgid "Point out the use of the keyword `self`, a method receiver." msgstr "" @@ -5822,6 +6177,14 @@ msgid "" "`greet` is provided, and relies on `talk`." msgstr "" +#: src/methods-and-traits/traits/implementing.md +msgid "" +"Multiple `impl` blocks are allowed for a given type. This includes both " +"inherent `impl` blocks and trait `impl` blocks. Likewise multiple traits can " +"be implemented for a given type (and often types implement many traits!). " +"`impl` blocks can even be spread across multiple modules/files." +msgstr "" + #: src/methods-and-traits/traits/supertraits.md msgid "" "A trait can require that types implementing it also implement other traits, " @@ -5900,6 +6263,20 @@ msgid "" "serialization support for a struct using `#[derive(Serialize)]`." msgstr "" +#: src/methods-and-traits/deriving.md +msgid "" +"Derivation is usually provided for traits that have a common boilerplate-y " +"implementation that is correct for most cases. For example, demonstrate how " +"a manual `Clone` impl can be repetitive compared to deriving the trait:" +msgstr "" + +#: src/methods-and-traits/deriving.md +msgid "" +"Not all of the `.clone()`s in the above are necessary in this case, but this " +"demonstrates the generally boilerplate-y pattern that manual impls would " +"follow, which should help make the use of `derive` clear to students." +msgstr "" + #: src/methods-and-traits/exercise.md msgid "Exercise: Logger Trait" msgstr "Alıştırma: Kaydedici Özellik" @@ -5914,7 +6291,7 @@ msgstr "" #: src/methods-and-traits/exercise.md msgid "" -"However, the `StdoutLogger` given below logs all messages, regardless of " +"However, the `StderrLogger` given below logs all messages, regardless of " "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" @@ -5922,46 +6299,43 @@ msgstr "" #: src/methods-and-traits/exercise.md msgid "" "This is a common pattern: a struct wrapping a trait implementation and " -"implementing that same trait, adding behavior in the process. What other " -"kinds of wrappers might be useful in a logging utility?" +"implementing that same trait, adding behavior in the process. In the " +"\"Generics\" segment this afternoon, we will see how to make the wrapper " +"generic over the wrapped type." msgstr "" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/generics/generic-data.md src/closures/exercise.md +#: src/closures/solution.md msgid "/// Log a message at the given verbosity level.\n" msgstr "" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/generics/generic-data.md src/closures/exercise.md +#: src/closures/solution.md msgid "\"verbosity={verbosity}: {message}\"" msgstr "" +#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/generics/generic-data.md +msgid "/// Only log messages up to the given verbosity level.\n" +msgstr "" + #: src/methods-and-traits/exercise.md -msgid "// TODO: Define and implement `VerbosityFilter`.\n" +msgid "// TODO: Implement the `Logger` trait for `VerbosityFilter`.\n" msgstr "" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/generics/generic-data.md src/closures/exercise.md +#: src/closures/solution.md msgid "\"FYI\"" msgstr "" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/generics/generic-data.md msgid "\"Uhoh\"" msgstr "" -#: src/methods-and-traits/solution.md -msgid "/// Only log messages up to the given verbosity level.\n" -msgstr "" - -#: src/welcome-day-2-afternoon.md -msgid "" -"Including 10 minute breaks, this session should take about 3 hours and 15 " -"minutes. It contains:" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 15 dakika sürmelidir. " -"İçeriği:" - -#: src/generics.md src/iterators.md src/testing.md -msgid "This segment should take about 45 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:" - #: src/generics.md msgid "impl Trait" msgstr "impl Trait" @@ -5981,23 +6355,27 @@ msgid "" msgstr "" #: src/generics/generic-functions.md -msgid "/// Pick `even` or `odd` depending on the value of `n`.\n" +msgid "\"picked a number: {:?}\"" msgstr "" #: src/generics/generic-functions.md -msgid "\"picked a number: {:?}\"" +msgid "\"picked a string: {:?}\"" msgstr "" #: src/generics/generic-functions.md -msgid "\"picked a string: {:?}\"" +msgid "'L'" msgstr "" #: src/generics/generic-functions.md -msgid "\"dog\"" +msgid "'R'" msgstr "" #: src/generics/generic-functions.md -msgid "\"cat\"" +msgid "" +"It can be helpful to show the monomorphized versions of `pick`, either " +"before talking about the generic `pick` in order to show how generics can " +"reduce code duplication, or after talking about generics to show how " +"monomorphization works." msgstr "" #: src/generics/generic-functions.md @@ -6008,7 +6386,7 @@ msgstr "" #: src/generics/generic-functions.md msgid "" -"In this example we only use the primitive types `i32` and `&str` for `T`, " +"In this example we only use the primitive types `i32` and `char` for `T`, " "but we can use any type here, including user-defined types:" msgstr "" @@ -6016,9 +6394,9 @@ msgstr "" msgid "" "This is similar to C++ templates, but Rust partially compiles the generic " "function immediately, so that function must be valid for all types matching " -"the constraints. For example, try modifying `pick` to return `even + odd` if " -"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust " -"still considers it invalid. C++ would let you do this." +"the constraints. For example, try modifying `pick` to return `left + right` " +"if `cond` is false. Even if only the `pick` instantiation with integers is " +"used, Rust still considers it invalid. C++ would let you do this." msgstr "" #: src/generics/generic-functions.md @@ -6028,22 +6406,62 @@ msgid "" "hand-coded the data structures without the abstraction." msgstr "" -#: src/generics/generic-data.md -msgid "You can use generics to abstract over the concrete field type:" +#: src/generics/trait-bounds.md +msgid "" +"When working with generics, you often want to require the types to implement " +"some trait, so that you can call this trait's methods." msgstr "" -#: src/generics/generic-data.md -msgid "\"{integer:?} and {float:?}\"" +#: src/generics/trait-bounds.md +msgid "You can do this with `T: Trait`:" +msgstr "" + +#: src/generics/trait-bounds.md +msgid "\"{pair:?}\"" +msgstr "" + +#: src/generics/trait-bounds.md +msgid "Try making a `NotCloneable` and passing it to `duplicate`." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "When multiple traits are necessary, use `+` to join them." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "Show a `where` clause, students will encounter it when reading code." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "It declutters the function signature if you have many parameters." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "It has additional features making it more powerful." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "" +"If someone asks, the extra feature is that the type on the left of \":\" can " +"be arbitrary, like `Option`." +msgstr "" + +#: src/generics/trait-bounds.md +msgid "" +"Note that Rust does not (yet) support specialization. For example, given the " +"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`." msgstr "" #: src/generics/generic-data.md -msgid "\"coords: {:?}\"" +msgid "" +"You can use generics to abstract over the concrete field type. Returning to " +"the exercise for the previous segment:" msgstr "" #: src/generics/generic-data.md msgid "" -"_Q:_ Why `T` is specified twice in `impl Point {}`? Isn't that " -"redundant?" +"_Q:_ Why `L` is specified twice in `impl .. VerbosityFilter`? " +"Isn't that redundant?" msgstr "" #: src/generics/generic-data.md @@ -6053,30 +6471,33 @@ msgid "" msgstr "" #: src/generics/generic-data.md -msgid "It means these methods are defined for any `T`." +msgid "It means these methods are defined for any `L`." msgstr "" #: src/generics/generic-data.md -msgid "It is possible to write `impl Point { .. }`." +msgid "It is possible to write `impl VerbosityFilter { .. }`." msgstr "" #: src/generics/generic-data.md msgid "" -"`Point` is still generic and you can use `Point`, but methods in this " -"block will only be available for `Point`." +"`VerbosityFilter` is still generic and you can use `VerbosityFilter`, " +"but methods in this block will only be available for " +"`VerbosityFilter`." msgstr "" #: src/generics/generic-data.md msgid "" -"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the " -"code to allow points that have elements of different types, by using two " -"type variables, e.g., `T` and `U`." +"Note that we don't put a trait bound on the `VerbosityFilter` type itself. " +"You can put bounds there as well, but generally in Rust we only put the " +"trait bounds on the impl blocks." msgstr "" #: src/generics/generic-traits.md msgid "" "Traits can also be generic, just like types and functions. A trait's " -"parameters get concrete types when it is used." +"parameters get concrete types when it is used. For example the [`From`]" +"(https://doc.rust-lang.org/std/convert/trait.From.html) trait is used to " +"define type conversions:" msgstr "" #: src/generics/generic-traits.md @@ -6087,15 +6508,11 @@ msgstr "" msgid "\"Converted from bool: {from}\"" msgstr "" -#: src/generics/generic-traits.md -msgid "\"{from_int:?}, {from_bool:?}\"" -msgstr "" - #: src/generics/generic-traits.md msgid "" "The `From` trait will be covered later in the course, but its [definition in " "the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is " -"simple." +"simple, and copied here for reference." msgstr "" #: src/generics/generic-traits.md @@ -6121,56 +6538,6 @@ msgid "" "html)." msgstr "" -#: src/generics/trait-bounds.md -msgid "" -"When working with generics, you often want to require the types to implement " -"some trait, so that you can call this trait's methods." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "You can do this with `T: Trait`:" -msgstr "" - -#: src/generics/trait-bounds.md -msgid "// struct NotCloneable;\n" -msgstr "" - -#: src/generics/trait-bounds.md -msgid "\"{pair:?}\"" -msgstr "" - -#: src/generics/trait-bounds.md -msgid "Try making a `NonCloneable` and passing it to `duplicate`." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "When multiple traits are necessary, use `+` to join them." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "Show a `where` clause, students will encounter it when reading code." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "It declutters the function signature if you have many parameters." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "It has additional features making it more powerful." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "" -"If someone asks, the extra feature is that the type on the left of \":\" can " -"be arbitrary, like `Option`." -msgstr "" - -#: src/generics/trait-bounds.md -msgid "" -"Note that Rust does not (yet) support specialization. For example, given the " -"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`." -msgstr "" - #: src/generics/impl-trait.md msgid "" "Similar to trait bounds, an `impl Trait` syntax can be used in function " @@ -6179,20 +6546,8 @@ msgstr "" #: src/generics/impl-trait.md msgid "" -"// Syntactic sugar for:\n" -"// fn add_42_millions>(x: T) -> i32 {\n" -msgstr "" - -#: src/generics/impl-trait.md -msgid "\"{many}\"" -msgstr "" - -#: src/generics/impl-trait.md -msgid "\"{many_more}\"" -msgstr "" - -#: src/generics/impl-trait.md -msgid "\"debuggable: {debuggable:?}\"" +"// Syntactic sugar for:\n" +"// fn add_42_millions>(x: T) -> i32 {\n" msgstr "" #: src/generics/impl-trait.md @@ -6303,11 +6658,10 @@ msgid "" msgstr "" #: src/generics/exercise.md -msgid "// TODO: implement the `min` function used in `main`.\n" +msgid "// TODO: implement the `min` function used in the tests.\n" msgstr "" #: src/generics/exercise.md src/generics/solution.md -#: src/error-handling/exercise.md src/error-handling/solution.md msgid "'z'" msgstr "" @@ -6319,6 +6673,11 @@ msgstr "" msgid "'1'" msgstr "" +#: src/generics/exercise.md src/generics/solution.md +#: src/std-traits/from-and-into.md +msgid "\"hello\"" +msgstr "\"merhaba\"" + #: src/generics/exercise.md src/generics/solution.md msgid "\"goodbye\"" msgstr "" @@ -6338,6 +6697,15 @@ msgid "" "Ordering.html) enum." msgstr "" +#: src/welcome-day-2-afternoon.md src/welcome-day-4.md +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 2 hours and 50 " +"minutes. It contains:" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"İçeriği:" + #: src/std-types.md src/std-types/option.md msgid "Option" msgstr "" @@ -6474,10 +6842,6 @@ msgstr "" msgid "'é'" msgstr "" -#: src/std-types/option.md -msgid "\"find returned {position:?}\"" -msgstr "" - #: src/std-types/option.md msgid "'Z'" msgstr "" @@ -6567,9 +6931,9 @@ msgid "" "growable UTF-8 encoded string:" msgstr "" -#: src/std-types/string.md src/std-traits/read-and-write.md -#: src/memory-management/review.md src/testing/unit-tests.md -#: src/concurrency/threads/scoped.md +#: src/std-types/string.md src/std-traits/comparisons.md +#: src/std-traits/read-and-write.md src/memory-management/review.md +#: src/testing/unit-tests.md src/concurrency/threads/scoped.md msgid "\"Hello\"" msgstr "\"Merhaba\"" @@ -6790,10 +7154,6 @@ msgstr "" msgid "// Use the .entry() method to insert a value if nothing is found.\n" msgstr "" -#: src/std-types/hashmap.md -msgid "\"{page_counts:#?}\"" -msgstr "" - #: src/std-types/hashmap.md msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." @@ -6895,10 +7255,249 @@ msgstr "" msgid "\"got {} apples\"" msgstr "" -#: src/std-traits.md src/concurrency/sync-exercises.md -#: src/concurrency/async-exercises.md -msgid "This segment should take about 1 hour and 10 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat 10 dakika sürmelidir. İçeriği:" +#: src/closures.md src/concurrency/threads.md src/concurrency/shared-state.md +msgid "This segment should take about 30 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:" + +#: src/closures/syntax.md +msgid "Closures are created with vertical bars: `|..| ..`." +msgstr "" + +#: src/closures/syntax.md +msgid "// Argument and return type can be inferred for lightweight syntax:\n" +msgstr "" + +#: src/closures/syntax.md +msgid "// Or we can specify types and bracket the body to be fully explicit:\n" +msgstr "" + +#: src/closures/syntax.md +msgid "" +"The arguments go between the `|..|`. The body can be surrounded by `{ .. }`, " +"but if it is a single expression these can be omitted." +msgstr "" + +#: src/closures/syntax.md +msgid "" +"Argument types are optional, and are inferred if not given. The return type " +"is also optional, but can only be written if using `{ .. }` around the body." +msgstr "" + +#: src/closures/syntax.md +msgid "" +"The examples can both be written as mere nested functions instead -- they do " +"not capture any variables from their lexical environment. We will see " +"captures next." +msgstr "" + +#: src/closures/syntax.md +msgid "" +"The ability to store functions in variables doesn't just apply to closures, " +"regular functions can be put in variables and then invoked the same way that " +"closures can: [Example in the playground](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." +msgstr "" + +#: src/closures/syntax.md +msgid "" +"The linked example also demonstrates that closures that don't capture " +"anything can also coerce to a regular function pointer." +msgstr "" + +#: src/closures/capturing.md +msgid "" +"A closure can capture variables from the environment where it was defined." +msgstr "" + +#: src/closures/capturing.md +msgid "" +"By default, a closure captures values by reference. Here `max_value` is " +"captured by `clamp`, but still available to `main` for printing. Try making " +"`max_value` mutable, changing it, and printing the clamped values again. Why " +"doesn't this work?" +msgstr "" + +#: src/closures/capturing.md +msgid "" +"If a closure mutates values, it will capture them by mutable reference. Try " +"adding `max_value += 1` to `clamp`." +msgstr "" + +#: src/closures/capturing.md +msgid "" +"You can force a closure to move values instead of referencing them with the " +"`move` keyword. This can help with lifetimes, for example if the closure " +"must outlive the captured values (more on lifetimes later)." +msgstr "" + +#: src/closures/capturing.md +msgid "" +"This looks like `move |v| ..`. Try adding this keyword and see if `main` can " +"still access `max_value` after defining `clamp`." +msgstr "" + +#: src/closures/capturing.md +msgid "" +"By default, closures will capture each variable from an outer scope by the " +"least demanding form of access they can (by shared reference if possible, " +"then exclusive reference, then by move). The `move` keyword forces capture " +"by value." +msgstr "" + +#: src/closures/traits.md +#, fuzzy +msgid "Closure traits" +msgstr "Çevreleyiciler (Closures)" + +#: src/closures/traits.md +msgid "" +"Closures or lambda expressions have types which cannot be named. However, " +"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn." +"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " +"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" +msgstr "" + +#: src/closures/traits.md +msgid "" +"The special types `fn(..) -> T` refer to function pointers - either the " +"address of a function, or a closure that captures nothing." +msgstr "" + +#: src/closures/traits.md +msgid "\"Calling {func_name}({input}): {}\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"-itis\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"{x}{suffix}\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"add_suffix\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"senior\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"appenix\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"/\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"accumulate\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"red\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"green\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"blue\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"take_and_reverse\"" +msgstr "" + +#: src/closures/traits.md +msgid "\"reversed: \"" +msgstr "" + +#: src/closures/traits.md +msgid "" +"An `Fn` (e.g. `add_suffix`) neither consumes nor mutates captured values. It " +"can be called needing only a shared reference to the closure, which means " +"the closure can be executed repeatedly and even concurrently." +msgstr "" + +#: src/closures/traits.md +msgid "" +"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure " +"object is accessed via exclusive reference, so it can be called repeatedly " +"but not concurrently." +msgstr "" + +#: src/closures/traits.md +msgid "" +"If you have an `FnOnce` (e.g. `take_and_reverse`), you may only call it " +"once. Doing so consumes the closure and any values captured by move." +msgstr "" + +#: src/closures/traits.md +msgid "" +"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " +"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " +"use an `Fn` wherever an `FnMut` or `FnOnce` is called for." +msgstr "" + +#: src/closures/traits.md +msgid "" +"When you define a function that takes a closure, you should take `FnOnce` if " +"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " +"the most flexibility for the caller." +msgstr "" + +#: src/closures/traits.md +msgid "" +"In contrast, when you have a closure, the most flexible you can have is `Fn` " +"(which can be passed to a consumer of any of the 3 closure traits), then " +"`FnMut`, and lastly `FnOnce`." +msgstr "" + +#: src/closures/traits.md +msgid "" +"The compiler also infers `Copy` (e.g. for `add_suffix`) and `Clone` (e.g. " +"`take_and_reverse`), depending on what the closure captures. Function " +"pointers (references to `fn` items) implement `Copy` and `Fn`." +msgstr "" + +#: src/closures/exercise.md +msgid "" +"Building on the generic logger from this morning, implement a `Filter` which " +"uses a closure to filter log messages, sending those which pass the " +"filtering predicate to an inner logger." +msgstr "" + +#: src/closures/exercise.md +msgid "// TODO: Define and implement `Filter`.\n" +msgstr "" + +#: src/closures/exercise.md src/closures/solution.md +msgid "\"yikes\"" +msgstr "" + +#: src/closures/exercise.md src/closures/solution.md +msgid "\"yikes, something went wrong\"" +msgstr "" + +#: src/closures/exercise.md src/closures/solution.md +#: src/unsafe-rust/dereferencing.md +msgid "\"uhoh\"" +msgstr "" + +#: src/closures/solution.md +msgid "/// Only log messages matching a filtering predicate.\n" +msgstr "" + +#: src/closures/solution.md +msgid "" +"Note that the `P: Fn(u8, &str) -> bool` bound on the first `Filter` impl " +"block isn't strictly necessary, but it helps with type inference when " +"calling `new`. Demonstrate removing it and showing how the compiler now " +"needs type annotations for the closure passed to `new`." +msgstr "" #: src/std-traits.md msgid "From and Into" @@ -6971,6 +7570,14 @@ msgid "" "them." msgstr "" +#: src/std-traits/comparisons.md +msgid "" +"When comparing references in Rust, it will compare the value of the things " +"pointed to, it will NOT compare the references themselves. That means that " +"references to two different things can compare as equal if the values " +"pointed to are the same:" +msgstr "" + #: src/std-traits/operators.md msgid "" "Operator overloading is implemented via traits in [`std::ops`](https://doc." @@ -7153,159 +7760,58 @@ msgid "The `Default` Trait" msgstr "" #: src/std-traits/default.md +#, fuzzy msgid "" -"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait " -"produces a default value for a type." +"The [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " +"trait produces a default value for a type." msgstr "" +"[`for` döngüsü](https://doc.rust-lang.org/std/keyword.for.html) değer " +"aralıkları veya bir koleksiyondaki öğeler üzerinde tekrarlar:" #: src/std-traits/default.md msgid "\"John Smith\"" msgstr "" -#: src/std-traits/default.md -msgid "\"{default_struct:#?}\"" -msgstr "" - #: src/std-traits/default.md msgid "\"Y is set!\"" msgstr "" -#: src/std-traits/default.md -msgid "\"{almost_default_struct:#?}\"" -msgstr "" - -#: src/std-traits/default.md -msgid "\"{:#?}\"" -msgstr "" - #: src/std-traits/default.md msgid "" "It can be implemented directly or it can be derived via `#[derive(Default)]`." msgstr "" #: src/std-traits/default.md -msgid "" -"A derived implementation will produce a value where all fields are set to " -"their default values." -msgstr "" - -#: src/std-traits/default.md -msgid "This means all types in the struct must implement `Default` too." -msgstr "" - -#: src/std-traits/default.md -msgid "" -"Standard Rust types often implement `Default` with reasonable values (e.g. " -"`0`, `\"\"`, etc)." -msgstr "" - -#: src/std-traits/default.md -msgid "The partial struct initialization works nicely with default." -msgstr "" - -#: src/std-traits/default.md -msgid "" -"The Rust standard library is aware that types can implement `Default` and " -"provides convenience methods that use it." -msgstr "" - -#: src/std-traits/default.md -msgid "" -"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/" -"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" -"with-struct-update-syntax)." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"Closures or lambda expressions have types which cannot be named. However, " -"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn." -"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " -"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" -msgstr "" - -#: src/std-traits/closures.md -msgid "\"Calling {func_name}({input}): {}\"" -msgstr "" - -#: src/std-traits/closures.md -msgid "\"add_3\"" -msgstr "" - -#: src/std-traits/closures.md -msgid "\"accumulate\"" -msgstr "" - -#: src/std-traits/closures.md -msgid "\"multiply_sum\"" -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can " -"be called needing only a shared reference to the closure, which means the " -"closure can be executed repeatedly and even concurrently." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure " -"object is accessed via exclusive reference, so it can be called repeatedly " -"but not concurrently." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. " -"Doing so consumes the closure and any values captured by move." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " -"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " -"use an `Fn` wherever an `FnMut` or `FnOnce` is called for." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"When you define a function that takes a closure, you should take `FnOnce` if " -"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " -"the most flexibility for the caller." -msgstr "" - -#: src/std-traits/closures.md -msgid "" -"In contrast, when you have a closure, the most flexible you can have is `Fn` " -"(which can be passed to a consumer of any of the 3 closure traits), then " -"`FnMut`, and lastly `FnOnce`." +msgid "" +"A derived implementation will produce a value where all fields are set to " +"their default values." msgstr "" -#: src/std-traits/closures.md -msgid "" -"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. " -"`multiply_sum`), depending on what the closure captures. Function pointers " -"(references to `fn` items) implement `Copy` and `Fn`." +#: src/std-traits/default.md +msgid "This means all types in the struct must implement `Default` too." msgstr "" -#: src/std-traits/closures.md +#: src/std-traits/default.md msgid "" -"By default, closures will capture each variable from an outer scope by the " -"least demanding form of access they can (by shared reference if possible, " -"then exclusive reference, then by move). The `move` keyword forces capture " -"by value." +"Standard Rust types often implement `Default` with reasonable values (e.g. " +"`0`, `\"\"`, etc)." msgstr "" -#: src/std-traits/closures.md src/smart-pointers/trait-objects.md -msgid "\"{} {}\"" +#: src/std-traits/default.md +msgid "The partial struct initialization works nicely with default." msgstr "" -#: src/std-traits/closures.md -msgid "\"Hi\"" +#: src/std-traits/default.md +msgid "" +"The Rust standard library is aware that types can implement `Default` and " +"provides convenience methods that use it." msgstr "" -#: src/std-traits/closures.md -msgid "\"Greg\"" +#: src/std-traits/default.md +msgid "" +"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/" +"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" +"with-struct-update-syntax)." msgstr "" #: src/std-traits/exercise.md @@ -7334,10 +7840,6 @@ msgid "" "by 13 characters?" msgstr "" -#: src/std-traits/solution.md -msgid "'A'" -msgstr "" - #: src/welcome-day-3.md msgid "Welcome to Day 3" msgstr "" @@ -7544,8 +8046,8 @@ msgid "" "of C, with alloc and free operations precisely where they are required -- " "zero cost. It also provides tools similar to C++'s smart pointers. When " "required, other options such as reference counting are available, and there " -"are even third-party crates available to support runtime garbage collection " -"(not covered in this class)." +"are even crates available to support runtime garbage collection (not covered " +"in this class)." msgstr "" #: src/memory-management/ownership.md @@ -7582,7 +8084,7 @@ msgid "\"Hello!\"" msgstr "\"Merhaba!\"" #: src/memory-management/move.md -msgid "// println!(\"s1: {s1}\");\n" +msgid "// dbg!(s1);\n" msgstr "" #: src/memory-management/move.md @@ -7895,11 +8397,11 @@ msgid "\"d\"" msgstr "" #: src/memory-management/drop.md -msgid "\"Exiting block B\"" +msgid "\"Exiting innermost block\"" msgstr "" #: src/memory-management/drop.md -msgid "\"Exiting block A\"" +msgid "\"Exiting next block\"" msgstr "" #: src/memory-management/drop.md @@ -8023,10 +8525,6 @@ msgstr "" msgid "\"0.13\"" msgstr "" -#: src/memory-management/exercise.md src/memory-management/solution.md -msgid "\"base64: {base64:?}\"" -msgstr "" - #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"log\"" msgstr "" @@ -8035,10 +8533,6 @@ msgstr "" msgid "\"0.4\"" msgstr "" -#: src/memory-management/exercise.md src/memory-management/solution.md -msgid "\"log: {log:?}\"" -msgstr "" - #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"serde\"" msgstr "" @@ -8051,10 +8545,6 @@ msgstr "" msgid "\"4.0\"" msgstr "" -#: src/memory-management/exercise.md src/memory-management/solution.md -msgid "\"serde: {serde:?}\"" -msgstr "" - #: src/memory-management/solution.md msgid "\"0.1\"" msgstr "" @@ -8183,11 +8673,9 @@ msgid "" msgstr "" #: src/smart-pointers/rc.md -msgid "\"a: {a}\"" -msgstr "" - -#: src/smart-pointers/rc.md -msgid "\"b: {b}\"" +msgid "" +"Each `Rc` points to the same shared data structure, containing strong and " +"weak pointers and the value:" msgstr "" #: src/smart-pointers/rc.md @@ -8251,59 +8739,59 @@ msgstr "" msgid "" "```bob\n" " Stack Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " -"- -.\n" -": : : :\n" -": \"pets: Vec\" : : \"data: Cat\" +----+----+----" -"+----+ :\n" -": +-----------+-------+ : : +-------+-------+ | F | i | d | " -"o | :\n" -": | ptr | o---+---+--. : | lives | 9 | +----+----+----" +".- - - - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - " +"- - - -.\n" +": : : :\n" +": \"pets: Vec>\" : : \"data: Cat\" +----+----" +"+----+----+ :\n" +": +-----------+-------+ : : +-------+-------+ | F | i | d " +"| o | :\n" +": | ptr | o---+-------+--. : | lives | 9 | +----+----+----" "+----+ :\n" -": | len | 2 | : | : +-------+-------+ " +": | len | 2 | : | : +-------+-------+ " "^ :\n" -": | capacity | 2 | : | : ^ " +": | capacity | 2 | : | : ^ " "| :\n" -": +-----------+-------+ : | : | " +": +-----------+-------+ : | : | " "'-------. :\n" -": : | : | data:" +": : | : | data:" "\"Dog\"| :\n" -": : | : | +-------+--|-------" -"+ :\n" -"`- - - - - - - - - - - - - -' | : +---|-+-----+ | name | o, 4, 4 " -"| :\n" -" `--+-->| o o | o o-|----->| age | 5 " -"| :\n" -" : +-|---+-|---+ +-------+----------" -"+ :\n" -" : | " +": : | : | +-------" +"+--|-------+ :\n" +"`- - - - - - - - - - - - - - - -' | : +---|-+-----+ | name | o, " +"4, 4 | :\n" +" `--+-->| o o | o o-|----->| age " +"| 5 | :\n" +" : +-|---+-|---+ +-------" +"+----------+ :\n" +" : | " "| :\n" -" `- - -| - - |- - - - - - - - - - - - - - - " -"- -'\n" -" | |\n" -" | | " +" `- - -| - - |- - - - - - - - - - - - - " +"- - - -'\n" +" | |\n" +" | | " "\"Program text\"\n" -" .- - -| - - |- - - - - - - - - - - - - - - " -"- -.\n" -" : | | " +" .- - -| - - |- - - - - - - - - - - - - " +"- - - -.\n" +" : | | " "vtable :\n" -" : | | +----------------------" -"+ :\n" -" : | `----->| \"::" +" : | | " +"+----------------------+ :\n" +" : | `----->| \"::" "talk\" | :\n" -" : | +----------------------" -"+ :\n" -" : | " +" : | " +"+----------------------+ :\n" +" : | " "vtable :\n" -" : | +----------------------" -"+ :\n" -" : '----------->| \"::" +" : | " +"+----------------------+ :\n" +" : '----------->| \"::" "talk\" | :\n" -" : +----------------------" -"+ :\n" -" : :\n" -" '- - - - - - - - - - - - - - - - - - - - - " -"- -'\n" +" : " +"+----------------------+ :\n" +" : :\n" +" '- - - - - - - - - - - - - - - - - - - " +"- - - -'\n" "```" msgstr "" @@ -8343,6 +8831,17 @@ msgstr "" msgid "Compare these outputs in the above example:" msgstr "" +#: src/smart-pointers/trait-objects.md +msgid "\"{} {}\"" +msgstr "" + +#: src/smart-pointers/trait-objects.md src/modules/exercise.md +#: src/modules/solution.md src/android/build-rules/library.md +#: src/android/interoperability/cpp/rust-bridge.md +#: src/concurrency/async-pitfalls/cancellation.md +msgid "\"{}\"" +msgstr "\"{}\"" + #: src/smart-pointers/exercise.md msgid "" "A binary tree is a tree-type data structure where every node has two " @@ -8355,12 +8854,6 @@ msgstr "" msgid "Implement the following types, so that the given tests pass." msgstr "" -#: src/smart-pointers/exercise.md -msgid "" -"Extra Credit: implement an iterator over a binary tree that returns the " -"values in order." -msgstr "" - #: src/smart-pointers/exercise.md src/smart-pointers/solution.md msgid "/// A node in the binary tree.\n" msgstr "" @@ -8384,10 +8877,6 @@ msgstr "" msgid "// not a unique item\n" msgstr "" -#: src/smart-pointers/solution.md src/android/testing/googletest.md -msgid "\"bar\"" -msgstr "" - #: src/welcome-day-3-afternoon.md msgid "" "Including 10 minute breaks, this session should take about 1 hour and 55 " @@ -8426,7 +8915,7 @@ msgid "" "eliminate the copy operation, by inlining the call to add into main. Change " "the above code to print stack addresses and run it on the [Playground]" "(https://play.rust-lang.org/?" -"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) " +"version=stable&mode=release&edition=2024&gist=0cb13be1c05d7e3446686ad9947c4671) " "or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the " "\"DEBUG\" optimization level, the addresses should change, while they stay " "the same when changing to the \"RELEASE\" setting:" @@ -8449,7 +8938,13 @@ msgstr "" #: src/borrowing/borrowck.md msgid "" "Rust's _borrow checker_ puts constraints on the ways you can borrow values. " -"For a given value, at any time:" +"We've already seen that a reference cannot _outlive_ the value it borrows:" +msgstr "" + +#: src/borrowing/borrowck.md +msgid "" +"There's also a second main rule that the borrow checker enforces: The " +"_aliasing_ rule. For a given value, at any time:" msgstr "" #: src/borrowing/borrowck.md @@ -8462,8 +8957,9 @@ msgstr "" #: src/borrowing/borrowck.md msgid "" -"Note that the requirement is that conflicting references not _exist_ at the " -"same point. It does not matter where the reference is dereferenced." +"The \"outlives\" rule was demonstrated previously when we first looked at " +"references. We review it here to show students that the borrow checking is " +"following a few different rules to validate borrowing." msgstr "" #: src/borrowing/borrowck.md @@ -8474,8 +8970,24 @@ msgstr "" #: src/borrowing/borrowck.md msgid "" -"Move the `println!` statement for `b` before the scope that introduces `c` " -"to make the code compile." +"Note that the requirement is that conflicting references not _exist_ at the " +"same point. It does not matter where the reference is dereferenced. Try " +"commenting out `*c = 20` and show that the compiler error still occurs even " +"if we never use `c`." +msgstr "" + +#: src/borrowing/borrowck.md +msgid "" +"Note that the intermediate reference `c` isn't necessary to trigger a borrow " +"conflict. Replace `c` with a direct mutation of `a` and demonstrate that " +"this produces a similar error. This is because direct mutation of a value " +"effectively creates a temporary mutable reference." +msgstr "" + +#: src/borrowing/borrowck.md +msgid "" +"Move the `dbg!` statement for `b` before the scope that introduces `c` to " +"make the code compile." msgstr "" #: src/borrowing/borrowck.md @@ -8487,18 +8999,36 @@ msgstr "" #: src/borrowing/borrowck.md msgid "" -"The exclusive reference constraint is quite strong. Rust uses it to ensure " -"that data races do not occur. Rust also _relies_ on this constraint to " -"optimize code. For example, a value behind a shared reference can be safely " -"cached in a register for the lifetime of that reference." +"Technically multiple mutable references to a piece of data can exist at the " +"same time via re-borrowing. This is what allows you to pass a mutable " +"reference into a function without invaliding the original reference. [This " +"playground example](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=8f5896878611566845fe3b0f4dc5af68) " +"demonstrates that behavior." +msgstr "" + +#: src/borrowing/borrowck.md +msgid "" +"Rust uses the exclusive reference constraint to ensure that data races do " +"not occur in multi-threaded code, since only one thread can have mutable " +"access to a piece of data at a time." +msgstr "" + +#: src/borrowing/borrowck.md +msgid "" +"Rust also uses this constraint to optimize code. For example, a value behind " +"a shared reference can be safely cached in a register for the lifetime of " +"that reference." msgstr "" #: src/borrowing/borrowck.md msgid "" -"The borrow checker is designed to accommodate many common patterns, such as " -"taking exclusive references to different fields in a struct at the same " -"time. But, there are some situations where it doesn't quite \"get it\" and " -"this often results in \"fighting with the borrow checker.\"" +"Fields of a struct can be borrowed independently of each other, but calling " +"a method on a struct will borrow the whole struct, potentially invalidating " +"references to individual fields. See [this playground snippet](https://play." +"rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=f293a31f2d4d0d31770486247c2e8437) " +"for an example of this." msgstr "" #: src/borrowing/examples.md @@ -8508,10 +9038,6 @@ msgid "" "its elements:" msgstr "" -#: src/borrowing/examples.md -msgid "\"{elem}\"" -msgstr "\"{elem}\"" - #: src/borrowing/examples.md msgid "Similarly, consider the case of iterator invalidation:" msgstr "" @@ -8538,10 +9064,13 @@ msgid "" msgstr "" #: src/borrowing/interior-mutability.md -msgid "`Cell`" +msgid "" +"The main thing to take away from this slide is that Rust provides _safe_ " +"ways to modify data behind a shared reference. There are a variety of ways " +"to ensure that safety, and the next sub-slides present a few of them." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/cell.md msgid "" "`Cell` wraps a value and allows getting or setting the value using only a " "shared reference to the `Cell`. However, it does not allow any references to " @@ -8549,52 +9078,49 @@ msgid "" "broken." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/cell.md +#: src/borrowing/interior-mutability/refcell.md msgid "// Note that `cell` is NOT declared as mutable.\n" msgstr "" -#: src/borrowing/interior-mutability.md -msgid "`RefCell`" -msgstr "`RefCell`" +#: src/borrowing/interior-mutability/cell.md +msgid "" +"`Cell` is a simple means to ensure safety: it has a `set` method that takes " +"`&self`. This needs no runtime check, but requires moving values, which can " +"have its own cost." +msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" "`RefCell` allows accessing and mutating a wrapped value by providing " "alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without " "actually being Rust references." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" "These types perform dynamic checks using a counter in the `RefCell` to " "prevent existence of a `RefMut` alongside another `Ref`/`RefMut`." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" "By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow " "calling methods on the inner value without allowing references to escape." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" "// This triggers an error at runtime.\n" " // let other = cell.borrow();\n" -" // println!(\"{}\", *other);\n" +" // println!(\"{}\", other);\n" msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "\"{cell:?}\"" msgstr "\"{cell:?}\"" -#: src/borrowing/interior-mutability.md -msgid "" -"The main thing to take away from this slide is that Rust provides _safe_ " -"ways to modify data behind a shared reference. There are a variety of ways " -"to ensure that safety, and `RefCell` and `Cell` are two of them." -msgstr "" - -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" "`RefCell` enforces Rust's usual borrowing rules (either multiple shared " "references or a single exclusive reference) with a runtime check. In this " @@ -8602,25 +9128,18 @@ msgid "" "succeed." msgstr "" -#: src/borrowing/interior-mutability.md -msgid "" -"The extra block in the `RefCell` example is to end the borrow created by the " -"call to `borrow_mut` before we print the cell. Trying to print a borrowed " -"`RefCell` just shows the message `\"{borrowed}\"`." -msgstr "" - -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" -"`Cell` is a simpler means to ensure safety: it has a `set` method that takes " -"`&self`. This needs no runtime check, but requires moving values, which can " -"have its own cost." +"The extra block in the example is to end the borrow created by the call to " +"`borrow_mut` before we print the cell. Trying to print a borrowed `RefCell` " +"just shows the message `\"{borrowed}\"`." msgstr "" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability/refcell.md msgid "" -"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` " -"can't be passed between threads. This prevents two threads trying to access " -"the cell at once." +"There are also `OnceCell` and `OnceLock`, which allow initialization on " +"first use. Making these useful requires some more knowledge than students " +"have at this time." msgstr "" #: src/borrowing/exercise.md @@ -8654,10 +9173,6 @@ msgstr "" msgid "\"Bob\"" msgstr "" -#: src/borrowing/exercise.md src/borrowing/solution.md -msgid "\"I'm {} and my age is {}\"" -msgstr "" - #: src/lifetimes/lifetime-annotations.md msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " @@ -8674,25 +9189,24 @@ msgstr "" #: src/lifetimes/lifetime-annotations.md msgid "" -"Lifetimes are always inferred by the compiler: you cannot assign a lifetime " -"yourself. Explicit lifetime annotations create constraints where there is " -"ambiguity; the compiler verifies that there is a valid solution." +"Only ownership, not lifetime annotations, control when values are destroyed " +"and determine the concrete lifetime of a given value. The borrow checker " +"just validates that borrows never extend beyond the concrete lifetime of the " +"value." msgstr "" #: src/lifetimes/lifetime-annotations.md msgid "" -"Lifetimes become more complicated when considering passing values to and " -"returning values from functions." +"Explicit lifetime annotations, like types, are required on function " +"signatures (but can be elided in common cases). These provide information " +"for inference at callsites and within the function body, helping the borrow " +"checker to do its job." msgstr "" #: src/lifetimes/lifetime-annotations.md msgid "// What is the lifetime of p3?\n" msgstr "" -#: src/lifetimes/lifetime-annotations.md -msgid "\"p3: {p3:?}\"" -msgstr "" - #: src/lifetimes/lifetime-annotations.md msgid "" "In this example, the compiler does not know what lifetime to infer for `p3`. " @@ -8708,13 +9222,14 @@ msgstr "" #: src/lifetimes/lifetime-annotations.md msgid "" -"This says, \"given p1 and p2 which both outlive `'a`, the return value lives " -"for at least `'a`." +"This says there is some lifetime `'a` which both `p1` and `p2` outlive, and " +"which outlives the return value. The borrow checker verifies this within the " +"function body, and uses this information in `main` to determine a lifetime " +"for `p3`." msgstr "" #: src/lifetimes/lifetime-annotations.md -msgid "" -"In common cases, lifetimes can be elided, as described on the next slide." +msgid "Try dropping `p2` in `main` before printing `p3`." msgstr "" #: src/lifetimes/lifetime-elision.md @@ -8752,7 +9267,8 @@ msgstr "" #: src/lifetimes/lifetime-elision.md msgid "" "The `nearest` function provides another example of a function with multiple " -"references in its arguments that requires explicit annotation." +"references in its arguments that requires explicit annotation. In `main`, " +"the return value is allowed to outlive the query." msgstr "" #: src/lifetimes/lifetime-elision.md @@ -8775,46 +9291,31 @@ msgid "" "just work with owned data by cloning values where necessary." msgstr "" -#: src/lifetimes/struct-lifetimes.md -msgid "Lifetimes in Data Structures" -msgstr "Veri Yapılarında Ömürler" - #: src/lifetimes/struct-lifetimes.md msgid "" "If a data type stores borrowed data, it must be annotated with a lifetime:" msgstr "" -#: src/lifetimes/struct-lifetimes.md -msgid "\"Bye {text}!\"" -msgstr "" - #: src/lifetimes/struct-lifetimes.md msgid "\"The quick brown fox jumps over the lazy dog.\"" msgstr "" #: src/lifetimes/struct-lifetimes.md -msgid "// erase(text);\n" -msgstr "" - -#: src/lifetimes/struct-lifetimes.md -msgid "\"{fox:?}\"" -msgstr "" - -#: src/lifetimes/struct-lifetimes.md -msgid "\"{dog:?}\"" +msgid "// drop(doc);\n" msgstr "" #: src/lifetimes/struct-lifetimes.md msgid "" "In the above example, the annotation on `Highlight` enforces that the data " "underlying the contained `&str` lives at least as long as any instance of " -"`Highlight` that uses that data." +"`Highlight` that uses that data. A struct cannot live longer than the data " +"it references." msgstr "" #: src/lifetimes/struct-lifetimes.md msgid "" -"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), " -"the borrow checker throws an error." +"If `doc` is dropped before the end of the lifetime of `noun` or `verb`, the " +"borrow checker throws an error." msgstr "" #: src/lifetimes/struct-lifetimes.md @@ -9133,53 +9634,254 @@ msgid "" "Unsafe Rust: the escape hatch when you can't express yourself in safe Rust." msgstr "" -#: src/welcome-day-4.md -msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 40 " -"minutes. It contains:" +#: src/iterators.md +#, fuzzy +msgid "Iterator Trait" +msgstr "Iterator" + +#: src/iterators.md +msgid "Iterator Helper Methods" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 40 dakika sürmelidir. " -"İçeriği:" #: src/iterators.md -msgid "Iterator" -msgstr "Iterator" +#, fuzzy +msgid "collect" +msgstr "Select" #: src/iterators.md msgid "IntoIterator" msgstr "IntoIterator" -#: src/iterators.md src/iterators/fromiterator.md -msgid "FromIterator" -msgstr "FromIterator" +#: src/iterators/motivation.md +#, fuzzy +msgid "Motivating Iterators" +msgstr "Dizeler (Stringler) ve Adımlayıcılar (Iterators)" + +#: src/iterators/motivation.md +msgid "" +"If you want to iterate over the contents of an array, you'll need to define:" +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"Some state to keep track of where you are in the iteration process, e.g. an " +"index." +msgstr "" + +#: src/iterators/motivation.md +msgid "A condition to determine when iteration is done." +msgstr "" + +#: src/iterators/motivation.md +msgid "Logic for updating the state of iteration each loop." +msgstr "" + +#: src/iterators/motivation.md +msgid "Logic for fetching each element using that iteration state." +msgstr "" + +#: src/iterators/motivation.md +msgid "In a C-style for loop you declare these things directly:" +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"In Rust we bundle this state and logic together into an object known as an " +"\"iterator\"." +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"This slide provides context for what Rust iterators do under the hood. We " +"use the (hopefully) familiar construct of a C-style `for` loop to show how " +"iteration requires some state and some logic, that way on the next slide we " +"can show how an iterator bundles these together." +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"Rust doesn't have a C-style `for` loop, but we can express the same thing " +"with `while`:" +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"There's another way to express array iteration using `for` in C and C++: You " +"can use a pointer to the front and a pointer to the end of the array and " +"then compare those pointers to determine when the loop should end." +msgstr "" + +#: src/iterators/motivation.md +msgid "" +"If students ask, you can point out that this is how Rust's slice and array " +"iterators work under the hood (though implemented as a Rust iterator)." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) " +"trait defines how an object can be used to produce a sequence of values. For " +"example, if we wanted to create an iterator that can produce the elements of " +"a slice it might look something like this:" +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"The `SliceIter` example implements the same logic as the C-style `for` loop " +"demonstrated on the last slide." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"Point out to the students that iterators are lazy: Creating the iterator " +"just initializes the struct but does not otherwise do any work. No work " +"happens until the `next` method is called." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"Iterators don't need to be finite! It's entirely valid to have an iterator " +"that will produce values forever. For example, a half open range like `0..` " +"will keep going until integer overflow occurs." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"The \"real\" version of `SliceIter` is the [`slice::Iter`](https://doc.rust-" +"lang.org/stable/std/slice/struct.Iter.html) type in the standard library, " +"however the real version uses pointers under the hood instead of an index in " +"order to eliminate bounds checks." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"The `SliceIter` example is a good example of a struct that contains a " +"reference and therefore uses lifetime annotations." +msgstr "" + +#: src/iterators/iterator.md +msgid "" +"You can also demonstrate adding a generic parameter to `SliceIter` to allow " +"it to work with any kind of slice (not just `&[i32]`)." +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"In addition to the `next` method that defines how an iterator behaves, the " +"`Iterator` trait provides 70+ helper methods that can be used to build " +"customized iterators." +msgstr "" + +#: src/iterators/helpers.md +msgid "// Create a range from 1 to 10\n" +msgstr "" + +#: src/iterators/helpers.md +msgid "// Keep only even numbers\n" +msgstr "" + +#: src/iterators/helpers.md +msgid "// Square each number\n" +msgstr "" + +#: src/iterators/helpers.md +msgid "// Sum up all the squared numbers\n" +msgstr "" + +#: src/iterators/helpers.md +msgid "\"The sum of squares of even numbers from 1 to 10 is: {}\"" +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"The `Iterator` trait implements many common functional programming " +"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is " +"the trait where you can find all the documentation about them." +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"Many of these helper methods take the original iterator and produce a new " +"iterator with different behavior. These are know as \"iterator adapter " +"methods\"." +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"Some methods, like `sum` and `count`, consume the iterator and pull all of " +"the elements out of it." +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"These methods are designed to be chained together so that it's easy to build " +"a custom iterator that does exactly what you need." +msgstr "" + +#: src/iterators/helpers.md +msgid "" +"Rust's iterators are extremely efficient and highly optimizable. Even " +"complex iterators made by combining many adapter methods will still result " +"in code as efficient as equivalent imperative implementations." +msgstr "" + +#: src/iterators/collect.md +msgid "" +"The [`collect`](https://doc.rust-lang.org/std/iter/trait.Iterator." +"html#method.collect) method lets you build a collection from an [`Iterator`]" +"(https://doc.rust-lang.org/std/iter/trait.Iterator.html)." +msgstr "" + +#: src/iterators/collect.md +msgid "\"prime_squares: {prime_squares:?}\"" +msgstr "" + +#: src/iterators/collect.md +msgid "" +"Any iterator can be collected in to a `Vec`, `VecDeque`, or `HashSet`. " +"Iterators that produce key-value pairs (i.e. a two-element tuple) can also " +"be collected into `HashMap` and `BTreeMap`." +msgstr "" + +#: src/iterators/collect.md +msgid "" +"Show the students the definition for `collect` in the standard library docs. " +"There are two ways to specify the generic type `B` for this method:" +msgstr "" + +#: src/iterators/collect.md +msgid "" +"With the \"turbofish\": `some_iterator.collect::()`, as " +"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` " +"elements." +msgstr "" -#: src/iterators/iterator.md +#: src/iterators/collect.md msgid "" -"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) " -"trait supports iterating over values in a collection. It requires a `next` " -"method and provides lots of methods. Many standard library types implement " -"`Iterator`, and you can implement it yourself, too:" +"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. " +"Rewrite the example to use this form." msgstr "" -#: src/iterators/iterator.md -msgid "\"fib({i}): {n}\"" +#: src/iterators/collect.md +msgid "" +"If students are curious about how this works, you can bring up the " +"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " +"trait, which defines how each type of collection gets built from an iterator." msgstr "" -#: src/iterators/iterator.md +#: src/iterators/collect.md msgid "" -"The `Iterator` trait implements many common functional programming " -"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is " -"the trait where you can find all the documentation about them. In Rust these " -"functions should produce the code as efficient as equivalent imperative " -"implementations." +"In addition to the basic implementations of `FromIterator` for `Vec`, " +"`HashMap`, etc., there are also more specialized implementations which let " +"you do cool things like convert an `Iterator>` into a " +"`Result, E>`." msgstr "" -#: src/iterators/iterator.md +#: src/iterators/collect.md msgid "" -"`IntoIterator` is the trait that makes for loops work. It is implemented by " -"collection types such as `Vec` and references to them such as `&Vec` " -"and `&[T]`. Ranges also implement it. This is why you can iterate over a " -"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist." +"The reason type annotations are often needed with `collect` is because it's " +"generic over its return type. This makes it harder for the compiler to infer " +"the correct type in a lot of cases." msgstr "" #: src/iterators/intoiterator.md @@ -9194,6 +9896,14 @@ msgstr "" msgid "\"point = {x}, {y}\"" msgstr "" +#: src/iterators/intoiterator.md +msgid "" +"`IntoIterator` is the trait that makes for loops work. It is implemented by " +"collection types such as `Vec` and references to them such as `&Vec` " +"and `&[T]`. Ranges also implement it. This is why you can iterate over a " +"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist." +msgstr "" + #: src/iterators/intoiterator.md msgid "" "Click through to the docs for `IntoIterator`. Every implementation of " @@ -9226,8 +9936,10 @@ msgstr "" #: src/iterators/intoiterator.md msgid "" -"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a " -"reference to the `Grid` in `GridIter`." +"Fix this issue by implementing `IntoIterator` for `&Grid` and creating a " +"`GridRefIter` that iterates by reference. A version with both `GridIter` and " +"`GridRefIter` is available [in this playground](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=947e371c7295af758504f01f149023a1)." msgstr "" #: src/iterators/intoiterator.md @@ -9238,45 +9950,6 @@ msgid "" "over references to elements of `some_vector`." msgstr "" -#: src/iterators/fromiterator.md -msgid "" -"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " -"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/" -"std/iter/trait.Iterator.html)." -msgstr "" - -#: src/iterators/fromiterator.md -msgid "\"prime_squares: {prime_squares:?}\"" -msgstr "" - -#: src/iterators/fromiterator.md -msgid "`Iterator` implements" -msgstr "" - -#: src/iterators/fromiterator.md -msgid "There are two ways to specify `B` for this method:" -msgstr "" - -#: src/iterators/fromiterator.md -msgid "" -"With the \"turbofish\": `some_iterator.collect::()`, as " -"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` " -"elements." -msgstr "" - -#: src/iterators/fromiterator.md -msgid "" -"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. " -"Rewrite the example to use this form." -msgstr "" - -#: src/iterators/fromiterator.md -msgid "" -"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. " -"There are also more specialized implementations which let you do cool things " -"like convert an `Iterator>` into a `Result, E>`." -msgstr "" - #: src/iterators/exercise.md msgid "" "In this exercise, you will need to find and use some of the provided methods " @@ -9482,6 +10155,83 @@ msgid "" "its descendants)." msgstr "" +#: src/modules/encapsulation.md +msgid "Visibility and Encapsulation" +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"Like with items in a module, struct fields are also private by default. " +"Private fields are likewise visible within the rest of the module (including " +"child modules). This allows us to encapsulate implementation details of " +"struct, controlling what data and functionality is visible externally." +msgstr "" + +#: src/modules/encapsulation.md +#, fuzzy +msgid "\"Is {} big? {}\"" +msgstr "\"{n}! = {}\"" + +#: src/modules/encapsulation.md +msgid "\"foo.val = {}\"" +msgstr "" + +#: src/modules/encapsulation.md +msgid "// let foo = Foo { val: 42, is_big: true };\n" +msgstr "" + +#: src/modules/encapsulation.md +msgid "// println!(\"Is {} big? {}\", foo.val, foo.is_big);\n" +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"This slide demonstrates how privacy in structs is module-based. Students " +"coming from object oriented languages may be used to types being the " +"encapsulation boundary, so this demonstrates how Rust behaves differently " +"while showing how we can still achieve encapsulation." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"Note how the `is_big` field is fully controlled by `Foo`, allowing `Foo` to " +"control how it's initialized and enforce any invariants it needs to (e.g. " +"that `is_big` is only `true` if `val > 100`)." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"Point out how helper functions can be defined in the same module (including " +"child modules) in order to get access to the type's private fields/methods." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"The first commented out line demonstrates that you cannot initialize a " +"struct with private fields. The second one demonstrates that you also can't " +"directly access private fields." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"Enums do not support privacy: Variants and data within those variants is " +"always public." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"If students want more information about privacy (or lack thereof) in enums, " +"you can bring up `#[doc_hidden]` and `#[non_exhaustive]` and show how " +"they're used to limit what can be done with an enum." +msgstr "" + +#: src/modules/encapsulation.md +msgid "" +"Module privacy still applies when there are `impl` blocks in other modules " +"[(example in the playground)](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=3e61f43c88de12bcdf69c1d6df9ab3da)." +msgstr "" + #: src/modules/paths.md msgid "" "A module can bring symbols from another module into scope with `use`. You " @@ -9724,27 +10474,11 @@ msgstr "" msgid "// ---- src/main.rs ----\n" msgstr "" -#: src/testing/unit-tests.md -msgid "Unit Tests" -msgstr "Birim Testleri" - -#: src/testing/unit-tests.md -msgid "Rust and Cargo come with a simple unit test framework:" -msgstr "" - -#: src/testing/unit-tests.md -msgid "Unit tests are supported throughout your code." -msgstr "" - -#: src/testing/unit-tests.md -msgid "Integration tests are supported via the `tests/` directory." -msgstr "" - #: src/testing/unit-tests.md msgid "" -"Tests are marked with `#[test]`. Unit tests are often put in a nested " -"`tests` module, using `#[cfg(test)]` to conditionally compile them only when " -"building tests." +"Rust and Cargo come with a simple unit test framework. Tests are marked with " +"`#[test]`. Unit tests are often put in a nested `tests` module, using " +"`#[cfg(test)]` to conditionally compile them only when building tests." msgstr "" #: src/testing/unit-tests.md @@ -9759,10 +10493,6 @@ msgstr "" msgid "The `#[cfg(test)]` attribute is only active when you run `cargo test`." msgstr "" -#: src/testing/unit-tests.md -msgid "Run the tests in the playground in order to show their results." -msgstr "" - #: src/testing/other.md msgid "Integration Tests" msgstr "Entegrasyon Testleri" @@ -9819,7 +10549,7 @@ msgstr "" #: src/testing/other.md msgid "" "Test the above code on the [Rust Playground](https://play.rust-lang.org/?" -"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0)." +"version=stable&mode=debug&edition=2024&gist=3ce2ad13ea1302f6572cb15cd96becf0)." msgstr "" #: src/testing/lints.md @@ -9835,16 +10565,10 @@ msgstr "" #: src/testing/lints.md msgid "" -"Run the code sample and examine the error message. There are also lints " -"visible here, but those will not be shown once the code compiles. Switch to " -"the Playground site to show those lints." -msgstr "" - -#: src/testing/lints.md -msgid "" -"After resolving the lints, run `clippy` on the playground site to show " -"clippy warnings. Clippy has extensive documentation of its lints, and adds " -"new lints (including default-deny lints) all the time." +"There are compiler lints visible here, but not clippy lints. Run `clippy` on " +"the playground site to show clippy warnings. Clippy has extensive " +"documentation of its lints, and adds new lints (including default-deny " +"lints) all the time." msgstr "" #: src/testing/lints.md @@ -9861,7 +10585,9 @@ msgid "" msgstr "" #: src/testing/exercise.md -msgid "Ignore all spaces. Reject numbers with fewer than two digits." +msgid "" +"Ignore all spaces. Reject numbers with fewer than two digits. Reject letters " +"and other non-digit characters." msgstr "" #: src/testing/exercise.md @@ -9922,14 +10648,6 @@ msgstr "" msgid "\"8273 1232 7352 0569\"" msgstr "" -#: src/testing/solution.md -msgid "// This is the buggy version that appears in the problem.\n" -msgstr "" - -#: src/testing/solution.md -msgid "// This is the solution and passes all of the tests below.\n" -msgstr "" - #: src/testing/solution.md msgid "// New: accept whitespace.\n" msgstr "" @@ -9942,22 +10660,6 @@ msgstr "" msgid "// New: check that we have at least two digits\n" msgstr "" -#: src/testing/solution.md -msgid "\"1234 5678 1234 5670\"" -msgstr "" - -#: src/testing/solution.md -msgid "\"Is {cc_number} a valid credit card number? {}\"" -msgstr "" - -#: src/testing/solution.md -msgid "\"yes\"" -msgstr "" - -#: src/testing/solution.md -msgid "\"no\"" -msgstr "" - #: src/testing/solution.md msgid "\"foo 0 0\"" msgstr "" @@ -9982,10 +10684,6 @@ msgstr "" msgid "\" 0 0 \"" msgstr "" -#: src/error-handling.md src/unsafe-rust.md -msgid "This segment should take about 1 hour and 5 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat 5 dakika sürmelidir. İçeriği:" - #: src/error-handling.md msgid "Error Trait" msgstr "Error Özelliği (Trait)" @@ -10010,10 +10708,6 @@ msgstr "" msgid "Rust will trigger a panic if a fatal error happens at runtime:" msgstr "" -#: src/error-handling/panics.md -msgid "\"v[100]: {}\"" -msgstr "" - #: src/error-handling/panics.md msgid "Panics are for unrecoverable and unexpected errors." msgstr "" @@ -10055,10 +10749,6 @@ msgstr "" msgid "\"No problem here!\"" msgstr "" -#: src/error-handling/panics.md -msgid "\"{result:?}\"" -msgstr "" - #: src/error-handling/panics.md msgid "\"oh no!\"" msgstr "" @@ -10413,99 +11103,34 @@ msgstr "" #: src/error-handling/exercise.md msgid "" -"The following implements a very simple parser for an expression language. " -"However, it handles errors by panicking. Rewrite it to instead use idiomatic " -"error handling and propagate errors to a return from `main`. Feel free to " -"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/" -"anyhow)." +"In this exercise we're revisiting the expression evaluator exercise that we " +"did in day 2. Our initial solution ignores a possible error case: Dividing " +"by zero! Rewrite `eval` to instead use idiomatic error handling to handle " +"this error case and return an error when it occurs. We provide a simple " +"`DivideByZeroError` type to use as the error type for `eval`." msgstr "" #: src/error-handling/exercise.md msgid "" -"**Hint:** start by fixing error handling in the `parse` function. Once that " -"is working correctly, update `Tokenizer` to implement " -"`Iterator>` and handle that in the parser." -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// An arithmetic operator.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// A token in the expression language.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// An expression in the expression language.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// A reference to a variable.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// A literal number.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "/// A binary operation.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'_'" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'+'" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'-'" -msgstr "" - -#: src/error-handling/exercise.md -msgid "\"Unexpected character {c}\"" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "\"Unexpected end of input\"" +"// The original implementation of the expression evaluator. Update this to\n" +"// return a `Result` and produce an error when dividing by 0.\n" msgstr "" #: src/error-handling/exercise.md -msgid "\"Invalid 32-bit integer\"" +msgid "\"Cannot divide by zero!\"" msgstr "" #: src/error-handling/exercise.md -msgid "\"Unexpected token {tok:?}\"" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "// Look ahead to parse a binary operation if present.\n" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "\"10+foo+20-30\"" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "\"{expr:?}\"" -msgstr "" - -#: src/error-handling/solution.md -msgid "\"Unexpected character '{0}' in input\"" -msgstr "" - -#: src/error-handling/solution.md -msgid "\"Tokenizer error: {0}\"" -msgstr "" - -#: src/error-handling/solution.md -msgid "\"Unexpected token {0:?}\"" +msgid "" +"The starting code here isn't exactly the same as the previous exercise's " +"solution: We've added in an explicit panic to show students where the error " +"case is. Point this out if students get confused." msgstr "" -#: src/error-handling/solution.md -msgid "\"Invalid number\"" -msgstr "" +#: src/unsafe-rust.md +#, fuzzy +msgid "This segment should take about 1 hour and 15 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat 5 dakika sürmelidir. İçeriği:" #: src/unsafe-rust/unsafe.md msgid "The Rust language has two parts:" @@ -10594,10 +11219,6 @@ msgstr "" msgid "\"r1 is: {}\"" msgstr "" -#: src/unsafe-rust/dereferencing.md -msgid "\"uhoh\"" -msgstr "" - #: src/unsafe-rust/dereferencing.md msgid "\"r2 is: {}\"" msgstr "" @@ -10684,22 +11305,31 @@ msgid "" msgstr "" #: src/unsafe-rust/mutable-static.md -msgid "\"COUNTER: {COUNTER}\"" +msgid "" +"The program here is safe because it is single-threaded. However, the Rust " +"compiler reasons about functions individually so can't assume that. Try " +"removing the `unsafe` and see how the compiler explains that it is undefined " +"behavior to access a mutable static from multiple threads." msgstr "" #: src/unsafe-rust/mutable-static.md msgid "" -"The program here is safe because it is single-threaded. However, the Rust " -"compiler is conservative and will assume the worst. Try removing the " -"`unsafe` and see how the compiler explains that it is undefined behavior to " -"mutate a static from multiple threads." +"Rust 2024 edition goes further and makes accessing a mutable static by " +"reference an error by default. We work around this in the example with " +"`#[allow(static_mut_refs)]`. Don't do this." +msgstr "" + +#: src/unsafe-rust/mutable-static.md +msgid "" +"Using a mutable static is almost always a bad idea, you should use interior " +"mutability instead." msgstr "" #: src/unsafe-rust/mutable-static.md msgid "" -"Using a mutable static is generally a bad idea, but there are some cases " -"where it might make sense in low-level `no_std` code, such as implementing a " -"heap allocator or working with some C APIs." +"There are some cases where it might be necessary in low-level `no_std` code, " +"such as implementing a heap allocator or working with some C APIs. In this " +"case you should use pointers rather than references." msgstr "" #: src/unsafe-rust/unions.md @@ -10733,116 +11363,203 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "Calling Unsafe Functions" -msgstr "Emniyetsiz (Unsafe) Fonksiyonları Çağırma" +msgid "" +"A function or method can be marked `unsafe` if it has extra preconditions " +"you must uphold to avoid undefined behaviour." +msgstr "" + +#: src/unsafe-rust/unsafe-functions.md +msgid "There are two main categories:" +msgstr "" + +#: src/unsafe-rust/unsafe-functions.md +#, fuzzy +msgid "Rust functions declared unsafe with `unsafe fn`." +msgstr "Fonksiyonlar `fn` ile tanıtılır." + +#: src/unsafe-rust/unsafe-functions.md +msgid "Foreign functions in `extern \"C\"` blocks." +msgstr "" #: src/unsafe-rust/unsafe-functions.md +msgid "We will look at the two kinds of unsafe functions next." +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md msgid "" -"A function or method can be marked `unsafe` if it has extra preconditions " -"you must uphold to avoid undefined behaviour:" +"You can mark your own functions as `unsafe` if they require particular " +"preconditions to avoid undefined behaviour." +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "" +"/// Swaps the values pointed to by the given pointers.\n" +"///\n" +"/// # Safety\n" +"///\n" +"/// The pointers must be valid, properly aligned, and not otherwise accessed " +"for\n" +"/// the duration of the function call.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "" +"// SAFETY: Our caller promised that the pointers are valid, properly " +"aligned\n" +" // and have no other access.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "" +"// SAFETY: The pointers must be valid, aligned and unique because they came\n" +" // from references.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "\"a = {}, b = {}\"" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "" +"We wouldn't actually use pointers for a `swap` function --- it can be done " +"safely with references." msgstr "" -#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md +#: src/unsafe-rust/unsafe-functions/rust.md +msgid "" +"Note that Rust 2021 and earlier allow unsafe code within an unsafe function " +"without an `unsafe` block. This changed in the 2024 edition. We can prohibit " +"it in older editions with `#[deny(unsafe_op_in_unsafe_fn)]`. Try adding it " +"and see what happens." +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "Functions in a foreign language may also be unsafe:" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md src/unsafe-rust/exercise.md #: src/unsafe-rust/solution.md src/android/interoperability/with-c.md -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md +#: src/bare-metal/aps/logging/using.md msgid "\"C\"" msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "\"🗻∈🌏\"" -msgstr "" +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "" +"// `abs` doesn't deal with pointers and doesn't have any safety " +"requirements.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "" +"/// # Safety\n" +" ///\n" +" /// `s` must be a pointer to a NUL-terminated C string which is valid " +"and\n" +" /// not modified for the duration of this function call.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "\"Absolute value of -3 according to C: {}\"" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "" +"// SAFETY: We pass a pointer to a C string literal which is valid for\n" +" // the duration of the program.\n" +msgstr "" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +#, fuzzy +msgid "\"String length: {}\"" +msgstr "\"Length: {}\"" + +#: src/unsafe-rust/unsafe-functions/extern-c.md +#, fuzzy +msgid "\"String\"" +msgstr "String" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/extern-c.md msgid "" -"// SAFETY: The indices are in the correct order, within the bounds of the\n" -" // string slice, and lie on UTF-8 sequence boundaries.\n" +"Rust used to consider all extern functions unsafe, but this changed in Rust " +"1.82 with `unsafe extern` blocks." msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "\"emoji: {}\"" +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "" +"`abs` must be explicitly marked as `safe` because it is an external function " +"(FFI). Calling external functions is usually only a problem when those " +"functions do things with pointers which might violate Rust's memory model, " +"but in general any C function might have undefined behaviour under any " +"arbitrary circumstances." msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "\"char count: {}\"" +#: src/unsafe-rust/unsafe-functions/extern-c.md +msgid "" +"The `\"C\"` in this example is the ABI; [other ABIs are available too]" +"(https://doc.rust-lang.org/reference/items/external-blocks.html)." msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/extern-c.md msgid "" -"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\n" -" // requirements.\n" +"Note that there is no verification that the Rust function signature matches " +"that of the function definition -- that's up to you!" msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "\"Absolute value of -3 according to C: {}\"" +#: src/unsafe-rust/unsafe-functions/calling.md +msgid "Failing to uphold the safety requirements breaks memory safety!" msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "" -"// Not upholding the UTF-8 encoding requirement breaks memory safety!\n" -" // println!(\"emoji: {}\", unsafe { emojis.get_unchecked(0..3) });\n" -" // println!(\"char count: {}\", count_chars(unsafe {\n" -" // emojis.get_unchecked(0..3) }));\n" +#: src/unsafe-rust/unsafe-functions/calling.md +msgid "// 8 bytes\n" msgstr "" -#: src/unsafe-rust/unsafe-functions.md -msgid "Writing Unsafe Functions" -msgstr "Emniyetsiz (Unsafe) Fonksiyonlar Yazma" +#: src/unsafe-rust/unsafe-functions/calling.md +#, fuzzy +msgid "\"{pk:?}\"" +msgstr "\"{:?}\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"You can mark your own functions as `unsafe` if they require particular " -"conditions to avoid undefined behaviour." +"Always include a safety comment for each `unsafe` block. It must explain why " +"the code is actually safe. This example is missing a safety comment and is " +"unsound." msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"/// Swaps the values pointed to by the given pointers.\n" -"///\n" -"/// # Safety\n" -"///\n" -"/// The pointers must be valid and properly aligned.\n" -msgstr "" - -#: src/unsafe-rust/unsafe-functions.md -msgid "// SAFETY: ...\n" -msgstr "" - -#: src/unsafe-rust/unsafe-functions.md -msgid "\"a = {}, b = {}\"" +"The second argument to `slice::from_raw_parts` is the number of _elements_, " +"not bytes! This example demonstrates unexpected behavior by reading past the " +"end of one array and into another." msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can " -"create UB if the range is incorrect. `abs` is unsafe for a different reason: " -"it is an external function (FFI). Calling external functions is usually only " -"a problem when those functions do things with pointers which might violate " -"Rust's memory model, but in general any C function might have undefined " -"behaviour under any arbitrary circumstances." +"This is undefined behavior because we're reading past the end of the array " +"that the pointer was derived from." msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"The `\"C\"` in this example is the ABI; [other ABIs are available too]" -"(https://doc.rust-lang.org/reference/items/external-blocks.html)." +"`log_public_key` should be unsafe, because `pk_ptr` must meet certain " +"prerequisites to avoid undefined behaviour. A safe function which can cause " +"undefined behaviour is said to be `unsound`. What should its safety " +"documentation say?" msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"We wouldn't actually use pointers for a `swap` function - it can be done " -"safely with references." +"The standard library contains many low-level unsafe functions. Prefer the " +"safe alternatives when possible!" msgstr "" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions/calling.md msgid "" -"Note that unsafe code is allowed within an unsafe function without an " -"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. " -"Try adding it and see what happens. This will likely change in a future Rust " -"edition." +"If you use an unsafe function as an optimization, make sure to add a " +"benchmark to demonstrate the gain." msgstr "" #: src/unsafe-rust/unsafe-traits.md @@ -11022,6 +11739,11 @@ msgid "" "functions and methods:" msgstr "" +#: src/unsafe-rust/exercise.md +msgid "// TODO: remove this when you're done with your implementation.\n" +msgstr "" +"// TODO: uyarlamanız (implementation) bittiğinde bu yorum satırını silin.\n" + #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "\"macos\"" msgstr "" @@ -11075,7 +11797,7 @@ msgid "// Call closedir as needed.\n" msgstr "" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "\".\"" msgstr "" @@ -11396,6 +12118,24 @@ msgid "" "```" msgstr "" +#: src/android/build-rules/binary.md src/android/build-rules/library.md +msgid "" +"Go through the build steps and demonstrate them running in your emulator." +msgstr "" + +#: src/android/build-rules/binary.md +msgid "" +"Notice the extensive documentation comments? The Android build rules enforce " +"that all modules have documentation. Try removing it and see what error you " +"get." +msgstr "" + +#: src/android/build-rules/binary.md +msgid "" +"Stress that the Rust build rules look like the other Soong rules. This is on " +"purpose to make it as easy to use Rust as C++ or Java." +msgstr "" + #: src/android/build-rules/library.md msgid "Rust Libraries" msgstr "" @@ -11414,9 +12154,9 @@ msgstr "" #: src/android/build-rules/library.md msgid "" -"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]" -"(https://cs.android.com/android/platform/superproject/+/master:external/rust/" -"crates/)." +"`libtextwrap`, which is a crate already vendored in [`external/rust/android-" +"crates-io/crates/`](https://cs.android.com/android/platform/superproject/" +"main/+/main:external/rust/android-crates-io/crates/)." msgstr "" #: src/android/build-rules/library.md @@ -11475,6 +12215,19 @@ msgid "" "```" msgstr "" +#: src/android/build-rules/library.md +msgid "" +"A Rust crate named `greetings` must be built by a rule called " +"`libgreetings`. Note how the Rust code uses the crate name, as is normal in " +"Rust." +msgstr "" + +#: src/android/build-rules/library.md +msgid "" +"Again, the build rules enforce that we add documentation comments to all " +"public items." +msgstr "" + #: src/android/aidl.md msgid "" "The [Android Interface Definition Language (AIDL)](https://developer.android." @@ -11566,7 +12319,7 @@ msgid "Binder generates a trait for each interface definition." msgstr "" #: src/android/aidl/example-service/service-bindings.md -msgid "_out/soong/.intermediates/.../birthdayservice/IBirthdayService.rs_:" +msgid "_out/soong/.intermediates/.../com_example_birthdayservice.rs_:" msgstr "" #: src/android/aidl/example-service/service-bindings.md @@ -11650,6 +12403,31 @@ msgid "" "why each of the segments is necessary." msgstr "" +#: src/android/aidl/example-service/service.md +msgid "" +"Note that `wishHappyBirthday` and other AIDL IPC methods take `&self` " +"(instead of `&mut self`)." +msgstr "" + +#: src/android/aidl/example-service/service.md +msgid "" +"This is necessary because binder responds to incoming requests on a thread " +"pool, allowing for multiple requests to be processed in parallel. This " +"requires that the service methods only get a shared reference to `self`." +msgstr "" + +#: src/android/aidl/example-service/service.md +msgid "" +"Any state that needs to be modified by the service will have to be put in " +"something like a `Mutex` to allow for safe mutation." +msgstr "" + +#: src/android/aidl/example-service/service.md +msgid "" +"The correct approach for managing service state depends heavily on the " +"details of your service." +msgstr "" + #: src/android/aidl/example-service/service.md msgid "" "TODO: What does the `binder::Interface` trait do? Are there methods to " @@ -12178,10 +12956,46 @@ msgstr "" msgid "\"leftpad_test\"" msgstr "" -#: src/android/testing.md src/android/interoperability/with-c/bindgen.md +#: src/android/testing.md src/android/interoperability/with-c/run-our-binary.md msgid "\"general-tests\"" msgstr "\"general-tests\"" +#: src/android/testing.md +msgid "\"libgoogletest_example\"" +msgstr "" + +#: src/android/testing.md +msgid "\"googletest_example\"" +msgstr "" + +#: src/android/testing.md +#, fuzzy +msgid "\"googletest.rs\"" +msgstr "GoogleTest" + +#: src/android/testing.md +msgid "\"libgoogletest_rust\"" +msgstr "" + +#: src/android/testing.md +#, fuzzy +msgid "\"libmockall_example\"" +msgstr "Küçük Örnek" + +#: src/android/testing.md +#, fuzzy +msgid "\"mockall_example\"" +msgstr "Küçük Örnek" + +#: src/android/testing.md +msgid "\"mockall.rs\"" +msgstr "" + +#: src/android/testing.md +#, fuzzy +msgid "\"libmockall\"" +msgstr "\"küçük\"" + #: src/android/testing.md msgid "_testing/src/lib.rs_:" msgstr "" @@ -12240,6 +13054,10 @@ msgid "" "assertions using _matchers_:" msgstr "" +#: src/android/testing/googletest.md +msgid "\"bar\"" +msgstr "" + #: src/android/testing/googletest.md msgid "\"baz\"" msgstr "" @@ -12418,7 +13236,7 @@ msgstr "" msgid "\"Something went wrong!\"" msgstr "" -#: src/android/logging.md src/android/interoperability/with-c/bindgen.md +#: src/android/logging.md src/android/interoperability/with-c/run-our-binary.md #: src/android/interoperability/with-c/rust.md msgid "Build, push, and run the binary on your device:" msgstr "" @@ -12463,6 +13281,19 @@ msgid "" "_foreign function interface_, also known as FFI." msgstr "" +#: src/android/interoperability.md +msgid "" +"This is a key ability of Rust: compiled code becomes indistinguishable from " +"compiled C or C++ code." +msgstr "" + +#: src/android/interoperability.md +msgid "" +"Technically, we say that Rust can be compiled to the same [ABI](https://en." +"wikipedia.org/wiki/Application_binary_interface) (application binary " +"interface) as C code." +msgstr "" + #: src/android/interoperability/with-c.md msgid "Interoperability with C" msgstr "" @@ -12497,76 +13328,91 @@ msgstr "" msgid "We will look at better options next." msgstr "" -#: src/android/interoperability/with-c/bindgen.md -msgid "Using Bindgen" +#: src/android/interoperability/with-c.md +msgid "" +"The [`\"C\"` part](https://doc.rust-lang.org/reference/items/external-blocks." +"html#abi) of the `extern` block tells Rust that `abs` can be called using " +"the C [ABI](https://en.wikipedia.org/wiki/Application_binary_interface) " +"(application binary interface)." msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c.md msgid "" -"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) " -"tool can auto-generate bindings from a C header file." +"The `safe fn abs` part tells that Rust that `abs` is a safe function. By " +"default, extern functions are considered unsafe, but since `abs(x)` is valid " +"for any `x`, we can declare it safe." msgstr "" -#: src/android/interoperability/with-c/bindgen.md -msgid "First create a small C library:" +#: src/android/interoperability/with-c/c-library.md +msgid "Let's first create a small C library:" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "_interoperability/bindgen/libbirthday.h_:" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "_interoperability/bindgen/libbirthday.c_:" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "" msgstr "" +#: src/android/interoperability/with-c/c-library.md #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday.h\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "\"+--------------\\n\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "\"| Happy Birthday %s!\\n\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "\"| Congratulations with the %i years!\\n\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "Add this to your `Android.bp` file:" msgstr "" +#: src/android/interoperability/with-c/c-library.md #: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "_interoperability/bindgen/Android.bp_:" msgstr "" +#: src/android/interoperability/with-c/c-library.md #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/c-library.md msgid "\"libbirthday.c\"" msgstr "" +#: src/android/interoperability/with-c/bindgen.md +msgid "Using Bindgen" +msgstr "" + #: src/android/interoperability/with-c/bindgen.md msgid "" -"Create a wrapper header file for the library (not strictly needed in this " -"example):" +"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) " +"tool can auto-generate bindings from a C header file." msgstr "" #: src/android/interoperability/with-c/bindgen.md -msgid "_interoperability/bindgen/libbirthday_wrapper.h_:" +msgid "" +"Create a wrapper header file for the library (not strictly needed in this " +"example):" msgstr "" #: src/android/interoperability/with-c/bindgen.md -msgid "You can now auto-generate the bindings:" +msgid "_interoperability/bindgen/libbirthday_wrapper.h_:" msgstr "" #: src/android/interoperability/with-c/bindgen.md @@ -12617,6 +13463,19 @@ msgstr "" #: src/android/interoperability/with-c/bindgen.md msgid "" +"The Android build rules will automatically call `bindgen` for you behind the " +"scenes." +msgstr "" + +#: src/android/interoperability/with-c/bindgen.md +msgid "" +"Notice that the Rust code in `main` is still hard to write. It is good " +"practice to encapsulate the output of `bindgen` in a Rust library which " +"exposes a safe interface to caller." +msgstr "" + +#: src/android/interoperability/with-c/run-our-binary.md +msgid "" "```shell\n" "m print_birthday_card\n" "adb push \"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\" /data/local/" @@ -12625,80 +13484,90 @@ msgid "" "```" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "Finally, we can run auto-generated tests to ensure the bindings work:" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "\"libbirthday_bindgen_test\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "\":libbirthday_bindgen\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "\"none\"" msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/run-our-binary.md msgid "// Generated file, skip linting\n" msgstr "" -#: src/android/interoperability/with-c/rust.md -msgid "Calling Rust" -msgstr "" - -#: src/android/interoperability/with-c/rust.md -msgid "Exporting Rust functions and types to C is easy:" +#: src/android/interoperability/with-c/rust-library.md +msgid "" +"Exporting Rust functions and types to C is easy. Here's a simple Rust " +"library:" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "_interoperability/rust/libanalyze/analyze.rs_" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "//! Rust FFI demo.\n" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "" "/// Analyze the numbers.\n" "// SAFETY: There is no other global function of this name.\n" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "\"x ({x}) is smallest!\"" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "\"y ({y}) is probably larger than x ({x})\"" msgstr "" -#: src/android/interoperability/with-c/rust.md -msgid "_interoperability/rust/libanalyze/analyze.h_" -msgstr "" - -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "_interoperability/rust/libanalyze/Android.bp_" msgstr "" +#: src/android/interoperability/with-c/rust-library.md #: src/android/interoperability/with-c/rust.md msgid "\"libanalyze_ffi\"" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "\"analyze_ffi\"" msgstr "" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust-library.md msgid "\"analyze.rs\"" msgstr "" +#: src/android/interoperability/with-c/rust-library.md +msgid "" +"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported " +"symbol will just be the name of the function. You can also use " +"`#[unsafe(export_name = \"some_name\")]` to specify whatever name you want." +msgstr "" + +#: src/android/interoperability/with-c/rust.md +msgid "Calling Rust" +msgstr "" + #: src/android/interoperability/with-c/rust.md msgid "We can now call this from a C binary:" msgstr "" +#: src/android/interoperability/with-c/rust.md +msgid "_interoperability/rust/libanalyze/analyze.h_" +msgstr "" + #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/analyze/main.c_" msgstr "" @@ -12729,13 +13598,6 @@ msgid "" "```" msgstr "" -#: src/android/interoperability/with-c/rust.md -msgid "" -"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported " -"symbol will just be the name of the function. You can also use " -"`#[unsafe(export_name = \"some_name\")]` to specify whatever name you want." -msgstr "" - #: src/android/interoperability/cpp.md msgid "" "The [CXX crate](https://cxx.rs/) makes it possible to do safe " @@ -13045,63 +13907,12 @@ msgid "" "semantics, so a `std::string` can't be passed by value to Rust." msgstr "" -#: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-build-rust.md msgid "Building in Android" msgstr "Android'de İnşa Etme (Build)" -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "" -"Create a `cc_library_static` to build the C++ library, including the CXX " -"generated header and source file." -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-build-rust.md -msgid "\"libcxx_test_cpp\"" -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "\"cxx_test.cpp\"" -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "\"cxx-bridge-header\"" -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-cpp-genrules.md -msgid "\"libcxx_test_bridge_header\"" -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-cpp-genrules.md -msgid "\"libcxx_test_bridge_code\"" -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "" -"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are " -"the dependencies for the CXX-generated C++ bindings. We'll show how these " -"are setup on the next slide." -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "" -"Note that you also need to depend on the `cxx-bridge-header` library in " -"order to pull in common CXX definitions." -msgstr "" - -#: src/android/interoperability/cpp/android-build-cpp.md -msgid "" -"Full docs for using CXX in Android can be found in [the Android docs]" -"(https://source.android.com/docs/setup/build/rust/building-rust-modules/" -"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share " -"that link with the class so that students know where they can find these " -"instructions again in the future." -msgstr "" - #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" "Create two genrules: One to generate the CXX header, and one to generate the " @@ -13114,6 +13925,11 @@ msgid "" "// to the Rust exported functions in lib.rs.\n" msgstr "" +#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "\"libcxx_test_bridge_header\"" +msgstr "" + #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"cxxbridge\"" msgstr "" @@ -13135,6 +13951,11 @@ msgstr "" msgid "// Generate the C++ code that Rust calls into.\n" msgstr "" +#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "\"libcxx_test_bridge_code\"" +msgstr "" + #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"$(location cxxbridge) $(in) > $(out)\"" msgstr "" @@ -13156,6 +13977,47 @@ msgid "" "convention isn't enforced, though." msgstr "" +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "" +"Create a `cc_library_static` to build the C++ library, including the CXX " +"generated header and source file." +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-rust.md +msgid "\"libcxx_test_cpp\"" +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "\"cxx_test.cpp\"" +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "\"cxx-bridge-header\"" +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "" +"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are " +"the dependencies for the CXX-generated C++ bindings. We'll show how these " +"are setup on the next slide." +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "" +"Note that you also need to depend on the `cxx-bridge-header` library in " +"order to pull in common CXX definitions." +msgstr "" + +#: src/android/interoperability/cpp/android-build-cpp.md +msgid "" +"Full docs for using CXX in Android can be found in [the Android docs]" +"(https://source.android.com/docs/setup/build/rust/building-rust-modules/" +"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share " +"that link with the class so that students know where they can find these " +"instructions again in the future." +msgstr "" + #: src/android/interoperability/cpp/android-build-rust.md msgid "" "Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`." @@ -13529,25 +14391,38 @@ msgstr "" #: src/chromium/policy.md msgid "" -"Chromium does not yet allow first-party Rust except in rare cases as " -"approved by Chromium's [Area Tech Leads](https://source.chromium.org/" -"chromium/chromium/src/+/main:ATL_OWNERS)." +"Chromium's Rust policy can be found [here](https://source.chromium.org/" +"chromium/chromium/src/+/main:docs/rust.md;l=22). Rust can be used for both " +"first-party and third-party code." +msgstr "" + +#: src/chromium/policy.md +msgid "Using Rust for pure first-party code looks like this:" msgstr "" #: src/chromium/policy.md msgid "" -"Chromium's policy on third party libraries is outlined [here](https://" -"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party." -"md#rust) - Rust is allowed for third party libraries under various " -"circumstances, including if they're the best option for performance or for " -"security." +"```bob\n" +"\"C++\" Rust\n" +".- - - - - - - - - -. .- - - - - - - - - - -.\n" +": : : :\n" +": Existing Chromium : : Chromium Rust :\n" +": \"C++\" : : code :\n" +": +---------------+ : : +----------------+ :\n" +": | | : : | | :\n" +": | o-----+-+-----------+-+-> | :\n" +": | | : Language : | | :\n" +": +---------------+ : boundary : +----------------+ :\n" +": : : :\n" +"`- - - - - - - - - -' `- - - - - - - - - - -'\n" +"```" msgstr "" #: src/chromium/policy.md msgid "" -"Very few Rust libraries directly expose a C/C++ API, so that means that " -"nearly all such libraries will require a small amount of first-party glue " -"code." +"The third-party case is also common. It's likely that you'll also need a " +"small amount of first-party glue code, because very few Rust libraries " +"directly expose a C/C++ API." msgstr "" #: src/chromium/policy.md @@ -13579,12 +14454,8 @@ msgstr "" #: src/chromium/policy.md msgid "" -"First-party Rust glue code for a particular third-party crate should " -"normally be kept in `third_party/rust///wrapper`." -msgstr "" - -#: src/chromium/policy.md -msgid "Because of this, today's course will be heavily focused on:" +"The scenario of using a third-party crate is the more complex one, so " +"today's course will focus on:" msgstr "" #: src/chromium/policy.md @@ -13592,11 +14463,9 @@ msgid "Bringing in third-party Rust libraries (\"crates\")" msgstr "" #: src/chromium/policy.md -msgid "Writing glue code to be able to use those crates from Chromium C++." -msgstr "" - -#: src/chromium/policy.md -msgid "If this policy changes over time, the course will evolve to keep up." +msgid "" +"Writing glue code to be able to use those crates from Chromium C++. (The " +"same techniques are used when working with first-party Rust code)." msgstr "" #: src/chromium/build-rules.md @@ -13797,8 +14666,8 @@ msgid "" msgstr "" #: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md +#: src/bare-metal/aps/logging/using.md msgid "// SAFETY: There is no other global function of this name.\n" msgstr "" @@ -15364,6 +16233,14 @@ msgid "" "And give users in the `plugdev` group access to the micro:bit programmer:" msgstr "" +#: src/bare-metal.md +msgid "" +"You should see \"NXP ARM mbed\" in the output of `lsusb` if the device is " +"available. If you are using a Linux environment on a Chromebook, you will " +"need to share the USB device with Linux, via `chrome://os-settings/crostini/" +"sharedUsbDevices`." +msgstr "" + #: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md msgid "On MacOS:" msgstr "" @@ -15392,6 +16269,10 @@ msgstr "" msgid "`Display`, `Debug`, `write!`..." msgstr "" +#: src/bare-metal/no_std.md +msgid "`Iterator`" +msgstr "`Iterator`" + #: src/bare-metal/no_std.md msgid "`Error`" msgstr "" @@ -15521,9 +16402,9 @@ msgstr "" #: src/bare-metal/alloc.md msgid "" -"`buddy_system_allocator` is a third-party crate implementing a basic buddy " -"system allocator. Other crates are available, or you can write your own or " -"hook into your existing allocator." +"`buddy_system_allocator` is a crate implementing a basic buddy system " +"allocator. Other crates are available, or you can write your own or hook " +"into your existing allocator." msgstr "" #: src/bare-metal/alloc.md @@ -16143,16 +17024,31 @@ msgstr "" #: src/bare-metal/aps.md msgid "" "So far we've talked about microcontrollers, such as the Arm Cortex-M series. " -"Now let's try writing something for Cortex-A. For simplicity we'll just work " -"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/" -"virt.html) board." +"These are typically small systems with very limited resources." +msgstr "" + +#: src/bare-metal/aps.md +msgid "" +"Larger systems with more resources are typically called application " +"processors, built around processors such as the ARM Cortex-A or Intel Atom." +msgstr "" + +#: src/bare-metal/aps.md +msgid "" +"For simplicity we'll just work with QEMU's aarch64 ['virt'](https://qemu-" +"project.gitlab.io/qemu/system/arm/virt.html) board." msgstr "" #: src/bare-metal/aps.md msgid "" "Broadly speaking, microcontrollers don't have an MMU or multiple levels of " -"privilege (exception levels on Arm CPUs, rings on x86), while application " -"processors do." +"privilege (exception levels on Arm CPUs, rings on x86)." +msgstr "" + +#: src/bare-metal/aps.md +msgid "" +"Application processors have more resources, and often run an operating " +"system, instead of directly executing the target application on startup." msgstr "" #: src/bare-metal/aps.md @@ -16162,6 +17058,12 @@ msgid "" "hardware, but is designed purely for virtual machines." msgstr "" +#: src/bare-metal/aps.md +msgid "" +"We will still address this board as bare-metal, as if we were writing an " +"operating system." +msgstr "" + #: src/bare-metal/aps/entry-point.md msgid "" "Before we can start running Rust code, we need to do some initialisation." @@ -16170,6 +17072,22 @@ msgstr "" #: src/bare-metal/aps/entry-point.md msgid "" "```armasm\n" +"/**\n" +" * This is a generic entry point for an image. It carries out the\n" +" * operations required to prepare the loaded image to be run.\n" +" * Specifically, it\n" +" *\n" +" * - sets up the MMU with an identity map of virtual to physical\n" +" * addresses, and enables caching\n" +" * - enables floating point\n" +" * - zeroes the bss section using registers x25 and above\n" +" * - prepares the stack, pointing to a section within the image\n" +" * - sets up the exception vector\n" +" * - branches to the Rust `main` function\n" +" *\n" +" * It preserves x0-x3 for the Rust entry point, as these may contain\n" +" * boot parameters.\n" +" */\n" ".section .init.entry, \"ax\"\n" ".global entry\n" "entry:\n" @@ -16241,6 +17159,13 @@ msgid "" "```" msgstr "" +#: src/bare-metal/aps/entry-point.md +msgid "" +"This code is in `src/bare-metal/aps/examples/src/entry.S`. It's not " +"necessary to understand this in detail -- the takeaway is that typically " +"some low-level setup is needed to meet Rust's expectations of the system." +msgstr "" + #: src/bare-metal/aps/entry-point.md msgid "" "This is the same as it would be for C: initialising the processor state, " @@ -16388,6 +17313,14 @@ msgid "" "because it is called from our entry point in `entry.S`." msgstr "" +#: src/bare-metal/aps/inline-assembly.md +msgid "" +"Just `#[no_mangle]` would be sufficient but [RFC3325](https://rust-lang." +"github.io/rfcs/3325-unsafe-attributes.html) uses this notation to draw " +"reviewer attention to attributes which might cause undefined behavior if " +"used incorrectly." +msgstr "" + #: src/bare-metal/aps/inline-assembly.md msgid "" "`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally " @@ -16417,7 +17350,9 @@ msgid "" msgstr "" #: src/bare-metal/aps/mmio.md -msgid "Never hold a reference." +msgid "" +"Never hold a reference to a location being accessed with these methods. Rust " +"may read from (or write to, for `&mut`) a reference at any time." msgstr "" #: src/bare-metal/aps/mmio.md @@ -16426,6 +17361,10 @@ msgid "" "reference." msgstr "" +#: src/bare-metal/aps/mmio.md +msgid "// SAFETY: Some device is mapped at this address.\n" +msgstr "" + #: src/bare-metal/aps/mmio.md msgid "" "Volatile access: read or write operations may have side-effects, so prevent " @@ -16470,7 +17409,7 @@ msgstr "" msgid "/// Minimal driver for a PL011 UART.\n" msgstr "" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/uart.md msgid "" "/// Constructs a new instance of the UART driver for a PL011 device at the\n" " /// given base address.\n" @@ -16485,10 +17424,12 @@ msgid "" msgstr "" #: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "/// Writes a single byte to the UART.\n" msgstr "" #: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "// Wait until there is room in the TX buffer.\n" msgstr "" @@ -16499,10 +17440,12 @@ msgid "" msgstr "" #: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "// Write to the TX buffer.\n" msgstr "" #: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "// Wait until the UART is no longer busy.\n" msgstr "" @@ -16554,6 +17497,47 @@ msgstr "" #: src/bare-metal/aps/uart/traits.md msgid "" +"`Send` is an auto-trait, but not implemented automatically because it is not " +"implemented for pointers." +msgstr "" + +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/logging/using.md +msgid "Using it" +msgstr "" + +#: src/bare-metal/aps/uart/using.md +msgid "" +"Let's write a small program using our driver to write to the serial console." +msgstr "" + +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md +#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "/// Base address of the primary PL011 UART.\n" +msgstr "" + +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md +#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "" +"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\n" +" // nothing else accesses that address range.\n" +msgstr "" + +#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md +#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md +msgid "\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\"" +msgstr "" + +#: src/bare-metal/aps/uart/using.md +msgid "" +"As in the [inline assembly](../inline-assembly.md) example, this `main` " +"function is called from our entry point code in `entry.S`. See the speaker " +"notes there for details." +msgstr "" + +#: src/bare-metal/aps/uart/using.md +msgid "" "Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/" "examples`." msgstr "" @@ -16779,8 +17763,8 @@ msgstr "" #: src/bare-metal/aps/better-uart/bitflags.md msgid "" -"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along " -"with a bunch of method implementations to get and set flags." +"The `bitflags!` macro creates a newtype something like `struct Flags(u16)`, " +"along with a bunch of method implementations to get and set flags." msgstr "" #: src/bare-metal/aps/better-uart/registers.md @@ -16802,13 +17786,30 @@ msgid "" msgstr "" #: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "Now let's use the new `Registers` struct in our driver." msgstr "" #: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "/// Driver for a PL011 UART.\n" msgstr "" +#: src/bare-metal/aps/better-uart/driver.md +msgid "" +"/// Constructs a new instance of the UART driver for a PL011 device with " +"the\n" +" /// given set of registers.\n" +" ///\n" +" /// # Safety\n" +" ///\n" +" /// The given pointer must point to the 8 MMIO control registers of a " +"PL011\n" +" /// device, which must be mapped into the address space of the process " +"as\n" +" /// device memory and not have any other aliases.\n" +msgstr "" + #: src/bare-metal/aps/better-uart/driver.md msgid "" "// SAFETY: We know that self.registers points to the control registers\n" @@ -16816,6 +17817,7 @@ msgid "" msgstr "" #: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "" "/// Reads and returns a pending byte, or `None` if nothing has been\n" " /// received.\n" @@ -16828,6 +17830,7 @@ msgid "" msgstr "" #: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/safemmio/driver.md msgid "// TODO: Check for error conditions in bits 8-11.\n" msgstr "" @@ -16837,59 +17840,175 @@ msgid "" "fields without creating an intermediate reference, which would be unsound." msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -msgid "Using it" +#: src/bare-metal/aps/better-uart/driver.md +msgid "" +"The example isn't included in the slides because it is very similar to the " +"`safe-mmio` example which comes next. You can run it in QEMU with `make " +"qemu` under `src/bare-metal/aps/examples` if you need to." msgstr "" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/registers.md msgid "" -"Let's write a small program using our driver to write to the serial console, " -"and echo incoming bytes." +"The [`safe-mmio`](https://crates.io/crates/safe-mmio) crate provides types " +"to wrap registers which can be read or written safely." msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "/// Base address of the primary PL011 UART.\n" +#: src/bare-metal/aps/safemmio/registers.md +#, fuzzy +msgid "Can't read" +msgstr "Temel İş Parçacıkları (Plain Threads)" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "Read has no side-effects" msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/safemmio/registers.md +msgid "Read has side-effects" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "Can't write" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md msgid "" -"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\n" -" // nothing else accesses that address range.\n" +"[`ReadPure`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct." +"ReadPure.html)" msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -msgid "\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\"" +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"[`ReadOnly`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct." +"ReadOnly.html)" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +#, fuzzy +msgid "Can write" +msgstr "Read ve Write" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"[`WriteOnly`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct." +"WriteOnly.html)" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"[`ReadPureWrite`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct." +"ReadPureWrite.html)" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"[`ReadWrite`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct." +"ReadWrite.html)" +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "Reading `dr` has a side effect: it pops a byte from the receive FIFO." +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"Reading `rsr` (and other registers) has no side-effects. It is a 'pure' read." +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"There are a number of different crates providing safe abstractions around " +"MMIO operations; we recommend the `safe-mmio` crate." +msgstr "" + +#: src/bare-metal/aps/safemmio/registers.md +msgid "" +"The difference between `ReadPure` or `ReadOnly` (and likewise between " +"`ReadPureWrite` and `ReadWrite`) is whether reading a register can have side-" +"effects which change the state of the device. E.g. reading the data register " +"pops a byte from the receive FIFO. `ReadPure` means that reads have no side-" +"effects, they are purely reading data." +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"/// Constructs a new instance of the UART driver for a PL011 device with " +"the\n" +" /// given set of registers.\n" +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "The driver no longer needs any unsafe code!" +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"`UniqueMmioPointer` is a wrapper around a raw pointer to an MMIO device or " +"register. The caller of `UniqueMmioPointer::new` promises that it is valid " +"and unique for the given lifetime, so it can provide safe methods to read " +"and write fields." msgstr "" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"Note that `Uart::new` is now safe; `UniqueMmioPointer::new` is unsafe " +"instead." +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"These MMIO accesses are generally a wrapper around `read_volatile` and " +"`write_volatile`, though on aarch64 they are instead implemented in assembly " +"to work around a bug where the compiler can emit instructions that prevent " +"MMIO virtualisation." +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"The `field!` and `field_shared!` macros internally use `&raw mut` and `&raw " +"const` to get pointers to individual fields without creating an intermediate " +"reference, which would be unsound." +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"`field!` needs a mutable reference to a `UniqueMmioPointer`, and returns a " +"`UniqueMmioPointer` which allows reads with side effects and writes." +msgstr "" + +#: src/bare-metal/aps/safemmio/driver.md +msgid "" +"`field_shared!` works with a shared reference to either a " +"`UniqueMmioPointer` or a `SharedMmioPointer`. It returns a " +"`SharedMmioPointer` which only allows pure reads." +msgstr "" + +#: src/bare-metal/aps/safemmio/using.md +msgid "" +"Let's write a small program using our driver to write to the serial console, " +"and echo incoming bytes." +msgstr "" + +#: src/bare-metal/aps/safemmio/using.md msgid "b'\\r'" msgstr "" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/using.md #: src/concurrency/async-pitfalls/cancellation.md msgid "b'\\n'" msgstr "" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/using.md msgid "b'q'" msgstr "" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/using.md msgid "\"\\n\\nBye!\"" msgstr "" -#: src/bare-metal/aps/better-uart/using.md -msgid "" -"As in the [inline assembly](../inline-assembly.md) example, this `main` " -"function is called from our entry point code in `entry.S`. See the speaker " -"notes there for details." -msgstr "" - -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/safemmio/using.md msgid "" -"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`." +"Run the example in QEMU with `make qemu_safemmio` under `src/bare-metal/aps/" +"examples`." msgstr "" #: src/bare-metal/aps/logging.md @@ -16909,8 +18028,9 @@ msgstr "" #: src/bare-metal/aps/logging.md msgid "" -"The unwrap in `log` is safe because we initialise `LOGGER` before calling " -"`set_logger`." +"The first unwrap in `log` will succeed because we initialise `LOGGER` before " +"calling `set_logger`. The second will succeed because `Uart::write_str` " +"always returns `Ok`." msgstr "" #: src/bare-metal/aps/logging/using.md @@ -16941,30 +18061,85 @@ msgid "" "calling into Rust code:" msgstr "" -#: src/bare-metal/aps/exceptions.md -msgid "EL is exception level; all our examples this afternoon run in EL1." +#: src/bare-metal/aps/exceptions.md +msgid "EL is exception level; all our examples this afternoon run in EL1." +msgstr "" + +#: src/bare-metal/aps/exceptions.md +msgid "" +"For simplicity we aren't distinguishing between SP0 and SPx for the current " +"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions." +msgstr "" + +#: src/bare-metal/aps/exceptions.md +msgid "" +"For this example we just log the exception and power down, as we don't " +"expect any of them to actually happen." +msgstr "" + +#: src/bare-metal/aps/exceptions.md +msgid "" +"We can think of exception handlers and our main execution context more or " +"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync." +"md) will control what we can share between them, just like with threads. For " +"example, if we want to share some value between exception handlers and the " +"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap " +"it in something like a `Mutex` and put it in a static." +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +msgid "" +"The `aarch64-rt` crate provides the assembly entry point and exception " +"vector that we implemented before. We just need to mark our main function " +"with the `entry!` macro." +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +msgid "" +"It also provides the `initial_pagetable!` macro to let us define an initial " +"static pagetable in Rust, rather than in assembly code like we did before." +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +msgid "" +"We can also use the UART driver from the `arm-pl011-uart` crate rather than " +"writing our own." +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "/// Attributes to use for device memory in the initial identity map.\n" +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "/// Attributes to use for normal memory in the initial identity map.\n" msgstr "" -#: src/bare-metal/aps/exceptions.md -msgid "" -"For simplicity we aren't distinguishing between SP0 and SPx for the current " -"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions." +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "// 1 GiB of device memory.\n" msgstr "" -#: src/bare-metal/aps/exceptions.md -msgid "" -"For this example we just log the exception and power down, as we don't " -"expect any of them to actually happen." +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "// 1 GiB of normal memory.\n" msgstr "" -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "// Another 1 GiB of device memory starting at 256 GiB.\n" +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "\"system_off returned\"" +msgstr "" + +#: src/bare-metal/aps/aarch64-rt.md msgid "" -"We can think of exception handlers and our main execution context more or " -"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync." -"md) will control what we can share between them, just like with threads. For " -"example, if we want to share some value between exception handlers and the " -"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap " -"it in something like a `Mutex` and put it in a static." +"Run the example in QEMU with `make qemu_rt` under `src/bare-metal/aps/" +"examples`." msgstr "" #: src/bare-metal/aps/other-projects.md @@ -17012,26 +18187,9 @@ msgstr "" #: src/bare-metal/aps/other-projects.md msgid "" "The RaspberryPi OS tutorial runs Rust code before the MMU and caches are " -"enabled. This will read and write memory (e.g. the stack). However:" -msgstr "" - -#: src/bare-metal/aps/other-projects.md -msgid "" -"Without the MMU and cache, unaligned accesses will fault. It builds with " -"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler " -"generating unaligned accesses so it should be alright, but this is not " -"necessarily the case in general." -msgstr "" - -#: src/bare-metal/aps/other-projects.md -msgid "" -"If it were running in a VM, this can lead to cache coherency issues. The " -"problem is that the VM is accessing memory directly with the cache disabled, " -"while the host has cacheable aliases to the same memory. Even if the host " -"doesn't explicitly access the memory, speculative accesses can lead to cache " -"fills, and then changes from one or the other will get lost. Again this is " -"alright in this particular case (running directly on the hardware with no " -"hypervisor), but isn't a good pattern in general." +"enabled. This will read and write memory (e.g. the stack). However, this has " +"the problems mentioned at the beginning of this session regarding unaligned " +"access and cache coherency." msgstr "" #: src/bare-metal/useful-crates.md @@ -17040,7 +18198,7 @@ msgstr "Kullanışlı kasalar (crates)" #: src/bare-metal/useful-crates.md msgid "" -"We'll go over a few crates which solve some common problems in bare-metal " +"We'll look at a few crates which solve some common problems in bare-metal " "programming." msgstr "" @@ -17102,35 +18260,30 @@ msgstr "" msgid "// Set `TTBR0_EL1` to activate the page table.\n" msgstr "" -#: src/bare-metal/useful-crates/aarch64-paging.md -msgid "" -"For now it only supports EL1, but support for other exception levels should " -"be straightforward to add." -msgstr "" - #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" "This is used in Android for the [Protected VM Firmware](https://cs.android." -"com/android/platform/superproject/+/master:packages/modules/Virtualization/" -"pvmfw/)." +"com/android/platform/superproject/main/+/main:packages/modules/" +"Virtualization/guest/pvmfw/)." msgstr "" #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" -"There's no easy way to run this example, as it needs to run on real hardware " -"or under QEMU." +"There's no easy way to run this example by itself, as it needs to run on " +"real hardware or under QEMU." msgstr "" #: src/bare-metal/useful-crates/buddy_system_allocator.md msgid "" "[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) " -"is a third-party crate implementing a basic buddy system allocator. It can " -"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/" -"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]" -"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use " -"the standard `alloc` crate (as we saw [before](../alloc.md)), or for " -"allocating other address space. For example, we might want to allocate MMIO " -"space for PCI BARs:" +"is a crate implementing a basic buddy system allocator. It can be used both " +"to implement [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait." +"GlobalAlloc.html) (using [`LockedHeap`](https://docs.rs/" +"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html)) " +"so you can use the standard `alloc` crate (as we saw [before](../alloc.md)), " +"or for allocating other address space (using [`FrameAllocator`](https://docs." +"rs/buddy_system_allocator/0.9.0/buddy_system_allocator/struct.FrameAllocator." +"html)) . For example, we might want to allocate MMIO space for PCI BARs:" msgstr "" #: src/bare-metal/useful-crates/buddy_system_allocator.md @@ -17299,28 +18452,12 @@ msgstr "" msgid "_src/logger.rs_ (you shouldn't need to change this):" msgstr "" -#: src/exercises/bare-metal/rtc.md -msgid "_src/pl011.rs_ (you shouldn't need to change this):" -msgstr "" - #: src/exercises/bare-metal/rtc.md msgid "_build.rs_ (you shouldn't need to change this):" msgstr "" #: src/exercises/bare-metal/rtc.md -msgid "_entry.S_ (you shouldn't need to change this):" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "_exceptions.S_ (you shouldn't need to change this):" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "_idmap.S_ (you shouldn't need to change this):" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "_image.ld_ (you shouldn't need to change this):" +msgid "_memory.ld_ (you shouldn't need to change this):" msgstr "" #: src/exercises/bare-metal/rtc.md @@ -17438,28 +18575,14 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"/// Constructs a new instance of the RTC driver for a PL031 device at the\n" -" /// given base address.\n" -" ///\n" -" /// # Safety\n" -" ///\n" -" /// The given base address must point to the MMIO control registers of " -"a\n" -" /// PL031 device, which must be mapped into the address space of the " -"process\n" -" /// as device memory and not have any other aliases.\n" +"/// Constructs a new instance of the RTC driver for a PL031 device with the\n" +" /// given set of registers.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "/// Reads the current RTC value.\n" msgstr "" -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "" -"// SAFETY: We know that self.registers points to the control registers\n" -" // of a PL031 device which is appropriately mapped.\n" -msgstr "" - #: src/exercises/bare-metal/solutions-afternoon.md msgid "" "/// Writes a match value. When the RTC value matches this then an interrupt\n" @@ -17494,12 +18617,6 @@ msgstr "" msgid "/// Clears a pending interrupt, if any.\n" msgstr "" -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "" -"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\n" -"// accessed from any context.\n" -msgstr "" - #: src/concurrency/welcome.md msgid "Welcome to Concurrency in Rust" msgstr "" @@ -17517,7 +18634,7 @@ msgid "" "you can rely on the compiler to ensure correctness at runtime." msgstr "" -#: src/concurrency/welcome.md src/concurrency/welcome-async.md +#: src/concurrency/welcome.md msgid "" "Including 10 minute breaks, this session should take about 3 hours and 20 " "minutes. It contains:" @@ -17542,11 +18659,6 @@ msgid "" "to read later) save us from multi-threading issues." msgstr "" -#: src/concurrency/threads.md src/concurrency/shared-state.md -#: src/concurrency/async.md -msgid "This segment should take about 30 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:" - #: src/concurrency/threads/plain.md msgid "Rust threads work similarly to threads in other languages:" msgstr "" @@ -18015,16 +19127,33 @@ msgstr "Mutex" #: src/concurrency/shared-state/arc.md msgid "" -"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared " -"read-only access via `Arc::clone`:" +"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows " +"shared, read-only ownership via `Arc::clone`:" +msgstr "" + +#: src/concurrency/shared-state/arc.md +msgid "/// A struct that prints which thread drops it.\n" +msgstr "" + +#: src/concurrency/shared-state/arc.md +msgid "\"Dropped by {:?}\"" +msgstr "" + +#: src/concurrency/shared-state/arc.md +msgid "// Sleep for 0-500ms.\n" msgstr "" #: src/concurrency/shared-state/arc.md msgid "\"{thread_id:?}: {v:?}\"" msgstr "" -#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md -msgid "\"v: {v:?}\"" +#: src/concurrency/shared-state/arc.md +msgid "// Now only the spawned threads will hold clones of `v`.\n" +msgstr "" + +#: src/concurrency/shared-state/arc.md +msgid "" +"// When the last spawned thread finishes, it will drop `v`'s contents.\n" msgstr "" #: src/concurrency/shared-state/arc.md @@ -18123,6 +19252,10 @@ msgstr "" msgid "// use std::sync::{Arc, Mutex};\n" msgstr "" +#: src/concurrency/shared-state/example.md +msgid "\"v: {v:?}\"" +msgstr "" + #: src/concurrency/shared-state/example.md msgid "Possible solution:" msgstr "" @@ -18145,7 +19278,7 @@ msgstr "" #: src/concurrency/shared-state/example.md msgid "" -"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " +"`v: Arc<_>` needs to be cloned to make a new reference for each new spawned " "thread. Note `move` was added to the lambda signature." msgstr "" @@ -18155,6 +19288,10 @@ msgid "" "possible." msgstr "" +#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md +msgid "This segment should take about 1 hour and 10 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat 10 dakika sürmelidir. İçeriği:" + #: src/concurrency/sync-exercises/dining-philosophers.md msgid "The dining philosophers problem is a classic problem in concurrency:" msgstr "" @@ -18162,13 +19299,13 @@ msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "Five philosophers dine together at the same table. Each philosopher has " -"their own place at the table. There is a fork between each plate. The dish " -"served is a kind of spaghetti which has to be eaten with two forks. Each " +"their own place at the table. There is a chopstick between each plate. The " +"dish served is spaghetti which requires two chopsticks to eat. Each " "philosopher can only alternately think and eat. Moreover, a philosopher can " -"only eat their spaghetti when they have both a left and right fork. Thus two " -"forks will only be available when their two nearest neighbors are thinking, " -"not eating. After an individual philosopher finishes eating, they will put " -"down both forks." +"only eat their spaghetti when they have both a left and right chopstick. " +"Thus two chopsticks will only be available when their two nearest neighbors " +"are thinking, not eating. After an individual philosopher finishes eating, " +"they will put down both chopsticks." msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md @@ -18181,8 +19318,8 @@ msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/async-exercises/dining-philosophers.md msgid "" -"// left_fork: ...\n" -" // right_fork: ...\n" +"// left_chopstick: ...\n" +" // right_chopstick: ...\n" " // thoughts: ...\n" msgstr "" @@ -18194,7 +19331,7 @@ msgid "\"Eureka! {} has a new idea!\"" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md -msgid "// Pick up forks...\n" +msgid "// Pick up chopsticks...\n" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md @@ -18220,29 +19357,23 @@ msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/sync-exercises/solutions.md -#: src/concurrency/async-exercises/dining-philosophers.md -#: src/concurrency/async-exercises/solutions.md msgid "\"Plato\"" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/sync-exercises/solutions.md -#: src/concurrency/async-exercises/dining-philosophers.md -#: src/concurrency/async-exercises/solutions.md msgid "\"Aristotle\"" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/sync-exercises/solutions.md -#: src/concurrency/async-exercises/dining-philosophers.md -#: src/concurrency/async-exercises/solutions.md msgid "\"Pythagoras\"" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/async-exercises/dining-philosophers.md #: src/concurrency/async-exercises/solutions.md -msgid "// Create forks\n" +msgid "// Create chopsticks\n" msgstr "" #: src/concurrency/sync-exercises/dining-philosophers.md @@ -18271,7 +19402,7 @@ msgid "" "[package]\n" "name = \"dining-philosophers\"\n" "version = \"0.1.0\"\n" -"edition = \"2021\"\n" +"edition = \"2024\"\n" "```" msgstr "" @@ -18324,7 +19455,7 @@ msgid "" "[package]\n" "name = \"link-checker\"\n" "version = \"0.1.0\"\n" -"edition = \"2021\"\n" +"edition = \"2024\"\n" "publish = false\n" "\n" "[dependencies]\n" @@ -18415,7 +19546,7 @@ msgstr "" #: src/concurrency/sync-exercises/solutions.md msgid "" "// To avoid a deadlock, we have to break the symmetry\n" -" // somewhere. This will swap the forks without deinitializing\n" +" // somewhere. This will swap the chopsticks without deinitializing\n" " // either of them.\n" msgstr "" @@ -18438,6 +19569,10 @@ msgid "" " /// been visited.\n" msgstr "" +#: src/concurrency/sync-exercises/solutions.md +msgid "// To multiplex the non-cloneable Receiver, wrap it in Arc>.\n" +msgstr "" + #: src/concurrency/sync-exercises/solutions.md msgid "// The sender got dropped. No more commands coming in.\n" msgstr "" @@ -18487,6 +19622,15 @@ msgid "" "resolution are hidden." msgstr "" +#: src/concurrency/welcome-async.md +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 30 " +"minutes. It contains:" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 20 dakika sürmelidir. " +"İçeriği:" + #: src/concurrency/async.md msgid "async/await" msgstr "async/await" @@ -18565,25 +19709,125 @@ msgid "" "links to show the implementations in the docs." msgstr "" -#: src/concurrency/async/futures.md -msgid "" -"We will not get to `Pin` and `Context`, as we will focus on writing async " -"code, rather than building new async primitives. Briefly:" -msgstr "" - #: src/concurrency/async/futures.md msgid "" "`Context` allows a Future to schedule itself to be polled again when an " -"event occurs." +"event such as a timeout occurs." msgstr "" #: src/concurrency/async/futures.md msgid "" "`Pin` ensures that the Future isn't moved in memory, so that pointers into " "that future remain valid. This is required to allow references to remain " -"valid after an `.await`." +"valid after an `.await`. We will address `Pin` in the \"Pitfalls\" segment." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"Rust transforms an async function or block to a hidden type that implements " +"`Future`, using a state machine to track the function's progress. The " +"details of this transform are complex, but it helps to have a schematic " +"understanding of what is happening. The following function" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "/// Sum two D10 rolls plus a modifier.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "is transformed to something like" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Function has not begun yet.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Waitig for first `.await` to complete.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Waitig for second `.await` to complete.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Create future for first dice roll.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Poll sub-future for first dice roll.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Create future for second roll.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "// Poll sub-future for second dice roll.\n" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"This example is illustrative, and isn't an accurate representation of the " +"Rust compiler's transformation. The important things to notice here are:" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"Calling an async function does nothing but construct and return a future." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"All local variables are stored in the function's future, using an enum to " +"identify where execution is currently suspended." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"An `.await` in the async function is translated into an a new state " +"containing all live variables and the awaited future. The `loop` then " +"handles that updated state, polling the future until it returns `Poll::" +"Ready`." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"Execution continues eagerly until a `Poll::Pending` occurs. In this simple " +"example, every future is ready immediately." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"`main` contains a naïve executor, which just busy-loops until the future is " +"ready. We will discuss real executors shortly." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"Imagine the `Future` data structure for a deeply nested stack of async " +"functions. Each function's `Future` contains the `Future` structures for the " +"functions it calls. This can result in unexpectedly large compiler-generated " +"`Future` types." +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"This also means that recursive async functions are challenging. Compare to " +"the common error of building recursive type, such as" +msgstr "" + +#: src/concurrency/async/state-machine.md +msgid "" +"The fix for a recursive type is to add a layer of indrection, such as with " +"`Box`. Similarly, a recursive async function must box the recursive future:" msgstr "" +#: src/concurrency/async/state-machine.md +#, fuzzy +msgid "\"{n}\"" +msgstr "\"{n}! = {}\"" + #: src/concurrency/async/runtimes.md msgid "" "A _runtime_ provides support for performing operations asynchronously (a " @@ -18976,16 +20220,10 @@ msgstr "" #: src/concurrency/async-pitfalls/pin.md msgid "" -"Async blocks and functions return types implementing the `Future` trait. The " -"type returned is the result of a compiler transformation which turns local " -"variables into data stored inside the future." -msgstr "" - -#: src/concurrency/async-pitfalls/pin.md -msgid "" -"Some of those variables can hold pointers to other local variables. Because " -"of that, the future should never be moved to a different memory location, as " -"it would invalidate those pointers." +"Recall an async function or block creates a type implementing `Future` and " +"containing all of the local variables. Some of those variables can hold " +"references (pointers) to other local variables. To ensure those remain " +"valid, the future can never be moved to a different memory location." msgstr "" #: src/concurrency/async-pitfalls/pin.md @@ -19109,9 +20347,9 @@ msgstr "" #: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Async methods in traits are were stabilized in the 1.75 release. This " -"required support for using return-position `impl Trait` in traits, as the " -"desugaring for `async fn` includes `-> impl Future`." +"Async methods in traits were stabilized in the 1.75 release. This required " +"support for using return-position `impl Trait` in traits, as the desugaring " +"for `async fn` includes `-> impl Future`." msgstr "" #: src/concurrency/async-pitfalls/async-traits.md @@ -19272,7 +20510,12 @@ msgid "" msgstr "" #: src/concurrency/async-exercises/dining-philosophers.md -msgid "// Keep trying until we have both forks\n" +msgid "// Keep trying until we have both chopsticks\n" +msgstr "" + +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md +msgid "// tokio scheduler doesn't deadlock with 5 philosophers, so have 2.\n" msgstr "" #: src/concurrency/async-exercises/dining-philosophers.md @@ -19292,7 +20535,7 @@ msgid "" "[package]\n" "name = \"dining-philosophers-async-dine\"\n" "version = \"0.1.0\"\n" -"edition = \"2021\"\n" +"edition = \"2024\"\n" "\n" "[dependencies]\n" "tokio = { version = \"1.26.0\", features = [\"sync\", \"time\", \"macros\", " @@ -19341,13 +20584,13 @@ msgid "" "[package]\n" "name = \"chat-async\"\n" "version = \"0.1.0\"\n" -"edition = \"2021\"\n" +"edition = \"2024\"\n" "\n" "[dependencies]\n" "futures-util = { version = \"0.3.31\", features = [\"sink\"] }\n" -"http = \"1.1.0\"\n" -"tokio = { version = \"1.41.1\", features = [\"full\"] }\n" -"tokio-websockets = { version = \"0.10.1\", features = [\"client\", " +"http = \"1.3.1\"\n" +"tokio = { version = \"1.45.1\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.11.4\", features = [\"client\", " "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" @@ -19494,8 +20737,8 @@ msgstr "" #: src/concurrency/async-exercises/solutions.md msgid "" -"// Keep trying until we have both forks\n" -" // Pick up forks...\n" +"// Keep trying until we have both chopsticks\n" +" // Pick up chopsticks...\n" msgstr "" #: src/concurrency/async-exercises/solutions.md @@ -20210,6 +21453,200 @@ msgid "" "directory for details, including the license terms." msgstr "" +#~ msgid "Scopes and Shadowing" +#~ msgstr "Kapsamlar (Scopes) ve Gölgeleme (Shadowing)" + +#~ msgid "Struct Lifetimes" +#~ msgstr "Yapıların Ömürleri" + +#~ msgid "`FromIterator`" +#~ msgstr "`FromIterator`" + +#~ msgid "Test Modules" +#~ msgstr "Test Modülleri" + +#~ msgid "Calling C with Bindgen" +#~ msgstr "Bindgen ile Rust Tarafından C'yi Kullanma" + +#~ msgid "Day 2 Afternoon (3 hours and 15 minutes, including breaks)" +#~ msgstr "2. Gün Öğleden Sonra (3 saat 15 dakika, aralar dahil)" + +#~ msgid "" +#~ "[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" +#~ "(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" +#~ "jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" +#~ "(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" +#~ "hamidrezakp) and [@mehrad77](https://github.com/mehrad77)." +#~ msgstr "" +#~ "[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " +#~ "[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://" +#~ "github.com/javad-jafari), [@Alix1383](https://github.com/alix1383), " +#~ "[@moaminsharifi](https://github.com/moaminsharifi), [@hamidrezakp]" +#~ "(https://github.com/hamidrezakp) ve [@mehrad77](https://github.com/" +#~ "mehrad77)." + +#~ msgid "Pattern matching: destructuring enums, structs, and arrays." +#~ msgstr "" +#~ "Desen eşleştirme: numaralandırmaların (enums), yapıların ve dizilerin " +#~ "çözümlenmesi (destructuring)." + +#~ msgid "\"Final x: {x}\"" +#~ msgstr "\"Son x: {x}\"" + +#~ msgid "\"elem: {elem}\"" +#~ msgstr "\"elem: {elem}\"" + +#~ msgid "\"{i}\"" +#~ msgstr "\"{i}\"" + +#~ msgid "\"elements searched: {elements_searched}\"" +#~ msgstr "\"aranan öğeler: {elements_searched}\"" + +#~ msgid "Blocks" +#~ msgstr "Bloklar" + +#~ msgid "\"y: {y}\"" +#~ msgstr "\"y: {y}\"" + +#~ msgid "" +#~ "You can shadow variables, both those from outer scopes and variables from " +#~ "the same scope:" +#~ msgstr "" +#~ "Hem dış kapsamlardaki (outer scopes) değişkenleri hem de aynı kapsamdaki " +#~ "değişkenleri gölgeleyebilirsiniz (shadow):" + +#~ msgid "\"before: {a}\"" +#~ msgstr "\"önce: {a}\"" + +#~ msgid "\"inner scope: {a}\"" +#~ msgstr "\"iç kapsam: {a}\"" + +#~ msgid "\"shadowed in inner scope: {a}\"" +#~ msgstr "\"iç kapsamda gölgelendi: {a}\"" + +#~ msgid "\"after: {a}\"" +#~ msgstr "\"sonra: {a}\"" + +#~ msgid "" +#~ "Show that a variable's scope is limited by adding a `b` in the inner " +#~ "block in the last example, and then trying to access it outside that " +#~ "block." +#~ msgstr "" +#~ "Son örnekte iç bloğa (inner block) bir `b` ekleyerek ve ardından bu " +#~ "bloğun dışından ona erişmeye çalışarak bir değişkenin kapsamının (scope) " +#~ "sınırlı olduğunu gösterin." + +#~ msgid "" +#~ "Shadowing is different from mutation, because after shadowing both " +#~ "variables' memory locations exist at the same time. Both are available " +#~ "under the same name, depending where you use it in the code." +#~ msgstr "" +#~ "Gölgeleme (shadowing) mutasyondan (mutation) farklıdır çünkü gölgeleme " +#~ "sonrasında her iki değişkenin de bellek konumları aynı anda mevcuttur. " +#~ "Her ikisi de kodda nerede kullandığınıza bağlı olarak aynı ad altında " +#~ "mevcuttur." + +#~ msgid "A shadowing variable can have a different type." +#~ msgstr "Bir gölgeleme (shadowing) değişkeni farklı bir türe sahip olabilir." + +#~ msgid "" +#~ "Shadowing looks obscure at first, but is convenient for holding on to " +#~ "values after `.unwrap()`." +#~ msgstr "" +#~ "Gölgelendirme ilk başta anlaşılmaz görünebilir, ancak `.unwrap()` " +#~ "sonrasındaki değerleri korumak için kullanışlıdır." + +#~ msgid "" +#~ "`unreachable!()` marks a bit of code as unreachable. If executed, it will " +#~ "panic." +#~ msgstr "" +#~ "`unreachable!()` kodun bir kısmını erişilemez (unreachable) olarak " +#~ "işaretler. Eğer yürütülürse, paniğe neden olur." + +#~ msgid "" +#~ "Including 10 minute breaks, this session should take about 2 hours and 35 " +#~ "minutes. It contains:" +#~ msgstr "" +#~ "10 dakikalık aralar, bu oturum yaklaşık 2 saat 35 dakika sürmelidir. " +#~ "İçeriği:" + +#~ msgid "" +#~ "Try accessing an out-of-bounds array element. Array accesses are checked " +#~ "at runtime. Rust can usually optimize these checks away, and they can be " +#~ "avoided using unsafe Rust." +#~ msgstr "" +#~ "Sınırların dışında bir dizi öğesine erişmeyi deneyin. Dizi erişimleri " +#~ "çalışma zamanında (runtime) kontrol edilir. Rust genellikle bu " +#~ "kontrolleri optimize edebilir ve emniyetsiz Rust (unsafe Rust) " +#~ "kullanılarak bu kontrollerden kaçınılabilir." + +#~ msgid "" +#~ "When working with tuples and other structured values it's common to want " +#~ "to extract the inner values into local variables. This can be done " +#~ "manually by directly accessing the inner values:" +#~ msgstr "" +#~ "Demetler (tuples) ve diğer yapılandırılmış değerlerle (structured values) " +#~ "çalışırken, içteki değerleri yerel (local) değişkenlere çıkarmayı istemek " +#~ "yaygındır. Bu, doğrudan iç değerlere erişilerek elle yapılabilir:" + +#~ msgid "\"left: {left}, right: {right}\"" +#~ msgstr "\"sol: {left}, sağ: {right}\"" + +#~ msgid "//\n" +#~ msgstr "//\n" + +#~ msgid "\"matrix: {:#?}\"" +#~ msgstr "\"matrix: {:#?}\"" + +#~ msgid "\"transposed: {:#?}\"" +#~ msgstr "\"transposed: {:#?}\"" + +#~ msgid "Rust will statically forbid dangling references:" +#~ msgstr "" +#~ "Rust, boşa düşen referansları (dangling references) statik olarak " +#~ "yasaklayacaktır:" + +#~ msgid "" +#~ "Rust does not automatically create references for you - the `&` is always " +#~ "required." +#~ msgstr "" +#~ "Rust sizin için otomatik olarak referans oluşturmaz. `&` her zaman " +#~ "gereklidir." + +#~ msgid "" +#~ "It isn't super common that one would need a runtime evaluated constant, " +#~ "but it is helpful and safer than using a static." +#~ msgstr "" +#~ "Çalışma zamanında değerlendirilen (evaluate) bir sabite (constant) " +#~ "ihtiyaç duyulması çok yaygın bir durum değildir, ancak statik " +#~ "kullanmaktan daha yararlı ve daha emniyetlidir." + +#~ msgid "while-let" +#~ msgstr "while-let" + +#~ msgid "" +#~ "Including 10 minute breaks, this session should take about 3 hours and 15 " +#~ "minutes. It contains:" +#~ msgstr "" +#~ "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 15 dakika sürmelidir. " +#~ "İçeriği:" + +#~ msgid "\"{elem}\"" +#~ msgstr "\"{elem}\"" + +#~ msgid "" +#~ "Including 10 minute breaks, this session should take about 2 hours and 40 " +#~ "minutes. It contains:" +#~ msgstr "" +#~ "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 40 dakika sürmelidir. " +#~ "İçeriği:" + +#~ msgid "FromIterator" +#~ msgstr "FromIterator" + +#~ msgid "Writing Unsafe Functions" +#~ msgstr "Emniyetsiz (Unsafe) Fonksiyonlar Yazma" + #~ msgid "Slices: `&[T]`" #~ msgstr "Dilimler: `&[T]`" @@ -20562,9 +21999,6 @@ msgstr "" #~ msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" #~ msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" -#~ msgid "`match` expressions" -#~ msgstr "`match` ifadeleri" - #~ msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" #~ msgstr "[Özellikler](../methods-and-traits/traits.md) (15 dakika)" @@ -20704,9 +22138,6 @@ msgstr "" #~ "karakter sınırında bitmiyor, bu nedenle program paniğe kapılıyor. Hata " #~ "mesajına bağlı olarak bunu uygun bir aralığa ayarlayın." -#~ msgid "Small Example" -#~ msgstr "Küçük Örnek" - #~ msgid "Why Rust?" #~ msgstr "Neden Rust?" @@ -20758,9 +22189,6 @@ msgstr "" #~ msgid "while let expressions" #~ msgstr "while let İfadeleri" -#~ msgid "match expressions" -#~ msgstr "match ifadeleri" - #~ msgid "Destructuring Arrays" #~ msgstr "Dizilerin Çözümlenmesi" @@ -20818,15 +22246,9 @@ msgstr "" #~ msgid "Iterators and Ownership" #~ msgstr "Adımlayıcılar (Iterators) ve Sahiplik" -#~ msgid "Strings and Iterators" -#~ msgstr "Dizeler (Stringler) ve Adımlayıcılar (Iterators)" - #~ msgid "Generic Methods" #~ msgstr "Jenerik Metotlar" -#~ msgid "Monomorphization" -#~ msgstr "Monomorfizasyon" - #~ msgid "Default Methods" #~ msgstr "Varsayılan Metotlar" @@ -20842,9 +22264,6 @@ msgstr "" #~ msgid "Closures: Fn, FnMut, FnOnce" #~ msgstr "Kapanışlar (Closures): Fn, FnMut, FnOnce" -#~ msgid "A Simple GUI Library" -#~ msgstr "Basit bir GUI Kütüphanesi" - #~ msgid "Points and Polygons" #~ msgstr "Noktalar ve Çokgenler" @@ -20881,9 +22300,6 @@ msgstr "" #~ msgid "zerocopy" #~ msgstr "zerocopy" -#~ msgid "aarch64-paging" -#~ msgstr "aarch64-paging" - #~ msgid "buddy_system_allocator" #~ msgstr "buddy_system_allocator" From 663c1f591b2dc516f4cb7bbcfa892f5a3f217621 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Fri, 4 Jul 2025 23:37:17 +0300 Subject: [PATCH 09/26] translations in some places aftermerging --- po/tr.po | 288 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 187 insertions(+), 101 deletions(-) diff --git a/po/tr.po b/po/tr.po index 0544fb0a9a73..b3e1e09ef634 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: 2025-07-04T11:43:49+03:00\n" -"PO-Revision-Date: 2024-12-11 13:44+0300\n" +"PO-Revision-Date: 2025-07-04 21:34+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -10,7 +10,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.5\n" +"X-Generator: Poedit 3.6\n" #: src/SUMMARY.md src/index.md msgid "Welcome to Comprehensive Rust 🦀" @@ -129,9 +129,8 @@ msgid "`if` Expressions" msgstr "`if` İfadeleri" #: src/SUMMARY.md src/control-flow-basics/match.md -#, fuzzy msgid "`match` Expressions" -msgstr "`match` ifadeleri" +msgstr "`match` İfadeleri" #: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md msgid "Loops" @@ -219,9 +218,8 @@ msgid "Strings" msgstr "Dizeler (Strings)" #: src/SUMMARY.md src/references.md src/references/dangling.md -#, fuzzy msgid "Reference Validity" -msgstr "Referanslar" +msgstr "Referans Geçerliliği (Validity)" #: src/SUMMARY.md src/references.md src/references/exercise.md msgid "Exercise: Geometry" @@ -274,7 +272,7 @@ msgstr "Desen Eşleştirme" #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/infallible.md msgid "Irrefutable Patterns" -msgstr "" +msgstr "Reddedilemez Desenler (Irrefutable Patterns)" #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md msgid "Matching Values" @@ -294,19 +292,16 @@ msgid "Let Control Flow" msgstr "Let'li Kontrol Akışı" #: src/SUMMARY.md src/pattern-matching/let-control-flow/if-let.md -#, fuzzy msgid "`if let` Expressions" -msgstr "`if let` ifadeleri" +msgstr "`if let` İfadeleri" #: src/SUMMARY.md src/pattern-matching/let-control-flow/while-let.md -#, fuzzy msgid "`while let` Statements" -msgstr "`while let` ifadeleri" +msgstr "`while let` Deyimleri" #: src/SUMMARY.md -#, fuzzy msgid "`let else`" -msgstr "`let else` ifadeleri" +msgstr "`let else`" #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" @@ -426,24 +421,20 @@ msgid "Closures" msgstr "Çevreleyiciler (Closures)" #: src/SUMMARY.md src/closures.md src/closures/syntax.md -#, fuzzy msgid "Closure Syntax" -msgstr "Çevreleyiciler (Closures)" +msgstr "Çevreleyici Sözdizimi (Closure Syntax)" #: src/SUMMARY.md src/closures.md src/closures/capturing.md -#, fuzzy msgid "Capturing" -msgstr "String" +msgstr "Yakalama (Capturing)" #: src/SUMMARY.md src/closures.md -#, fuzzy msgid "Closure Traits" -msgstr "Daha Fazla Özellik (Trait)" +msgstr "Çevreleyici Özellikler (Closure Traits)" #: src/SUMMARY.md src/closures.md src/closures/exercise.md -#, fuzzy msgid "Exercise: Log Filter" -msgstr "Alıştırma: Kaydedici Özellik" +msgstr "Alıştırma: Kaydedici (Log) Filtresi" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-traits.md @@ -569,7 +560,7 @@ msgstr "İç Değişebilirlik (Interior Mutability)" #: src/SUMMARY.md src/borrowing/interior-mutability/cell.md msgid "`Cell`" -msgstr "" +msgstr "`Cell`" #: src/SUMMARY.md src/borrowing/interior-mutability/refcell.md msgid "`RefCell`" @@ -610,22 +601,20 @@ msgid "Iterators" msgstr "Adımlayıcılar (Iterators)" #: src/SUMMARY.md src/iterators.md -#, fuzzy msgid "Motivation" -msgstr "Monomorfizasyon" +msgstr "Motivasyon" #: src/SUMMARY.md src/iterators/iterator.md -#, fuzzy msgid "`Iterator` Trait" -msgstr "`Iterator`" +msgstr "`Iterator` Özelliği (Trait)" #: src/SUMMARY.md src/iterators/helpers.md msgid "`Iterator` Helper Methods" -msgstr "" +msgstr "`Iterator` Yardımcı Metotları" #: src/SUMMARY.md src/iterators/collect.md msgid "`collect`" -msgstr "" +msgstr "`collect`" #: src/SUMMARY.md src/iterators/intoiterator.md msgid "`IntoIterator`" @@ -649,9 +638,8 @@ msgid "Visibility" msgstr "Görünürlük" #: src/SUMMARY.md src/modules.md -#, fuzzy msgid "Encapsulation" -msgstr "Çeviriler" +msgstr "Kapsülleme (Encapsulation)" #: src/SUMMARY.md msgid "`use`, `super`, `self`" @@ -742,17 +730,15 @@ msgstr "Birlikler (Unions)" #: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md msgid "Unsafe Functions" -msgstr "Emniyetsiz Fonksiyonlar" +msgstr "Emniyetsiz (Unsafe) Fonksiyonlar" #: src/SUMMARY.md src/unsafe-rust/unsafe-functions/rust.md -#, fuzzy msgid "Unsafe Rust Functions" -msgstr "Emniyetsiz Fonksiyonlar" +msgstr "Emniyetsiz (Unsafe) Rust Fonksiyonlar" #: src/SUMMARY.md src/unsafe-rust/unsafe-functions/extern-c.md -#, fuzzy msgid "Unsafe External Functions" -msgstr "Emniyetsiz Fonksiyonlar" +msgstr "Emniyetsiz (Unsafe) Harici Fonksiyonlar" #: src/SUMMARY.md src/unsafe-rust/unsafe-functions/calling.md msgid "Calling Unsafe Functions" @@ -760,7 +746,7 @@ msgstr "Emniyetsiz (Unsafe) Fonksiyonları Çağırma" #: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe Traits" -msgstr "Emniyetsiz Özellikler (Traits)" +msgstr "Emniyetsiz Özellikler (Unsafe Traits)" #: src/SUMMARY.md src/unsafe-rust.md msgid "Exercise: FFI Wrapper" @@ -871,23 +857,20 @@ msgid "With C" msgstr "C ile" #: src/SUMMARY.md src/android/interoperability/with-c/c-library.md -#, fuzzy msgid "A Simple C Library" -msgstr "Basit bir GUI Kütüphanesi" +msgstr "Basit bir C Kütüphanesi" #: src/SUMMARY.md msgid "Bindgen" -msgstr "" +msgstr "Bindgen" #: src/SUMMARY.md src/android/interoperability/with-c/run-our-binary.md -#, fuzzy msgid "Running Our Binary" -msgstr "Cargo'nun Yerel (Local) Olarak Çalıştırılması" +msgstr "İkili Dosyamızı Çalıştırmak" #: src/SUMMARY.md src/android/interoperability/with-c/rust-library.md -#, fuzzy msgid "A Simple Rust Library" -msgstr "Basit bir GUI Kütüphanesi" +msgstr "Basit bir Rust Kütüphanesi" #: src/SUMMARY.md msgid "Calling Rust from C" @@ -1207,16 +1190,15 @@ msgstr "Sürücü" #: src/SUMMARY.md src/bare-metal/aps/safemmio/registers.md msgid "safe-mmio" -msgstr "" +msgstr "safe-mmio" #: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md msgid "Exceptions" msgstr "İstisnalar" #: src/SUMMARY.md src/bare-metal/aps/aarch64-rt.md -#, fuzzy msgid "aarch64-rt" -msgstr "aarch64-paging" +msgstr "aarch64-rt" #: src/SUMMARY.md msgid "Useful Crates" @@ -1363,9 +1345,8 @@ msgstr "Future Özellikleri (Traits)" #: src/SUMMARY.md src/concurrency/async.md #: src/concurrency/async/state-machine.md -#, fuzzy msgid "State Machine" -msgstr "Desen Eşleştirme" +msgstr "Durum Makinesi" #: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md msgid "Runtimes" @@ -1600,9 +1581,8 @@ msgid "" "example/macros.html) instead." msgstr "" "Makroların nasıl geliştirileceğini öğrenmek: lütfen bunun yerine [Rust " -"Book'ta Bölüm 19.5](https://doc.rust-lang.org/book/ch19-06-macros.html) ve " -"[Örneklerle Rust](https://doc.rust-lang.org/rust-by-example/macros.html) " -"bakınız." +"Kitabı](https://doc.rust-lang.org/book/)'na ve [Örneklerle Rust](https://doc." +"rust-lang.org/rust-by-example/macros.html)'a bakınız." #: src/index.md msgid "Assumptions" @@ -1784,9 +1764,8 @@ msgid "Course schedule:" msgstr "Kurs programı:" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 1 Morning (2 hours and 10 minutes, including breaks)" -msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" +msgstr "1. Gün Sabah (2 saat 10 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-1.md #: src/welcome-day-1-afternoon.md src/welcome-day-2.md @@ -1846,9 +1825,8 @@ msgid "45 minutes" msgstr "45 dakika" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 1 Afternoon (2 hours and 45 minutes, including breaks)" -msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" +msgstr "1. Gün Öğleden Sonra (2 saat 45 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md msgid "35 minutes" @@ -1866,9 +1844,8 @@ msgid "1 hour" msgstr "1 saat" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 2 Morning (2 hours and 45 minutes, including breaks)" -msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" +msgstr "2. Gün Sabah (2 saat 45 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/hello-world.md #: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md @@ -1885,9 +1862,8 @@ msgid "50 minutes" msgstr "50 dakika" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 2 Afternoon (2 hours and 50 minutes, including breaks)" -msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" +msgstr "2. Gün Öğleden Sonra (2 saat 50 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md #: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md @@ -1905,18 +1881,16 @@ msgid "Day 3 Afternoon (1 hour and 55 minutes, including breaks)" msgstr "3. Gün Öğleden Sonra (1 saat 55 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Day 4 Morning (2 hours and 50 minutes, including breaks)" -msgstr "4. Gün Sabah (2 saat 40 dakika, aralar dahil)" +msgstr "4. Gün Sabah (2 saat 50 dakika, aralar dahil)" #: src/running-the-course/course-structure.md msgid "Day 4 Afternoon (2 hours and 20 minutes, including breaks)" msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md -#, fuzzy msgid "1 hour and 15 minutes" -msgstr "1 saat 5 dakika" +msgstr "1 saat 15 dakika" #: src/running-the-course/course-structure.md msgid "Deep Dives" @@ -2070,9 +2044,8 @@ msgid "1 hour and 10 minutes" msgstr "1 saat 10 dakika" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Afternoon (3 hours and 30 minutes, including breaks)" -msgstr "Öğleden Sonra (3 saat 20 dakika, aralar dahil)" +msgstr "Öğleden Sonra (3 saat 30 dakika, aralar dahil)" #: src/running-the-course/course-structure.md msgid "Format" @@ -2466,8 +2439,8 @@ msgid "" "and Rust 2021." msgstr "" "Rust'ın ayrıca [yayınları](https://doc.rust-lang.org/edition-guide/) " -"(editions) vardır: mevcut yayın (edition) Rust 2021'dir. Önceki yayınlar " -"Rust 2015 ve Rust 2018'di." +"(editions) vardır: mevcut yayın (edition) Rust 2024'dür. Önceki yayınlar " +"Rust 2015, Rust 2018 ve Rust 2021'di." #: src/cargo/rust-ecosystem.md msgid "" @@ -3184,7 +3157,7 @@ msgstr "" #: src/types-and-values/hello-world.md msgid "Statements end with `;`." -msgstr "" +msgstr "Deyimler `;` ile biter." #: src/types-and-values/hello-world.md msgid "Rust has hygienic macros, `println!` is an example of this." @@ -3290,6 +3263,10 @@ msgid "" "unnecessary `mut`. These are omitted in most slides to avoid distracting " "warnings. Try removing the mutation but leaving the `mut` keyword in place." msgstr "" +"Bu slayt için kullanılmayan değişkenler veya gereksiz `mut` gibi uyarılar " +"(warnings) etkinleştirildi. Dikkat dağıtan uyarılardan kaçınmak için çoğu " +"slaytta bunlar atlanır. Atamayı içeren yorum satırını kaldırmayı deneyin, " +"ancak `mut` anahtar sözcüğünü yerinde kalmaya devam etsin." #: src/types-and-values/variables.md msgid "" @@ -3557,9 +3534,8 @@ msgid "4 minutes" msgstr "4 dakika" #: src/control-flow-basics.md -#, fuzzy msgid "match Expressions" -msgstr "match ifadeleri" +msgstr "match İfadeleri" #: src/control-flow-basics.md msgid "break and continue" @@ -3589,7 +3565,7 @@ msgstr "" #: src/control-flow-basics/blocks-and-scopes.md msgid "// dbg!(y);\n" -msgstr "" +msgstr "// dbg!(y);\n" #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3606,6 +3582,9 @@ msgid "" "You can explain that dbg! is a Rust macro that prints and returns the value " "of a given expression for quick and dirty debugging." msgstr "" +"\"dbg!\"'nin, hızlı ve basitçe hata ayıklama için verilen bir ifadenin " +"değerini yazdırmaya ve geri döndürmeye yarayan bir Rust makrosu olduğunu " +"açıklayabilirsiniz." #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3620,12 +3599,17 @@ msgstr "" msgid "" "Demonstrate that attempting to access `y` outside of its scope won't compile." msgstr "" +"`y` değişkenine kapsamı (scope) dışından erişmeye çalışmanın derleme hatası " +"olacağını gösterin." #: src/control-flow-basics/blocks-and-scopes.md msgid "" "Values are effectively \"deallocated\" when they go out of their scope, even " "if their data on the stack is still there." msgstr "" +"Değerler, yığındaki (stack) verileri hala orada olsa bile, kapsamlarının " +"(scope) dışına çıktıklarında etkili bir şekilde \"tahsisleri geri verilir " +"(deallocated)\"." #: src/control-flow-basics/if.md msgid "`if` expressions" @@ -3697,42 +3681,49 @@ msgstr "" #: src/control-flow-basics/match.md msgid "`match` can be used to check a value against one or more options:" msgstr "" +"`match` bir değeri bir veya daha fazla seçeneğe göre kontrol etmek için " +"kullanılabilir:" #: src/control-flow-basics/match.md msgid "\"one\"" -msgstr "" +msgstr "\"bir\"" #: src/control-flow-basics/match.md msgid "\"ten\"" -msgstr "" +msgstr "\"on\"" #: src/control-flow-basics/match.md msgid "\"one hundred\"" -msgstr "" +msgstr "\"yüz\"" #: src/control-flow-basics/match.md msgid "\"something else\"" -msgstr "" +msgstr "\"başka bir şey\"" #: src/control-flow-basics/match.md msgid "Like `if` expressions, `match` can also return a value;" msgstr "" +"`if` ifadeleri gibi `match` ifadesi de bir değeri geri döndürebilir (return);" #: src/control-flow-basics/match.md msgid "\"The value of {flag} is {val}\"" -msgstr "" +msgstr "\"{flag}'in değeri = {val}\"" #: src/control-flow-basics/match.md msgid "" "`match` arms are evaluated from top to bottom, and the first one that " "matches has its corresponding body executed." msgstr "" +"`match` kolları yukarıdan aşağıya doğru değerlendirilir ve eşleşen ilk kolun " +"karşılık gelen gövdesi (body) çalıştırılır." #: src/control-flow-basics/match.md msgid "" "There is no fall-through between cases the way that `switch` works in other " "languages." msgstr "" +"`switch`'in diğer dillerdeki çalışma şekli gibi durumlar(cases) arasında " +"aşağıya geçiş (fall-through) yoktur." #: src/control-flow-basics/match.md msgid "" @@ -3740,6 +3731,9 @@ msgid "" "this is the same thing, since blocks are also expressions, but students may " "not fully understand that symmetry at this point." msgstr "" +"Bir `match` kolunun gövdesi tek bir ifade (expression) veya bir blok " +"olabilir. Teknik olarak bu aynı şeydir, çünkü bloklar da bir ifadedir, ancak " +"öğrenciler bu noktadaki denk yapıyı (symmetry) tam olarak anlamayabilirler." #: src/control-flow-basics/match.md msgid "" @@ -3749,6 +3743,11 @@ msgid "" "introduced yet. Instead we demonstrate matching on a `bool`, which is the " "simplest primitive type." msgstr "" +"`match` ifadelerinin kapsamlı (exhaustive) olması gerekir, yani ya tüm olası " +"değerleri kapsamaları ya da `_` gibi varsayılan bir duruma (case) sahip " +"olmaları gerekir. Kapsamlılık (Exhaustiveness) enumlarla gösterilmesi en " +"kolay olanıdır, ancak enumlar henüz tanıtılmadı. Bunun yerine, en basit " +"ilkel tür olan `bool` üzerinde eşleştirmeyi gösteriyoruz." #: src/control-flow-basics/match.md msgid "" @@ -3757,6 +3756,10 @@ msgid "" "much information. We'll be talking about pattern matching in more detail " "tomorrow, so try not to go into too much detail here." msgstr "" +"Bu slayt, desen eşleştirmesinden (pattern matching) bahsetmeden `match`'i " +"tanıtıyor ve öğrencilere çok fazla bilgi yüklemeden sözdizimine (syntax) " +"aşina olma şansı veriyor. Desen eşleştirmesi hakkında yarın daha detaylı " +"konuşacağız, bu yüzden burada çok fazla detaya girmemeye çalışın." #: src/control-flow-basics/match.md src/references/dangling.md #: src/user-defined-types/named-structs.md src/user-defined-types/enums.md @@ -3781,6 +3784,11 @@ msgid "" "checks multiple cases, a `match` expression can be more concise than `if {} " "else if {} else if {} else`." msgstr "" +"`match` kullanımını daha da motive etmek için, örnekleri `if` ile yazılmış " +"eşdeğerleriyle karşılaştırabilirsiniz. İkinci durumda, bir `bool` üzerinde " +"eşleme (matching) yapmak, `if {} else {}` bloğuna oldukça benzer. Ancak " +"birden fazla durumu kontrol eden ilk örnekte, bir `match` ifadesi `if {} " +"else if {} else if {} else` ifadesinden daha az ve öz olabilir." #: src/control-flow-basics/match.md msgid "" @@ -3789,6 +3797,12 @@ msgid "" "should be taken. However talking about match guards requires explaining " "about pattern matching, which we're trying to avoid on this slide." msgstr "" +"`match` ayrıca eşleşme korumalarını (match guards) da destekler, bu da " +"eşleşme kolunun (match arm) alınıp alınmaması gerektiğini belirlemek için " +"değerlendirilecek keyfi bir mantıksal koşul (condition) eklemenize olanak " +"tanır. Ancak eşleşme korumaları hakkında konuşmak, bu slaytta kaçınmaya " +"çalıştığımız desen eşleştirmesi (pattern matching) hakkında açıklama " +"gerektirir." #: src/control-flow-basics/loops.md msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" @@ -4026,6 +4040,9 @@ msgid "" "There are a number of other useful macros provided by the standard library. " "Some other examples you can share with students if they want to know more:" msgstr "" +"Standart kütüphane tarafından sağlanan birçok başka kullanışlı makro vardır. " +"Öğrenciler daha fazlasını öğrenmek isterse onlarla paylaşabileceğiniz bazı " +"diğer örnekler:" #: src/control-flow-basics/macros.md msgid "" @@ -4033,18 +4050,26 @@ msgid "" "related macros can be used to add assertions to your code. These are used " "heavily in writing tests." msgstr "" +"[`assert!`](https://doc.rust-lang.org/stable/std/macro.assert.html) ve " +"ilgili makrolar, kodunuza doğrulamalar (assertions) eklemek için " +"kullanılabilir. Bu makrolar, test yazımında yoğun şekilde kullanılır." #: src/control-flow-basics/macros.md msgid "" "[`unreachable!`](https://doc.rust-lang.org/stable/std/macro.unreachable." "html) is used to mark a branch of control flow that should never be hit." msgstr "" +"[`unreachable!`](https://doc.rust-lang.org/stable/std/macro.unreachable." +"html), hiçbir zaman ulaşılmaması gereken bir kontrol akışı dalını " +"işaretlemek için kullanılır." #: src/control-flow-basics/macros.md msgid "" "[`eprintln!`](https://doc.rust-lang.org/stable/std/macro.eprintln.html) " "allows you to print to stderr." msgstr "" +"[`eprintln!`](https://doc.rust-lang.org/stable/std/macro.eprintln.html) " +"stderr'e yazdırmanıza olanak tanır." #: src/control-flow-basics/exercise.md msgid "" @@ -4124,7 +4149,7 @@ msgstr "\"Length: {}\"" #: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md msgid "// should be 15\n" -msgstr "" +msgstr "// 15 olmalı\n" #: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md #: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md @@ -4132,12 +4157,11 @@ msgid "Welcome Back" msgstr "Tekrar Hoş Geldiniz" #: src/welcome-day-1-afternoon.md src/welcome-day-2.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 45 " "minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 45 dakika sürmelidir. " "İçeriği:" #: src/tuples-and-arrays.md @@ -4159,6 +4183,10 @@ msgid "" "value, or if you have a large array that would be hard to initialize " "manually." msgstr "" +"Diziler ayrıca kısaltma sözdizimi (shorthand syntax) kullanılarak da " +"ilklendirilebilir, örneğin `[0; 1024]`. Bu, tüm elemanları aynı değere " +"başlatmak istediğinizde veya manuel olarak başlatılması zor olan büyük bir " +"diziniz varsa yararlı olabilir." #: src/tuples-and-arrays/arrays.md msgid "" @@ -4179,11 +4207,13 @@ msgid "" "Try accessing an out-of-bounds array element. The compiler is able to " "determine that the index is unsafe, and will not compile the code:" msgstr "" +"Sınırların dışında (out-of-bounds) bir dizi (array) elemanına erişmeyi " +"deneyin. Derleyici, indeksin emniyetsiz (unsafe) olduğunu belirleyebilir ve " +"kodu derlemez:" #: src/tuples-and-arrays/arrays.md -#, fuzzy msgid "\"a: {a:?}\"" -msgstr "\"{:?}\"" +msgstr "\"a: {a:?}\"" #: src/tuples-and-arrays/arrays.md msgid "" @@ -4194,6 +4224,13 @@ msgid "" "of runtime checks failing. The following code will compile but panic at " "runtime:" msgstr "" +"Dizi erişimleri çalışma zamanında kontrol edilir. Rust genellikle bu " +"kontrolleri optimize edebilir; yani, derleyici erişimin güvenli olduğunu " +"kanıtlayabilirse, daha iyi performans için çalışma zamanı kontrolünü " +"kaldırır. Bu kontroller, unsafe Rust kullanılarak da atlanabilir. " +"Optimizasyon o kadar iyidir ki, çalışma zamanı kontrollerinin başarısız " +"olduğu bir örnek vermek zordur. Aşağıdaki kod derlenecektir ancak çalışma " +"zamanında panik (panic) ile sonuçlanacaktır:" #: src/tuples-and-arrays/arrays.md msgid "We can use literals to assign values to arrays." @@ -4281,22 +4318,21 @@ msgid "" "Rust supports using pattern matching to destructure a larger value like a " "tuple into its constituent parts:" msgstr "" -"Ancak, Rust daha büyük bir değeri kendisini oluşturan parçalara çözümlemek " -"(destructure) için desen eşleştirmeyi (pattern matching) kullanmayı da " -"destekliyor:" +"Rust, bir tuple gibi daha büyük bir değeri, onu oluşturan parçalara " +"çözümlemek (destructure) için desen eşleştirmeyi (pattern matching) " +"kullanmayı destekler:" #: src/tuples-and-arrays/destructuring.md -#, fuzzy msgid "\"{tuple:?}: {}\"" -msgstr "\"{v:?} vektörünün büyüklüğü: {}\"" +msgstr "\"{tuple:?}: {}\"" #: src/tuples-and-arrays/destructuring.md msgid "\"ordered\"" -msgstr "" +msgstr "\"sıralanmış\"" #: src/tuples-and-arrays/destructuring.md msgid "\"unordered\"" -msgstr "" +msgstr "\"sıralı de\"" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4383,11 +4419,11 @@ msgstr "" #: src/references/shared.md src/std-traits/solution.md msgid "'A'" -msgstr "" +msgstr "'A'" #: src/references/shared.md msgid "'B'" -msgstr "" +msgstr "'B'" #: src/references/shared.md msgid "" @@ -4439,6 +4475,9 @@ msgid "" "Explicit referencing with `&` is usually required. However, Rust performs " "automatic referencing and dereferencing when invoking methods." msgstr "" +"Açık bir şekilde (explicit) `&` ile referans vermek genellikle gereklidir. " +"Ancak, Rust metotları çağırırken referans verme ve referanstan çıkarma " +"işlemlerini otomatik olarak gerçekleştirir." #: src/references/shared.md msgid "" @@ -4479,19 +4518,18 @@ msgid "" "enough. Dangling references cannot occur in safe Rust." msgstr "" "Rust, yeterince uzun süre hayatta olmalarını sağlamak için tüm referansların " -"ömrülerini (lifetime) takip eder. Emniyetli Rust'ta boşa çıkan referanslar " -"(dangling reference) oluşamaz. `x_axis` fonksiyonu, `point`'e bir referans " -"geri döndürecekti, ancak fonksiyon geri döndüğünde `point` için tahsis " -"edilen alan geri verileceğinden (deallocation) bu kod derlenmeyecektir." +"ömrülerini (lifetime) takip eder. Emniyetli (safe) Rust'ta boşa çıkan " +"referanslar (dangling reference) oluşamaz." #: src/references/shared.md -#, fuzzy msgid "" "We will talk more about borrowing and preventing dangling references when we " "get to ownership." msgstr "" "Sahipliğe (ownership) geçince ödünç alma (borrowing) konusunu daha detaylı " -"konuşacağız." +"konuşacağız.\n" +"Sahiplik (ownership) konusuna geldiğimizde ödünç alma ve boşa çıkan " +"referansları (dangling references) daha detaylı konuşacağız." #: src/references/exclusive.md msgid "" @@ -4592,13 +4630,15 @@ msgstr "" #: src/references/slices.md msgid "You can't \"grow\" a slice once it's created:" -msgstr "" +msgstr "Bir dilimi (slice) oluşturduktan sonra onu \"büyütemezsiniz\":" #: src/references/slices.md msgid "" "You can't append elements of the slice, since it doesn't own the backing " "buffer." msgstr "" +"Dilim (slice), destekleyici arabelleğe (backing buffer) sahip olmadığından, " +"dilimin öğelerine ekleyemezsiniz." #: src/references/slices.md msgid "" @@ -4606,12 +4646,18 @@ msgid "" "The slice loses information about the underlying buffer and so you can't " "know how larger the slice can be grown." msgstr "" +"Bir dilimi (slice), destekleyici arabelleğin (backing buffer) daha büyük bir " +"bölümünü gösterecek şekilde büyütemezsiniz. Dilim, temel arabellek " +"(underlying buffer) hakkında bilgiyi kaybeder ve bu nedenle ne kadar " +"büyütülebileceğini bilemezsiniz." #: src/references/slices.md msgid "" "To get a larger slice you have to back to the original buffer and create a " "larger slice from there." msgstr "" +"Daha büyük bir dilim (slice) elde etmek için, orijinal arabelleği (buffer) " +"kullanarak daha büyük bir dilim (slice) oluşturmalısınız." #: src/references/strings.md msgid "We can now understand the two string types in Rust:" @@ -4741,18 +4787,28 @@ msgid "" "use without `null` checks. The other rule we'll look at for now is that " "references can't _outlive_ the data they point to." msgstr "" +"Rust, referansların her zaman emniyetli (safe) kullanılmasını sağlayan bir " +"dizi kural uygular. Bunlardan biri, referansların asla `null` " +"olamayacağıdır; bu da `null` kontrolü yapmadan emniyetli kullanılmalarını " +"sağlar. Şimdi bakacağımız diğer kural ise, referansların gösterdikleri " +"veriden _daha uzun ömürlü (outlive)_ olamayacaklarıdır." #: src/references/dangling.md msgid "" "This slide gets students thinking about references as not simply being " "pointers, since Rust has different rules for references than other languages." msgstr "" +"Bu slayt, Rust'ın referanslar için diğer dillerden farklı kuralları " +"olduğundan, öğrencilerin referansların sadece göstericiler (pointers) " +"olmadığını düşünmelerini sağlar." #: src/references/dangling.md msgid "" "We'll look at the rest of Rust's borrowing rules on day 3 when we talk about " "Rust's ownership system." msgstr "" +"Rust'ın ödünç alma (borrowing) kurallarının geri kalanına, 3. günde Rust'ın " +"sahiplik (ownership) sisteminden bahsederken bakacağız." #: src/references/dangling.md msgid "" @@ -4761,6 +4817,11 @@ msgid "" "introduced enums or pattern matching, though, so try not to go into too much " "detail about this here." msgstr "" +"Rust dilindeki null olabilirliğin karşılığı `Option` türüdür, bu tür " +"herhangi bir türü \"null olabilir (nullable)\" hâle getirmek için " +"kullanılabilir (sadece referanslar/göstericiler değil). Ancak henüz " +"enum'ları veya desen eşleştirmeyi (pattern matching) tanıtmadık, bu yüzden " +"burada bu konulara fazla girmemeye çalış." #: src/references/exercise.md msgid "" @@ -4828,6 +4889,10 @@ msgid "" "array, which causes the `for` loop to give mutable references to each " "element." msgstr "" +"`normalize` fonksiyonunda her bir elemanı değiştirmek için `*item /= mag` " +"yapabildiğimize dikkat edin. Bunun sebebi, bir diziye değiştirilebilir " +"(mutable) referans kullanarak döngü de dönmemizdir; bu da `for` döngüsünün " +"her elemana değiştirilebilir (mutable) referanslar vermesini sağlar." #: src/user-defined-types.md src/std-types.md src/std-traits.md #: src/memory-management.md @@ -4911,24 +4976,27 @@ msgid "" "Struct fields do not support default values. Default values are specified by " "implementing the `Default` trait which we will cover later." msgstr "" +"Yapı alanları (struct fields) varsayılan değerleri desteklemez. Varsayılan " +"değerler, daha sonra ele alacağımız `Default` özelliği (trait) uygulanarak " +"belirtilir." #: src/user-defined-types/named-structs.md msgid "You can also demonstrate the struct update syntax here:" msgstr "" +"Burada aynı zamanda yapı güncelleme sözdizimini (struct update syntax) de " +"gösterebilirsiniz:" #: src/user-defined-types/named-structs.md msgid "\"Jackie\"" msgstr "\"Jackie\"" #: src/user-defined-types/named-structs.md -#, fuzzy msgid "" "It allows us to copy the majority of the fields from the old struct without " "having to explicitly type it all out. It must always be the last element." msgstr "" -"`..avery` sözdizimi, eski yapıdaki alanların çoğunu, hepsini açıkça " -"yazmamıza gerek kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe " -"olmalıdır." +"Bu, eski yapının (struct) alanlarının çoğunu açıkça tek tek yazmak zorunda " +"kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe olmalıdır." #: src/user-defined-types/named-structs.md msgid "" @@ -4936,6 +5004,10 @@ msgid "" "about struct update syntax in more detail on the slide on the `Default` " "trait, so we don't need to talk about it here unless students ask about it." msgstr "" +"Bu, çoğunlukla `Default` özelliği (trait) ile birlikte kullanılır. `Default` " +"özelliği ile ilgili slaytta yapı güncelleme sözdizimini (struct update " +"syntax) daha detaylı ele alacağız, bu yüzden öğrenciler sormadıkça burada " +"bahsetmemize gerek yok." #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" @@ -5011,6 +5083,9 @@ msgid "" "a zero-sized type (ZST), of which there is only one value (the name of the " "type)." msgstr "" +"Bir demet (tuple) yapısının sıfır alanı varsa, `()` kısmı atlanabilir. " +"Böylece ortaya sıfır boyutlu (zero-sized) bir tür (SBT/ZST) çıkar ve bu " +"türün yalnızca bir değeri vardır (türün adı)." #: src/user-defined-types/tuple-structs.md msgid "" @@ -5018,6 +5093,9 @@ msgid "" "(imagine a `NullReader` that implements some reader behavior by always " "returning EOF)." msgstr "" +"Bu, bazı davranışları uygulayıp verisi olmayan türler için yaygındır (her " +"zaman EOF döndüren bir `NullReader` hayal edin; okuma davranışını uygular " +"ama veri içermez)." #: src/user-defined-types/tuple-structs.md msgid "" @@ -5288,6 +5366,9 @@ msgid "" "initialization on first use. `OnceCell` is not `Sync` and thus cannot be " "used in this context." msgstr "" +"İlk kullanımda ilklendirmeyi (initialization) desteklemek için `static` " +"içinde `OnceLock` kullanmak yaygındır. `OnceCell`, `Sync` olmadığı için bu " +"bağlamda kullanılamaz." #: src/user-defined-types/static.md msgid "Thread-local data can be created with the macro `std::thread_local`." @@ -5386,6 +5467,11 @@ msgid "" "it to think that the code is unused. They can ignore it for the purpose of " "this exercise." msgstr "" +"Eğer öğrenciler alıştırmanın en üstündeki `#![allow(dead_code)]` satırını " +"sorarlarsa, bunun nedeni `Event` türüyle yaptığımız tek şeyin onu ekrana " +"yazdırmak olmasıdır. Derleyicinin ölü kodu (dead code) kontrol etme " +"biçimindeki bir ayrıntı nedeniyle, bu durum kodun kullanılmadığını sanmasına " +"yol açar. Öğrenciler bu satırı bu alıştırma özelinde görmezden gelebilirler." #: src/user-defined-types/solution.md msgid "/// A button was pressed.\n" From 58de599b224681a002008ec1b95c574d6e37de7a Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sat, 5 Jul 2025 00:00:19 +0300 Subject: [PATCH 10/26] deleted fuzzy, and edited translations in some places after merging --- po/tr.po | 80 ++++++++++++++++++-------------------------------------- 1 file changed, 26 insertions(+), 54 deletions(-) diff --git a/po/tr.po b/po/tr.po index b3e1e09ef634..d55b479eddaf 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: 2025-07-04T11:43:49+03:00\n" -"PO-Revision-Date: 2025-07-04 21:34+0300\n" +"PO-Revision-Date: 2025-07-04 23:59+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -1574,7 +1574,6 @@ msgstr "" "olmayacak. Aşağıdakiler bu kursun amaçları dışında kalır:" #: src/index.md -#, fuzzy msgid "" "Learning how to develop macros: please see [the Rust Book](https://doc.rust-" "lang.org/book/) and [Rust by Example](https://doc.rust-lang.org/rust-by-" @@ -2432,7 +2431,6 @@ msgstr "" "fazlasından çözülebilir." #: src/cargo/rust-ecosystem.md -#, fuzzy msgid "" "Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the " "current edition is Rust 2024. Previous editions were Rust 2015, Rust 2018 " @@ -4313,7 +4311,6 @@ msgstr "" "hiçbir şeye derlenmez." #: src/tuples-and-arrays/destructuring.md -#, fuzzy msgid "" "Rust supports using pattern matching to destructure a larger value like a " "tuple into its constituent parts:" @@ -4512,7 +4509,6 @@ msgstr "" "izin vermez. `*r = 'X'`'i deneyin." #: src/references/shared.md -#, fuzzy msgid "" "Rust is tracking the lifetimes of all references to ensure they live long " "enough. Dangling references cannot occur in safe Rust." @@ -5581,14 +5577,12 @@ msgid "" msgstr "" #: src/pattern-matching/infallible.md -#, fuzzy msgid "" "Variable names are patterns that always match and which bind the matched " "value into a new variable with that name." msgstr "" -"Bir değişken adı, her zaman herhangi bir değerle eşleşen reddedilemez " -"(irrefutable) bir desendir, bu nedenle tek bir değişkeni bildirmek için " -"`let`'i kullanabiliriz." +"Değişken adları her zaman eşleşen ve eşleşen değeri o isimle yeni bir " +"değişkene bağlayan kalıplardır." #: src/pattern-matching/infallible.md msgid "" @@ -5929,9 +5923,8 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow/while-let.md -#, fuzzy msgid "\"Comprehensive Rust 🦀\"" -msgstr "Comprehensive Rust'a Hoş Geldiniz 🦀" +msgstr "\"Comprehensive Rust 🦀\"" #: src/pattern-matching/let-control-flow/while-let.md msgid "// (There are more efficient ways to reverse a string!)\n" @@ -5965,9 +5958,8 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow/let-else.md -#, fuzzy msgid "`let else` Statements" -msgstr "`let else` ifadeleri" +msgstr "`let else` Deyimleri" #: src/pattern-matching/let-control-flow/let-else.md msgid "" @@ -6784,12 +6776,11 @@ msgid "" msgstr "" #: src/welcome-day-2-afternoon.md src/welcome-day-4.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 2 hours and 50 " "minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 50 dakika sürmelidir. " "İçeriği:" #: src/std-types.md src/std-types/option.md @@ -7431,9 +7422,8 @@ msgid "" msgstr "" #: src/closures/traits.md -#, fuzzy msgid "Closure traits" -msgstr "Çevreleyiciler (Closures)" +msgstr "Çevreleyici özellikler (Closures traits)" #: src/closures/traits.md msgid "" @@ -7846,13 +7836,12 @@ msgid "The `Default` Trait" msgstr "" #: src/std-traits/default.md -#, fuzzy msgid "" "The [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " "trait produces a default value for a type." msgstr "" -"[`for` döngüsü](https://doc.rust-lang.org/std/keyword.for.html) değer " -"aralıkları veya bir koleksiyondaki öğeler üzerinde tekrarlar:" +"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " +"özelliği (trait) bir tür için varsayılan bir değer üretir." #: src/std-traits/default.md msgid "\"John Smith\"" @@ -9721,27 +9710,24 @@ msgid "" msgstr "" #: src/iterators.md -#, fuzzy msgid "Iterator Trait" -msgstr "Iterator" +msgstr "Adımlayıcı Özelliği (Iterator Trait)" #: src/iterators.md msgid "Iterator Helper Methods" msgstr "" #: src/iterators.md -#, fuzzy msgid "collect" -msgstr "Select" +msgstr "collect" #: src/iterators.md msgid "IntoIterator" msgstr "IntoIterator" #: src/iterators/motivation.md -#, fuzzy msgid "Motivating Iterators" -msgstr "Dizeler (Stringler) ve Adımlayıcılar (Iterators)" +msgstr "Adımlayıcılara (Iterators) Motive Edici Şeyler" #: src/iterators/motivation.md msgid "" @@ -10254,9 +10240,8 @@ msgid "" msgstr "" #: src/modules/encapsulation.md -#, fuzzy msgid "\"Is {} big? {}\"" -msgstr "\"{n}! = {}\"" +msgstr "\"{} büyük mü? {}\"" #: src/modules/encapsulation.md msgid "\"foo.val = {}\"" @@ -11214,9 +11199,8 @@ msgid "" msgstr "" #: src/unsafe-rust.md -#, fuzzy msgid "This segment should take about 1 hour and 15 minutes. It contains:" -msgstr "Bu bölüm yaklaşık 1 saat 5 dakika sürmelidir. İçeriği:" +msgstr "Bu bölüm yaklaşık 1 saat 15 dakika sürmelidir. İçeriği:" #: src/unsafe-rust/unsafe.md msgid "The Rust language has two parts:" @@ -11459,9 +11443,8 @@ msgid "There are two main categories:" msgstr "" #: src/unsafe-rust/unsafe-functions.md -#, fuzzy msgid "Rust functions declared unsafe with `unsafe fn`." -msgstr "Fonksiyonlar `fn` ile tanıtılır." +msgstr "Rust fonksiyonları `unsafe fn` ile emniyetli olmadığı bildirildi." #: src/unsafe-rust/unsafe-functions.md msgid "Foreign functions in `extern \"C\"` blocks." @@ -11559,14 +11542,12 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions/extern-c.md -#, fuzzy msgid "\"String length: {}\"" -msgstr "\"Length: {}\"" +msgstr "\"Dize uzunluğu: {}\"" #: src/unsafe-rust/unsafe-functions/extern-c.md -#, fuzzy msgid "\"String\"" -msgstr "String" +msgstr "\"String\"" #: src/unsafe-rust/unsafe-functions/extern-c.md msgid "" @@ -11604,9 +11585,8 @@ msgid "// 8 bytes\n" msgstr "" #: src/unsafe-rust/unsafe-functions/calling.md -#, fuzzy msgid "\"{pk:?}\"" -msgstr "\"{:?}\"" +msgstr "\"{pk:?}\"" #: src/unsafe-rust/unsafe-functions/calling.md msgid "" @@ -13055,32 +13035,28 @@ msgid "\"googletest_example\"" msgstr "" #: src/android/testing.md -#, fuzzy msgid "\"googletest.rs\"" -msgstr "GoogleTest" +msgstr "\"googletest.rs\"" #: src/android/testing.md msgid "\"libgoogletest_rust\"" msgstr "" #: src/android/testing.md -#, fuzzy msgid "\"libmockall_example\"" -msgstr "Küçük Örnek" +msgstr "\"libmockall_example\"" #: src/android/testing.md -#, fuzzy msgid "\"mockall_example\"" -msgstr "Küçük Örnek" +msgstr "\"mockall_example\"" #: src/android/testing.md msgid "\"mockall.rs\"" msgstr "" #: src/android/testing.md -#, fuzzy msgid "\"libmockall\"" -msgstr "\"küçük\"" +msgstr "\"libmockall\"" #: src/android/testing.md msgid "_testing/src/lib.rs_:" @@ -17940,9 +17916,8 @@ msgid "" msgstr "" #: src/bare-metal/aps/safemmio/registers.md -#, fuzzy msgid "Can't read" -msgstr "Temel İş Parçacıkları (Plain Threads)" +msgstr "" #: src/bare-metal/aps/safemmio/registers.md msgid "Read has no side-effects" @@ -17969,9 +17944,8 @@ msgid "" msgstr "" #: src/bare-metal/aps/safemmio/registers.md -#, fuzzy msgid "Can write" -msgstr "Read ve Write" +msgstr "" #: src/bare-metal/aps/safemmio/registers.md msgid "" @@ -19709,12 +19683,11 @@ msgid "" msgstr "" #: src/concurrency/welcome-async.md -#, fuzzy msgid "" "Including 10 minute breaks, this session should take about 3 hours and 30 " "minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 20 dakika sürmelidir. " +"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 30 dakika sürmelidir. " "İçeriği:" #: src/concurrency/async.md @@ -19910,9 +19883,8 @@ msgid "" msgstr "" #: src/concurrency/async/state-machine.md -#, fuzzy msgid "\"{n}\"" -msgstr "\"{n}! = {}\"" +msgstr "\"{n}\"" #: src/concurrency/async/runtimes.md msgid "" From f024fa4eeeff491f4ce859703e2ca4a6aec3e292 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sat, 5 Jul 2025 18:50:53 +0300 Subject: [PATCH 11/26] corrected incorrect translation of elevator "car". --- po/tr.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/po/tr.po b/po/tr.po index d55b479eddaf..37c11fe79c94 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5475,15 +5475,15 @@ msgstr "/// Bir düğmeye basıldı.\n" #: src/user-defined-types/solution.md msgid "/// The car has arrived at the given floor.\n" -msgstr "/// Araba verilen kata ulaşmış durumda.\n" +msgstr "/// Kabin verilen kata ulaşmış durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have opened.\n" -msgstr "/// Arabanın kapıları açık durumda.\n" +msgstr "/// Kabin kapıları açılmış durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have closed.\n" -msgstr "/// Arabanın kapıları kapalı durumda.\n" +msgstr "/// Kabin kapıları kapanmış durumda.\n" #: src/user-defined-types/solution.md msgid "/// A floor is represented as an integer.\n" @@ -5499,7 +5499,7 @@ msgstr "/// Verilem katta asansör lobisinde bulunan bir düğme.\n" #: src/user-defined-types/solution.md msgid "/// A floor button within the car.\n" -msgstr "/// Arabanın içindeki bir kat düğmesi.\n" +msgstr "/// Kabinin içindeki bir kat düğmesi.\n" #: src/welcome-day-2.md msgid "Welcome to Day 2" From 874c94c4c0c89a22ad4d9cb6d59454bad9bbfbb9 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sat, 5 Jul 2025 18:52:47 +0300 Subject: [PATCH 12/26] corrected incorrect translation of elevator "car". v2 --- po/tr.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/tr.po b/po/tr.po index 37c11fe79c94..471d5b743ce0 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5411,15 +5411,15 @@ msgstr "" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car has arrived on the given floor.\n" -msgstr "/// Araba verilen kata ulaşmış durumda.\n" +msgstr "/// Kabin verilen kata ulaşmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have opened.\n" -msgstr "/// Araba kapıları açılmış durumda.\n" +msgstr "/// Kabin kapıları açılmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have closed.\n" -msgstr "/// Araba kapıları kapanmış durumda.\n" +msgstr "/// Kabin kapıları kapanmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" @@ -5437,11 +5437,11 @@ msgstr "\"Zemin kattaki bir yolcu yukarı düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the ground floor: {:?}\"" -msgstr "\"Araba zemin kata ulaşmış durumda: {:?}\"" +msgstr "\"Kabin zemin kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door opened: {:?}\"" -msgstr "\"Araba kapısı açıldı: {:?}\"" +msgstr "\"Kabin kapısı açıldı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A passenger has pressed the 3rd floor button: {:?}\"" @@ -5449,11 +5449,11 @@ msgstr "\"Bir yolcu 3. katın düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door closed: {:?}\"" -msgstr "\"Araba kapısı kapandı: {:?}\"" +msgstr "\"Kabin kapısı kapandı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the 3rd floor: {:?}\"" -msgstr "\"Araba 3. kata ulaşmış durumda: {:?}\"" +msgstr "\"Kabin 3. kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/exercise.md msgid "" From a1d03126bbae864b0fb1bfd9e11fa58f1696639f Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sun, 6 Jul 2025 18:29:36 +0300 Subject: [PATCH 13/26] updated tr.po after merge --- po/tr.po | 78 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/po/tr.po b/po/tr.po index 471d5b743ce0..8db6c579cdab 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7559,7 +7559,6 @@ msgid "\"yikes, something went wrong\"" msgstr "" #: src/closures/exercise.md src/closures/solution.md -#: src/unsafe-rust/dereferencing.md msgid "\"uhoh\"" msgstr "" @@ -11271,35 +11270,34 @@ msgstr "" msgid "Creating pointers is safe, but dereferencing them requires `unsafe`:" msgstr "" -#: src/unsafe-rust/dereferencing.md -msgid "\"careful!\"" -msgstr "" - #: src/unsafe-rust/dereferencing.md msgid "" -"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\n" -" // be non-null and properly aligned, the objects underlying the " -"references\n" -" // from which they were obtained are live throughout the whole unsafe\n" -" // block, and they are not accessed either through the references or\n" -" // concurrently through any other pointers.\n" -msgstr "" - -#: src/unsafe-rust/dereferencing.md -msgid "\"r1 is: {}\"" +"// SAFETY: p1 and p2 were created by taking raw pointers to a local, so " +"they\n" +" // are guaranteed to be non-null, aligned, and point into a single " +"(stack-)\n" +" // allocated object.\n" +" //\n" +" // The object underlying the raw pointers lives for the entire function, " +"so\n" +" // it is not deallocated while the raw pointers still exist. It is not\n" +" // accessed through references while the raw pointers exist, nor is it\n" +" // accessed from other threads concurrently.\n" msgstr "" #: src/unsafe-rust/dereferencing.md -msgid "\"r2 is: {}\"" +msgid "// Mutation may soundly be observed through a raw pointer, like in C.\n" msgstr "" #: src/unsafe-rust/dereferencing.md msgid "" -"// NOT SAFE. DO NOT DO THIS.\n" +"// UNSOUND. DO NOT DO THIS.\n" " /*\n" -" let r3: &String = unsafe { &*r1 };\n" -" drop(s);\n" -" println!(\"r3 is: {}\", *r3);\n" +" let r: &i32 = unsafe { &*p1 };\n" +" dbg!(r);\n" +" x = 50;\n" +" dbg!(r); // Object underlying the reference has been mutated. This is " +"UB.\n" " */" msgstr "" @@ -11346,9 +11344,12 @@ msgstr "" #: src/unsafe-rust/dereferencing.md msgid "" -"The \"NOT SAFE\" section gives an example of a common kind of UB bug: `*r1` " -"has the `'static` lifetime, so `r3` has type `&'static String`, and thus " -"outlives `s`. Creating a reference from a pointer requires _great care_." +"The \"UNSOUND\" section gives an example of a common kind of UB bug: naïvely " +"taking a reference to the dereference of a raw pointer sidesteps the " +"compiler's knowledge of what object the reference is actually pointing to. " +"As such, the borrow checker does not freeze `x` and so we are able to modify " +"it despite the existence of a reference to it. Creating a reference from a " +"pointer requires _great care_." msgstr "" #: src/unsafe-rust/mutable-static.md @@ -11365,8 +11366,15 @@ msgstr "" #: src/unsafe-rust/mutable-static.md msgid "" -"However, since data races can occur, it is unsafe to read and write mutable " -"static variables:" +"However, mutable static variables are unsafe to read and write because " +"multiple threads could do so concurrently without synchronization, " +"constituting a data race." +msgstr "" + +#: src/unsafe-rust/mutable-static.md +msgid "" +"Using mutable statics soundly requires reasoning about concurrency without " +"the compiler's help:" msgstr "" #: src/unsafe-rust/mutable-static.md @@ -11376,7 +11384,7 @@ msgstr "" #: src/unsafe-rust/mutable-static.md msgid "" -"The program here is safe because it is single-threaded. However, the Rust " +"The program here is sound because it is single-threaded. However, the Rust " "compiler reasons about functions individually so can't assume that. Try " "removing the `unsafe` and see how the compiler explains that it is undefined " "behavior to access a mutable static from multiple threads." @@ -11384,9 +11392,8 @@ msgstr "" #: src/unsafe-rust/mutable-static.md msgid "" -"Rust 2024 edition goes further and makes accessing a mutable static by " -"reference an error by default. We work around this in the example with " -"`#[allow(static_mut_refs)]`. Don't do this." +"The 2024 Rust edition goes further and makes accessing a mutable static by " +"reference an error by default." msgstr "" #: src/unsafe-rust/mutable-static.md @@ -11439,15 +11446,16 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "There are two main categories:" +msgid "Unsafe functions may come from two places:" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "Rust functions declared unsafe with `unsafe fn`." +#, fuzzy +msgid "Rust functions declared unsafe." msgstr "Rust fonksiyonları `unsafe fn` ile emniyetli olmadığı bildirildi." #: src/unsafe-rust/unsafe-functions.md -msgid "Foreign functions in `extern \"C\"` blocks." +msgid "Unsafe foreign functions in `extern \"C\"` blocks." msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -11503,7 +11511,11 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions/extern-c.md -msgid "Functions in a foreign language may also be unsafe:" +msgid "" +"You can declare foreign functions for access from Rust with `unsafe extern`. " +"This is unsafe because the compiler has to way to reason about their " +"behavior. Functions declared in an `extern` block must be marked as `safe` " +"or `unsafe`, depending on whether they have preconditions for safe use:" msgstr "" #: src/unsafe-rust/unsafe-functions/extern-c.md src/unsafe-rust/exercise.md From fa3e988815df2df36d1c75837f18d6229cd76d0a Mon Sep 17 00:00:00 2001 From: enes1313 Date: Mon, 14 Jul 2025 21:44:04 +0300 Subject: [PATCH 14/26] some improvements for day 1 morning --- po/tr.po | 160 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 84 insertions(+), 76 deletions(-) diff --git a/po/tr.po b/po/tr.po index 8db6c579cdab..87b554ca7f31 100644 --- a/po/tr.po +++ b/po/tr.po @@ -95,7 +95,7 @@ msgstr "Aritmetik" #: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md msgid "Type Inference" -msgstr "Tür Çıkarımı" +msgstr "Tür Çıkarımı (Type Inference)" #: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md msgid "Exercise: Fibonacci" @@ -681,7 +681,7 @@ msgstr "Hata İşleme" #: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md msgid "Panics" -msgstr "Panic'ler" +msgstr "Panikler (Panics)" #: src/SUMMARY.md src/error-handling.md src/error-handling/try.md msgid "Try Operator" @@ -850,7 +850,7 @@ msgstr "Kayıt Tutma (Logging)" #: src/SUMMARY.md src/android/interoperability.md msgid "Interoperability" -msgstr "Birlikte Çalışabilirlik" +msgstr "Birlikte Çalışabilirlik (Interoperability)" #: src/SUMMARY.md msgid "With C" @@ -975,7 +975,7 @@ msgstr "`chromium::import!` Makrosu" #: src/SUMMARY.md src/chromium/interoperability-with-cpp.md msgid "Interoperability with C++" -msgstr "C++ ile Birlikte Çalışabilirlik" +msgstr "C++ ile Birlikte Çalışabilirlik (Interoperability)" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md msgid "Example Bindings" @@ -1506,7 +1506,7 @@ msgstr "" #: src/index.md msgid "Show you common Rust idioms." -msgstr "Yaygın Rust kod kaplarını göstermeyi." +msgstr "Yaygın Rust kod kalıplarını göstermeyi." #: src/index.md msgid "We call the first four course days Rust Fundamentals." @@ -1526,7 +1526,7 @@ msgid "" msgstr "" "[Android](android.md): Android platformu geliştirme (AOSP) için Rust'ın " "kullanımına ilişkin yarım günlük bir kurs. Buna C, C++ ve Java ile birlikte " -"çalışabilirlik de dahildir." +"çalışabilirlik (interoperability) de dahildir." #: src/index.md msgid "" @@ -1593,9 +1593,10 @@ msgid "" "statically-typed language and we will sometimes make comparisons with C and " "C++ to better explain or contrast the Rust approach." msgstr "" -"Kurs, nasıl programlanacağını zaten bildiğinizi varsayar. Rust, statik " -"olarak türlenen bir dildir ve Rust yaklaşımını daha iyi açıklamak veya " -"karşılaştırmak için bazen C ve C++ ile karşılaştırmalar yapacağız." +"Kurs, nasıl programlanacağını zaten bildiğinizi varsayar. Rust, statik tür " +"sistemine sahip (statically-typed) bir dildir ve Rust yaklaşımını daha iyi " +"açıklamak veya karşılaştırmak için bazen C ve C++ ile karşılaştırmalar " +"yapacağız." #: src/index.md msgid "" @@ -2300,7 +2301,7 @@ msgstr "" "Bu size Cargo oluşturma aracını (`cargo`) ve Rust derleyicisini (`rustc`) " "sağlayacaktır. Ayrıca, araç zincirlerini (toolchain) kurmak/değiştirmek, " "çapraz derlemeyi ayarlamak vb. için kullanabileceğiniz bir komut satırı " -"yardımcı programı olan `rustup` a sahip olacaksınız." +"yardımcı programı olan `rustup`'a sahip olacaksınız." #: src/cargo.md msgid "" @@ -2315,11 +2316,11 @@ msgstr "" "Rust'u kurduktan sonra editörünüzü/düzenleyicinizi veya IDE'nizi Rust ile " "çalışacak şekilde yapılandırmalısınız. Çoğu editör bunu, [VS Code](https://" "code.visualstudio.com/), [Emacs](https://rust-analyzer.github.io/manual." -"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual. " -"html#vimneovim) ve diğerleri için otomatik tamamlama ve tanıma atlama işlevi " -"sağlayan [rust-analyzer](https://rust-analyzer.github.io/) ile haberleşerek " -"yapar. Ayrıca [RustRover](https://www.jetbrains.com/rust/) adında farklı bir " -"IDE de mevcuttur." +"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual." +"html#vimneovim) ve diğerleri için otomatik tamamlama ve tanıma atlama " +"işlevselliği sağlayan [rust-analyzer](https://rust-analyzer.github.io/) ile " +"haberleşerek yapar. Ayrıca [RustRover](https://www.jetbrains.com/rust/) " +"adında farklı bir IDE de mevcuttur." #: src/cargo.md msgid "" @@ -2329,7 +2330,7 @@ msgid "" "command would be:" msgstr "" "Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu ve " -"[Rust biçimlendiricisini](https://github.com/rust-lang/rustfmt) " +"[Rust biçimlendiricisini (formatter)](https://github.com/rust-lang/rustfmt) " "kurabilirsiniz. Ancak bu size eski bir Rust sürümü verir ve beklenmeyen " "davranışlara yol açabilir. Komut şu şekilde olacaktır:" @@ -2717,7 +2718,7 @@ msgstr "" #: src/welcome-day-1.md msgid "Types and type inference." -msgstr "Türler ve tür çıkarımı." +msgstr "Türler ve tür çıkarımı (inference)." #: src/welcome-day-1.md msgid "Control flow constructs: loops, conditionals, and so on." @@ -2784,7 +2785,7 @@ msgid "" "Remember that the slides are just a support and you are free to skip them as " "you like." msgstr "" -"Bu kesinlikle sorun değil! Tekrar etkemk, öğrenmenin önemli bir parçasıdır. " +"Bu kesinlikle sorun değil! Tekrar etmek, öğrenmenin önemli bir parçasıdır. " "Slaytların sadece bir destek olduğunu ve istediğiniz gibi atlamakta özgür " "olduğunuzu unutmayın." @@ -2856,7 +2857,7 @@ msgstr "" #: src/hello-world/what-is-rust.md msgid "Rust is a statically compiled language in a similar role as C++" -msgstr "Rust, C++ ile benzer role sahip statik olarak derlenmiş bir dildir" +msgstr "Rust, C++ ile benzer role sahip statik olarak derlenen bir dildir" #: src/hello-world/what-is-rust.md msgid "`rustc` uses LLVM as its backend." @@ -2958,7 +2959,7 @@ msgstr "`NULL` göstericileri yok." #: src/hello-world/benefits.md msgid "No forgotten locked mutexes." -msgstr "Unutulan kilitli muteksler yok." +msgstr "Kilitli halde unutulmuş hiçbir mutex yok." #: src/hello-world/benefits.md msgid "No data races between threads." @@ -2966,7 +2967,7 @@ msgstr "İş parçacıkları (threads) arasında veri yarışları (data races) #: src/hello-world/benefits.md msgid "No iterator invalidation." -msgstr "Adımlayıcıyı (iterator) geçersiz kılma (invalidation) yok." +msgstr "Adımlayıcıyının (iterator) geçersiz kılınması (invalidation) yok." #: src/hello-world/benefits.md msgid "" @@ -2982,7 +2983,7 @@ msgstr "Dizi erişiminde sınırlar kontrol edilir." #: src/hello-world/benefits.md msgid "Integer overflow is defined (panic or wrap-around)." -msgstr "Tamsayı taşması tanımlandı (panic veya wrap-around)." +msgstr "Tamsayı taşması tanımlıdır (panic veya wrap-around)." #: src/hello-world/benefits.md msgid "" @@ -3155,7 +3156,7 @@ msgstr "" #: src/types-and-values/hello-world.md msgid "Statements end with `;`." -msgstr "Deyimler `;` ile biter." +msgstr "Deyimler (Statements) `;` ile biter." #: src/types-and-values/hello-world.md msgid "Rust has hygienic macros, `println!` is an example of this." @@ -3199,8 +3200,8 @@ msgid "" "arguments (no function [overloading](../control-flow-basics/functions.md))." msgstr "" "Rust, değişken sayıda argümana sahip olmak istediğiniz durumlar için " -"makroları kullanır (fonksiyon [yüklemesi](../control-flow-basics/functions." -"md) yoktur)." +"makroları kullanır (fonksiyon [yüklemesi (overloading)](../control-flow-" +"basics/functions.md) yoktur)." #: src/types-and-values/hello-world.md msgid "" @@ -3211,8 +3212,8 @@ msgid "" msgstr "" "Makroların 'arınmış/pak' olması, kullanıldıkları kapsamdaki (scope) " "tanımlayıcıları (identifiers) yanlışlıkla yakalamadıkları anlamına gelir. " -"Rust makroları aslında yalnızca [kısmen hijyeniktir](https://veykril.github." -"io/tlborm/decl-macros/minutiae/hygiene.html)." +"Rust makroları aslında yalnızca [kısmi paktır (hygienic)](https://veykril." +"github.io/tlborm/decl-macros/minutiae/hygiene.html)." #: src/types-and-values/hello-world.md msgid "" @@ -3231,7 +3232,7 @@ msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" msgstr "" -"Rust, statik tür özelliğine sahip olmasıyla tür emniyeti sağlar. Değişken " +"Rust, statik tür sistemine sahip olmasıyla tür emniyeti sağlar. Değişken " "bağlamaları (binding) `let` ile yapılır:" #: src/types-and-values/variables.md @@ -3251,9 +3252,9 @@ msgid "" "Uncomment the `x = 20` to demonstrate that variables are immutable by " "default. Add the `mut` keyword to allow changes." msgstr "" -"Değişkenlerin varsayılan olarak değişemez (immutable) olduğunu göstermek " -"için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için " -"`mut` anahtar kelimesini ekleyin." +"Değişkenlerin varsayılan olarak değiştirilemez (immutable) olduğunu " +"göstermek için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin " +"vermek için `mut` anahtar kelimesini ekleyin." #: src/types-and-values/variables.md msgid "" @@ -3273,8 +3274,8 @@ msgid "" "many cases." msgstr "" "Buradaki `i32` değişkenin türüdür. Bunun derleme zamanında bilinmesi " -"gerekir, ancak tür çıkarımı (daha sonra ele alınacaktır), programcının " -"birçok durumda bunu atlamasına olanak tanır." +"gerekir, ancak tür çıkarımı (type inference) (daha sonra ele alınacaktır), " +"programcının birçok durumda bunu atlamasına olanak tanır." #: src/types-and-values/values.md msgid "" @@ -3330,7 +3331,7 @@ msgstr "`3.14`, `-10.0e20`, `2_f32`" #: src/types-and-values/values.md msgid "Unicode scalar values" -msgstr "Ünicode skaler değerler" +msgstr "Ünikod skaler değerler" #: src/types-and-values/values.md src/android/aidl/types/primitives.md msgid "`char`" @@ -3403,8 +3404,8 @@ msgstr "" #: src/types-and-values/arithmetic.md msgid "Arithmetic is very similar to other languages, with similar precedence." msgstr "" -"Aritmetik işlemleri, diğer dillerinkine benzer öncelik sıralamasıyla çok " -"benzerdir." +"Aritmetik, benzer öncelik (precedence) kurallarıyla birlikte diğer " +"dillerdeki aritmetiğe oldukça benzerdir." #: src/types-and-values/arithmetic.md msgid "" @@ -3436,12 +3437,13 @@ msgid "" "In fact, the compiler will detect overflow of constant expressions, which is " "why the example requires a separate function." msgstr "" -"Aslında derleyici sabit (constant) ifadelerin (expression) taşmasını " +"Aslında derleyici sabit ifadelerin (constant expression) taşmasını " "algılayacaktır, bu nedenle örnek ayrı bir fonksiyon gerektirir." #: src/types-and-values/inference.md msgid "Rust will look at how the variable is _used_ to determine the type:" -msgstr "Rust, türü belirlemek için değişkenin nasıl _kullanıldığına_ bakacak:" +msgstr "" +"Rust, türü belirlemek için değişkenin nasıl _kullanıldığına_ bakacaktır:" #: src/types-and-values/inference.md msgid "" @@ -3449,8 +3451,8 @@ msgid "" "constraints given by variable declarations and usages." msgstr "" "Bu slayt, Rust derleyicisinin değişken bildirimleri ve kullanımları " -"tarafından verilen kısıtlamalara dayanarak türleri nasıl çıkarım yaptığını " -"gösterir." +"tarafından verilen kısıtlamalara (constraints) dayanarak türleri nasıl " +"çıkarım (inference) yapabildiğini gösterir." #: src/types-and-values/inference.md msgid "" @@ -3472,10 +3474,10 @@ msgid "" "`i32`. This sometimes appears as `{integer}` in error messages. Similarly, " "floating-point literals default to `f64`." msgstr "" -"Hiçbir şey bir tamsayı değişmezinin türünü kısıtlamadığında, Rust varsayılan " -"olarak türü `i32` yapar. Bu bazen hata mesajlarında \"{integer}\" olarak " -"görünür. Benzer şekilde, ondalıklı sayı değişmezleri için varsayılan tür " -"`f64`'tür." +"Bir tamsayı değişmezinin (integer literal) türünü hiçbir " +"şeykısıtlamadığında, Rust varsayılan olarak türü `i32` yapar. Bu bazen hata " +"mesajlarında \"{integer}\" olarak görünür. Benzer şekilde, ondalıklı sayı " +"değişmezleri (floating-point literals) için varsayılan tür `f64`'tür." #: src/types-and-values/inference.md msgid "// ERROR: no implementation for `{float} == {integer}`\n" @@ -3499,7 +3501,7 @@ msgid "" "will this function panic?" msgstr "" "N'inci Fibonacci sayısını hesaplayan bir `fib(n)` fonksiyonu yazın. Bu " -"fonksiyon ne zaman paniğe kapılacak?" +"fonksiyon ne zaman paniğe (panic) uğrar?" #: src/types-and-values/exercise.md msgid "// The base case.\n" @@ -3511,7 +3513,7 @@ msgstr "\"Bunu gerçekleştirin (implement)\"" #: src/types-and-values/exercise.md msgid "// The recursive case.\n" -msgstr "// Özyinelemeli durum.\n" +msgstr "// Özyinelemeli (recursive) durum.\n" #: src/types-and-values/exercise.md src/types-and-values/solution.md msgid "\"fib({n}) = {}\"" @@ -3524,7 +3526,7 @@ msgstr "Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:" #: src/control-flow-basics.md msgid "if Expressions" -msgstr "if İfadeleri" +msgstr "if İfadeleri (Expressions)" #: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md #: src/concurrency/async-control-flow.md @@ -3533,7 +3535,7 @@ msgstr "4 dakika" #: src/control-flow-basics.md msgid "match Expressions" -msgstr "match İfadeleri" +msgstr "match İfadeleri (Expressions)" #: src/control-flow-basics.md msgid "break and continue" @@ -3541,7 +3543,9 @@ msgstr "break ve continue" #: src/control-flow-basics.md msgid "We will now cover the many kinds of flow control found in Rust." -msgstr "Şimdi, Rust'ta bulunan birçok akış kontrol çeşitlerini ele alacağız." +msgstr "" +"Şimdi, Rust'ta bulunan birçok akış kontrol (flow control) çeşitlerini ele " +"alacağız." #: src/control-flow-basics.md msgid "" @@ -3558,8 +3562,8 @@ msgid "" "the block:" msgstr "" "Rust dilindeki bir blok, `{}` parantezleri içine alınmış bir ifadeler dizisi " -"(sequence of expressions) içerir. Her bloğun, bloğun son ifadesine ait olan " -"bir değeri ve türü vardır:" +"(sequence of expressions) içerir. Her bloğun bir değeri ve bir türü vardır; " +"bunlar, bloğun son ifadesinin değer ve türüdür." #: src/control-flow-basics/blocks-and-scopes.md msgid "// dbg!(y);\n" @@ -3573,7 +3577,9 @@ msgstr "Son ifade `;` ile bitiyorsa, ortaya çıkan değer ve tür `()` olur." #: src/control-flow-basics/blocks-and-scopes.md msgid "A variable's scope is limited to the enclosing block." -msgstr "Bir değişkenin kapsamı (scope) onu çevreleyen blokla sınırlıdır." +msgstr "" +"Bir değişkenin kapsamı (scope) onu çevreleyen blokla (enclosing block) " +"sınırlıdır." #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3712,15 +3718,15 @@ msgid "" "`match` arms are evaluated from top to bottom, and the first one that " "matches has its corresponding body executed." msgstr "" -"`match` kolları yukarıdan aşağıya doğru değerlendirilir ve eşleşen ilk kolun " -"karşılık gelen gövdesi (body) çalıştırılır." +"`match` kolları (arms) yukarıdan aşağıya doğru değerlendirilir ve eşleşen " +"ilk kolun karşılık gelen gövdesi (body) çalıştırılır." #: src/control-flow-basics/match.md msgid "" "There is no fall-through between cases the way that `switch` works in other " "languages." msgstr "" -"`switch`'in diğer dillerdeki çalışma şekli gibi durumlar(cases) arasında " +"`switch`'in diğer dillerdeki çalışma şekli gibi durumlar (cases) arasında " "aşağıya geçiş (fall-through) yoktur." #: src/control-flow-basics/match.md @@ -3745,7 +3751,7 @@ msgstr "" "değerleri kapsamaları ya da `_` gibi varsayılan bir duruma (case) sahip " "olmaları gerekir. Kapsamlılık (Exhaustiveness) enumlarla gösterilmesi en " "kolay olanıdır, ancak enumlar henüz tanıtılmadı. Bunun yerine, en basit " -"ilkel tür olan `bool` üzerinde eşleştirmeyi gösteriyoruz." +"ilkel tür olan `bool` üzerinde eşleştirmeyi (matching) gösteriyoruz." #: src/control-flow-basics/match.md msgid "" @@ -3795,10 +3801,10 @@ msgid "" "should be taken. However talking about match guards requires explaining " "about pattern matching, which we're trying to avoid on this slide." msgstr "" -"`match` ayrıca eşleşme korumalarını (match guards) da destekler, bu da " +"`match` ayrıca eşleşme filtrelerini (match guards) da destekler, bu da " "eşleşme kolunun (match arm) alınıp alınmaması gerektiğini belirlemek için " "değerlendirilecek keyfi bir mantıksal koşul (condition) eklemenize olanak " -"tanır. Ancak eşleşme korumaları hakkında konuşmak, bu slaytta kaçınmaya " +"tanır. Ancak eşleşme filtreleri hakkında konuşmak, bu slaytta kaçınmaya " "çalıştığımız desen eşleştirmesi (pattern matching) hakkında açıklama " "gerektirir." @@ -3827,7 +3833,8 @@ msgid "" "over ranges of values or the items in a collection:" msgstr "" "[`for` döngüsü](https://doc.rust-lang.org/std/keyword.for.html) değer " -"aralıkları veya bir koleksiyondaki öğeler üzerinde tekrarlar:" +"aralıkları (ranges of values) veya bir koleksiyondaki (collection) öğeler " +"üzerinde adımlama yapar (iterate):" #: src/control-flow-basics/loops/for.md msgid "" @@ -3836,8 +3843,8 @@ msgid "" "discussed in more detail later." msgstr "" "`for` döngülerinin başlığının altında, farklı türdeki aralıklar/" -"koleksiyonlar üzerinde tekrarlamayı gerçekleştirmek için \"adımlayıcılar\" " -"adı verilen bir kavram kullanılır. Adımlayıcılar (iterators) daha sonra daha " +"koleksiyonlar üzerinde adımlamayı gerçekleştirmek için \"adımlayıcılar\" adı " +"verilen bir kavram kullanılır. Adımlayıcılar (iterators) daha sonra daha " "ayrıntılı olarak tartışılacaktır." #: src/control-flow-basics/loops/for.md @@ -3845,7 +3852,7 @@ msgid "" "Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax " "for an inclusive range." msgstr "" -"İlk `for` döngüsünün yalnızca `4`e kadar adım attığını unutmayın. Kapalı bir " +"İlk `for` döngüsünün yalnızca `4`'e kadar adımladığını unutmayın. Kapalı bir " "aralık için `1..=5` sözdizimini gösterin." #: src/control-flow-basics/loops/loop.md @@ -3881,8 +3888,8 @@ msgid "" msgstr "" "Herhangi bir döngüden erken çıkmak istiyorsanız, [`break`](https://doc.rust-" "lang.org/reference/expressions/loop-expr.html#break-expressions) kullanın. " -"`loop` ile, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifade " -"alabilir." +"`loop` ile, isteğe bağlı bir ifade yazılabilir ve bu ifade, `loop` " +"ifadesinin değeri olur." #: src/control-flow-basics/break-continue.md msgid "" @@ -3930,9 +3937,9 @@ msgstr "" "Bir fonksiyon gövdesindeki (veya herhangi bir bloktaki) son ifade " "(expression), geri dönüş değeri (return value) olur. İfadenin sonundaki `;` " "işaretini silmeniz yeterlidir. `return` anahtar kelimesi erken geri dönüş " -"(early return) için kullanılabilir, ancak \"yalın (bare) değer\" formu bir " -"fonksiyonun sonunda tercih edilen yaklaşımdır (idiomatic) (`return`kullanmak " -"için `gcd`'yi yeniden düzenleyin - refactor)." +"(early return) için kullanılabilir, ancak fonksiyonun sonunda \"yalın (bare) " +"değer\" kullanmak daha yaygındır (idiomatic) (`return`kullanmak için " +"`gcd`'yi yeniden düzenleyin - refactor)." #: src/control-flow-basics/functions.md msgid "" @@ -3947,8 +3954,8 @@ msgstr "" msgid "" "Overloading is not supported -- each function has a single implementation." msgstr "" -"Yüklenme (overloading) desteklenmez -- her fonksiyonun tek bir uygulaması " -"(implementation) vardır." +"Fonksiyon yüklemesi (overloading) desteklenmez -- her fonksiyonun tek bir " +"uygulaması (implementation) vardır." #: src/control-flow-basics/functions.md msgid "" @@ -3964,8 +3971,8 @@ msgid "" "Always takes a single set of parameter types. These types can be generic, " "which will be covered later." msgstr "" -"Her zaman tek bir parametre türü kümesini alır. Bu türler, daha sonra ele " -"alınacak olan jenerik olabilir." +"Her zaman tek bir parametre türü kümesi alır. Bu türler jenerik (generic) " +"olabilir, bu konuya daha sonra değinilecektir." #: src/control-flow-basics/macros.md msgid "" @@ -3974,7 +3981,7 @@ msgid "" "The Rust standard library includes an assortment of useful macros." msgstr "" "Makrolar, derleme sırasında Rust koduna genişletilir ve değişken sayıda " -"argüman alabilir. Sonunda `!` işaretiyle ayırt edilirler. Rust standart " +"argüman alabilir. Sonda olan `!` işaretiyle ayırt edilirler. Rust standart " "kütüphanesi çeşitli yararlı makrolar içerir." #: src/control-flow-basics/macros.md @@ -3983,7 +3990,8 @@ msgid "" "described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html)." msgstr "" "`println!(format, ..)`, [`std::fmt`](https://doc.rust-lang.org/std/fmt/index." -"html)'de açıklanan biçimi uygulayarak standart çıktıya bir satır yazdırır." +"html)'de açıklanan biçimi (formatting) uygulayarak standart çıktıya bir " +"satır yazdırır." #: src/control-flow-basics/macros.md msgid "" @@ -3996,7 +4004,7 @@ msgstr "" #: src/control-flow-basics/macros.md msgid "`dbg!(expression)` logs the value of the expression and returns it." msgstr "" -"`dbg!(expression)` ifadenin değerini kayıt tutar (loggging) ve onu geri " +"`dbg!(expression)` ifadenin değerini kaydeder (loggging) ve onu geri " "döndürür." #: src/control-flow-basics/macros.md @@ -4027,7 +4035,7 @@ msgid "" "use of derive macros." msgstr "" "Kurs, makroların tanımlanmasını (define) kapsamaz, ancak daha sonraki bir " -"bölümde türetilmiş makroların kullanımı anlatılacaktır." +"bölümde `derive` makrolarının kullanımı anlatılacaktır." #: src/control-flow-basics/macros.md src/pattern-matching/match.md msgid "More To Explore" @@ -4143,7 +4151,7 @@ msgstr "/// `n`'den başlayan collatz sekansının uzunluğunu belirle.\n" #: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md msgid "\"Length: {}\"" -msgstr "\"Length: {}\"" +msgstr "\"Uzunluk: {}\"" #: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md msgid "// should be 15\n" From 46dc676e30de6c5c4cd75b264c814ad738f20ef8 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Tue, 15 Jul 2025 13:53:10 +0300 Subject: [PATCH 15/26] =?UTF-8?q?some=20improvements=20for=20day=201=20aft?= =?UTF-8?q?ernoon,=20changed=20jenerik=20->=20genelle=C5=9Ftirme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- po/tr.po | 110 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/po/tr.po b/po/tr.po index 87b554ca7f31..fd9bfa293777 100644 --- a/po/tr.po +++ b/po/tr.po @@ -203,7 +203,7 @@ msgstr "Referanslar" #: src/SUMMARY.md src/references.md src/references/shared.md msgid "Shared References" -msgstr "Paylaşılan Referanslar" +msgstr "Paylaşılan (Shared) Referanslar" #: src/SUMMARY.md src/references.md src/references/exclusive.md msgid "Exclusive References" @@ -233,7 +233,7 @@ msgstr "Kullanıcı Tanımlı Türler" #: src/SUMMARY.md src/user-defined-types.md #: src/user-defined-types/named-structs.md msgid "Named Structs" -msgstr "İsimli Yapılar" +msgstr "İsimli Yapılar (Named Structs)" #: src/SUMMARY.md src/user-defined-types.md #: src/user-defined-types/tuple-structs.md @@ -343,11 +343,11 @@ msgstr "Alıştırma: Genel Kaydedici" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2.md src/generics.md msgid "Generics" -msgstr "Jenerikler" +msgstr "Genelleştirmeler (Generics)" #: src/SUMMARY.md src/generics.md src/generics/generic-functions.md msgid "Generic Functions" -msgstr "Jenerik Fonksiyonlar" +msgstr "Genelleştirilmiş (Generic) Fonksiyonlar" #: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md msgid "Trait Bounds" @@ -355,11 +355,11 @@ msgstr "Özellik (Trait) Sınırları" #: src/SUMMARY.md src/generics.md src/generics/generic-data.md msgid "Generic Data Types" -msgstr "Jenerik Veri Türleri" +msgstr "Genelleştirilmiş (Generic) Veri Türleri" #: src/SUMMARY.md src/generics/generic-traits.md msgid "Generic Traits" -msgstr "Jenerik Özellikler (Traits)" +msgstr "Genelleştirilmiş (Generic) Özellikler (Traits)" #: src/SUMMARY.md src/generics/impl-trait.md msgid "`impl Trait`" @@ -371,7 +371,7 @@ msgstr "`dyn Trait`" #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" -msgstr "Alıştırma: Jenerik `min`" +msgstr "Alıştırma: Genelleştirilmiş (Generic) `min`" #: src/SUMMARY.md msgid "Day 2: Afternoon" @@ -1459,8 +1459,8 @@ msgid "" "topics like generics and error handling." msgstr "" "Bu, Google'daki Android ekibi tarafından geliştirilen ücretsiz bir Rust " -"kursudur. Kurs, temel sözdiziminden jenerikler ve hata işleme gibi ileri " -"düzey konulara kadar Rust'ın tüm yelpazesini kapsar." +"kursudur. Kurs, temel sözdiziminden genelleştirmeler (generics) ve hata " +"işleme gibi ileri düzey konulara kadar Rust'ın tüm yelpazesini kapsar." #: src/index.md msgid "" @@ -2998,7 +2998,7 @@ msgstr "Numaralandırmalar (Enums) ve desen eşleştirme." #: src/hello-world/benefits.md msgid "Generics." -msgstr "Jenerikler." +msgstr "Genelleştirmeler (Generics)." #: src/hello-world/benefits.md msgid "No overhead FFI." @@ -3971,8 +3971,8 @@ msgid "" "Always takes a single set of parameter types. These types can be generic, " "which will be covered later." msgstr "" -"Her zaman tek bir parametre türü kümesi alır. Bu türler jenerik (generic) " -"olabilir, bu konuya daha sonra değinilecektir." +"Her zaman tek bir parametre türü kümesi alır. Bu türler genelleştirilmiş " +"(generic) olabilir, bu konuya daha sonra değinilecektir." #: src/control-flow-basics/macros.md msgid "" @@ -4296,8 +4296,8 @@ msgstr "" #: src/tuples-and-arrays/iteration.md msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" -"'for' deyimi diziler üzerinde adımlamayı/dolaşmayı destekler (ancak demetler " -"(tuples) üzerinde desteklemez)." +"'for' deyimi (statement) diziler üzerinde adımlamayı/dolaşmayı destekler " +"(ancak demetler (tuples) üzerinde desteklemez)." #: src/tuples-and-arrays/iteration.md msgid "" @@ -4323,7 +4323,7 @@ msgid "" "Rust supports using pattern matching to destructure a larger value like a " "tuple into its constituent parts:" msgstr "" -"Rust, bir tuple gibi daha büyük bir değeri, onu oluşturan parçalara " +"Rust, bir demet (tuple) gibi daha büyük bir değeri, onu oluşturan parçalara " "çözümlemek (destructure) için desen eşleştirmeyi (pattern matching) " "kullanmayı destekler:" @@ -4345,9 +4345,9 @@ msgid "" "statically verify that the value on the right of `=` has the same structure " "as the pattern." msgstr "" -"Burada kullanılan desenler \"reddedilemez (irrefutable)\"dir, yani derleyici " -"`=` sağındaki değerin desenle aynı yapıya sahip olduğunu statik olarak " -"doğrulayabilir." +"Burada kullanılan desenler (patterns) \"reddedilemez (irrefutable)\"dir, " +"yani derleyici `=` sağındaki değerin desenle aynı yapıya sahip olduğunu " +"statik olarak doğrulayabilir." #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4390,8 +4390,8 @@ msgid "" "Use an array such as the above to write a function `transpose` which will " "transpose a matrix (turn rows into columns):" msgstr "" -"Bir matrisin devrini yapacak (satırları sütunlara çevirecek) `transpose` " -"fonksiyonu yazmak için yukarıdaki gibi bir dizi kullanın:" +"Bir matrisin devrini (transpose) yapacak (satırları sütunlara çevirecek) " +"`transpose` fonksiyonu yazmak için yukarıdaki gibi bir dizi kullanın:" #: src/tuples-and-arrays/exercise.md msgid "" @@ -4399,8 +4399,8 @@ msgid "" "function. This function only operates on 3x3 matrices." msgstr "" "Aşağıdaki kodu adresine kopyalayın ve " -"fonksiyonu uygulayın (implement). Bu fonksiyon yalnızca 3x3'lük matrislerde " -"çalışır." +"fonksiyonu gerçekleştirin (implement). Bu fonksiyon yalnızca 3x3'lük " +"matrislerde çalışır." #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "// <-- the comment makes rustfmt add a newline\n" @@ -4468,9 +4468,9 @@ msgid "" "cover how Rust prevents the memory-safety bugs that come from using raw " "pointers." msgstr "" -"Referanslar göstericiler (pointers) olarak uyarlanır/uygulanır (implement) " -"ve önemli bir avantaj şudur ki, gösterdikleri şeyin boyutundan çok daha " -"küçük olabilmeleridir. C veya C++'a aşina olan öğrenciler referansları " +"Referanslar göstericiler (pointers) olarak gerçekleştirilir (implement) ve " +"önemli bir avantaj şudur ki, gösterdikleri şeyin boyutundan çok daha küçük " +"olabilmeleridir. C veya C++'a aşina olan öğrenciler referansları " "göstericiler olarak tanıyacaklardır. Kursun ilerleyen bölümlerinde Rust'ın, " "ham göstericilerin (raw pointers) kullanılmasından kaynaklanan bellek " "emniyeti hatalarını (memory-safety bugs) nasıl önlediği ele alınacaktır." @@ -4482,7 +4482,7 @@ msgid "" msgstr "" "Açık bir şekilde (explicit) `&` ile referans vermek genellikle gereklidir. " "Ancak, Rust metotları çağırırken referans verme ve referanstan çıkarma " -"işlemlerini otomatik olarak gerçekleştirir." +"(dereferencing) işlemlerini otomatik olarak gerçekleştirir." #: src/references/shared.md msgid "" @@ -4542,7 +4542,7 @@ msgid "" msgstr "" "Değiştirilebilir referanslar (mutable reference) olarak da bilinen özel " "(exclusive) referanslar, atıfta bulundukları (refer) değerin " -"değiştirilmesine olanak tanır. `&mut T` türüne sahiplerdir." +"değiştirilmesine olanak tanır. Aynı zamanda, `&mut T` türüne sahiplerdir." #: src/references/exclusive.md msgid "" @@ -4955,9 +4955,9 @@ msgid "" "trait on some type but don’t have any data that you want to store in the " "value itself." msgstr "" -"Sıfır boyutlu (zero-sized) yapılar (örn. `struct Foo;'), bir özelliği " -"(trait) bazı türlere uygularken kullanılabilir, ancak değerin kendisinde " -"saklamak istediğiniz herhangi bir veri yoktur." +"Sıfır boyutlu (zero-sized) yapılar (örn. `struct Foo;`), bir özelliğin " +"(trait) bazı türlere gerçekleştiriminde (implementing) kullanılabilir, ancak " +"değer olarak kendisinde saklamak istenilen herhangi bir veri yoktur." #: src/user-defined-types/named-structs.md msgid "" @@ -4965,7 +4965,7 @@ msgid "" "not important." msgstr "" "Sonraki slaytta alan adları (field names) önemli olmadığında kullanılan " -"Demet (Tupe) yapıları tanıtılacaktır." +"Demet (Tuple) yapıları tanıtılacaktır." #: src/user-defined-types/named-structs.md msgid "" @@ -5079,7 +5079,7 @@ msgstr "" #: src/user-defined-types/tuple-structs.md msgid "Operator overloading is discussed on Day 3 (generics)." -msgstr "Operatör yüklemesi 3. günde (jenerikler) tartışıldı." +msgstr "Operatör yüklemesi 3. günde (genelleştirmeler(generics)) tartışıldı." #: src/user-defined-types/tuple-structs.md msgid "" @@ -5097,7 +5097,7 @@ msgid "" "(imagine a `NullReader` that implements some reader behavior by always " "returning EOF)." msgstr "" -"Bu, bazı davranışları uygulayıp verisi olmayan türler için yaygındır (her " +"Bu, bazı davranışları uygulayan verisi olmayan türler için yaygındır (her " "zaman EOF döndüren bir `NullReader` hayal edin; okuma davranışını uygular " "ama veri içermez)." @@ -5114,12 +5114,12 @@ msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" msgstr "" -"'enum' anahtar sözcüğü birkaç farklı varyanta sahip bir türün yaratılmasına " +"`enum` anahtar sözcüğü birkaç farklı varyanta sahip bir türün yaratılmasına " "olanak sağlar:" #: src/user-defined-types/enums.md msgid "// Simple variant\n" -msgstr "// Basit (simple) varyant\n" +msgstr "// Basit (Simple) varyant\n" #: src/user-defined-types/enums.md msgid "// Tuple variant\n" @@ -5153,9 +5153,9 @@ msgid "" "Rust will store a discriminant so that it knows at runtime which variant is " "in a `PlayerMove` value." msgstr "" -"`PlayerMove` üç varyantı olan bir türdür. Rust, varyant değerlerine (variant " +"`PlayerMove` üç varyantı olan bir türdür. Rust, varyant ek yüküne (variant " "payloads) ek olarak, çalışma zamanında hangi varyantın `PlayerMove` " -"değerinde olduğunu bilmesi için bir ayırıcı (discriminant) da depolayacaktır." +"değerinde olduğunu bilmesi için bir ayırıcı (discriminant) da depolar." #: src/user-defined-types/enums.md msgid "This might be a good time to compare structs and enums:" @@ -5169,7 +5169,7 @@ msgid "" "with different types of fields (variant payloads)." msgstr "" "Her ikisinde de, alanları olmayan basit bir versiyona (birim yapı) veya " -"farklı alan türlerine sahip bir versiyona (varyant yükleri) sahip " +"farklı alan türlerine sahip bir versiyona (varyant ek yükleri) sahip " "olabilirsiniz." #: src/user-defined-types/enums.md @@ -5262,7 +5262,7 @@ msgid "" "creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " "InventoryCount = usize`." msgstr "" -"[Bir yeni tür deseni (newtype)](tuple-structs.html) genellikle farklı bir " +"Bir [yeni tür (newtype)](tuple-structs.html) deseni genellikle farklı bir " "tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` " "yerine `struct InventoryCount(usize)`'ı tercih edin." @@ -5315,7 +5315,7 @@ msgid "" "therefore will not move:" msgstr "" "Statik değişkenler programın tüm yürütmesi (execution) boyunca yaşayacak ve " -"bu nedenle taşınmayacaklar:" +"bu nedenle taşınmayacaklar (not move):" #: src/user-defined-types/static.md msgid "\"Welcome to RustOS 3.14\"" @@ -5336,22 +5336,24 @@ msgid "" msgstr "" "[Rust RFC Kitabında](https://rust-lang.github.io/rfcs/0246-const-vs-static." "html) belirtildiği gibi, statik kullanımı satır içi (inline) özelliği vermez " -"ve gerçek bir ilişkili bellek konumuna sahiptir. Bu, emniyetsiz ve gömülü " -"kod için yararlıdır ve değişken, program yürütmesinin tamamı boyunca yaşar. " -"Global kapsamlı (globally-scoped) bir değerin nesne kimliğine ihtiyaç " -"duyması için bir nedeni olmadığında, genellikle `const` tercih edilir." +"ve gerçek bir ilişkili bellek konumuna sahiptir. Bu, emniyetsiz (unsafe) ve " +"gömülü (embedded) kod için yararlıdır ve değişken, program yürütmesinin " +"tamamı boyunca yaşar. Global kapsamlı (globally-scoped) bir değerin nesne " +"kimliğine (object identity) ihtiyaç duyması için bir nedeni olmadığında, " +"genellikle `const` tercih edilir." #: src/user-defined-types/static.md msgid "`static` is similar to mutable global variables in C++." -msgstr "`statik`, C++'daki değişebilir olan global değişkenlere benzer." +msgstr "`statik`, C++'daki değiştirilebilir olan global değişkenlere benzer." #: src/user-defined-types/static.md msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." msgstr "" -"`static`, `Mutex` gibi iç değişebilirliğe sahip türlerin gerektirdiği " -"şekilde bellekteki bir adres ve durumu nesneye kimlik olarak sağlar." +"`static`, `Mutex` gibi iç değişebilirliğe (interior mutability) sahip " +"türlerin gerektirdiği şekilde bellekteki bir adres ve durumu nesneye kimlik " +"olarak sağlar." #: src/user-defined-types/static.md msgid "" @@ -5359,10 +5361,10 @@ msgid "" "`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html), atomic or similar." msgstr "" -"Çünkü `static` değişkenlere herhangi bir iş parçacığından " +"Çünkü `static` değişkenlere herhangi bir iş parçacığından (thread) " "erişilebildiğinden, bunların `Sync` olması gerekir. İç değişebilirlik " -"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), atomik veya " -"benzer yöntemlerle mümkündür." +"(Interior mutability) [`Mutex`](https://doc.rust-lang.org/std/sync/struct." +"Mutex.html), atomik veya benzer yöntemlerle mümkündür." #: src/user-defined-types/static.md msgid "" @@ -5389,8 +5391,8 @@ msgid "" msgstr "" "Bir asansör kontrol sistemindeki bir olayı temsil etmek için bir veri yapısı " "oluşturacağız. Çeşitli olayları yapılandırmak için türleri ve fonksiyonları " -"tanımlamak size kalmış. Türlerin `{:?}` ile biçimlendirilmesine izin vermek " -"için `#[derive(Debug)]` kullanın." +"tanımlamak size kalmış. Türlerin `{:?}` ile biçimlendirilmesine (format) " +"izin vermek için `#[derive(Debug)]` kullanın." #: src/user-defined-types/exercise.md msgid "" @@ -22054,7 +22056,9 @@ msgstr "" #~ "edildiği (heap-allocated) sahipli (owned) bir arabellektir (buffer)" #~ msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" -#~ msgstr "[İsimli Yapılar](./user-defined-types/named-structs.md) (10 dakika)" +#~ msgstr "" +#~ "[İsimli Yapılar (Named Structs)](./user-defined-types/named-structs.md) " +#~ "(10 dakika)" #~ msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" #~ msgstr "[Demet Yapıları](./user-defined-types/tuple-structs.md) (10 dakika)" From 437bec76cff3547a9d7e904b5fc6f748212d282a Mon Sep 17 00:00:00 2001 From: enes1313 Date: Thu, 17 Jul 2025 13:44:49 +0300 Subject: [PATCH 16/26] Fix punctuation in tr translation on day 1 afternoon --- po/tr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/tr.po b/po/tr.po index fd9bfa293777..2c9e12366530 100644 --- a/po/tr.po +++ b/po/tr.po @@ -3562,8 +3562,8 @@ msgid "" "the block:" msgstr "" "Rust dilindeki bir blok, `{}` parantezleri içine alınmış bir ifadeler dizisi " -"(sequence of expressions) içerir. Her bloğun bir değeri ve bir türü vardır; " -"bunlar, bloğun son ifadesinin değer ve türüdür." +"(sequence of expressions) içerir. Her bloğun bir değeri ve bir türü vardır, " +"bunlar, bloğun son ifadesinin değer ve türüdür:" #: src/control-flow-basics/blocks-and-scopes.md msgid "// dbg!(y);\n" From 593e2399b363210345a2c8c4f9380b993b861921 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sun, 6 Jul 2025 18:38:26 +0300 Subject: [PATCH 17/26] day-2-morning is fully translated into Turkish --- po/tr.po | 578 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 480 insertions(+), 98 deletions(-) diff --git a/po/tr.po b/po/tr.po index 2c9e12366530..d75d92a6640f 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2025-07-04T11:43:49+03:00\n" -"PO-Revision-Date: 2025-07-04 23:59+0300\n" +"POT-Creation-Date: 2025-07-06T18:27:10+03:00\n" +"PO-Revision-Date: 2025-07-06 17:14+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -5513,38 +5513,43 @@ msgstr "/// Kabinin içindeki bir kat düğmesi.\n" #: src/welcome-day-2.md msgid "Welcome to Day 2" -msgstr "" +msgstr "2. Gün'e Hoş Geldiniz" #: src/welcome-day-2.md msgid "" "Now that we have seen a fair amount of Rust, today will focus on Rust's type " "system:" msgstr "" +"Rust'ı artık yeterince gördüğümüze göre, bugün Rust'ın tür sistemine " +"odaklanacağız:" #: src/welcome-day-2.md msgid "Pattern matching: extracting data from structures." -msgstr "Desen eşleştirme: yapılardan veri çıkarma." +msgstr "Desen eşleştirme (pattern matching): yapılardan veri çıkarma." #: src/welcome-day-2.md msgid "Methods: associating functions with types." -msgstr "" +msgstr "Metotlar: fonksiyonları türlerle ilişkilendirme." #: src/welcome-day-2.md msgid "Traits: behaviors shared by multiple types." msgstr "" +"Özellikler (traits): birden fazla tür tarafından paylaşılan davranışlar." #: src/welcome-day-2.md msgid "Generics: parameterizing types on other types." -msgstr "" +msgstr "Jenerikler: türleri diğer türler üzerinden parametrelendirme." #: src/welcome-day-2.md msgid "" "Standard library types and traits: a tour of Rust's rich standard library." msgstr "" +"Standart kütüphane türleri ve özellikleri (traits): Rust'ın zengin standart " +"kütüphanesinde bir tur." #: src/welcome-day-2.md msgid "Closures: function pointers with data." -msgstr "" +msgstr "Çevreleyiciler (closures): veriyle birlikte fonksiyon göstericileri." #: src/pattern-matching.md src/lifetimes.md msgid "This segment should take about 50 minutes. It contains:" @@ -5556,35 +5561,43 @@ msgid "" "values. Let's review that and talk about a few other things patterns can " "express:" msgstr "" +"1. günde, desenlerin bileşik değerlerini _çözümlemek (destructure)_ için " +"nasıl kullanılabileceğini kısaca görmüştük. Şimdi bunu gözden geçirelim ve " +"desenlerin ifade edebileceği birkaç diğer şey hakkında konuşalım:" #: src/pattern-matching/infallible.md msgid "// This does the same thing as above.\n" -msgstr "" +msgstr "// Bu, yukarıdakiyle aynı şeyi yapar.\n" #: src/pattern-matching/infallible.md msgid "// Ignore the first element, only bind the second and third.\n" -msgstr "" +msgstr "// İlk elemanı yoksay, sadece ikinci ve üçüncüyü bağla.\n" #: src/pattern-matching/infallible.md msgid "// Ignore everything but the last element.\n" -msgstr "" +msgstr "// Son eleman hariç her şeyi yoksay.\n" #: src/pattern-matching/infallible.md src/pattern-matching/match.md #: src/generics/exercise.md src/generics/solution.md src/std-traits/solution.md msgid "'a'" -msgstr "" +msgstr "'a'" #: src/pattern-matching/infallible.md msgid "" "All of the demonstrated patterns are _irrefutable_, meaning that they will " "always match the value on the right hand side." msgstr "" +"Gösterilen desenlerin tümü _reddedilemezdir (irrefutable)_, yani her zaman " +"sağ taraftaki değerle eşleşeceklerdir." #: src/pattern-matching/infallible.md msgid "" "Patterns are type-specific, including irrefutable patterns. Try adding or " "removing an element to the tuple and look at the resulting compiler errors." msgstr "" +"Desenler, reddedilemez (irrefutable) desenler de dahil olmak üzere türe " +"özgüdür (type-specific). Demete (tuple) bir eleman eklemeyi veya çıkarmayı " +"deneyin ve ortaya çıkan derleyici hatalarına bakın." #: src/pattern-matching/infallible.md msgid "" @@ -5592,26 +5605,30 @@ msgid "" "value into a new variable with that name." msgstr "" "Değişken adları her zaman eşleşen ve eşleşen değeri o isimle yeni bir " -"değişkene bağlayan kalıplardır." +"değişkene bağlayan (bind) desenlerdir." #: src/pattern-matching/infallible.md msgid "" "`_` is a pattern that always matches any value, discarding the matched value." msgstr "" +"`_` her zaman herhangi bir değerle eşleşen ve eşleşen değeri atan " +"(discarding) bir desendir." #: src/pattern-matching/infallible.md msgid "`..` allows you to ignore multiple values at once." -msgstr "" +msgstr "`..` aynı anda birden fazla değeri yok saymanıza olanak tanır." #: src/pattern-matching/infallible.md msgid "" "You can also demonstrate more advanced usages of `..`, such as ignoring the " "middle elements of a tuple." msgstr "" +"Ayrıca, bir demetin (tuple) ortadaki elemanlarını yok saymak gibi `..`'nın " +"daha gelişmiş kullanımlarını da gösterebilirsiniz." #: src/pattern-matching/infallible.md msgid "All of these patterns work with arrays as well:" -msgstr "" +msgstr "Bu desenlerin tümü dizilerle (arrays) de çalışır:" #: src/pattern-matching/match.md msgid "" @@ -5619,54 +5636,58 @@ msgid "" "The patterns can be simple values, similarly to `switch` in C and C++, but " "they can also be used to express more complex conditions:" msgstr "" +"`match` anahtar kelimesi, bir değeri bir veya daha fazla _desene (pattern)_ " +"göre eşleştirmenizi sağlar. Desenler, C ve C++'daki `switch`'e benzer " +"şekilde basit değerler olabilir, ancak daha karmaşık koşulları ifade etmek " +"için de kullanılabilirler:" #: src/pattern-matching/match.md msgid "'x'" -msgstr "" +msgstr "'x'" #: src/pattern-matching/match.md msgid "'q'" -msgstr "" +msgstr "'q'" #: src/pattern-matching/match.md msgid "\"Quitting\"" -msgstr "" +msgstr "\"Çıkılıyor\"" #: src/pattern-matching/match.md msgid "'s'" -msgstr "" +msgstr "'s'" #: src/pattern-matching/match.md msgid "'w'" -msgstr "" +msgstr "'w'" #: src/pattern-matching/match.md msgid "'d'" -msgstr "" +msgstr "'d'" #: src/pattern-matching/match.md msgid "\"Moving around\"" -msgstr "" +msgstr "\"Etrafta hareket ediliyor\"" #: src/pattern-matching/match.md msgid "'0'" -msgstr "" +msgstr "'0'" #: src/pattern-matching/match.md msgid "'9'" -msgstr "" +msgstr "'9'" #: src/pattern-matching/match.md msgid "\"Number input\"" -msgstr "" +msgstr "\"Sayı girişi\"" #: src/pattern-matching/match.md msgid "\"Lowercase: {key}\"" -msgstr "" +msgstr "\"Küçük harf: {key}\"" #: src/pattern-matching/match.md msgid "\"Something else\"" -msgstr "" +msgstr "\"Başka bir şey\"" #: src/pattern-matching/match.md msgid "" @@ -5674,34 +5695,41 @@ msgid "" "can be used within the match arm. We will learn more about this on the next " "slide." msgstr "" +"Desendeki bir değişken (bu örnekte `key`) eşleşme kolu (match arm) içinde " +"kullanılabilecek bir bağlama (binding) oluşturacaktır. Bunu bir sonraki " +"slaytta daha ayrıntılı öğreneceğiz." #: src/pattern-matching/match.md msgid "" "A match guard causes the arm to match only if the condition is true. If the " "condition is false the match will continue checking later cases." msgstr "" +"Bir eşleşme filtresi (match guard), kolun yalnızca koşul doğruysa " +"eşleşmesine neden olur. Koşul yanlışsa, eşleşme daha sonraki durumları " +"kontrol etmeye devam edecektir." #: src/pattern-matching/match.md msgid "" "You might point out how some specific characters are being used when in a " "pattern" msgstr "" +"Bir desendeyken bazı özel karakterlerin nasıl kullanıldığına dikkat edin" #: src/pattern-matching/match.md msgid "`|` as an `or`" -msgstr "" +msgstr "`|` bir `veya (or)` olarak" #: src/pattern-matching/match.md msgid "`..` can expand as much as it needs to be" -msgstr "" +msgstr "`..` gerektiği kadar genişleyebilir" #: src/pattern-matching/match.md msgid "`1..=5` represents an inclusive range" -msgstr "" +msgstr "`1..=5` kapsayıcı bir aralığı (inclusive range) temsil eder" #: src/pattern-matching/match.md msgid "`_` is a wild card" -msgstr "" +msgstr "`_` bir joker karakterdir" #: src/pattern-matching/match.md msgid "" @@ -5709,6 +5737,9 @@ msgid "" "we wish to concisely express more complex ideas than patterns alone would " "allow." msgstr "" +"Ayrı bir sözdizimi özelliği olarak eşleşme filtreleri (match guards), tek " +"başına desenlerin izin verdiğinden daha karmaşık fikirleri kısaca ifade " +"etmek istediğimizde önemli ve gereklidir." #: src/pattern-matching/match.md msgid "" @@ -5717,12 +5748,19 @@ msgid "" "match arm is selected. Failing the `if` condition inside of that block won't " "result in other arms of the original `match` expression being considered." msgstr "" +"Bunlar, eşleşme kolunun (match arm) içindeki ayrı bir `if` ifadesiyle aynı " +"değildir. Dal (branch) bloğunun içindeki bir `if` ifadesi (`=>`'dan sonra), " +"eşleşme kolu seçildikten sonra gerçekleşir. O bloğun içindeki `if` koşulunun " +"başarısız olması, orijinal `match` ifadesinin diğer kollarının dikkate " +"alınmasıyla sonuçlanmaz." #: src/pattern-matching/match.md msgid "" "The condition defined in the guard applies to every expression in a pattern " "with an `|`." msgstr "" +"Filtrede tanımlanan koşul, bir `|` içeren bir desendeki her ifade için " +"geçerlidir." #: src/pattern-matching/match.md msgid "" @@ -5730,14 +5768,18 @@ msgid "" "arm, as it will instead be interpreted as a variable name pattern, which " "creates a new variable that will shadow the existing one. For example:" msgstr "" +"Bir eşleşme kolunda (match arm) mevcut bir değişkeni koşul olarak " +"kullanamayacağınızı unutmayın, çünkü bunun yerine bir değişken adı deseni " +"olarak yorumlanacaktır, bu da mevcut olanı gölgeleyecek (shadow) yeni bir " +"değişken oluşturur. Örneğin:" #: src/pattern-matching/match.md msgid "\"Expected value is 5, actual is {expected}\"" -msgstr "" +msgstr "\"Beklenen değer 5, gerçek değer {expected}\"" #: src/pattern-matching/match.md msgid "\"Value was something else\"" -msgstr "" +msgstr "\"Değer başka bir şeydi\"" #: src/pattern-matching/match.md msgid "" @@ -5747,16 +5789,23 @@ msgid "" "variable pattern which always matches, meaning the first branch will always " "be taken. If a constant is used instead this will then work as expected." msgstr "" +"Burada 123 sayısıyla eşleştirmeye çalışıyoruz, ilk durumun değerin 5 olup " +"olmadığını kontrol etmesini istiyoruz. Saf beklenti, değer 5 olmadığı için " +"ilk durumun eşleşmeyeceğidir, ancak bunun yerine bu, her zaman eşleşen bir " +"değişken deseni olarak yorumlanır, yani her zaman ilk dal alınacaktır. Bunun " +"yerine bir sabit (constant) kullanılırsa bu beklendiği gibi çalışacaktır." #: src/pattern-matching/match.md msgid "" "Another piece of pattern syntax you can show students is the `@` syntax " "which binds a part of a pattern to a variable. For example:" msgstr "" +"Öğrencilere gösterebileceğiniz başka bir desen sözdizimi parçası, bir " +"desenin bir bölümünü bir değişkene bağlayan `@` sözdizimidir. Örneğin:" #: src/pattern-matching/match.md msgid "\"outer: {outer:?}, inner: {inner}\"" -msgstr "" +msgstr "\"dış: {outer:?}, iç: {inner}\"" #: src/pattern-matching/match.md msgid "" @@ -5765,6 +5814,10 @@ msgid "" "it contains the full `Option::Some(123)`. This is rarely used but can be " "useful in more complex patterns." msgstr "" +"Bu örnekte `inner`, çözümleme (destructuring) yoluyla `Option`'dan çektiği " +"123 değerine sahiptir, `outer` ise tüm `Some(inner)` ifadesini yakalar, bu " +"nedenle tam `Option::Some(123)`'ü içerir. Bu nadiren kullanılır ancak daha " +"karmaşık desenlerde faydalı olabilir." #: src/pattern-matching/destructuring-structs.md msgid "Structs" @@ -5773,26 +5826,31 @@ msgstr "Yapılar (Structs)" #: src/pattern-matching/destructuring-structs.md msgid "Like tuples, Struct can also be destructured by matching:" msgstr "" +"Demetler (tuples) gibi, Yapılar (structs) da eşleştirme (matching) yoluyla " +"çözümlenebilir (destructured):" #: src/pattern-matching/destructuring-structs.md msgid "\"y = 2, x = {i:?}\"" -msgstr "" +msgstr "\"y = 2, x = {i:?}\"" #: src/pattern-matching/destructuring-structs.md msgid "\"x.0 = 1, b = {b}, y = {y}\"" -msgstr "" +msgstr "\"x.0 = 1, b = {b}, y = {y}\"" #: src/pattern-matching/destructuring-structs.md msgid "\"y = {y}, other fields were ignored\"" -msgstr "" +msgstr "\"y = {y}, diğer alanlar yoksayıldı\"" #: src/pattern-matching/destructuring-structs.md msgid "Change the literal values in `foo` to match with the other patterns." msgstr "" +"`foo`'daki değişmez (literal) değerleri diğer desenlerle eşleşecek şekilde " +"değiştirin." #: src/pattern-matching/destructuring-structs.md msgid "Add a new field to `Foo` and make changes to the pattern as needed." msgstr "" +"`Foo`'ya yeni bir alan ekleyin ve desende gerektiği gibi değişiklikler yapın." #: src/pattern-matching/destructuring-structs.md msgid "" @@ -5801,12 +5859,20 @@ msgid "" "ergonomics](https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) and " "is often useful with `match self` when implementing methods on an enum." msgstr "" +"`match &foo`'yu deneyin ve yakalanan (captures) değerlerin türünü kontrol " +"edin. Desen sözdizimi aynı kalır, ancak yakalananlar paylaşılan referanslar " +"(shared references) haline gelir. Bu [eşleşme ergonomisidir (match " +"ergonomics)](https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) ve " +"bir enum üzerinde metotlar uygularken `match self` ile genellikle " +"kullanışlıdır." #: src/pattern-matching/destructuring-structs.md msgid "" "The same effect occurs with `match &mut foo`: the captures become exclusive " "references." msgstr "" +"Aynı etki `match &mut foo` ile de meydana gelir: yakalanan (captures) " +"değerler özel (exclusive) referanslar haline gelir." #: src/pattern-matching/destructuring-structs.md msgid "" @@ -5814,10 +5880,16 @@ msgid "" "spot. Try changing the `2` in the second arm to a variable, and see that it " "subtly doesn't work. Change it to a `const` and see it working again." msgstr "" +"Bir yakalanan(capture) değer ile bir sabit (constant) ifade arasındaki " +"ayrımı fark etmek zor olabilir. İlk koldaki `2`'yi bir değişken yapmayı " +"deneyin ve çalışmadığını görün. Sonra o değişkeni bir `const` olacak şekilde " +"değiştirin ve tekrar çalıştığını görün." #: src/pattern-matching/destructuring-enums.md msgid "Like tuples, enums can also be destructured by matching:" msgstr "" +"Demetler (tuples) gibi, enum'lar da eşleştirme yoluyla çözümlenebilir " +"(destructured):" #: src/pattern-matching/destructuring-enums.md msgid "" @@ -5825,18 +5897,21 @@ msgid "" "how you inspect the structure of your types. Let us start with a simple " "`enum` type:" msgstr "" +"Desenler, değişkenleri değerlerinizin parçalarına bağlamak için de " +"kullanılabilir. Türlerinizin yapısını bu şekilde inceleyebilirsiniz. Basit " +"bir `enum` türüyle başlayalım:" #: src/pattern-matching/destructuring-enums.md msgid "\"cannot divide {n} into two equal parts\"" -msgstr "" +msgstr "\"{n} iki eşit parçaya bölünemez\"" #: src/pattern-matching/destructuring-enums.md msgid "\"{n} divided in two is {half}\"" -msgstr "" +msgstr "\"{n} ikiye bölündüğünde {half}\"" #: src/pattern-matching/destructuring-enums.md msgid "\"sorry, an error happened: {msg}\"" -msgstr "" +msgstr "\"üzgünüm, bir hata oluştu: {msg}\"" #: src/pattern-matching/destructuring-enums.md msgid "" @@ -5844,12 +5919,17 @@ msgid "" "arm, `half` is bound to the value inside the `Ok` variant. In the second " "arm, `msg` is bound to the error message." msgstr "" +"Burada `Result` değerini _çözümlemek (destructure)_ için kolları (arm) " +"kullandık. İlk kolda, `half`, `Ok` varyantının içindeki değere bağlanır. " +"İkinci kolda, `msg` hata mesajına bağlanır." #: src/pattern-matching/destructuring-enums.md msgid "" "The `if`/`else` expression is returning an enum that is later unpacked with " "a `match`." msgstr "" +"`if`/`else` ifadesi, daha sonra bir `match` ile açılan (unpacked) bir enum " +"döndürüyor." #: src/pattern-matching/destructuring-enums.md msgid "" @@ -5857,18 +5937,27 @@ msgid "" "errors when running the code. Point out the places where your code is now " "inexhaustive and how the compiler tries to give you hints." msgstr "" +"Enum tanımına üçüncü bir varyant eklemeyi ve kodu çalıştırırken hataları " +"göstermeyi deneyebilirsiniz. Kodunuzun artık kapsayıcı olmadığı " +"(inexhaustive) yerlere ve derleyicinin size nasıl ipuçları vermeye " +"çalıştığına dikkat çekin." #: src/pattern-matching/destructuring-enums.md msgid "" "The values in the enum variants can only be accessed after being pattern " "matched." msgstr "" +"Enum varyantlarındaki değerlere yalnızca desen eşleştirmesi yapıldıktan " +"sonra erişilebilir." #: src/pattern-matching/destructuring-enums.md msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " "the Rust compiler provides by confirming when all cases are handled." msgstr "" +"Aramanın kapsayıcı olmadığında (inexhaustive) ne olduğunu gösterin. Rust " +"derleyicisinin tüm durumların ele alındığını onaylayarak sağladığı avantaja " +"dikkat edin." #: src/pattern-matching/destructuring-enums.md msgid "" @@ -5876,12 +5965,18 @@ msgid "" "definition and the `match`. Point out how this is syntactically similar to " "matching on a struct." msgstr "" +"Enum tanımına ve `match`'e bir tane ekleyerek yapı stili (struct-style) bir " +"varyant için sözdizimini (syntax) gösterin. Bunun sözdizimsel olarak bir " +"yapı (struct) üzerinde eşleştirmeye (matching) nasıl benzediğine dikkat " +"çekin." #: src/pattern-matching/let-control-flow.md msgid "" "Rust has a few control flow constructs which differ from other languages. " "They are used for pattern matching:" msgstr "" +"Rust'ın diğer dillerden farklı olan birkaç kontrol akışı yapısı vardır. " +"Bunlar desen eşleştirme (pattern matching:) için kullanılır:" #: src/pattern-matching/let-control-flow.md msgid "`if let` expressions" @@ -5901,29 +5996,37 @@ msgid "" "expr.html#if-let-expressions) lets you execute different code depending on " "whether a value matches a pattern:" msgstr "" +"[`if let` ifadesi](https://doc.rust-lang.org/reference/expressions/if-expr." +"html#if-let-expressions), bir değerin bir desenle eşleşip eşleşmediğine " +"bağlı olarak farklı kod çalıştırmanıza olanak tanır:" #: src/pattern-matching/let-control-flow/if-let.md msgid "\"slept for {duration:?}\"" -msgstr "" +msgstr "\"{duration:?} kadar uyunuldu\"" #: src/pattern-matching/let-control-flow/if-let.md msgid "" "Unlike `match`, `if let` does not have to cover all branches. This can make " "it more concise than `match`." msgstr "" +"`match`'in aksine, `if let` tüm dalları kapsamak zorunda değildir. Bu onu " +"`match`'den daha özlü (concise) yapabilir." #: src/pattern-matching/let-control-flow/if-let.md msgid "A common usage is handling `Some` values when working with `Option`." msgstr "" +"`Option` ile çalışırken yaygın bir kullanım, `Some` değerlerini işlemektir." #: src/pattern-matching/let-control-flow/if-let.md msgid "" "Unlike `match`, `if let` does not support guard clauses for pattern matching." msgstr "" +"`match`'in aksine, `if let` desen eşleştirme için filtre koşul grubu (guard " +"clauses) desteklemez." #: src/pattern-matching/let-control-flow/if-let.md msgid "With an `else` clause, this can be used as an expression." -msgstr "" +msgstr "Bir `else` durumuyla, bu bir ifade (expression) olarak kullanılabilir." #: src/pattern-matching/let-control-flow/while-let.md msgid "" @@ -5931,6 +6034,9 @@ msgid "" "reference/expressions/loop-expr.html#predicate-pattern-loops) variant which " "repeatedly tests a value against a pattern:" msgstr "" +"`if let`'te olduğu gibi, bir değeri tekrar tekrar bir desene göre test eden " +"bir [`while let`](https://doc.rust-lang.org/reference/expressions/loop-expr." +"html#predicate-pattern-loops) çeşidi vardır:" #: src/pattern-matching/let-control-flow/while-let.md msgid "\"Comprehensive Rust 🦀\"" @@ -5938,7 +6044,7 @@ msgstr "\"Comprehensive Rust 🦀\"" #: src/pattern-matching/let-control-flow/while-let.md msgid "// (There are more efficient ways to reverse a string!)\n" -msgstr "" +msgstr "// (Bir dizeyi tersine çevirmenin daha verimli yolları var!)\n" #: src/pattern-matching/let-control-flow/while-let.md msgid "" @@ -5947,12 +6053,18 @@ msgid "" "which it will return `None`. The `while let` lets us keep iterating through " "all items." msgstr "" +"Burada [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." +"String.html#method.pop) dize boşalana kadar `Some(c)` döndürür, ardından " +"`None` döndürür. `while let` tüm öğeler arasında adımlamaya (iterating) " +"devam etmemizi sağlar." #: src/pattern-matching/let-control-flow/while-let.md msgid "" "Point out that the `while let` loop will keep going as long as the value " "matches the pattern." msgstr "" +"`while let` döngüsünün, değer desenle eşleştiği sürece devam edeceğine " +"dikkat çekin." #: src/pattern-matching/let-control-flow/while-let.md msgid "" @@ -5960,12 +6072,18 @@ msgid "" "statement that breaks when there is no value to unwrap for `name.pop()`. The " "`while let` provides syntactic sugar for the above scenario." msgstr "" +"`while let` döngüsünü, `name.pop()` için açılacak bir değer olmadığında " +"kesintiye uğrayan bir if ifadesiyle sonsuz bir döngü olarak yeniden " +"yazabilirsiniz. `while let` yukarıdaki senaryo için sözdizimsel kolaylık " +"sağlar." #: src/pattern-matching/let-control-flow/while-let.md msgid "" "This form cannot be used as an expression, because it may have no value if " "the condition is false." msgstr "" +"Bu form bir ifade (expression) olarak kullanılamaz, çünkü koşul yanlışsa " +"hiçbir değeri olmayabilir." #: src/pattern-matching/let-control-flow/let-else.md msgid "`let else` Statements" @@ -5978,28 +6096,32 @@ msgid "" "let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " "- anything but falling off the end of the block)." msgstr "" +"Bir deseni eşleştirip fonksiyondan geri dönmenin yaygın durumu için [`let " +"else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) " +"kullanın. \"else\" durumu farklı olmalıdır (diverge) (`return`, `break` veya " +"`panic` - bloğun sonundan çıkmak dışında her şey)." #: src/pattern-matching/let-control-flow/let-else.md msgid "\"got None\"" -msgstr "" +msgstr "\"None alındı\"" #: src/pattern-matching/let-control-flow/let-else.md msgid "\"got empty string\"" -msgstr "" +msgstr "\"boş dize alındı\"" #: src/pattern-matching/let-control-flow/let-else.md msgid "\"not a hex digit\"" -msgstr "" +msgstr "\"onaltılık bir basamak değil\"" #: src/pattern-matching/let-control-flow/let-else.md msgid "\"result: {:?}\"" -msgstr "" +msgstr "\"sonuç: {:?}\"" #: src/pattern-matching/let-control-flow/let-else.md #: src/generics/trait-bounds.md src/testing/solution.md src/android/testing.md #: src/android/testing/googletest.md msgid "\"foo\"" -msgstr "" +msgstr "\"foo\"" #: src/pattern-matching/let-control-flow/let-else.md msgid "" @@ -6007,52 +6129,65 @@ msgid "" "where you try to get a value out of a `Result`, returning an error if the " "`Result` was `Err`." msgstr "" +"Bu erken dönüş tabanlı kontrol akışı (early return-based control flow), Rust " +"hata işleme (error handling) kodunda yaygındır; burada bir `Result`'tan bir " +"değer almaya çalışırsınız ve `Result` `Err` ise bir hata döndürürsünüz." #: src/pattern-matching/let-control-flow/let-else.md msgid "" "If students ask, you can also demonstrate how real error handling code would " "be written with `?`." msgstr "" +"Öğrenciler sorarsa, gerçek hata işleme kodunun `?` ile nasıl yazılacağını da " +"gösterebilirsiniz." #: src/pattern-matching/exercise.md msgid "Let's write a simple recursive evaluator for arithmetic expressions." msgstr "" +"Aritmetik ifadeler için basit bir özyinelemeli değerlendirici (recursive " +"evaluator) yazalım." #: src/pattern-matching/exercise.md msgid "" "An example of a small arithmetic expression could be `10 + 20`, which " "evaluates to `30`. We can represent the expression as a tree:" msgstr "" +"Küçük bir aritmetik ifadenin bir örneği, `30` olarak değerlendirilen `10 + " +"20` olabilir. İfadeyi bir ağaç olarak temsil edebiliriz:" #: src/pattern-matching/exercise.md msgid "" "A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, " "which evaluate to `85`. We represent this as a much bigger tree:" msgstr "" +"Daha büyük ve daha karmaşık bir ifade, `85` olarak değerlendirilen `(10 * 9) " +"+ ((3 - 4) * 5)` olacaktır. Bunu çok daha büyük bir ağaç olarak temsil " +"ediyoruz:" #: src/pattern-matching/exercise.md msgid "In code, we will represent the tree with two types:" -msgstr "" +msgstr "Kodda, ağacı iki türle temsil (represent) edeceğiz:" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An operation to perform on two subexpressions.\n" msgstr "" +"/// İki alt ifade (subexpression) üzerinde gerçekleştirilecek bir işlem.\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An expression, in tree form.\n" -msgstr "" +msgstr "/// Ağaç şeklinde bir ifade (expression).\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An operation on two subexpressions.\n" -msgstr "" +msgstr "/// İki alt ifade üzerinde bir işlem.\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// A literal value\n" -msgstr "" +msgstr "/// Bir değişmez (literal) değer\n" #: src/pattern-matching/exercise.md msgid "" @@ -6061,6 +6196,12 @@ msgid "" "tests. To evaluate a boxed expression, use the deref operator (`*`) to " "\"unbox\" it: `eval(*boxed_expr)`." msgstr "" +"`Box` türü burada bir akıllı göstericidir (smart pointer) ve kursun " +"ilerleyen bölümlerinde ayrıntılı olarak ele alınacaktır. Bir ifade, " +"testlerde görüldüğü gibi `Box::new` ile \"kutulanabilir (boxed)\". " +"Kutulanmış bir ifadeyi değerlendirmek için, onu \"kutudan çıkarmak (unbox)\" " +"için referans kaldırma (deref) operatörünü (`*`) kullanın: " +"`eval(*boxed_expr)`." #: src/pattern-matching/exercise.md msgid "" @@ -6069,66 +6210,83 @@ msgid "" "`todo!()` and get the tests to pass one-by-one. You can also skip a test " "temporarily with `#[ignore]`:" msgstr "" +"Kodu Rust deneme alanına (playground) kopyalayıp yapıştırın ve `eval`'i " +"uygulamaya başlayın. Son ürün testleri geçmelidir. `todo!()` kullanmak ve " +"testleri birer birer geçmek yardımcı olabilir. Bir testi geçici olarak " +"`#[ignore]` ile de atlayabilirsiniz:" #: src/methods-and-traits/methods.md msgid "" "Rust allows you to associate functions with your new types. You do this with " "an `impl` block:" msgstr "" +"Rust, fonksiyonları yeni türlerinizle ilişkilendirmenize (associate) olanak " +"tanır. Bunu bir `impl` bloğu ile yaparsınız:" #: src/methods-and-traits/methods.md msgid "// No receiver, a static method\n" -msgstr "" +msgstr "// Alıcı (receiver) yok, statik bir metot\n" #: src/methods-and-traits/methods.md msgid "// Exclusive borrowed read-write access to self\n" msgstr "" +"// self'e özel (exclusive) ödünç alınmış (borrowed) okuma-yazma erişimi\n" #: src/methods-and-traits/methods.md msgid "// Shared and read-only borrowed access to self\n" msgstr "" +"// self'e paylaşılan ve salt okunur (read-only) ödünç alınmış (borrowed) " +"erişim\n" #: src/methods-and-traits/methods.md msgid "\"Recorded {} laps for {}:\"" -msgstr "" +msgstr "\"{} tur kaydedildi, {} için:\"" #: src/methods-and-traits/methods.md msgid "\"Lap {idx}: {lap} sec\"" -msgstr "" +msgstr "\"Tur {idx}: {lap} sn\"" #: src/methods-and-traits/methods.md msgid "// Exclusive ownership of self (covered later)\n" -msgstr "" +msgstr "// self'in özel (exclusive) sahipliği (daha sonra ele alınacak)\n" #: src/methods-and-traits/methods.md msgid "\"Race {} is finished, total lap time: {}\"" -msgstr "" +msgstr "\"Yarış {} bitti, toplam tur süresi: {}\"" #: src/methods-and-traits/methods.md msgid "\"Monaco Grand Prix\"" -msgstr "" +msgstr "\"Türkiye Grand Prix\"" #: src/methods-and-traits/methods.md msgid "// race.add_lap(42);\n" -msgstr "" +msgstr "// race.add_lap(42);\n" #: src/methods-and-traits/methods.md msgid "" "The `self` arguments specify the \"receiver\" - the object the method acts " "on. There are several common receivers for a method:" msgstr "" +"`self` argümanları \"alıcıyı (receiver)\" ( metodun üzerinde işlem yaptığı " +"nesne) belirtir. Bir metot için birkaç yaygın alıcı vardır:" #: src/methods-and-traits/methods.md msgid "" "`&self`: borrows the object from the caller using a shared and immutable " "reference. The object can be used again afterwards." msgstr "" +"`&self`: nesneyi çağırandan paylaşılan ve değiştirilemez (shared and " +"immutable) bir referans kullanarak ödünç alır (borrows). Nesne daha sonra " +"tekrar kullanılabilir." #: src/methods-and-traits/methods.md msgid "" "`&mut self`: borrows the object from the caller using a unique and mutable " "reference. The object can be used again afterwards." msgstr "" +"`&mut self`: nesneyi çağırandan benzersiz ve değiştirilebilir (unique and " +"mutable) bir referans kullanarak ödünç alır (borrows). Nesne daha sonra " +"tekrar kullanılabilir." #: src/methods-and-traits/methods.md msgid "" @@ -6137,26 +6295,35 @@ msgid "" "(deallocated) when the method returns, unless its ownership is explicitly " "transmitted. Complete ownership does not automatically mean mutability." msgstr "" +"`self`: nesnenin sahipliğini (ownership) alır ve onu çağırandan uzağa taşır. " +"Metot, nesnenin sahibi olur. Sahipliği açıkça (explicitly) aktarılmadığı " +"sürece, metot geri döndüğünde nesne düşürülür (deallocated). Tam sahiplik " +"otomatik olarak değiştirilebilirlik (mutability) anlamına gelmez." #: src/methods-and-traits/methods.md msgid "`mut self`: same as above, but the method can mutate the object." -msgstr "" +msgstr "`mut self`: yukarıdakiyle aynı, ancak metot nesneyi değiştirebilir." #: src/methods-and-traits/methods.md msgid "" "No receiver: this becomes a static method on the struct. Typically used to " "create constructors which are called `new` by convention." msgstr "" +"Alıcı (receiver) yok: bu, yapı (struct) üzerinde statik bir metot haline " +"gelir. Genellikle geleneksel olarak `new` olarak adlandırılan yapıcılar " +"(constructors) oluşturmak için kullanılır." #: src/methods-and-traits/methods.md msgid "It can be helpful to introduce methods by comparing them to functions." -msgstr "" +msgstr "Metotları fonksiyonlarla karşılaştırarak tanıtmak faydalı olabilir." #: src/methods-and-traits/methods.md msgid "" "Methods are called on an instance of a type (such as a struct or enum), the " "first parameter represents the instance as `self`." msgstr "" +"Metotlar bir türün (bir yapı veya enum gibi) bir örneği üzerinden çağrılır; " +"ilk parametre, örneği (instance) `self` olarak temsil (represents) eder." #: src/methods-and-traits/methods.md msgid "" @@ -6164,40 +6331,57 @@ msgid "" "syntax and to help keep them more organized. By using methods we can keep " "all the implementation code in one predictable place." msgstr "" +"Geliştiriciler, metot alıcı sözdiziminden (method receiver syntax) " +"yararlanmak ve onları daha düzenli tutmaya yardımcı olmak için metotları " +"kullanmayı seçebilirler. Metotları kullanarak tüm gerçekleştirim " +"(implementation) kodunu tek bir öngörülebilir yerde tutabiliriz." #: src/methods-and-traits/methods.md msgid "" "Note that methods can also be called like associated functions by explicitly " "passing the receiver in, e.g. `CarRace::add_lap(&mut race, 20)`." msgstr "" +"Metotların, alıcıyı (receiver) açıkça ileterek ilişkili fonksiyonlar gibi de " +"çağrılabileceğini unutmayın, örn. `CarRace::add_lap(&mut race, 20)`." #: src/methods-and-traits/methods.md msgid "Point out the use of the keyword `self`, a method receiver." msgstr "" +"Bir metot alıcısı (receiver) olan `self` anahtar kelimesinin kullanımına " +"dikkat çekin." #: src/methods-and-traits/methods.md msgid "" "Show that it is an abbreviated term for `self: Self` and perhaps show how " "the struct name could also be used." msgstr "" +"Bunun `self: Self` için kısaltılmış bir terim olduğunu gösterin ve belki de " +"yapı (struct) adının nasıl kullanılabileceğini de gösterin." #: src/methods-and-traits/methods.md msgid "" "Explain that `Self` is a type alias for the type the `impl` block is in and " "can be used elsewhere in the block." msgstr "" +"`Self`'in, `impl` bloğunun içinde olduğu tür için bir tür takma adı (type " +"alias) olduğunu ve bloğun başka yerlerinde de kullanılabileceğini açıklayın." #: src/methods-and-traits/methods.md msgid "" "Note how `self` is used like other structs and dot notation can be used to " "refer to individual fields." msgstr "" +"`self`'in diğer yapılar gibi nasıl kullanıldığına ve bireysel alanlara " +"(individual fields) atıfta bulunmak için nokta (.) notasyonunun nasıl " +"kullanılabileceğine dikkat edin." #: src/methods-and-traits/methods.md msgid "" "This might be a good time to demonstrate how the `&self` differs from `self` " "by trying to run `finish` twice." msgstr "" +"`finish`'i iki kez çalıştırmayı deneyerek `&self`'in `self`'ten nasıl farklı " +"olduğunu göstermek için bu iyi bir zaman olabilir." #: src/methods-and-traits/methods.md msgid "" @@ -6205,51 +6389,63 @@ msgid "" "doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be " "receiver types, such as `Box`." msgstr "" +"`self` üzerindeki varyantların ötesinde, `Box` gibi alıcı (receiver) " +"türleri olmasına izin verilen [özel sarmalayıcı türleri](https://doc.rust-" +"lang.org/reference/special-types-and-traits.html) de vardır." #: src/methods-and-traits/traits.md msgid "" "Rust lets you abstract over types with traits. They're similar to interfaces:" msgstr "" +"Rust, özellikler (traits) ile türler üzerinde soyutlama yapmanıza olanak " +"tanır. Arayüzlere (interfaces) benzerler:" #: src/methods-and-traits/traits.md msgid "/// Return a sentence from this pet.\n" -msgstr "" +msgstr "/// Bu evcil hayvandan bir cümle döndürün.\n" #: src/methods-and-traits/traits.md msgid "/// Print a string to the terminal greeting this pet.\n" -msgstr "" +msgstr "/// Bu evcil hayvanı selamlayan bir dizeyi terminale yazdırın.\n" #: src/methods-and-traits/traits.md msgid "" "A trait defines a number of methods that types must have in order to " "implement the trait." msgstr "" +"Bir özellik (trait), türlerin özelliği gerçekleştirmek (implement) için " +"sahip olması gereken bir dizi metodu tanımlar." #: src/methods-and-traits/traits.md msgid "" "In the \"Generics\" segment, next, we will see how to build functionality " "that is generic over all types implementing a trait." msgstr "" +"Bir sonraki \"Jenerikler\" bölümünde, bir özelliği (trait) gerçekleştiren " +"tüm türler üzerinde jenerik olan fonksiyonelliğin nasıl oluşturulacağını " +"göreceğiz." #: src/methods-and-traits/traits/implementing.md msgid "\"Oh you're a cutie! What's your name? {}\"" -msgstr "" +msgstr "\"Ah sen ne şirinsin! Adın ne? {}\"" #: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Woof, my name is {}!\"" -msgstr "" +msgstr "\"Hav, benim adım {}!\"" #: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Fido\"" -msgstr "" +msgstr "\"Fido\"" #: src/methods-and-traits/traits/implementing.md msgid "" "To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` " "block." msgstr "" +"`Type` için `Trait`'i gerçekleştirmek (implement) üzere bir `impl Trait for " +"Type { .. }` bloğu kullanırsınız." #: src/methods-and-traits/traits/implementing.md msgid "" @@ -6257,6 +6453,9 @@ msgid "" "type with a `talk()` method would not automatically satisfy `Pet` unless it " "is in an `impl Pet` block." msgstr "" +"Go arayüzlerinin (interfaces) aksine, sadece eşleşen metotlara sahip olmak " +"yeterli değildir: `talk()` metoduna sahip bir `Cat` türü, bir `impl Pet` " +"bloğunda olmadığı sürece `Pet`'i otomatik olarak karşılamaz." #: src/methods-and-traits/traits/implementing.md msgid "" @@ -6264,6 +6463,9 @@ msgid "" "implementations can rely on all the methods of the trait. In this case, " "`greet` is provided, and relies on `talk`." msgstr "" +"Özellikler (traits), bazı metotların varsayılan gerçekleştirmelerini " +"(implementations) sağlayabilir. Varsayılan gerçekleştirmeler, özelliğin tüm " +"metotlarına dayanabilir. Bu durumda, `greet` sağlanır ve `talk`'a dayanır." #: src/methods-and-traits/traits/implementing.md msgid "" @@ -6272,6 +6474,11 @@ msgid "" "be implemented for a given type (and often types implement many traits!). " "`impl` blocks can even be spread across multiple modules/files." msgstr "" +"Belirli bir tür için birden fazla `impl` bloğuna izin verilir. Bu hem doğal " +"`impl` bloklarını hem de özellik (trait) `impl` bloklarını içerir. Aynı " +"şekilde belirli bir tür için birden fazla özellik gerçekleştirilebilir (ve " +"genellikle türler birçok özelliği gerçekleştirir!). `impl` blokları birden " +"fazla modüle/dosyaya bile yayılabilir." #: src/methods-and-traits/traits/supertraits.md msgid "" @@ -6279,14 +6486,18 @@ msgid "" "called _supertraits_. Here, any type implementing `Pet` must implement " "`Animal`." msgstr "" +"Bir özellik (trait), onu gerçekleştiren türlerin _üstözellikler " +"(supertraits)_ olarak adlandırılan diğer özellikleri de gerçekleştirmesini " +"gerektirebilir. Burada, `Pet`'i gerçekleştiren herhangi bir tür `Animal`'ı " +"da gerçekleştirmelidir." #: src/methods-and-traits/traits/supertraits.md msgid "\"Rex\"" -msgstr "" +msgstr "\"Rex\"" #: src/methods-and-traits/traits/supertraits.md msgid "\"{} has {} legs\"" -msgstr "" +msgstr "\"{}, {} bacağa sahip\"" #: src/methods-and-traits/traits/supertraits.md msgid "" @@ -6294,12 +6505,18 @@ msgid "" "expect this to behave like OO inheritance. It just specifies an additional " "requirement on implementations of a trait." msgstr "" +"Bu bazen \"özellik kalıtımı (trait inheritance)\" olarak adlandırılır ancak " +"öğrencilerin bunun nesne yönelimli kalıtım (OO inheritance) gibi " +"davranmasını beklememesi gerekir. Bu sadece bir özelliğin gerçekleştirmeleri " +"üzerinde ek bir gereksinimi (requirement) belirtir." #: src/methods-and-traits/traits/associated-types.md msgid "" "Associated types are placeholder types which are supplied by the trait " "implementation." msgstr "" +"İlişkili türler (associated types), özellik (trait) gerçekleştirimi " +"tarafından sağlanan yer tutucu (placeholder) türlerdir." #: src/methods-and-traits/traits/associated-types.md #: src/lifetimes/lifetime-elision.md @@ -6311,38 +6528,46 @@ msgid "" "Associated types are sometimes also called \"output types\". The key " "observation is that the implementer, not the caller, chooses this type." msgstr "" +"İlişkili türler (associated types) bazen \"çıktı türleri (output types)\" " +"olarak da adlandırılır. Anahtar gözlem, bu türü çağıranın değil, " +"gerçekleştirenin (implementer) seçmesidir." #: src/methods-and-traits/traits/associated-types.md msgid "" "Many standard library traits have associated types, including arithmetic " "operators and `Iterator`." msgstr "" +"Aritmetik operatörler ve `Iterator` da dahil olmak üzere birçok standart " +"kütüphane özelliğinin (traits) ilişkili türleri vardır." #: src/methods-and-traits/deriving.md msgid "" "Supported traits can be automatically implemented for your custom types, as " "follows:" msgstr "" +"Desteklenen özellikler (traits), özel türleriniz için aşağıdaki gibi " +"otomatik olarak gerçekleştirilebilir (implemented):" #: src/methods-and-traits/deriving.md msgid "// Default trait adds `default` constructor.\n" msgstr "" +"// Default özelliği (trait) `default` yapıcısını (constructor) ekler.\n" #: src/methods-and-traits/deriving.md msgid "// Clone trait adds `clone` method.\n" -msgstr "" +msgstr "// Clone özelliği (trait) `clone` metodunu ekler.\n" #: src/methods-and-traits/deriving.md msgid "\"EldurScrollz\"" -msgstr "" +msgstr "\"EldurScrollz\"" #: src/methods-and-traits/deriving.md msgid "// Debug trait adds support for printing with `{:?}`.\n" -msgstr "" +msgstr "// Debug özelliği (trait) `{:?}` ile yazdırma desteği ekler.\n" #: src/methods-and-traits/deriving.md msgid "\"{p1:?} vs. {p2:?}\"" -msgstr "" +msgstr "\"{p1:?} vs. {p2:?}\"" #: src/methods-and-traits/deriving.md msgid "" @@ -6350,6 +6575,10 @@ msgid "" "macros to add useful functionality. For example, `serde` can derive " "serialization support for a struct using `#[derive(Serialize)]`." msgstr "" +"Türetme (derivation), makrolarla gerçekleştirilir (implemented) ve birçok " +"kasa (crate) kullanışlı fonksiyonellik eklemek için faydalı türetme (derive) " +"makroları sağlar. Örneğin, `serde`, `#[derive(Serialize)]` kullanarak bir " +"yapı (struct) için serileştirme desteği türetebilir." #: src/methods-and-traits/deriving.md msgid "" @@ -6357,6 +6586,11 @@ msgid "" "implementation that is correct for most cases. For example, demonstrate how " "a manual `Clone` impl can be repetitive compared to deriving the trait:" msgstr "" +"Türetme (derivation) genellikle, çoğu durum için doğru olan yaygın bir " +"basmakalıpsal (boilerplate-y) gerçekleştirmeye sahip özellikler (traits) " +"için sağlanır. Örneğin, bir manuel `Clone` gerçekleştiriminin (impl) " +"özelliği (trait) türetmeye kıyasla nasıl tekrarlanabilen bir yapıda " +"olabileceğini gösterin:" #: src/methods-and-traits/deriving.md msgid "" @@ -6364,10 +6598,14 @@ msgid "" "demonstrates the generally boilerplate-y pattern that manual impls would " "follow, which should help make the use of `derive` clear to students." msgstr "" +"Yukarıdaki `.clone()`'ların hepsi bu durumda gerekli değildir, ancak bu, " +"manuel gerçekleştirmelerin (impls) izleyeceği genel basmakalıpsal " +"(boilerplate-y) deseni gösterir, bu da öğrencilere `derive` kullanımını " +"netleştirmeye yardımcı olmalıdır." #: src/methods-and-traits/exercise.md msgid "Exercise: Logger Trait" -msgstr "Alıştırma: Kaydedici Özellik" +msgstr "Alıştırma: Kaydedici Özelliği (Logger Trait)" #: src/methods-and-traits/exercise.md msgid "" @@ -6376,6 +6614,11 @@ msgid "" "In testing, this might put messages in the test logfile, while in a " "production build it would send messages to a log server." msgstr "" +"Bir `log` metoduna sahip bir `Logger` özelliği (trait) kullanarak basit bir " +"kayıt (logging) aracı tasarlayalım. İlerlemesini kaydedebilecek kod daha " +"sonra bir `&impl Logger` alabilir. Testte bu, mesajları test kayıt dosyasına " +"(logfile) koyabilirken, bir üretim (production) inşasında mesajları bir " +"kayıt sunucusuna (log server) gönderir." #: src/methods-and-traits/exercise.md msgid "" @@ -6383,6 +6626,9 @@ msgid "" "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" +"Ancak, aşağıda verilen `StderrLogger` ayrıntı seviyesine (verbosity) " +"bakılmaksızın tüm mesajları kaydeder. Göreviniz, maksimum ayrıntı seviyesi " +"üzerindeki mesajları yoksayacak bir `VerbosityFilter` türü yazmaktır." #: src/methods-and-traits/exercise.md msgid "" @@ -6391,38 +6637,44 @@ msgid "" "\"Generics\" segment this afternoon, we will see how to make the wrapper " "generic over the wrapped type." msgstr "" +"Bu yaygın bir desendir: bir özellik gerçekleştirmesini (trait " +"implementation) saran ve aynı özelliği gerçekleştiren, süreçte davranış " +"ekleyen bir yapı (struct). \"Jenerikler\" bölümünde, sarmalayıcıyı (wrapper) " +"sarılmış tür (wrapped type) üzerinde jenerik yapmayı göreceğiz." #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md src/closures/exercise.md #: src/closures/solution.md msgid "/// Log a message at the given verbosity level.\n" -msgstr "" +msgstr "/// Belirtilen ayrıntı seviyesinde bir mesaj kaydedin.\n" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md src/closures/exercise.md #: src/closures/solution.md msgid "\"verbosity={verbosity}: {message}\"" -msgstr "" +msgstr "\"ayrıntı seviyesi={verbosity}: {message}\"" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md msgid "/// Only log messages up to the given verbosity level.\n" msgstr "" +"/// Yalnızca belirtilen ayrıntı seviyesine kadar olan mesajları kaydedin.\n" #: src/methods-and-traits/exercise.md msgid "// TODO: Implement the `Logger` trait for `VerbosityFilter`.\n" msgstr "" +"// TODO: `VerbosityFilter` için `Logger` özelliğini (trait) gerçekleştirin.\n" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md src/closures/exercise.md #: src/closures/solution.md msgid "\"FYI\"" -msgstr "" +msgstr "\"Bilginiz Olsun\"" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md msgid "\"Uhoh\"" -msgstr "" +msgstr "\"Eyvah\"" #: src/generics.md msgid "impl Trait" @@ -6441,22 +6693,25 @@ msgid "" "Rust supports generics, which lets you abstract algorithms or data " "structures (such as sorting or a binary tree) over the types used or stored." msgstr "" +"Rust, algoritmaları veya veri yapılarını (sıralama veya ikili ağaç gibi) " +"kullanılan veya depolanan türler üzerinde soyutlamanıza olanak tanıyan " +"jenerikleri (generics) destekler." #: src/generics/generic-functions.md msgid "\"picked a number: {:?}\"" -msgstr "" +msgstr "\"bir sayı seçildi: {:?}\"" #: src/generics/generic-functions.md msgid "\"picked a string: {:?}\"" -msgstr "" +msgstr "\"bir dize seçildi: {:?}\"" #: src/generics/generic-functions.md msgid "'L'" -msgstr "" +msgstr "'L'" #: src/generics/generic-functions.md msgid "'R'" -msgstr "" +msgstr "'R'" #: src/generics/generic-functions.md msgid "" @@ -6465,18 +6720,27 @@ msgid "" "reduce code duplication, or after talking about generics to show how " "monomorphization works." msgstr "" +"Jeneriklerin kod tekrarını nasıl azaltabileceğini göstermek için jenerik " +"`pick`'ten önce veya jeneriklerden sonra tek biçimli hâle getirmenin " +"(monomorphization) nasıl çalıştığını göstermek için `pick`'in tek biçimli " +"hâle getirilmiş (monomorphized) sürümlerini göstermek faydalı olabilir." #: src/generics/generic-functions.md msgid "" "Rust infers a type for T based on the types of the arguments and return " "value." msgstr "" +"Rust, argümanların ve dönüş değerinin türlerine dayanarak T için bir tür " +"çıkarır (infers)." #: src/generics/generic-functions.md msgid "" "In this example we only use the primitive types `i32` and `char` for `T`, " "but we can use any type here, including user-defined types:" msgstr "" +"Bu örnekte `T` için yalnızca ilkel (primitive) `i32` ve `char` türlerini " +"kullanıyoruz, ancak burada kullanıcı tanımlı türler (user-defined types) de " +"dahil olmak üzere herhangi bir türü kullanabiliriz:" #: src/generics/generic-functions.md msgid "" @@ -6486,6 +6750,12 @@ msgid "" "if `cond` is false. Even if only the `pick` instantiation with integers is " "used, Rust still considers it invalid. C++ would let you do this." msgstr "" +"Bu, C++ şablonlarına (templates) benzer, ancak Rust, jenerik fonksiyonu " +"kısmen de olsa anında derler, bu nedenle bu fonksiyon kısıtlamalarla " +"(constraints) eşleşen tüm türler için geçerli olmalıdır. Örneğin, `cond` " +"yanlışsa `left + right` döndürmek için `pick`'i değiştirmeyi deneyin. " +"Yalnızca tamsayılarla `pick` örneği kullanılsa bile, Rust bunu yine de " +"geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." #: src/generics/generic-functions.md msgid "" @@ -6493,78 +6763,101 @@ msgid "" "is a zero-cost abstraction: you get exactly the same result as if you had " "hand-coded the data structures without the abstraction." msgstr "" +"Jenerik (genel) kod, çağrıldığı yerlere (call sites) göre jenerik olmayan " +"(özelleştirilmiş) koda dönüştürülür. Bu, sıfır maliyetli bir soyutlamadır: " +"soyutlama olmadan veri yapılarını elle kodlamış olsaydınız alacağınız " +"sonucun aynısını elde edersiniz." #: src/generics/trait-bounds.md msgid "" "When working with generics, you often want to require the types to implement " "some trait, so that you can call this trait's methods." msgstr "" +"Jeneriklerle (generics) çalışırken, genellikle türlerin bazı özellikleri " +"(trait) gerçekleştirmesini (implement) istersiniz, böylece bu özelliğin " +"metotlarını çağırabilirsiniz." #: src/generics/trait-bounds.md msgid "You can do this with `T: Trait`:" -msgstr "" +msgstr "Bunu `T: Trait` ile yapabilirsiniz:" #: src/generics/trait-bounds.md msgid "\"{pair:?}\"" -msgstr "" +msgstr "\"{pair:?}\"" #: src/generics/trait-bounds.md msgid "Try making a `NotCloneable` and passing it to `duplicate`." -msgstr "" +msgstr "Bir `NotCloneable` yapıp `duplicate`'e geçirmeyi deneyin." #: src/generics/trait-bounds.md msgid "When multiple traits are necessary, use `+` to join them." msgstr "" +"Birden fazla özellik (trait) gerektiğinde, bunları birleştirmek için `+` " +"kullanın." #: src/generics/trait-bounds.md msgid "Show a `where` clause, students will encounter it when reading code." msgstr "" +"Öğrencilerin kod okurken karşılaşacakları bir `where` yan tümcesi gösterin." #: src/generics/trait-bounds.md msgid "It declutters the function signature if you have many parameters." msgstr "" +"Çok sayıda parametreniz varsa fonksiyon imzasını (signature) sadeleştirir." #: src/generics/trait-bounds.md msgid "It has additional features making it more powerful." -msgstr "" +msgstr "Daha güçlü kılan ek özelliklere sahiptir." #: src/generics/trait-bounds.md msgid "" "If someone asks, the extra feature is that the type on the left of \":\" can " "be arbitrary, like `Option`." msgstr "" +"Birisi sorarsa, ekstra özellik, \":\" solundaki türün `Option` gibi keyfi " +"olabilmesidir." #: src/generics/trait-bounds.md msgid "" "Note that Rust does not (yet) support specialization. For example, given the " "original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`." msgstr "" +"Rust'ın (şimdilik) özelleştirmeyi (specialization) desteklemediğini " +"unutmayın. Örneğin, orijinal `duplicate` verildiğinde, özel bir " +"`duplicate(a: u32)` eklemek geçersizdir." #: src/generics/generic-data.md msgid "" "You can use generics to abstract over the concrete field type. Returning to " "the exercise for the previous segment:" msgstr "" +"Belirli alan türü (concrete field type) üzerinde soyutlama yapmak için " +"jenerikleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına " +"dönersek:" #: src/generics/generic-data.md msgid "" "_Q:_ Why `L` is specified twice in `impl .. VerbosityFilter`? " "Isn't that redundant?" msgstr "" +"_S:_ Neden `L`, `impl .. VerbosityFilter`'de iki kez " +"belirtiliyor? Bu gereksiz (redundant) değil mi?" #: src/generics/generic-data.md msgid "" "This is because it is a generic implementation section for generic type. " "They are independently generic." msgstr "" +"Bunun nedeni, jenerik (generic) tür için jenerik bir gerçekleştirme bölümü " +"(generic implementation section) olmasıdır. Bağımsız olarak jeneriktirler." #: src/generics/generic-data.md msgid "It means these methods are defined for any `L`." -msgstr "" +msgstr "Bu, bu metotların herhangi bir `L` için tanımlandığı anlamına gelir." #: src/generics/generic-data.md msgid "It is possible to write `impl VerbosityFilter { .. }`." -msgstr "" +msgstr "`impl VerbosityFilter { .. }` yazmak mümkündür." #: src/generics/generic-data.md msgid "" @@ -6572,6 +6865,9 @@ msgid "" "but methods in this block will only be available for " "`VerbosityFilter`." msgstr "" +"`VerbosityFilter` hala jeneriktir ve `VerbosityFilter` " +"kullanabilirsiniz, ancak bu bloktaki metotlar yalnızca " +"`VerbosityFilter` için mevcut olacaktır." #: src/generics/generic-data.md msgid "" @@ -6579,6 +6875,10 @@ msgid "" "You can put bounds there as well, but generally in Rust we only put the " "trait bounds on the impl blocks." msgstr "" +"`VerbosityFilter` türünün kendisine bir özellik sınırı (trait " +"bound)koymadığımıza dikkat edin. Oraya da sınırlar koyabilirsiniz, ancak " +"genellikle Rust'ta özellik sınırlarını (trait bounds) yalnızca `impl` " +"bloklarına koyarız." #: src/generics/generic-traits.md msgid "" @@ -6587,14 +6887,19 @@ msgid "" "(https://doc.rust-lang.org/std/convert/trait.From.html) trait is used to " "define type conversions:" msgstr "" +"Özellikler (traits), tıpkı türler ve fonksiyonlar gibi jenerik (generic) de " +"olabilir. Bir özelliğin parametreleri, kullanıldığında belirli (concrete) " +"türler alır. Örneğin, [`From`](https://doc.rust-lang.org/std/convert/" +"trait.From.html) özelliği tür dönüşümlerini (type conversions) tanımlamak " +"için kullanılır:" #: src/generics/generic-traits.md msgid "\"Converted from integer: {from}\"" -msgstr "" +msgstr "\"Tamsayıdan dönüştürüldü: {from}\"" #: src/generics/generic-traits.md msgid "\"Converted from bool: {from}\"" -msgstr "" +msgstr "\"Bool'dan dönüştürüldü: {from}\"" #: src/generics/generic-traits.md msgid "" @@ -6602,6 +6907,9 @@ msgid "" "the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is " "simple, and copied here for reference." msgstr "" +"`From` özelliği (trait) kursun ilerleyen bölümlerinde ele alınacaktır, ancak " +"[`std` belgelerindeki tanımı](https://doc.rust-lang.org/std/convert/trait." +"From.html) basittir ve referans için buraya kopyalanmıştır." #: src/generics/generic-traits.md msgid "" @@ -6609,6 +6917,9 @@ msgid "" "parameters. Here, `Foo::from(\"hello\")` would not compile because there is " "no `From<&str>` implementation for `Foo`." msgstr "" +"Özelliğin (trait) gerçekleştirmeleri (implementations), olası tüm tür " +"parametrelerini kapsamak zorunda değildir. Burada, `Foo` için `From<&str>` " +"gerçekleştirmesi olmadığından `Foo::from(\"hello\")` derlenmezdi." #: src/generics/generic-traits.md msgid "" @@ -6616,6 +6927,10 @@ msgid "" "\"output\" type. A trait can have multiple implementations for different " "input types." msgstr "" +"Jenerik (generic) özellikler (traits) türleri \"girdi\" olarak alırken, " +"ilişkili türler (associated types) bir tür \"çıktı\" türüdür. Bir özelliğin " +"farklı girdi türleri için birden çok gerçekleştirmesi (implementation) " +"olabilir." #: src/generics/generic-traits.md msgid "" @@ -6625,30 +6940,44 @@ msgid "" "[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization." "html)." msgstr "" +"Aslında, Rust herhangi bir T türü için bir özelliğin (trait) en fazla bir " +"gerçekleştiriminin (implementation) eşleşmesini gerektirir. Diğer bazı " +"dillerden farklı olarak, Rust'ın \"en spesifik\" eşleşmeyi seçmek için bir " +"sezgisi (heuristic) yoktur. Bu desteği eklemek için [özelleştirme " +"(specialization)](https://rust-lang.github.io/rfcs/1210-impl-specialization." +"html) adı verilen bir çalışma vardır." #: src/generics/impl-trait.md msgid "" "Similar to trait bounds, an `impl Trait` syntax can be used in function " "arguments and return values:" msgstr "" +"Özellik sınırlarına (trait bounds) benzer şekilde, fonksiyon argümanlarında " +"ve geri dönüş değerlerinde bir `impl Trait` sözdizimi kullanılabilir:" #: src/generics/impl-trait.md msgid "" "// Syntactic sugar for:\n" "// fn add_42_millions>(x: T) -> i32 {\n" msgstr "" +"// Sözdizimsel kolaylık:\n" +"// fn add_42_millions>(x: T) -> i32 {\n" #: src/generics/impl-trait.md msgid "" "`impl Trait` allows you to work with types which you cannot name. The " "meaning of `impl Trait` is a bit different in the different positions." msgstr "" +"`impl Trait`, isimlendiremeyeceğiniz türlerle çalışmanıza olanak tanır. " +"`impl Trait`'in anlamı farklı konumlarda biraz farklıdır." #: src/generics/impl-trait.md msgid "" "For a parameter, `impl Trait` is like an anonymous generic parameter with a " "trait bound." msgstr "" +"Bir parametre için, `impl Trait` bir özellik sınırına (trait bound) sahip " +"anonim bir jenerik (generic) parametre gibidir." #: src/generics/impl-trait.md msgid "" @@ -6656,6 +6985,10 @@ msgid "" "implements the trait, without naming the type. This can be useful when you " "don't want to expose the concrete type in a public API." msgstr "" +"Bir geri dönüş türü için, bu, geri dönüş türünün, türü isimlendirmeden " +"özelliği (trait) gerçekleştiren (implement) bir belirli (concrete) tür " +"olduğu anlamına gelir. Bu, genel bir API'de belirli olan türü açığa çıkarmak " +"istemediğinizde kullanışlı olabilir." #: src/generics/impl-trait.md msgid "" @@ -6666,26 +6999,40 @@ msgid "" "`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::" ">()`." msgstr "" +"Geri dönüş konumunda (return position) çıkarım (inference) yapmak zordur. " +"`impl Foo` döndüren bir fonksiyon, döndürdüğü belirli olan türü kaynakta " +"yazmadan seçer. `collect() -> B` gibi jenerik bir tür döndüren bir " +"fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir ve çağıranın, " +"`let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo balığı / " +"turbofish) ile `foo.collect::>()` gibi birini seçmesi gerekebilir." #: src/generics/impl-trait.md msgid "" "What is the type of `debuggable`? Try `let debuggable: () = ..` to see what " "the error message shows." msgstr "" +"`debuggable`'ın türü nedir? Hata mesajının ne gösterdiğini görmek için `let " +"debuggable: () = ..`'yi deneyin." #: src/generics/dyn-trait.md msgid "" "In addition to using traits for static dispatch via generics, Rust also " "supports using them for type-erased, dynamic dispatch via trait objects:" msgstr "" +"Rust, jenerikler (generics) yoluyla statik yönlendirme (static dispatch) " +"için özellikleri (trait) kullanmaya ek olarak, özellik nesneleri (trait " +"objects) yoluyla silinmiş türle (type-erased), dinamik yönlendirmeyi " +"(dynamic dispatch) destekler:" #: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md msgid "\"Miau!\"" -msgstr "" +msgstr "\"Miyav!\"" #: src/generics/dyn-trait.md msgid "// Uses generics and static dispatch.\n" msgstr "" +"// Jenerikleri (generics) ve statik yönlendirmeyi (static dispatch) " +"kullanır.\n" #: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md msgid "\"Hello, who are you? {}\"" @@ -6694,6 +7041,8 @@ msgstr "\"Merhaba, nasılsın? {}\"" #: src/generics/dyn-trait.md msgid "// Uses type-erasure and dynamic dispatch.\n" msgstr "" +"// Tür silmeyi (type-erasure) ve dinamik yönlendirmeyi (dynamic dispatch) " +"kullanır.\n" #: src/generics/dyn-trait.md msgid "" @@ -6704,6 +7053,13 @@ msgid "" "full type information and can resolve which type's trait implementation to " "use." msgstr "" +"`impl Trait` de dahil olmak üzere jenerikler (generics), jeneriğin " +"oluşturulduğu her farklı tür için fonksiyonun özel bir örneğini oluşturmak " +"üzere tek biçimli hâle getirmeyi (monomorphization) kullanır. Bu, jenerik " +"bir fonksiyon içinden bir özellik (trait) metodunu çağırmanın hala statik " +"yönlendirme (static dispatch) kullandığı anlamına gelir, çünkü derleyici tam " +"tür bilgisine sahiptir ve hangi türün özellik gerçekleştiriminin (trait " +"implementation) kullanılacağını çözebilir." #: src/generics/dyn-trait.md msgid "" @@ -6712,6 +7068,11 @@ msgid "" "This means that there's a single version of `fn dynamic` that is used " "regardless of what type of `Pet` is passed in." msgstr "" +"`dyn Trait` kullanırken, bunun yerine bir [sanal metot tablosu (virtual " +"method table)](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable) " +"aracılığıyla dinamik yönlendirme (dynamic dispatch) kullanır. Bu, hangi " +"türde `Pet` geçirilirse geçirilsin kullanılan tek bir `fn dynamic` sürümü " +"olduğu anlamına gelir." #: src/generics/dyn-trait.md msgid "" @@ -6719,6 +7080,10 @@ msgid "" "indirection. In this case it's a reference, though smart pointer types like " "`Box` can also be used (this will be demonstrated on day 3)." msgstr "" +"`dyn Trait` kullanırken, özellik nesnesinin (trait object) bir tür dolaylı " +"yol (indirection) arkasında olması gerekir. Bu durumda bu bir referanstır, " +"ancak `Box` gibi akıllı gösterici (smart pointer) türleri de kullanılabilir " +"(bu 3. günde gösterilecektir)." #: src/generics/dyn-trait.md msgid "" @@ -6731,12 +7096,23 @@ msgid "" "compiler doesn't need to know the concrete type of the `Pet` in order to do " "this." msgstr "" +"Çalışma zamanında, bir `&dyn Pet`, \"genişletilmiş bir gösterici (fat " +"pointer)\" olarak temsil edilir, yani iki göstericiden oluşan bir çift: Bir " +"gösterici, `Pet`'i gerçekleştiren (implement) belirli nesneye işaret eder ve " +"diğeri o tür için özellik gerçekleştiriminin (trait implementation) sanal " +"metot tablosuna (vtable) işaret eder. `&dyn Pet` üzerinde `talk` metodunu " +"çağırırken, derleyici sanal metot tablosunda `talk` için fonksiyon " +"göstericisini (function pointer) arar ve ardından `Dog` veya `Cat`'e " +"göstericiyi o fonksiyona geçirerek fonksiyonu çağırır. Derleyicinin bunu " +"yapmak için `Pet`'in belirli olan türünü (concrete type) bilmesi gerekmez." #: src/generics/dyn-trait.md msgid "" "A `dyn Trait` is considered to be \"type-erased\", because we no longer have " "compile-time knowledge of what the concrete type is." msgstr "" +"Bir `dyn Trait`, \"silinmiş tür (type-erased)\" olarak kabul edilir, çünkü " +"artık somut türün ne olduğuna dair derleme zamanı bilgisine sahip değiliz." #: src/generics/exercise.md msgid "" @@ -6744,22 +7120,25 @@ msgid "" "determines the minimum of two values, using the [`Ord`](https://doc.rust-" "lang.org/stable/std/cmp/trait.Ord.html) trait." msgstr "" +"Bu kısa alıştırmada, [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait." +"Ord.html) özelliğini (trait) kullanarak iki değerin minimumunu belirleyen " +"jenerik (generic) bir `min` fonksiyonu gerçekleştireceksiniz (implement)." #: src/generics/exercise.md msgid "// TODO: implement the `min` function used in the tests.\n" -msgstr "" +msgstr "// TODO: testlerde kullanılan `min` fonksiyonunu gerçekleştirin.\n" #: src/generics/exercise.md src/generics/solution.md msgid "'z'" -msgstr "" +msgstr "'z'" #: src/generics/exercise.md src/generics/solution.md msgid "'7'" -msgstr "" +msgstr "'7'" #: src/generics/exercise.md src/generics/solution.md msgid "'1'" -msgstr "" +msgstr "'1'" #: src/generics/exercise.md src/generics/solution.md #: src/std-traits/from-and-into.md @@ -6768,15 +7147,15 @@ msgstr "\"merhaba\"" #: src/generics/exercise.md src/generics/solution.md msgid "\"goodbye\"" -msgstr "" +msgstr "\"hoşçakal\"" #: src/generics/exercise.md src/generics/solution.md msgid "\"bat\"" -msgstr "" +msgstr "\"yarasa\"" #: src/generics/exercise.md src/generics/solution.md msgid "\"armadillo\"" -msgstr "" +msgstr "\"armadillo\"" #: src/generics/exercise.md msgid "" @@ -6784,6 +7163,9 @@ msgid "" "html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum." "Ordering.html) enum." msgstr "" +"Öğrencilere [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html) " +"özelliğini (trait) ve [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/" +"enum.Ordering.html) enum'ını gösterin." #: src/welcome-day-2-afternoon.md src/welcome-day-4.md msgid "" @@ -6795,11 +7177,11 @@ msgstr "" #: src/std-types.md src/std-types/option.md msgid "Option" -msgstr "" +msgstr "Option" #: src/std-types.md src/std-types/result.md src/error-handling.md msgid "Result" -msgstr "" +msgstr "Result" #: src/std-types.md src/std-types/string.md msgid "String" From a21208c36b78139b3c0156d109f43562e3864624 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Tue, 15 Jul 2025 14:13:55 +0300 Subject: [PATCH 18/26] =?UTF-8?q?changed=20jenerik=20->=20genelle=C5=9Ftir?= =?UTF-8?q?me,=20for=20day=202=20morning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- po/tr.po | 119 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 56 deletions(-) diff --git a/po/tr.po b/po/tr.po index d75d92a6640f..41be7ebeb977 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5538,7 +5538,9 @@ msgstr "" #: src/welcome-day-2.md msgid "Generics: parameterizing types on other types." -msgstr "Jenerikler: türleri diğer türler üzerinden parametrelendirme." +msgstr "" +"Genelleştirmeler (Generics): türleri diğer türler üzerinden " +"parametrelendirme." #: src/welcome-day-2.md msgid "" @@ -6421,9 +6423,9 @@ msgid "" "In the \"Generics\" segment, next, we will see how to build functionality " "that is generic over all types implementing a trait." msgstr "" -"Bir sonraki \"Jenerikler\" bölümünde, bir özelliği (trait) gerçekleştiren " -"tüm türler üzerinde jenerik olan fonksiyonelliğin nasıl oluşturulacağını " -"göreceğiz." +"Bir sonraki \"Genelleştirmeler (Generics)\" bölümünde, bir özelliği (trait) " +"gerçekleştiren tüm türler üzerinde jenerik olan fonksiyonelliğin nasıl " +"oluşturulacağını göreceğiz." #: src/methods-and-traits/traits/implementing.md msgid "\"Oh you're a cutie! What's your name? {}\"" @@ -6639,8 +6641,9 @@ msgid "" msgstr "" "Bu yaygın bir desendir: bir özellik gerçekleştirmesini (trait " "implementation) saran ve aynı özelliği gerçekleştiren, süreçte davranış " -"ekleyen bir yapı (struct). \"Jenerikler\" bölümünde, sarmalayıcıyı (wrapper) " -"sarılmış tür (wrapped type) üzerinde jenerik yapmayı göreceğiz." +"ekleyen bir yapı (struct). \"Genelleştirmeler (Generics)\" bölümünde, " +"sarmalayıcıyı (wrapper) sarılmış tür (wrapped type) üzerinde genelleştirmeyi " +"(generic) göreceğiz." #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md #: src/generics/generic-data.md src/closures/exercise.md @@ -6686,7 +6689,7 @@ msgstr "dyn Trait" #: src/generics.md msgid "Exercise: Generic min" -msgstr "Alıştırma: Jenerik min" +msgstr "Alıştırma: Genelleştirilmiş min" #: src/generics/generic-functions.md msgid "" @@ -6695,7 +6698,7 @@ msgid "" msgstr "" "Rust, algoritmaları veya veri yapılarını (sıralama veya ikili ağaç gibi) " "kullanılan veya depolanan türler üzerinde soyutlamanıza olanak tanıyan " -"jenerikleri (generics) destekler." +"genelleştirmeleri (generics) destekler." #: src/generics/generic-functions.md msgid "\"picked a number: {:?}\"" @@ -6720,10 +6723,11 @@ msgid "" "reduce code duplication, or after talking about generics to show how " "monomorphization works." msgstr "" -"Jeneriklerin kod tekrarını nasıl azaltabileceğini göstermek için jenerik " -"`pick`'ten önce veya jeneriklerden sonra tek biçimli hâle getirmenin " -"(monomorphization) nasıl çalıştığını göstermek için `pick`'in tek biçimli " -"hâle getirilmiş (monomorphized) sürümlerini göstermek faydalı olabilir." +"Genelleştirmelerin (generics) kod tekrarını nasıl azaltabileceğini göstermek " +"için genelleştirilmiş `pick`'ten önce veya genelleştirmelerden sonra tek " +"biçimli hâle getirmenin (monomorphization) nasıl çalıştığını göstermek için " +"`pick`'in tek biçimli hâle getirilmiş (monomorphized) sürümlerini göstermek " +"faydalı olabilir." #: src/generics/generic-functions.md msgid "" @@ -6750,12 +6754,12 @@ msgid "" "if `cond` is false. Even if only the `pick` instantiation with integers is " "used, Rust still considers it invalid. C++ would let you do this." msgstr "" -"Bu, C++ şablonlarına (templates) benzer, ancak Rust, jenerik fonksiyonu " -"kısmen de olsa anında derler, bu nedenle bu fonksiyon kısıtlamalarla " -"(constraints) eşleşen tüm türler için geçerli olmalıdır. Örneğin, `cond` " -"yanlışsa `left + right` döndürmek için `pick`'i değiştirmeyi deneyin. " -"Yalnızca tamsayılarla `pick` örneği kullanılsa bile, Rust bunu yine de " -"geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." +"Bu, C++ şablonlarına (templates) benzer, ancak Rust, genelleştirilmiş " +"(generic) fonksiyonu kısmen de olsa anında derler, bu nedenle bu fonksiyon " +"kısıtlamalarla (constraints) eşleşen tüm türler için geçerli olmalıdır. " +"Örneğin, `cond` yanlışsa `left + right` döndürmek için `pick`'i değiştirmeyi " +"deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, Rust bunu yine " +"de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." #: src/generics/generic-functions.md msgid "" @@ -6763,19 +6767,19 @@ msgid "" "is a zero-cost abstraction: you get exactly the same result as if you had " "hand-coded the data structures without the abstraction." msgstr "" -"Jenerik (genel) kod, çağrıldığı yerlere (call sites) göre jenerik olmayan " -"(özelleştirilmiş) koda dönüştürülür. Bu, sıfır maliyetli bir soyutlamadır: " -"soyutlama olmadan veri yapılarını elle kodlamış olsaydınız alacağınız " -"sonucun aynısını elde edersiniz." +"Genelleştirilmiş (generic) kod, çağrıldığı yerlerde (call sites) " +"genelleştirilmemiş (özelleştirilmiş) koda dönüştürülür. Bu, sıfır maliyetli " +"bir soyutlamadır: soyutlama olmadan veri yapılarını elle kodlamış olsaydınız " +"alacağınız sonucun aynısını elde edersiniz." #: src/generics/trait-bounds.md msgid "" "When working with generics, you often want to require the types to implement " "some trait, so that you can call this trait's methods." msgstr "" -"Jeneriklerle (generics) çalışırken, genellikle türlerin bazı özellikleri " -"(trait) gerçekleştirmesini (implement) istersiniz, böylece bu özelliğin " -"metotlarını çağırabilirsiniz." +"Genelleştirmelerle (generics) çalışırken, genellikle türlerin bazı " +"özellikleri (trait) gerçekleştirmesini (implement) istersiniz, böylece bu " +"özelliğin metotlarını çağırabilirsiniz." #: src/generics/trait-bounds.md msgid "You can do this with `T: Trait`:" @@ -6832,7 +6836,7 @@ msgid "" "the exercise for the previous segment:" msgstr "" "Belirli alan türü (concrete field type) üzerinde soyutlama yapmak için " -"jenerikleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına " +"genelleştirmeleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına " "dönersek:" #: src/generics/generic-data.md @@ -6848,8 +6852,9 @@ msgid "" "This is because it is a generic implementation section for generic type. " "They are independently generic." msgstr "" -"Bunun nedeni, jenerik (generic) tür için jenerik bir gerçekleştirme bölümü " -"(generic implementation section) olmasıdır. Bağımsız olarak jeneriktirler." +"Bunun nedeni, genelleştirilmiş (generic) tür için genel bir gerçekleştirme " +"bölümü (generic implementation section) olmasıdır. Onlar, bağımsız olarak " +"genelleştirilmiştir (generic)." #: src/generics/generic-data.md msgid "It means these methods are defined for any `L`." @@ -6865,8 +6870,8 @@ msgid "" "but methods in this block will only be available for " "`VerbosityFilter`." msgstr "" -"`VerbosityFilter` hala jeneriktir ve `VerbosityFilter` " -"kullanabilirsiniz, ancak bu bloktaki metotlar yalnızca " +"`VerbosityFilter` hala genelleştirilmiştir türdür ve `VerbosityFilter` " +"türünü kullanabilirsiniz, ancak bu bloktaki metotlar yalnızca " "`VerbosityFilter` için mevcut olacaktır." #: src/generics/generic-data.md @@ -6887,11 +6892,11 @@ msgid "" "(https://doc.rust-lang.org/std/convert/trait.From.html) trait is used to " "define type conversions:" msgstr "" -"Özellikler (traits), tıpkı türler ve fonksiyonlar gibi jenerik (generic) de " -"olabilir. Bir özelliğin parametreleri, kullanıldığında belirli (concrete) " -"türler alır. Örneğin, [`From`](https://doc.rust-lang.org/std/convert/" -"trait.From.html) özelliği tür dönüşümlerini (type conversions) tanımlamak " -"için kullanılır:" +"Özellikler (traits), tıpkı türler ve fonksiyonlar gibi genelleştirilmiş " +"(generic) de olabilir. Bir özelliğin parametreleri, kullanıldığında belirli " +"(concrete) türler alır. Örneğin, [`From`](https://doc.rust-lang.org/std/" +"convert/trait.From.html) özelliği tür dönüşümlerini (type conversions) " +"tanımlamak için kullanılır:" #: src/generics/generic-traits.md msgid "\"Converted from integer: {from}\"" @@ -6927,10 +6932,10 @@ msgid "" "\"output\" type. A trait can have multiple implementations for different " "input types." msgstr "" -"Jenerik (generic) özellikler (traits) türleri \"girdi\" olarak alırken, " -"ilişkili türler (associated types) bir tür \"çıktı\" türüdür. Bir özelliğin " -"farklı girdi türleri için birden çok gerçekleştirmesi (implementation) " -"olabilir." +"Genelleştirilmiş (generic) özellikler (traits) türleri \"girdi\" olarak " +"alırken, ilişkili türler (associated types) bir tür \"çıktı\" türüdür. Bir " +"özelliğin farklı girdi türleri için birden çok gerçekleştirmesi " +"(implementation) olabilir." #: src/generics/generic-traits.md msgid "" @@ -6977,7 +6982,7 @@ msgid "" "trait bound." msgstr "" "Bir parametre için, `impl Trait` bir özellik sınırına (trait bound) sahip " -"anonim bir jenerik (generic) parametre gibidir." +"anonim bir genelleştirilmiş (generic) parametre gibidir." #: src/generics/impl-trait.md msgid "" @@ -7001,10 +7006,11 @@ msgid "" msgstr "" "Geri dönüş konumunda (return position) çıkarım (inference) yapmak zordur. " "`impl Foo` döndüren bir fonksiyon, döndürdüğü belirli olan türü kaynakta " -"yazmadan seçer. `collect() -> B` gibi jenerik bir tür döndüren bir " -"fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir ve çağıranın, " -"`let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo balığı / " -"turbofish) ile `foo.collect::>()` gibi birini seçmesi gerekebilir." +"yazmadan seçer. `collect() -> B` gibi genelleştirilmiş bir tür döndüren " +"bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir ve " +"çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo " +"balığı / turbofish) ile `foo.collect::>()` gibi birini seçmesi " +"gerekebilir." #: src/generics/impl-trait.md msgid "" @@ -7019,9 +7025,9 @@ msgid "" "In addition to using traits for static dispatch via generics, Rust also " "supports using them for type-erased, dynamic dispatch via trait objects:" msgstr "" -"Rust, jenerikler (generics) yoluyla statik yönlendirme (static dispatch) " -"için özellikleri (trait) kullanmaya ek olarak, özellik nesneleri (trait " -"objects) yoluyla silinmiş türle (type-erased), dinamik yönlendirmeyi " +"Rust, genelleştirmeler (generics) yoluyla statik yönlendirme (static " +"dispatch) için özellikleri (trait) kullanmaya ek olarak, özellik nesneleri " +"(trait objects) yoluyla silinmiş türle (type-erased), dinamik yönlendirmeyi " "(dynamic dispatch) destekler:" #: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md @@ -7031,7 +7037,7 @@ msgstr "\"Miyav!\"" #: src/generics/dyn-trait.md msgid "// Uses generics and static dispatch.\n" msgstr "" -"// Jenerikleri (generics) ve statik yönlendirmeyi (static dispatch) " +"// Genelleştirmeleri (generics) ve statik yönlendirmeyi (static dispatch) " "kullanır.\n" #: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md @@ -7053,13 +7059,13 @@ msgid "" "full type information and can resolve which type's trait implementation to " "use." msgstr "" -"`impl Trait` de dahil olmak üzere jenerikler (generics), jeneriğin " -"oluşturulduğu her farklı tür için fonksiyonun özel bir örneğini oluşturmak " -"üzere tek biçimli hâle getirmeyi (monomorphization) kullanır. Bu, jenerik " -"bir fonksiyon içinden bir özellik (trait) metodunu çağırmanın hala statik " -"yönlendirme (static dispatch) kullandığı anlamına gelir, çünkü derleyici tam " -"tür bilgisine sahiptir ve hangi türün özellik gerçekleştiriminin (trait " -"implementation) kullanılacağını çözebilir." +"`impl Trait` de dahil olmak üzere genelleştirmeler (generics), " +"genelleştirmenin oluşturulduğu her farklı tür için fonksiyonun özel bir " +"örneğini oluşturmak üzere tek biçimli hâle getirmeyi (monomorphization) " +"kullanır. Bu, genelleştirilmiş bir fonksiyon içinden bir özellik (trait) " +"metodunu çağırmanın hala statik yönlendirme (static dispatch) kullandığı " +"anlamına gelir, çünkü derleyici tam tür bilgisine sahiptir ve hangi türün " +"özellik gerçekleştiriminin (trait implementation) kullanılacağını çözebilir." #: src/generics/dyn-trait.md msgid "" @@ -7122,7 +7128,8 @@ msgid "" msgstr "" "Bu kısa alıştırmada, [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait." "Ord.html) özelliğini (trait) kullanarak iki değerin minimumunu belirleyen " -"jenerik (generic) bir `min` fonksiyonu gerçekleştireceksiniz (implement)." +"genelleştirilmiş (generic) bir `min` fonksiyonu gerçekleştireceksiniz " +"(implement)." #: src/generics/exercise.md msgid "// TODO: implement the `min` function used in the tests.\n" From 0b069a8f7d5b6fb79296234a62f9aad3e8bf517f Mon Sep 17 00:00:00 2001 From: enes1313 Date: Thu, 17 Jul 2025 11:41:00 +0300 Subject: [PATCH 19/26] some improvements for day 2 afternoon --- po/tr.po | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/po/tr.po b/po/tr.po index 41be7ebeb977..707a356d6f64 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5563,9 +5563,10 @@ msgid "" "values. Let's review that and talk about a few other things patterns can " "express:" msgstr "" -"1. günde, desenlerin bileşik değerlerini _çözümlemek (destructure)_ için " -"nasıl kullanılabileceğini kısaca görmüştük. Şimdi bunu gözden geçirelim ve " -"desenlerin ifade edebileceği birkaç diğer şey hakkında konuşalım:" +"1. günde, desenlerin bileşik değerlerini (compound values) _çözümlemek " +"(destructure)_ için nasıl kullanılabileceğini kısaca görmüştük. Şimdi bunu " +"gözden geçirelim ve desenlerin ifade edebileceği birkaç diğer şey hakkında " +"konuşalım:" #: src/pattern-matching/infallible.md msgid "// This does the same thing as above.\n" @@ -5606,7 +5607,7 @@ msgid "" "Variable names are patterns that always match and which bind the matched " "value into a new variable with that name." msgstr "" -"Değişken adları her zaman eşleşen ve eşleşen değeri o isimle yeni bir " +"Değişken adları her zaman eşleşen ve eşleştikleri değeri bu isimle yeni bir " "değişkene bağlayan (bind) desenlerdir." #: src/pattern-matching/infallible.md @@ -5707,8 +5708,8 @@ msgid "" "condition is false the match will continue checking later cases." msgstr "" "Bir eşleşme filtresi (match guard), kolun yalnızca koşul doğruysa " -"eşleşmesine neden olur. Koşul yanlışsa, eşleşme daha sonraki durumları " -"kontrol etmeye devam edecektir." +"eşleşmesine neden olur. Koşul yanlışsa, eşleşme diğer durumları kontrol " +"etmeye devam edecektir." #: src/pattern-matching/match.md msgid "" @@ -5772,8 +5773,8 @@ msgid "" msgstr "" "Bir eşleşme kolunda (match arm) mevcut bir değişkeni koşul olarak " "kullanamayacağınızı unutmayın, çünkü bunun yerine bir değişken adı deseni " -"olarak yorumlanacaktır, bu da mevcut olanı gölgeleyecek (shadow) yeni bir " -"değişken oluşturur. Örneğin:" +"(variable name pattern) olarak yorumlanacaktır, bu da mevcut olanı " +"gölgeleyecek (shadow) yeni bir değişken oluşturur. Örneğin:" #: src/pattern-matching/match.md msgid "\"Expected value is 5, actual is {expected}\"" @@ -5792,7 +5793,7 @@ msgid "" "be taken. If a constant is used instead this will then work as expected." msgstr "" "Burada 123 sayısıyla eşleştirmeye çalışıyoruz, ilk durumun değerin 5 olup " -"olmadığını kontrol etmesini istiyoruz. Saf beklenti, değer 5 olmadığı için " +"olmadığını kontrol etmesini istiyoruz. Doğal beklenti, değer 5 olmadığı için " "ilk durumun eşleşmeyeceğidir, ancak bunun yerine bu, her zaman eşleşen bir " "değişken deseni olarak yorumlanır, yani her zaman ilk dal alınacaktır. Bunun " "yerine bir sabit (constant) kullanılırsa bu beklendiği gibi çalışacaktır." @@ -5828,7 +5829,7 @@ msgstr "Yapılar (Structs)" #: src/pattern-matching/destructuring-structs.md msgid "Like tuples, Struct can also be destructured by matching:" msgstr "" -"Demetler (tuples) gibi, Yapılar (structs) da eşleştirme (matching) yoluyla " +"Demetler (tuples) gibi, yapılar (structs) da eşleştirme (matching) yoluyla " "çözümlenebilir (destructured):" #: src/pattern-matching/destructuring-structs.md From 25539952a5ed66a594ba9c5d31db10938d4431b7 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Fri, 18 Jul 2025 10:50:24 +0300 Subject: [PATCH 20/26] Fix typo in pattern matching translation --- po/tr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/tr.po b/po/tr.po index 707a356d6f64..08ec8894c99d 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5979,7 +5979,7 @@ msgid "" "They are used for pattern matching:" msgstr "" "Rust'ın diğer dillerden farklı olan birkaç kontrol akışı yapısı vardır. " -"Bunlar desen eşleştirme (pattern matching:) için kullanılır:" +"Bunlar desen eşleştirme (pattern matching) için kullanılır:" #: src/pattern-matching/let-control-flow.md msgid "`if let` expressions" From b4359a35f2f36b4513c6f134e414ac243b93441d Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sun, 13 Jul 2025 18:31:13 +0300 Subject: [PATCH 21/26] day-2-afternoon is fully translated into Turkish --- po/tr.po | 519 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 435 insertions(+), 84 deletions(-) diff --git a/po/tr.po b/po/tr.po index 08ec8894c99d..a8852a1958d9 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7208,6 +7208,9 @@ msgid "" "For each of the slides in this section, spend some time reviewing the " "documentation pages, highlighting some of the more common methods." msgstr "" +"Bu bölümdeki slaytların her biri için, dokümantasyon sayfalarını gözden " +"geçirerek biraz zaman ayırın ve daha yaygın metotlardan bazılarını öne " +"çıkarın." #: src/std-types/std.md msgid "" @@ -7215,45 +7218,61 @@ msgid "" "types used by Rust libraries and programs. This way, two libraries can work " "together smoothly because they both use the same `String` type." msgstr "" +"Rust, Rust kütüphaneleri ve programları tarafından kullanılan bir dizi ortak " +"türün oluşturulmasına yardımcı olan bir standart kütüphane ile birlikte " +"gelir. Bu şekilde, her hangi iki kütüphane aynı `String` türünü kullandığı " +"için sorunsuzca birlikte çalışabilir." #: src/std-types/std.md msgid "" "In fact, Rust contains several layers of the Standard Library: `core`, " "`alloc` and `std`." msgstr "" +"Aslında Rust, Standart Kütüphanenin birkaç katmanını içerir: `core`, `alloc` " +"ve `std`." #: src/std-types/std.md msgid "" "`core` includes the most basic types and functions that don't depend on " "`libc`, allocator or even the presence of an operating system." msgstr "" +"`core`, `libc`'ye, tahsis ediciye (allocator) ve hatta bir işletim " +"sisteminin varlığına bağlı olmayan en temel türleri ve fonksiyonları içerir." #: src/std-types/std.md msgid "" "`alloc` includes types which require a global heap allocator, such as `Vec`, " "`Box` and `Arc`." msgstr "" +"`alloc`, `Vec`, `Box` ve `Arc` gibi global bir dinamik bellek tahsis " +"edicisini (heap allocator) gerektiren türleri içerir." #: src/std-types/std.md msgid "" "Embedded Rust applications often only use `core`, and sometimes `alloc`." msgstr "" +"Gömülü Rust uygulamaları genellikle sadece `core` ve bazen de `alloc` " +"kullanır." #: src/std-types/docs.md msgid "Rust comes with extensive documentation. For example:" -msgstr "" +msgstr "Rust, kapsamlı bir dokümantasyonla birlikte gelir. Örneğin:" #: src/std-types/docs.md msgid "" "All of the details about [loops](https://doc.rust-lang.org/stable/reference/" "expressions/loop-expr.html)." msgstr "" +"[Döngüler](https://doc.rust-lang.org/stable/reference/expressions/loop-expr." +"html) hakkındaki tüm ayrıntılar." #: src/std-types/docs.md msgid "" "Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive." "u8.html)." msgstr "" +"[`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.html) gibi ilkel " +"türler (primitive types)." #: src/std-types/docs.md msgid "" @@ -7261,14 +7280,19 @@ msgid "" "option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/" "std/collections/struct.BinaryHeap.html)." msgstr "" +"[`Option`](https://doc.rust-lang.org/stable/std/option/enum.Option.html) " +"veya [`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct." +"BinaryHeap.html) gibi standart kütüphane türleri." #: src/std-types/docs.md msgid "Use `rustup doc --std` or to view the documentation." msgstr "" +"Dokümantasyonu görüntülemek için `rustup doc --std` veya " +"kullanın." #: src/std-types/docs.md msgid "In fact, you can document your own code:" -msgstr "" +msgstr "Aslında, kendi kodunuzu belgeleyebilirsiniz:" #: src/std-types/docs.md msgid "" @@ -7277,6 +7301,9 @@ msgid "" "///\n" "/// If the second argument is zero, the result is false.\n" msgstr "" +"/// İlk argümanın ikinci argümana bölünüp bölünemeyeceğini belirle.\n" +"///\n" +"/// İkinci argüman sıfır ise, sonuç yanlıştır.\n" #: src/std-types/docs.md msgid "" @@ -7285,24 +7312,36 @@ msgid "" "(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is " "idiomatic to document all public items in an API using this pattern." msgstr "" +"İçerikler Markdown olarak işlenir. Yayınlanan tüm Rust kütüphane kasaları " +"(crates), [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) " +"aracı kullanılarak [`docs.rs`](https://docs.rs) adresinde otomatik olarak " +"belgelenir. Bir API'deki tüm genel (public) öğeleri bu deseni kullanarak " +"belgelemek, tercih edilen yaklaşımdır (idiomatic)." #: src/std-types/docs.md msgid "" "To document an item from inside the item (such as inside a module), use `//!" "` or `/*! .. */`, called \"inner doc comments\":" msgstr "" +"Bir öğeyi, öğenin içinden (bir modülün içi gibi) belgelemek için \"iç " +"doküman yorumları (inner doc comments)\" olarak adlandırılan `//!` veya `/" +"*! .. */` kullanın:" #: src/std-types/docs.md msgid "" "//! This module contains functionality relating to divisibility of " "integers.\n" msgstr "" +"//! Bu modül, tamsayıların bölünebilirliği ile ilgili fonksiyonellik " +"içerir.\n" #: src/std-types/docs.md msgid "" "Show students the generated docs for the `rand` crate at ." msgstr "" +"Öğrencilere adresindeki `rand` kasası (crate) için " +"oluşturulmuş belgeleri gösterin." #: src/std-types/option.md msgid "" @@ -7310,44 +7349,57 @@ msgid "" "type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/" "stable/std/string/struct.String.html#method.find) returns an `Option`." msgstr "" +"Daha önce `Option`'nin bazı kullanımlarını görmüştük. Ya `T` türünde bir " +"değer saklar ya da hiçbir şey saklamaz. Örneğin, [`String::find`](https://" +"doc.rust-lang.org/stable/std/string/struct.String.html#method.find) bir " +"`Option` döndürür." #: src/std-types/option.md msgid "\"Löwe 老虎 Léopard Gepardi\"" -msgstr "" +msgstr "\"Löwe 老虎 Léopard Gepardi\"" #: src/std-types/option.md msgid "'é'" -msgstr "" +msgstr "'é'" #: src/std-types/option.md msgid "'Z'" -msgstr "" +msgstr "'Z'" #: src/std-types/option.md msgid "\"Character not found\"" -msgstr "" +msgstr "\"Karakter bulunamadı\"" #: src/std-types/option.md msgid "`Option` is widely used, not just in the standard library." msgstr "" +"`Option` sadece standart kütüphanede kullanılır gibi bir şey yoktur, yaygın " +"olarak kullanılır." #: src/std-types/option.md msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" +"`unwrap`, bir `Option` içindeki değeri döndürür veya paniğe (panic) neden " +"olur. `expect` benzerdir ancak bir hata mesajı (error message) alır." #: src/std-types/option.md msgid "" "You can panic on None, but you can't \"accidentally\" forget to check for " "None." msgstr "" +"None durumunda panik alabilirsiniz, ancak None'ı kontrol etmeyi " +"\"yanlışlıkla\" unutamazsınız." #: src/std-types/option.md msgid "" "It's common to `unwrap`/`expect` all over the place when hacking something " "together, but production code typically handles `None` in a nicer fashion." msgstr "" +"Bir şeyler üzerinde çalışırken her yerde `unwrap`/`expect` kullanmak " +"yaygındır, ancak üretim (production) kodu genellikle `None`'ı daha şık bir " +"şekilde ele alır." #: src/std-types/option.md msgid "" @@ -7357,6 +7409,12 @@ msgid "" "uses NULL to represent the `None` variant, and thus can be stored in the " "same memory as `&T`." msgstr "" +"\"Niş/oyuk optimizasyonu (niche optimization)\", T'nin geçerli bir değeri " +"olmayan bir gösterimi (representation) varsa, `Option`'nin genellikle " +"bellekte `T` ile aynı boyuta sahip olduğu anlamına gelir. Örneğin, bir " +"referans NULL olamaz, bu nedenle `Option<&T>` `None` varyantını temsil etmek " +"için otomatik olarak NULL kullanır ve bu sayede `&T` ile aynı bellekte " +"saklanabilir." #: src/std-types/result.md msgid "" @@ -7364,22 +7422,26 @@ msgid "" "operation, each with a different enum variant. It is generic: `Result` " "where `T` is used in the `Ok` variant and `E` appears in the `Err` variant." msgstr "" +"`Result`, `Option`'a benzer, ancak her biri farklı bir enum varyantına sahip " +"bir işlemin başarısını veya başarısızlığını belirtir. Jeneriktir: `Result`; burada `T`, `Ok` varyantında kullanılır ve `E`, `Err` varyantında " +"görünür." #: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" -msgstr "" +msgstr "\"günlük.txt\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"Dear diary: {contents} ({bytes} bytes)\"" -msgstr "" +msgstr "\"Sevgili günlük: {contents} ({bytes} bayt)\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"Could not read file content\"" -msgstr "" +msgstr "\"Dosya içeriği okunamadı\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"The diary could not be opened: {err}\"" -msgstr "" +msgstr "\"Günlük açılamadı: {err}\"" #: src/std-types/result.md msgid "" @@ -7388,6 +7450,11 @@ msgid "" "case where an error should never happen, `unwrap()` or `expect()` can be " "called, and this is a signal of the developer intent too." msgstr "" +"`Option`'da olduğu gibi, başarılı değer `Result`'ın içinde yer alır ve " +"geliştiriciyi onu açıkça (explicitly) çıkarmaya zorlar. Bu, hata kontrolünü " +"teşvik eder. Bir hatanın asla olmaması gereken durumlarda, `unwrap()` veya " +"`expect()` çağrılabilir ve bu aynı zamanda geliştiricinin niyetinin de bir " +"işaretidir." #: src/std-types/result.md msgid "" @@ -7395,18 +7462,25 @@ msgid "" "is worth mentioning. It contains a lot of convenience methods and functions " "that help functional-style programming." msgstr "" +"`Result` dokümantasyonunu okumanız tavsiye edilir. Kurs sırasında değil, ama " +"bahsetmeye değer. Fonksiyonel tarzda programlamaya yardımcı olan birçok " +"kullanışlı metot ve fonksiyon içerir." #: src/std-types/result.md msgid "" "`Result` is the standard type to implement error handling as we will see on " "Day 4." msgstr "" +"`Result`, 4. Günde göreceğimiz gibi hata işlemeyi (error handling) " +"gerçekleştirmek (implement) için standart türdür." #: src/std-types/string.md msgid "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a " "growable UTF-8 encoded string:" msgstr "" +"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) türü, " +"büyüyebilir, UTF-8 olarak kodlanmış bir dizedir (string):" #: src/std-types/string.md src/std-traits/comparisons.md #: src/std-traits/read-and-write.md src/memory-management/review.md @@ -7416,23 +7490,23 @@ msgstr "\"Merhaba\"" #: src/std-types/string.md msgid "\"s1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s1: uzunluk = {}, kapasite = {}\"" #: src/std-types/string.md msgid "'!'" -msgstr "" +msgstr "'!'" #: src/std-types/string.md msgid "\"s2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s2: uzunluk = {}, kapasite = {}\"" #: src/std-types/string.md msgid "\"🇨🇭\"" -msgstr "" +msgstr "\"🇹🇷\"" #: src/std-types/string.md msgid "\"s3: len = {}, number of chars = {}\"" -msgstr "" +msgstr "\"s3: uzunluk = {}, karakter sayısı = {}\"" #: src/std-types/string.md msgid "" @@ -7440,18 +7514,26 @@ msgid "" "string/struct.String.html#deref-methods-str), which means that you can call " "all `str` methods on a `String`." msgstr "" +"`String`, [`Deref`](https://doc.rust-lang.org/std/string/" +"struct.String.html#deref-methods-str) özelliğini gerçekleştirir (implement), " +"bu da bir `String` üzerinde tüm `str` metotlarını çağırabileceğiniz anlamına " +"gelir." #: src/std-types/string.md msgid "" "`String::new` returns a new empty string, use `String::with_capacity` when " "you know how much data you want to push to the string." msgstr "" +"`String::new` yeni bir boş dize döndürür, dizeye ne kadar veri eklemek " +"istediğinizi bildiğinizde `String::with_capacity` kullanın." #: src/std-types/string.md msgid "" "`String::len` returns the size of the `String` in bytes (which can be " "different from its length in characters)." msgstr "" +"`String::len`, `String`'in bayt cinsinden boyutunu döndürür (bu, karakter " +"cinsinden uzunluğundan farklı olabilir)." #: src/std-types/string.md msgid "" @@ -7460,34 +7542,48 @@ msgid "" "to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" "unicode_segmentation/struct.Graphemes.html)." msgstr "" +"`String::chars`, gerçek karakterler üzerinde bir adımlayıcı (iterator) " +"döndürür. [yazıbirim (grapheme) kümeleri](https://docs.rs/unicode-" +"segmentation/latest/unicode_segmentation/struct.Graphemes.html) nedeniyle " +"bir `char`'ın bir insanın \"karakter\" olarak kabul edeceği şeyden farklı " +"olabileceğini unutmayın." #: src/std-types/string.md msgid "" "When people refer to strings they could either be talking about `&str` or " "`String`." msgstr "" +"İnsanlar dizelerden (strings) bahsettiğinde, ya `&str` ya da `String`'den " +"bahsediyor olabilirler." #: src/std-types/string.md msgid "" "When a type implements `Deref`, the compiler will let you " "transparently call methods from `T`." msgstr "" +"Bir tür `Deref`'yi gerçekleştirdiğinde (implement), derleyici " +"`T`'den metotları şeffaf bir şekilde çağırmanıza izin verir." #: src/std-types/string.md msgid "" "We haven't discussed the `Deref` trait yet, so at this point this mostly " "explains the structure of the sidebar in the documentation." msgstr "" +"`Deref` özelliğini (trait) henüz tartışmadık, bu yüzden bu noktada bu " +"çoğunlukla dokümantasyondaki kenar çubuğunun yapısını (neden String türünün " +"altında str metodlarının da görüldüğünü) açıklar." #: src/std-types/string.md msgid "" "`String` implements `Deref` which transparently gives it " "access to `str`'s methods." msgstr "" +"`String`, `Deref` özelliğini gerçekleştirir (implement) ve bu " +"ona şeffaf bir şekilde `str`'nin metotlarına erişim sağlar." #: src/std-types/string.md msgid "Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`." -msgstr "" +msgstr "`let s3 = s1.deref();` ve `let s3 = &*s1;` yazıp karşılaştırın." #: src/std-types/string.md msgid "" @@ -7495,22 +7591,29 @@ msgid "" "operations you see supported on vectors are also supported on `String`, but " "with some extra guarantees." msgstr "" +"`String`, bir bayt vektörü etrafında bir sarmalayıcı (wrapper) olarak " +"gerçekleştirilmiştir (implement), vektörlerde desteklenen birçok işlem " +"`String`'de de desteklenir, ancak bazı ek garantilerle." #: src/std-types/string.md msgid "Compare the different ways to index a `String`:" -msgstr "" +msgstr "Bir `String`'e erimenin farklı yollarını karşılaştırın:" #: src/std-types/string.md msgid "" "To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, " "out-of-bounds." msgstr "" +"`i`'nin sınırlar içinde veya dışında olduğu `s3.chars().nth(i).unwrap()` " +"kullanarak bir karaktere erişmek." #: src/std-types/string.md msgid "" "To a substring by using `s3[0..4]`, where that slice is on character " "boundaries or not." msgstr "" +"Bu dilimin (slice) karakter sınırlarına denk gelip gelmediği durumlarda " +"`s3[0..4]` kullanarak bir alt dizeye erişmek." #: src/std-types/string.md msgid "" @@ -7520,36 +7623,45 @@ msgid "" "`Display`, so anything that can be formatted can also be converted to a " "string." msgstr "" +"Birçok tür, [`to_string`](https://doc.rust-lang.org/std/string/trait." +"ToString.html#tymethod.to_string) metodu ile bir dizeye dönüştürülebilir. Bu " +"özellik (trait), `Display`'i gerçekleştiren (implement) tüm türler için " +"otomatik olarak gerçekleştirilir, bu nedenle biçimlendirilebilen (format) " +"her şey bir dizeye de dönüştürülebilir." #: src/std-types/vec.md msgid "" "[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard " "resizable heap-allocated buffer:" msgstr "" +"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html), standart yeniden " +"boyutlandırılabilir dinamik bellekten tahsis edilen arabellektir (heap-" +"allocated buffer):" #: src/std-types/vec.md msgid "\"v1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v1: uzunluk = {}, kapasite = {}\"" #: src/std-types/vec.md msgid "\"v2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v2: uzunluk = {}, kapasite = {}\"" #: src/std-types/vec.md msgid "// Canonical macro to initialize a vector with elements.\n" msgstr "" +"// Bir vektörü elemanlarla ilklendirmek (initialize) için standart makro.\n" #: src/std-types/vec.md msgid "// Retain only the even elements.\n" -msgstr "" +msgstr "// Sadece çift elemanları tut.\n" #: src/std-types/vec.md msgid "\"{v3:?}\"" -msgstr "" +msgstr "\"{v3:?}\"" #: src/std-types/vec.md msgid "// Remove consecutive duplicates.\n" -msgstr "" +msgstr "// Ardışık kopyaları sil.\n" #: src/std-types/vec.md msgid "" @@ -7557,6 +7669,9 @@ msgid "" "struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice " "methods on a `Vec`." msgstr "" +"`Vec`, [`Deref`](https://doc.rust-lang.org/std/vec/struct.Vec." +"html#deref-methods-%5BT%5D) özelliğini gerçekleştirir (implement), bu da bir " +"`Vec` üzerinde dilim (slice) metotlarını çağırabileceğiniz anlamına gelir." #: src/std-types/vec.md msgid "" @@ -7564,6 +7679,10 @@ msgid "" "it contains is stored on the heap. This means the amount of data doesn't " "need to be known at compile time. It can grow or shrink at runtime." msgstr "" +"`Vec`, `String` ve `HashMap` ile birlikte bir koleksiyon türüdür. İçerdiği " +"veriler dinamik bellekte (heap) saklanır. Bu, veri miktarının derleme " +"zamanında bilinmesi gerekmediği anlamına gelir. Çalışma zamanında " +"büyüyebilir veya küçülebilir." #: src/std-types/vec.md msgid "" @@ -7571,12 +7690,18 @@ msgid "" "explicitly. As always with Rust type inference, the `T` was established " "during the first `push` call." msgstr "" +"`Vec`'nin de jenerik (generic) bir tür olduğuna, ancak `T`'yi açıkça " +"belirtmek zorunda olmadığınıza dikkat edin. Rust tür çıkarımında (type " +"inference) her zaman olduğu gibi, `T` ilk `push` çağrısı sırasında " +"belirlenmiştir." #: src/std-types/vec.md msgid "" "`vec![...]` is a canonical macro to use instead of `Vec::new()` and it " "supports adding initial elements to the vector." msgstr "" +"`vec![...]`, `Vec::new()` yerine kullanılacak standart bir makrodur ve " +"vektöre başlangıç elemanları eklemeyi destekler." #: src/std-types/vec.md msgid "" @@ -7584,57 +7709,68 @@ msgid "" "Alternatively, using `get` will return an `Option`. The `pop` function will " "remove the last element." msgstr "" +"Vektörün elemanlarına erişmek için `[` `]` kullanırsınız, ancak sınırlar " +"dışındaysa paniğe (panic) neden olurlar. Alternatif olarak, `get` kullanmak " +"bir `Option` döndürür. `pop` fonksiyonu son elemanı kaldırır." #: src/std-types/vec.md msgid "" "Slices are covered on day 3. For now, students only need to know that a " "value of type `Vec` gives access to all of the documented slice methods, too." msgstr "" +"Dilimler (slices) 3. günde ele alınacak. Şimdilik, öğrencilerin sadece `Vec` " +"türündeki bir değerin, belgelenmiş tüm dilim (slice) metotlarına da erişim " +"sağladığını bilmeleri yeterlidir." #: src/std-types/hashmap.md msgid "Standard hash map with protection against HashDoS attacks:" msgstr "" +"HashDoS saldırılarına karşı korumalı standart özet haritası (hash map):" #: src/std-types/hashmap.md msgid "\"Adventures of Huckleberry Finn\"" -msgstr "" +msgstr "\"Fadiş\"" #: src/std-types/hashmap.md msgid "\"Grimms' Fairy Tales\"" -msgstr "" +msgstr "\"Dede Korkut Hikayeleri\"" #: src/std-types/hashmap.md msgid "\"Pride and Prejudice\"" -msgstr "" +msgstr "\"Aşk-ı Memnu\"" #: src/std-types/hashmap.md msgid "\"Les Misérables\"" -msgstr "" +msgstr "\"İnce Mehmed\"" #: src/std-types/hashmap.md msgid "\"We know about {} books, but not Les Misérables.\"" -msgstr "" +msgstr "\"{} kitap hakkında bilgimiz var, ama İnce Mehmed hakkında yok.\"" #: src/std-types/hashmap.md msgid "\"Alice's Adventure in Wonderland\"" -msgstr "" +msgstr "\"Keloğlan Masalları \"" #: src/std-types/hashmap.md msgid "\"{book}: {count} pages\"" -msgstr "" +msgstr "\"{book}: {count} sayfa\"" #: src/std-types/hashmap.md msgid "\"{book} is unknown.\"" -msgstr "" +msgstr "\"{book} bilinmiyor.\"" #: src/std-types/hashmap.md msgid "// Use the .entry() method to insert a value if nothing is found.\n" msgstr "" +"// Eğer bir şey bulunmazsa bir değer eklemek için .entry() metodunu " +"kullanın.\n" #: src/std-types/hashmap.md msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." msgstr "" +"`HashMap`, başlangıç (prelude) kısmında tanımlı değildir ve kapsama (scope) " +"alınması gerekir." #: src/std-types/hashmap.md msgid "" @@ -7642,18 +7778,21 @@ msgid "" "hashmap and if not return an alternative value. The second line will insert " "the alternative value in the hashmap if the book is not found." msgstr "" +"Aşağıdaki kod satırlarını deneyin. İlk satır bir kitabın hash haritasında " +"olup olmadığına bakar ve yoksa alternatif bir değer döndürür. İkinci satır, " +"kitap bulunmazsa alternatif değeri hash haritasına ekler." #: src/std-types/hashmap.md msgid "\"Harry Potter and the Sorcerer's Stone\"" -msgstr "" +msgstr "\"Osmanlı Cadısı\"" #: src/std-types/hashmap.md msgid "\"The Hunger Games\"" -msgstr "" +msgstr "\"Gri Gökyüzü \"" #: src/std-types/hashmap.md msgid "Unlike `vec!`, there is unfortunately no standard `hashmap!` macro." -msgstr "" +msgstr "`vec!`'in aksine, maalesef standart bir `hashmap!` makrosu yoktur." #: src/std-types/hashmap.md msgid "" @@ -7662,12 +7801,19 @@ msgid "" "From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows " "us to easily initialize a hash map from a literal array:" msgstr "" +"Ancak, Rust 1.56'dan beri, HashMap [`From<[(K, V); N]>`](https://doc.rust-" +"lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,+V);" +"+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) özelliğini (trait) " +"gerçekleştirir (implement), bu da bir özet haritasını (hash map) bir " +"değişmez (literal) diziden kolayca ilklendirmemize (initialize)olanak tanır:" #: src/std-types/hashmap.md msgid "" "Alternatively HashMap can be built from any `Iterator` which yields key-" "value tuples." msgstr "" +"Alternatif olarak HashMap, anahtar-değer (key-value) demetleri (tuple) " +"üreten herhangi bir `Iterator`'dan oluşturulabilir." #: src/std-types/hashmap.md msgid "" @@ -7676,6 +7822,10 @@ msgid "" "Rust docs. Show students the docs for this type, and the helpful link back " "to the `keys` method." msgstr "" +"Bu tür, `std::collections::hash_map::Keys` gibi birkaç \"metoda özgü\" dönüş " +"türüne sahiptir. Bu türler genellikle Rust belgelerindeki aramalarda " +"görünür. Öğrencilere bu türün belgelerini ve `keys` metoduna geri dönen " +"yardımcı bağlantıyı gösterin." #: src/std-types/exercise.md msgid "" @@ -7684,6 +7834,10 @@ msgid "" "stable/std/collections/struct.HashMap.html) to keep track of which values " "have been seen and how many times each one has appeared." msgstr "" +"Bu alıştırmada çok basit bir veri yapısı alıp onu jenerik (generic) hale " +"getireceksiniz. Hangi değerlerin görüldüğünü ve her birinin kaç kez " +"göründüğünü takip etmek için bir [`std::collections::HashMap`](https://doc." +"rust-lang.org/stable/std/collections/struct.HashMap.html) kullanır." #: src/std-types/exercise.md msgid "" @@ -7691,6 +7845,9 @@ msgid "" "values. Make the struct and its methods generic over the type of value being " "tracked, that way `Counter` can track any type of value." msgstr "" +"`Counter`'ın ilk sürümü sadece `u32` değerleri için çalışacak şekilde sabit " +"kodlanmıştır. Yapıyı ve metotlarını, izlenen değerin türü üzerinde jenerik " +"(generic) yapın, bu şekilde `Counter` her tür değeri izleyebilir." #: src/std-types/exercise.md msgid "" @@ -7698,39 +7855,43 @@ msgid "" "stable/std/collections/struct.HashMap.html#method.entry) method to halve the " "number of hash lookups required to implement the `count` method." msgstr "" +"Eğer erken bitirirseniz, `count` metodunu gerçekleştirmek (implement) için " +"gereken özet (hash) arama sayısını yarıya indirmek için [`entry`](https://" +"doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry) " +"metodunu kullanmayı deneyin." #: src/std-types/exercise.md src/std-types/solution.md msgid "" "/// Counter counts the number of times each value of type T has been seen.\n" -msgstr "" +msgstr "/// Counter, T türündeki her bir değerin kaç kez görüldüğünü sayar.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Create a new Counter.\n" -msgstr "" +msgstr "/// Yeni bir Counter oluştur.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Count an occurrence of the given value.\n" -msgstr "" +msgstr "/// Verilen değerin bir tekrarını say.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Return the number of times the given value has been seen.\n" -msgstr "" +msgstr "/// Verilen değerin kaç kez görüldüğünü döndür.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"saw {} values equal to {}\"" -msgstr "" +msgstr "\"{} değer {}`e eşit görüldü\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"apple\"" -msgstr "" +msgstr "\"elma\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"orange\"" -msgstr "" +msgstr "\"portakal\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"got {} apples\"" -msgstr "" +msgstr "\"{} elma alındı\"" #: src/closures.md src/concurrency/threads.md src/concurrency/shared-state.md msgid "This segment should take about 30 minutes. It contains:" @@ -7738,27 +7899,36 @@ msgstr "Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:" #: src/closures/syntax.md msgid "Closures are created with vertical bars: `|..| ..`." -msgstr "" +msgstr "Çevreleyiciler (closures) dikey çubuklarla oluşturulur: `|..| ..`." #: src/closures/syntax.md msgid "// Argument and return type can be inferred for lightweight syntax:\n" msgstr "" +"// Hafif sözdizimi (lightweight syntax) için, argüman ve geri dönüş türü " +"çıkarımı yapılabilir:\n" #: src/closures/syntax.md msgid "// Or we can specify types and bracket the body to be fully explicit:\n" msgstr "" +"// Veya türleri belirtebilir ve tamamen açık (fully explicit) olmak için " +"gövdeyi parantez içine alabiliriz:\n" #: src/closures/syntax.md msgid "" "The arguments go between the `|..|`. The body can be surrounded by `{ .. }`, " "but if it is a single expression these can be omitted." msgstr "" +"Argümanlar `|..|` arasına girer. Gövde `{ .. }` içine alınır., ancak tek bir " +"ifade (expression) ise bunlar atlanabilir." #: src/closures/syntax.md msgid "" "Argument types are optional, and are inferred if not given. The return type " "is also optional, but can only be written if using `{ .. }` around the body." msgstr "" +"Argüman türleri isteğe bağlıdır ve eğer verilmezse türler çıkarım " +"(inference) yapılır. Geri dönüş türü (return type) de isteğe bağlıdır, ancak " +"yalnızca gövdenin etrafında `{ .. }` varsa yazılabilir." #: src/closures/syntax.md msgid "" @@ -7766,6 +7936,10 @@ msgid "" "not capture any variables from their lexical environment. We will see " "captures next." msgstr "" +"Örneklerin her ikisi de bunun yerine sadece iç içe fonksiyonlar olarak " +"yazılabilir -- çünkü bulundukları sözcüksel ortamdan (lexical environment) " +"herhangi bir değişkeni yakalamazlar. Yakalamayı (capturing) bir sonraki " +"adımda göreceğiz." #: src/closures/syntax.md msgid "" @@ -7774,17 +7948,27 @@ msgid "" "closures can: [Example in the playground](https://play.rust-lang.org/?" "version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." msgstr "" +"Fonksiyonları değişkenlerde saklama yeteneği sadece çevreleyicilere " +"(closures) özgü değildir, düzenli (regular) fonksiyonlar da değişkenlere " +"konulabilir ve ardından çevreleyicilerle aynı şekilde çağrılabilir: [Deneme " +"alanında (playground) örnek](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." #: src/closures/syntax.md msgid "" "The linked example also demonstrates that closures that don't capture " "anything can also coerce to a regular function pointer." msgstr "" +"Bağlantısı verilen örnek ayrıca hiçbir şey yakalamayan (capture) " +"çevreleyicilerin (closures) de düzenli bir fonksiyon göstericisine (regular " +"function pointer) dönüştürülebileceğini (coerce) göstermektedir." #: src/closures/capturing.md msgid "" "A closure can capture variables from the environment where it was defined." msgstr "" +"Bir çevreleyici (closure), tanımlandığı ortamdan değişkenleri yakalayabilir " +"(capture)." #: src/closures/capturing.md msgid "" @@ -7793,12 +7977,20 @@ msgid "" "`max_value` mutable, changing it, and printing the clamped values again. Why " "doesn't this work?" msgstr "" +"Varsayılan olarak, bir çevreleyici (closure) değerleri referans yoluyla " +"yakalar. Burada `max_value`, `clamp` tarafından yakalanır, ancak yazdırma " +"için `main`'de hala kullanılabilir. `max_value` değişkenini değiştirilebilir " +"(mutable) yapmayı, değiştirmeyi ve değerleri tekrar yazdırmayı deneyin. Bu " +"neden işe yaramıyor?" #: src/closures/capturing.md msgid "" "If a closure mutates values, it will capture them by mutable reference. Try " "adding `max_value += 1` to `clamp`." msgstr "" +"Bir çevreleyici (closure) değerleri değiştirirse, onları değiştirilebilir " +"(mutable) referans yoluyla yakalar. `clamp`'e `max_value += 1` eklemeyi " +"deneyin." #: src/closures/capturing.md msgid "" @@ -7806,12 +7998,19 @@ msgid "" "`move` keyword. This can help with lifetimes, for example if the closure " "must outlive the captured values (more on lifetimes later)." msgstr "" +"Bir çevreleyiciyi (closure), `move` anahtar kelimesiyle değerleri referans " +"almak yerine taşımaya (move) zorlayabilirsiniz. Bu, ömürlerle (lifetimes) " +"ilgili yardımcı olabilir, örneğin çevreleyici yakalanan değerlerden daha " +"uzun yaşamalıysa (ömürler hakkında daha sonra daha fazla bilgi)." #: src/closures/capturing.md msgid "" "This looks like `move |v| ..`. Try adding this keyword and see if `main` can " "still access `max_value` after defining `clamp`." msgstr "" +"Bu, `move |v| ..` gibi görünüyor. Bu anahtar kelimeyi eklemeyi deneyin ve " +"`clamp`'i tanımladıktan sonra `main`'in hala `max_value`'e erişip " +"erişemediğini görün." #: src/closures/capturing.md msgid "" @@ -7820,10 +8019,15 @@ msgid "" "then exclusive reference, then by move). The `move` keyword forces capture " "by value." msgstr "" +"Varsayılan olarak, çevreleyiciler (closures) dış kapsamdan (outer scope) her " +"değişkeni, yapabildikleri en az talepkar erişim biçimiyle yakalarlar " +"(mümkünse paylaşılan (shared) referansla, sonra özel (exclusive) referansla, " +"sonra taşıma (move) ile). `move` anahtar kelimesi, değerle yakalamayı " +"(move)zorlar." #: src/closures/traits.md msgid "Closure traits" -msgstr "Çevreleyici özellikler (Closures traits)" +msgstr "Çevreleyici özellikleri (Closure traits)" #: src/closures/traits.md msgid "" @@ -7832,64 +8036,72 @@ msgid "" "html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " "[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" msgstr "" +"Çevreleyicilerin (closures) veya lambda ifadelerinin isimlendirilemeyen " +"türleri vardır. Ancak, özel [`Fn`](https://doc.rust-lang.org/std/ops/trait." +"Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html) ve " +"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) " +"özelliklerini (traits) gerçekleştirirler (implement):" #: src/closures/traits.md msgid "" "The special types `fn(..) -> T` refer to function pointers - either the " "address of a function, or a closure that captures nothing." msgstr "" +"Özel `fn(..) -> T` türleri, fonksiyon göstericilerine (function pointers) " +"referans verir - ya bir fonksiyonun adresi ya da hiçbir şey yakalamayan " +"(capture) bir çevreleyici (closure)." #: src/closures/traits.md msgid "\"Calling {func_name}({input}): {}\"" -msgstr "" +msgstr "\"Çağrılıyor {func_name}({input}): {}\"" #: src/closures/traits.md msgid "\"-itis\"" -msgstr "" +msgstr "\"sendromu\"" #: src/closures/traits.md msgid "\"{x}{suffix}\"" -msgstr "" +msgstr "\"{x} {suffix}\"" #: src/closures/traits.md msgid "\"add_suffix\"" -msgstr "" +msgstr "\"add_suffix\"" #: src/closures/traits.md msgid "\"senior\"" -msgstr "" +msgstr "\"son sınıf\"" #: src/closures/traits.md msgid "\"appenix\"" -msgstr "" +msgstr "\"apandis\"" #: src/closures/traits.md msgid "\"/\"" -msgstr "" +msgstr "\"/\"" #: src/closures/traits.md msgid "\"accumulate\"" -msgstr "" +msgstr "\"accumulate\"" #: src/closures/traits.md msgid "\"red\"" -msgstr "" +msgstr "\"kırmızı\"" #: src/closures/traits.md msgid "\"green\"" -msgstr "" +msgstr "\"yeşil\"" #: src/closures/traits.md msgid "\"blue\"" -msgstr "" +msgstr "\"mavi\"" #: src/closures/traits.md msgid "\"take_and_reverse\"" -msgstr "" +msgstr "\"take_and_reverse\"" #: src/closures/traits.md msgid "\"reversed: \"" -msgstr "" +msgstr "\"ters çevrilmiş: \"" #: src/closures/traits.md msgid "" @@ -7897,6 +8109,11 @@ msgid "" "can be called needing only a shared reference to the closure, which means " "the closure can be executed repeatedly and even concurrently." msgstr "" +"Bir `Fn` (ör. `add_suffix`) yakalanan değerleri (captured values) ne tüketir " +"ne de değiştirir. Sadece çevreleyiciye (closure) paylaşılan bir referans " +"(shared reference) gerektirerek çağrılabilir, bu da çevreleyicinin tekrar " +"tekrar ve hatta eş zamanlı olarak (concurrently) yürütülebileceği anlamına " +"gelir." #: src/closures/traits.md msgid "" @@ -7904,12 +8121,19 @@ msgid "" "object is accessed via exclusive reference, so it can be called repeatedly " "but not concurrently." msgstr "" +"Bir `FnMut` (ör. `accumulate`) yakalanan değerleri (captured values) " +"değiştirebilir. Çevreleyici (closure) nesnesine özel (exclusive) referans " +"yoluyla erişilir, bu nedenle tekrar tekrar çağrılabilir ancak eş zamanlı " +"olarak (concurrently) çağrılamaz." #: src/closures/traits.md msgid "" "If you have an `FnOnce` (e.g. `take_and_reverse`), you may only call it " "once. Doing so consumes the closure and any values captured by move." msgstr "" +"Eğer bir `FnOnce`'ınız varsa (ör. `take_and_reverse`), onu yalnızca bir kez " +"çağırabilirsiniz. Bunu yapmak, çevreleyiciyi (closure) ve taşıma (move) ile " +"yakalanan tüm değerleri tüketir." #: src/closures/traits.md msgid "" @@ -7917,6 +8141,9 @@ msgid "" "I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " "use an `Fn` wherever an `FnMut` or `FnOnce` is called for." msgstr "" +"`FnMut`, `FnOnce`'ın bir alt türüdür. `Fn`, `FnMut` ve `FnOnce`'ın bir alt " +"türüdür. Yani, `FnOnce`'ın istendiği her yerde bir `FnMut` kullanabilirsiniz " +"ve `FnMut` veya `FnOnce`'ın istendiği her yerde bir `Fn` kullanabilirsiniz." #: src/closures/traits.md msgid "" @@ -7924,6 +8151,10 @@ msgid "" "you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " "the most flexibility for the caller." msgstr "" +"Bir çevreleyici (closure) alan bir fonksiyon tanımladığınızda, " +"yapabiliyorsanız `FnOnce` (yani onu bir kez çağırırsınız), değilse `FnMut` " +"ve son olarak `Fn` almalısınız. Bu, çağırana (caller) en fazla esnekliği " +"sağlar." #: src/closures/traits.md msgid "" @@ -7931,6 +8162,9 @@ msgid "" "(which can be passed to a consumer of any of the 3 closure traits), then " "`FnMut`, and lastly `FnOnce`." msgstr "" +"Buna karşılık, bir çevreleyiciniz (closure) olduğunda, sahip olabileceğiniz " +"en esnek olan `Fn`'dir (3 çevreleyici özelliğinin (trait) herhangi birinin " +"tüketicisine geçirilebilir), sonra `FnMut` ve son olarak `FnOnce`." #: src/closures/traits.md msgid "" @@ -7938,6 +8172,10 @@ msgid "" "`take_and_reverse`), depending on what the closure captures. Function " "pointers (references to `fn` items) implement `Copy` and `Fn`." msgstr "" +"Derleyici ayrıca, çevreleyicinin (closure) ne yakaladığına bağlı olarak " +"`Copy` (ör. `add_suffix` için) ve `Clone` (ör. `take_and_reverse`) çıkarımı " +"yapar (infers). Fonksiyon göstericileri (`fn` öğelerine referanslar) " +"`Copy`'yi ve `Fn`'yi gerçekleştirir (implement)." #: src/closures/exercise.md msgid "" @@ -7945,26 +8183,31 @@ msgid "" "uses a closure to filter log messages, sending those which pass the " "filtering predicate to an inner logger." msgstr "" +"Bu sabahki jenerik (generic) kaydediciden (logger) yola çıkarak, kayıt " +"mesajlarını filtrelemek için bir çevreleyici (closure) kullanan bir `Filter` " +"gerçekleştirin (implement), filtreleme koşulunu geçenleri bir iç kaydediciye " +"(logger) gönderin." #: src/closures/exercise.md msgid "// TODO: Define and implement `Filter`.\n" -msgstr "" +msgstr "// TODO: `Filter`'ı tanımlayın ve gerçekleştirin (implement).\n" #: src/closures/exercise.md src/closures/solution.md msgid "\"yikes\"" -msgstr "" +msgstr "\"berbat\"" #: src/closures/exercise.md src/closures/solution.md msgid "\"yikes, something went wrong\"" -msgstr "" +msgstr "\"berbat, bir şeyler ters gitti\"" #: src/closures/exercise.md src/closures/solution.md msgid "\"uhoh\"" -msgstr "" +msgstr "\"eyvah\"" #: src/closures/solution.md msgid "/// Only log messages matching a filtering predicate.\n" msgstr "" +"/// Yalnızca bir filtreleme koşuluyla eşleşen günlük mesajlarını kaydet.\n" #: src/closures/solution.md msgid "" @@ -7973,6 +8216,11 @@ msgid "" "calling `new`. Demonstrate removing it and showing how the compiler now " "needs type annotations for the closure passed to `new`." msgstr "" +"İlk `Filter` impl bloğundaki `P: Fn(u8, &str) -> bool` sınırının kesinlikle " +"gerekli olmadığını, ancak `new` çağrılırken tür çıkarımına (type inference) " +"yardımcı olduğunu unutmayın. Onu kaldırmayı gösterin ve derleyicinin şimdi " +"`new`'e geçirilen çevreleyici (closure) için tür ek açıklamalarına (type " +"annotations) nasıl ihtiyaç duyduğunu gösterin." #: src/std-traits.md msgid "From and Into" @@ -7984,33 +8232,40 @@ msgstr "Read ve Write" #: src/std-traits.md msgid "Default, struct update syntax" -msgstr "Varsayılan, yapı (struct) güncelleme sözdizimi" +msgstr "Default, yapı güncelleme sözdizimi (struct update syntax)" #: src/std-traits.md msgid "" "As with the standard-library types, spend time reviewing the documentation " "for each trait." msgstr "" +"Standart kütüphane türlerinde olduğu gibi, her bir özellik (trait) için de " +"dokümantasyonu gözden geçirmeye zaman ayırın." #: src/std-traits.md msgid "This section is long. Take a break midway through." -msgstr "" +msgstr "Bu bölüm uzun. Ortasında bir mola verin." #: src/std-traits/comparisons.md msgid "" "These traits support comparisons between values. All traits can be derived " "for types containing fields that implement these traits." msgstr "" +"Bu özellikler (traits), değerler arasında karşılaştırmaları destekler. Tüm " +"özellikler, bu özellikleri gerçekleştiren (implement) alanlar içeren türler " +"için türetilebilir." #: src/std-traits/comparisons.md msgid "`PartialEq` and `Eq`" -msgstr "" +msgstr "`PartialEq` ve `Eq`" #: src/std-traits/comparisons.md msgid "" "`PartialEq` is a partial equivalence relation, with required method `eq` and " "provided method `ne`. The `==` and `!=` operators will call these methods." msgstr "" +"`PartialEq`, gerekli metot `eq` ve sağlanan metot `ne` ile kısmi bir denklik " +"ilişkisidir. `==` ve `!=` operatörleri bu metotları çağırır." #: src/std-traits/comparisons.md msgid "" @@ -8018,32 +8273,42 @@ msgid "" "and implies `PartialEq`. Functions that require full equivalence will use " "`Eq` as a trait bound." msgstr "" +"`Eq` tam bir denklik ilişkisidir (yansımalı, simetrik ve geçişme) " +"(reflexive, symmetric, and transitive) ve `PartialEq` özelliğini kapsar " +"(imply). Tam denklik gerektiren fonksiyonlar, bir özellik sınırı (trait " +"bound) olarak `Eq` kullanır." #: src/std-traits/comparisons.md msgid "`PartialOrd` and `Ord`" -msgstr "" +msgstr "`PartialOrd` ve `Ord`" #: src/std-traits/comparisons.md msgid "" "`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is " "used to implement the `<`, `<=`, `>=`, and `>` operators." msgstr "" +"`PartialOrd`, `partial_cmp` metoduyla kısmi bir sıralama tanımlar. `<`, " +"`<=`, `>=` ve `>` operatörlerini gerçekleştirmek (implement) için kullanılır." #: src/std-traits/comparisons.md msgid "`Ord` is a total ordering, with `cmp` returning `Ordering`." -msgstr "" +msgstr "`Ord`, `cmp`'nin `Ordering` geri döndürdüğü tam bir sıralamadır." #: src/std-traits/comparisons.md msgid "" "`PartialEq` can be implemented between different types, but `Eq` cannot, " "because it is reflexive:" msgstr "" +"`PartialEq` farklı türler arasında gerçekleştirilebilir (implement), ancak " +"`Eq` yansımalı (reflexive) olduğu için gerçekleştirilemez:" #: src/std-traits/comparisons.md msgid "" "In practice, it's common to derive these traits, but uncommon to implement " "them." msgstr "" +"Pratikte bu özellikleri (traits) türetmek (derive) yaygındır, ancak onları " +"gerçekleştirmek (implement) yaygın değildir." #: src/std-traits/comparisons.md msgid "" @@ -8052,25 +8317,34 @@ msgid "" "references to two different things can compare as equal if the values " "pointed to are the same:" msgstr "" +"Rust'ta referansları karşılaştırırken, gösterdikleri şeylerin değerini " +"karşılaştırır, referansların kendilerini DEĞİL. Bu, gösterilen değerler " +"aynıysa, iki farklı şeye yapılan referansların eşit olarak " +"karşılaştırılabileceği anlamına gelir:" #: src/std-traits/operators.md msgid "" "Operator overloading is implemented via traits in [`std::ops`](https://doc." "rust-lang.org/std/ops/index.html):" msgstr "" +"Operatör yüklemesi (overloading), [`std::ops`](https://doc.rust-lang.org/std/" +"ops/index.html)'deki özellikler (traits) aracılığıyla gerçekleştirilir " +"(implement):" #: src/std-traits/operators.md msgid "\"{p1:?} + {p2:?} = {:?}\"" -msgstr "" +msgstr "\"{p1:?} + {p2:?} = {:?}\"" #: src/std-traits/operators.md src/memory-management/drop.md msgid "Discussion points:" -msgstr "" +msgstr "Tartışma noktaları:" #: src/std-traits/operators.md msgid "" "You could implement `Add` for `&Point`. In which situations is that useful?" msgstr "" +"`&Point` için `Add`'i gerçekleştirebilirsiniz (implement). Bu hangi " +"durumlarda kullanışlıdır?" #: src/std-traits/operators.md msgid "" @@ -8078,12 +8352,17 @@ msgid "" "the operator is not `Copy`, you should consider overloading the operator for " "`&T` as well. This avoids unnecessary cloning on the call site." msgstr "" +"Cevap: `Add:add`, `self`'i tüketir. Operatörü yüklediğiniz `T` türü `Copy` " +"değilse, operatörü `&T` için de yüklemey yapmayı (overloading) " +"düşünmelisiniz. Bu, çağrı yerleride (call site) gereksiz klonlamayı önler." #: src/std-traits/operators.md msgid "" "Why is `Output` an associated type? Could it be made a type parameter of the " "method?" msgstr "" +"`Output` neden bir ilişkili türdür (associated type)? Metodun bir tür " +"parametresi yapılabilir miydi?" #: src/std-traits/operators.md msgid "" @@ -8091,12 +8370,17 @@ msgid "" "associated types (like `Output`) are controlled by the implementer of a " "trait." msgstr "" +"Kısa cevap: Fonksiyon tür parametreleri çağıran (caller) tarafından kontrol " +"edilir, ancak ilişkili türler (`Output` gibi) bir özelliğin (trait) " +"gerçekleştiricisi (implementer) tarafından kontrol edilir." #: src/std-traits/operators.md msgid "" "You could implement `Add` for two different types, e.g. `impl Add<(i32, " "i32)> for Point` would add a tuple to a `Point`." msgstr "" +"İki farklı tür için `Add` gerçekleştirebilirsiniz (implement), örn. `impl " +"Add<(i32, i32)> for Point`, bu bir `Point`'e bir demet (tuple) eklerdi." #: src/std-traits/operators.md msgid "" @@ -8105,6 +8389,10 @@ msgid "" "negates each bit of the number, which arithmetically is equivalent to " "subtracting it from -1: `!5 == -6`." msgstr "" +"`Not` özelliği (`!` operatörü), C ailesi dillerindeki aynı operatör gibi " +"\"boole'laştırmadığı\" için dikkat çekicidir; bunun yerine, tamsayı türleri " +"için sayının her bitini olumsuzlar, bu da aritmetik olarak onu -1'den " +"çıkarmaya eşdeğerdir: `!5 == -6`." #: src/std-traits/from-and-into.md msgid "" @@ -8113,10 +8401,14 @@ msgid "" "facilitate type conversions. Unlike `as`, these traits correspond to " "lossless, infallible conversions." msgstr "" +"Türler, tür dönüşümlerini kolaylaştırmak için [`From`](https://doc.rust-lang." +"org/std/convert/trait.From.html) ve [`Into`](https://doc.rust-lang.org/std/" +"convert/trait.Into.html) özelliklerini gerçekleştirir (implement). `as`'in " +"aksine, bu özellikler (traits) kayıpsız, hatasız dönüşümlere karşılık gelir." #: src/std-traits/from-and-into.md msgid "\"{s}, {addr}, {one}, {bigger}\"" -msgstr "" +msgstr "\"{s}, {addr}, {one}, {bigger}\"" #: src/std-traits/from-and-into.md msgid "" @@ -8124,12 +8416,17 @@ msgid "" "automatically implemented when [`From`](https://doc.rust-lang.org/std/" "convert/trait.From.html) is implemented:" msgstr "" +"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) " +"gerçekleştirildiğinde (implement) [`Into`](https://doc.rust-lang.org/std/" +"convert/trait.Into.html) otomatik olarak gerçekleştirilir:" #: src/std-traits/from-and-into.md msgid "" "That's why it is common to only implement `From`, as your type will get " "`Into` implementation too." msgstr "" +"Bu yüzden sadece `From`'u gerçekleştirmek (implement) yaygındır, çünkü " +"türünüz `Into` gerçekleştirmesini de alacaktır." #: src/std-traits/from-and-into.md msgid "" @@ -8138,24 +8435,31 @@ msgid "" "Your function will accept types that implement `From` and those that _only_ " "implement `Into`." msgstr "" +"\"Bir `String`'e dönüştürülebilen herhangi bir şey\" gibi bir fonksiyon " +"argümanı girdi türü bildirirken, kural tam tersidir, `Into` kullanmalısınız. " +"Fonksiyonunuz `From`'u gerçekleştiren (implement) türleri ve _sadece_ " +"`Into`'yu gerçekleştirenleri kabul edecektir." #: src/std-traits/casting.md msgid "" "Rust has no _implicit_ type conversions, but does support explicit casts " "with `as`. These generally follow C semantics where those are defined." msgstr "" +"Rust'ta _örtük (implicit)_ tür dönüşümleri yoktur, ancak `as` ile açık " +"(explicit) tür dönüştürmelerini (casts) destekler. Bunlar genellikle " +"tanımlandıkları yerlerde C semantiğini takip eder." #: src/std-traits/casting.md msgid "\"as u16: {}\"" -msgstr "" +msgstr "\"u16 olarak: {}\"" #: src/std-traits/casting.md msgid "\"as i16: {}\"" -msgstr "" +msgstr "\"i16 olarak: {}\"" #: src/std-traits/casting.md msgid "\"as u8: {}\"" -msgstr "" +msgstr "\"u8 olarak: {}\"" #: src/std-traits/casting.md msgid "" @@ -8163,6 +8467,10 @@ msgid "" "platforms. This might not match your intuition for changing sign or casting " "to a smaller type -- check the docs, and comment for clarity." msgstr "" +"`as`'in sonuçları Rust'ta _her zaman_ tanımlıdır ve platformlar arasında " +"tutarlıdır. Bu, işaret (sign) değiştirme veya daha küçük bir türe dönüştürme " +"(cast) konusundaki sezginizle uyuşmayabilir -- belgeleri kontrol edin ve " +"açıklık için yorum yapın." #: src/std-traits/casting.md msgid "" @@ -8173,6 +8481,12 @@ msgid "" "selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what " "was in the high bits)." msgstr "" +"`as` ile dönüştürme (cast), yanlış kullanılması kolay olan nispeten keskin " +"bir araçtır ve gelecekteki bakım çalışmaları (maintenance work) kullanılan " +"türleri veya türlerdeki değer aralıklarını değiştirdikçe ince hataların " +"kaynağı olabilir. Tür dnüştürmesi en iyi, niyetin koşulsuz olarak kesmeyi " +"belirtmek olduğu durumlarda kullanılır (örneğin, yüksek bitlerde ne olursa " +"olsun bir `u64`'ün alt 32 bitini `as u32` ile seçmek)." #: src/std-traits/casting.md msgid "" @@ -8181,10 +8495,15 @@ msgid "" "casts, `TryFrom` and `TryInto` are available when you want to handle casts " "that fit differently from those that don't." msgstr "" +"Hatasız tür dönüştürmeleri (cast) için (örneğin `u32`'den `u64`'e), " +"dönüşümün gerçekten hatasız olduğunu doğrulamak için `as` yerine `From` veya " +"`Into` kullanmayı tercih edin. Hatalı olabilecek dönüştürmeler (cast) için, " +"uyan ve uymayan dnüştürmeleri (cast) ele almak istediğinizde `TryFrom` ve " +"`TryInto` mevcuttur." #: src/std-traits/casting.md msgid "Consider taking a break after this slide." -msgstr "" +msgstr "Bu slayttan sonra bir mola vermeyi düşünün." #: src/std-traits/casting.md msgid "" @@ -8192,10 +8511,15 @@ msgid "" "be lost is generally discouraged, or at least deserves an explanatory " "comment." msgstr "" +"`as`, C++'daki bir statik dönüştürmeye (static cast) benzer. Veri kaybı " +"olabilecek durumlarda `as` kullanımı genellikle önerilmez veya en azından " +"açıklayıcı bir yorumu hak eder." #: src/std-traits/casting.md msgid "This is common in casting integers to `usize` for use as an index." msgstr "" +"Bu, tamsayıları bir indeks olarak kullanmak üzere `usize`'a dönüştürürken " +"yaygındır." #: src/std-traits/read-and-write.md msgid "" @@ -8203,36 +8527,41 @@ msgid "" "[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can " "abstract over `u8` sources:" msgstr "" +"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) ve [`BufRead`]" +"(https://doc.rust-lang.org/std/io/trait.BufRead.html) kullanarak, `u8` " +"kaynakları üzerinde soyutlama yapabilirsiniz:" #: src/std-traits/read-and-write.md msgid "b\"foo\\nbar\\nbaz\\n\"" -msgstr "" +msgstr "b\"foo\\nbar\\nbaz\\n\"" #: src/std-traits/read-and-write.md msgid "\"lines in slice: {}\"" -msgstr "" +msgstr "\"dilimdeki (slice) satırlar: {}\"" #: src/std-traits/read-and-write.md msgid "\"lines in file: {}\"" -msgstr "" +msgstr "\"dosyadaki satırlar: {}\"" #: src/std-traits/read-and-write.md msgid "" "Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets " "you abstract over `u8` sinks:" msgstr "" +"Benzer şekilde, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) " +"`u8` alıcıları (sinks) üzerinde soyutlama yapmanızı sağlar:" #: src/std-traits/read-and-write.md msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" #: src/std-traits/read-and-write.md msgid "\"Logged: {buffer:?}\"" -msgstr "" +msgstr "\"Kaydedildi: {buffer:?}\"" #: src/std-traits/default.md msgid "The `Default` Trait" -msgstr "" +msgstr "`Default` Özelliği (Trait)" #: src/std-traits/default.md msgid "" @@ -8240,46 +8569,58 @@ msgid "" "trait produces a default value for a type." msgstr "" "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " -"özelliği (trait) bir tür için varsayılan bir değer üretir." +"özelliği (trait), bir tür için varsayılan bir değer üretir." #: src/std-traits/default.md msgid "\"John Smith\"" -msgstr "" +msgstr "\"Evliya Çelebi\"" #: src/std-traits/default.md msgid "\"Y is set!\"" -msgstr "" +msgstr "\"Y ayarlandı!\"" #: src/std-traits/default.md msgid "" "It can be implemented directly or it can be derived via `#[derive(Default)]`." msgstr "" +"Doğrudan gerçekleştirilebilir (implement) veya `#[derive(Default)]` " +"aracılığıyla türetilebilir." #: src/std-traits/default.md msgid "" "A derived implementation will produce a value where all fields are set to " "their default values." msgstr "" +"Türetilmiş bir gerçekleştirme (implementation), tüm alanların varsayılan " +"değerlerine ayarlandığı bir değer üretecektir." #: src/std-traits/default.md msgid "This means all types in the struct must implement `Default` too." msgstr "" +"Bu, yapıdaki (struct) tüm türlerin de `Default`'u gerçekleştirmesi " +"(implement) gerektiği anlamına gelir." #: src/std-traits/default.md msgid "" "Standard Rust types often implement `Default` with reasonable values (e.g. " "`0`, `\"\"`, etc)." msgstr "" +"Standart Rust türleri genellikle `Default`'u makul değerlerle (ör. `0`, " +"`\"\"`, vb.) gerçekleştirir (implement)." #: src/std-traits/default.md msgid "The partial struct initialization works nicely with default." msgstr "" +"Kısmi yapı ilklendirmesi (partial struct initialization), default ile güzel " +"çalışır." #: src/std-traits/default.md msgid "" "The Rust standard library is aware that types can implement `Default` and " "provides convenience methods that use it." msgstr "" +"Rust standart kütüphanesi, türlerin `Default`'u gerçekleştirebileceğinin " +"(implement) farkındadır ve onu kullanan kullanışlı metotlar sağlar." #: src/std-traits/default.md msgid "" @@ -8287,6 +8628,9 @@ msgid "" "book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" "with-struct-update-syntax)." msgstr "" +"`..` sözdizimine [yapı güncelleme sözdizimi (struct update syntax)](https://" +"doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-" +"other-instances-with-struct-update-syntax) denir." #: src/std-traits/exercise.md msgid "" @@ -8295,24 +8639,31 @@ msgid "" "implement the missing bits. Only rotate ASCII alphabetic characters, to " "ensure the result is still valid UTF-8." msgstr "" +"Bu örnekte, klasik [\"ROT13\" şifresini](https://en.wikipedia.org/wiki/" +"ROT13) gerçekleştireceksiniz (implement). Bu kodu deneme alanına " +"(playground) kopyalayın ve eksik kısımları gerçekleştirin. Sonucun hala " +"geçerli UTF-8 olduğundan emin olmak için yalnızca ASCII alfabetik " +"karakterleri döndürün." #: src/std-traits/exercise.md msgid "// Implement the `Read` trait for `RotDecoder`.\n" -msgstr "" +msgstr "// `RotDecoder` için `Read` özelliğini (trait) gerçekleştirin.\n" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"Gb trg gb gur bgure fvqr!\"" -msgstr "" +msgstr "\"B gnensn ineznx tnlrfvlyr!\"" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"To get to the other side!\"" -msgstr "" +msgstr "\"O tarafa varmak gayesiyle!\"" #: src/std-traits/exercise.md msgid "" "What happens if you chain two `RotDecoder` instances together, each rotating " "by 13 characters?" msgstr "" +"Her biri 13 karakter kaydırma (ROT13) yapan iki adet RotDecoder örneğini " +"ardı ardına (biri diğerinin çıktısını okuyarak) çalıştırırsan ne olur?" #: src/welcome-day-3.md msgid "Welcome to Day 3" From bd4be837a32a246da0d6816cae91fd299c581099 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sun, 13 Jul 2025 18:46:36 +0300 Subject: [PATCH 22/26] some improvements to previous translations --- po/tr.po | 95 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/po/tr.po b/po/tr.po index a8852a1958d9..f5081fc1443a 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: 2025-07-06T18:27:10+03:00\n" -"PO-Revision-Date: 2025-07-06 17:14+0300\n" +"PO-Revision-Date: 2025-07-13 18:24+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -280,11 +280,11 @@ msgstr "Değerleri Eşleştirmek" #: src/SUMMARY.md src/pattern-matching.md msgid "Destructuring Structs" -msgstr "Yapıların (Struct) Çözümlenmesi" +msgstr "Yapıların Çözümlenmesi (Destructuring Structs)" #: src/SUMMARY.md src/pattern-matching.md msgid "Destructuring Enums" -msgstr "Enum'ların (Struct) Çözümlenmesi" +msgstr "Enum'ların Çözümlenmesi (Destructuring)" #: src/SUMMARY.md src/pattern-matching.md #: src/pattern-matching/let-control-flow.md @@ -334,7 +334,7 @@ msgstr "İlişkili Türler" #: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md msgid "Deriving" -msgstr "Türetme" +msgstr "Türetme (Deriving)" #: src/SUMMARY.md src/methods-and-traits.md msgid "Exercise: Generic Logger" @@ -456,7 +456,7 @@ msgstr "`From` ve `Into`" #: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md msgid "Casting" -msgstr "Tür Çevirimi" +msgstr "Tür Dönüştürmesi (Casting)" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" @@ -3398,8 +3398,8 @@ msgid "" "Functions will be covered in more detail later." msgstr "" "İlk defa `main` dışında bir fonksiyon görüyoruz, ancak anlamı açık: üç " -"tamsayı alır ve bir tamsayı döndürür. Fonksiyonlar daha sonra daha detaylı " -"olarak ele alınacaktır." +"tamsayı alır ve bir tamsayı geri döndürür. Fonksiyonlar daha sonra daha " +"detaylı olarak ele alınacaktır." #: src/types-and-values/arithmetic.md msgid "Arithmetic is very similar to other languages, with similar precedence." @@ -3898,10 +3898,10 @@ msgid "" "statement (unlike `while` and `for` loops, which can also return when the " "condition fails)." msgstr "" -"`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " -"olduğunu unutmayın. Bunun nedeni, en az bir `break` ifadesinde sonlanmasının " -"garantili olmasıdır (koşul başarısız olduğunda da sonlanabilen `while` ve " -"`for` döngülerinin aksine)." +"`loop`'un önemsiz olmayan (non-trivial) bir değer geri döndüren tek döngüsel " +"yapı olduğunu unutmayın. Bunun nedeni, en az bir `break` ifadesinde " +"sonlanmasının garantili olmasıdır (koşul başarısız olduğunda da sonlanabilen " +"`while` ve `for` döngülerinin aksine)." #: src/control-flow-basics/break-continue/labels.md msgid "" @@ -3925,7 +3925,7 @@ msgid "" "programming languages), then a return type." msgstr "" "Bildirim (declaration) parametrelerinin ardından bir tür (bazı programlama " -"dillerinin tersi) ve ardından bir dönüş türü gelir." +"dillerinin tersi) ve ardından bir geri dönüş türü gelir." #: src/control-flow-basics/functions.md msgid "" @@ -3946,9 +3946,9 @@ msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the return type is omitted." msgstr "" -"Bazı fonksiyonların dönüş değeri (return value) yoktur ve 'birim türü (unit " -"type)', `()` döndürürler. Eğer dönüş türü yazılmazsa, derleyici birim türünü " -"çıkarım (infer) yapacaktır." +"Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü " +"(unit type)', `()` geri döndürürler. Eğer geri dönüş türü yazılmazsa, " +"derleyici birim türünü çıkarım (infer) yapacaktır." #: src/control-flow-basics/functions.md msgid "" @@ -5932,7 +5932,7 @@ msgid "" "a `match`." msgstr "" "`if`/`else` ifadesi, daha sonra bir `match` ile açılan (unpacked) bir enum " -"döndürüyor." +"geri döndürüyor." #: src/pattern-matching/destructuring-enums.md msgid "" @@ -6057,9 +6057,9 @@ msgid "" "all items." msgstr "" "Burada [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." -"String.html#method.pop) dize boşalana kadar `Some(c)` döndürür, ardından " -"`None` döndürür. `while let` tüm öğeler arasında adımlamaya (iterating) " -"devam etmemizi sağlar." +"String.html#method.pop) dize boşalana kadar `Some(c)` geri döndürür, " +"ardından `None` geri döndürür. `while let` tüm öğeler arasında adımlamaya " +"(iterating) devam etmemizi sağlar." #: src/pattern-matching/let-control-flow/while-let.md msgid "" @@ -6099,7 +6099,7 @@ msgid "" "let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " "- anything but falling off the end of the block)." msgstr "" -"Bir deseni eşleştirip fonksiyondan geri dönmenin yaygın durumu için [`let " +"Bir deseni eşleştirip fonksiyondan geri döndürmenin yaygın durumu için [`let " "else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) " "kullanın. \"else\" durumu farklı olmalıdır (diverge) (`return`, `break` veya " "`panic` - bloğun sonundan çıkmak dışında her şey)." @@ -6132,9 +6132,10 @@ msgid "" "where you try to get a value out of a `Result`, returning an error if the " "`Result` was `Err`." msgstr "" -"Bu erken dönüş tabanlı kontrol akışı (early return-based control flow), Rust " -"hata işleme (error handling) kodunda yaygındır; burada bir `Result`'tan bir " -"değer almaya çalışırsınız ve `Result` `Err` ise bir hata döndürürsünüz." +"Bu erken geri döndürme tabanlı kontrol akışı (early return-based control " +"flow), Rust hata işleme (error handling) kodunda yaygındır; burada bir " +"`Result`'tan bir değer almaya çalışırsınız ve `Result` `Err` ise bir hata " +"geri döndürürsünüz." #: src/pattern-matching/let-control-flow/let-else.md msgid "" @@ -6405,7 +6406,7 @@ msgstr "" #: src/methods-and-traits/traits.md msgid "/// Return a sentence from this pet.\n" -msgstr "/// Bu evcil hayvandan bir cümle döndürün.\n" +msgstr "/// Bu evcil hayvandan bir cümle geri döndürün.\n" #: src/methods-and-traits/traits.md msgid "/// Print a string to the terminal greeting this pet.\n" @@ -6735,8 +6736,8 @@ msgid "" "Rust infers a type for T based on the types of the arguments and return " "value." msgstr "" -"Rust, argümanların ve dönüş değerinin türlerine dayanarak T için bir tür " -"çıkarır (infers)." +"Rust, argümanların ve geri dönüş değerinin türlerine dayanarak T için bir " +"tür çıkarır (infers)." #: src/generics/generic-functions.md msgid "" @@ -6758,9 +6759,9 @@ msgstr "" "Bu, C++ şablonlarına (templates) benzer, ancak Rust, genelleştirilmiş " "(generic) fonksiyonu kısmen de olsa anında derler, bu nedenle bu fonksiyon " "kısıtlamalarla (constraints) eşleşen tüm türler için geçerli olmalıdır. " -"Örneğin, `cond` yanlışsa `left + right` döndürmek için `pick`'i değiştirmeyi " -"deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, Rust bunu yine " -"de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." +"Örneğin, `cond` yanlışsa `left + right` geri döndürmek için `pick`'i " +"değiştirmeyi deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, " +"Rust bunu yine de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." #: src/generics/generic-functions.md msgid "" @@ -6838,7 +6839,7 @@ msgid "" msgstr "" "Belirli alan türü (concrete field type) üzerinde soyutlama yapmak için " "genelleştirmeleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına " -"dönersek:" +"geri dönersek:" #: src/generics/generic-data.md msgid "" @@ -7006,10 +7007,10 @@ msgid "" ">()`." msgstr "" "Geri dönüş konumunda (return position) çıkarım (inference) yapmak zordur. " -"`impl Foo` döndüren bir fonksiyon, döndürdüğü belirli olan türü kaynakta " -"yazmadan seçer. `collect() -> B` gibi genelleştirilmiş bir tür döndüren " -"bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir ve " -"çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo " +"`impl Foo` geri döndüren bir fonksiyon, geri döndürdüğü belirli olan türü " +"kaynakta yazmadan seçer. `collect() -> B` gibi genelleştirilmiş bir tür " +"döndüren bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir " +"ve çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo " "balığı / turbofish) ile `foo.collect::>()` gibi birini seçmesi " "gerekebilir." @@ -7352,7 +7353,7 @@ msgstr "" "Daha önce `Option`'nin bazı kullanımlarını görmüştük. Ya `T` türünde bir " "değer saklar ya da hiçbir şey saklamaz. Örneğin, [`String::find`](https://" "doc.rust-lang.org/stable/std/string/struct.String.html#method.find) bir " -"`Option` döndürür." +"`Option` geri döndürür." #: src/std-types/option.md msgid "\"Löwe 老虎 Léopard Gepardi\"" @@ -7381,8 +7382,8 @@ msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" -"`unwrap`, bir `Option` içindeki değeri döndürür veya paniğe (panic) neden " -"olur. `expect` benzerdir ancak bir hata mesajı (error message) alır." +"`unwrap`, bir `Option` içindeki değeri geri döndürür veya paniğe (panic) " +"neden olur. `expect` benzerdir ancak bir hata mesajı (error message) alır." #: src/std-types/option.md msgid "" @@ -7524,7 +7525,7 @@ msgid "" "`String::new` returns a new empty string, use `String::with_capacity` when " "you know how much data you want to push to the string." msgstr "" -"`String::new` yeni bir boş dize döndürür, dizeye ne kadar veri eklemek " +"`String::new` yeni bir boş dize geri döndürür, dizeye ne kadar veri eklemek " "istediğinizi bildiğinizde `String::with_capacity` kullanın." #: src/std-types/string.md @@ -7532,8 +7533,8 @@ msgid "" "`String::len` returns the size of the `String` in bytes (which can be " "different from its length in characters)." msgstr "" -"`String::len`, `String`'in bayt cinsinden boyutunu döndürür (bu, karakter " -"cinsinden uzunluğundan farklı olabilir)." +"`String::len`, `String`'in bayt cinsinden boyutunu geri döndürür (bu, " +"karakter cinsinden uzunluğundan farklı olabilir)." #: src/std-types/string.md msgid "" @@ -7542,7 +7543,7 @@ msgid "" "to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" "unicode_segmentation/struct.Graphemes.html)." msgstr "" -"`String::chars`, gerçek karakterler üzerinde bir adımlayıcı (iterator) " +"`String::chars`, gerçek karakterler üzerinde bir adımlayıcı (iterator) geri " "döndürür. [yazıbirim (grapheme) kümeleri](https://docs.rs/unicode-" "segmentation/latest/unicode_segmentation/struct.Graphemes.html) nedeniyle " "bir `char`'ın bir insanın \"karakter\" olarak kabul edeceği şeyden farklı " @@ -7711,7 +7712,7 @@ msgid "" msgstr "" "Vektörün elemanlarına erişmek için `[` `]` kullanırsınız, ancak sınırlar " "dışındaysa paniğe (panic) neden olurlar. Alternatif olarak, `get` kullanmak " -"bir `Option` döndürür. `pop` fonksiyonu son elemanı kaldırır." +"bir `Option` geri döndürür. `pop` fonksiyonu son elemanı kaldırır." #: src/std-types/vec.md msgid "" @@ -7779,8 +7780,8 @@ msgid "" "the alternative value in the hashmap if the book is not found." msgstr "" "Aşağıdaki kod satırlarını deneyin. İlk satır bir kitabın hash haritasında " -"olup olmadığına bakar ve yoksa alternatif bir değer döndürür. İkinci satır, " -"kitap bulunmazsa alternatif değeri hash haritasına ekler." +"olup olmadığına bakar ve yoksa alternatif bir değer geri döndürür. İkinci " +"satır, kitap bulunmazsa alternatif değeri hash haritasına ekler." #: src/std-types/hashmap.md msgid "\"Harry Potter and the Sorcerer's Stone\"" @@ -7822,8 +7823,8 @@ msgid "" "Rust docs. Show students the docs for this type, and the helpful link back " "to the `keys` method." msgstr "" -"Bu tür, `std::collections::hash_map::Keys` gibi birkaç \"metoda özgü\" dönüş " -"türüne sahiptir. Bu türler genellikle Rust belgelerindeki aramalarda " +"Bu tür, `std::collections::hash_map::Keys` gibi birkaç \"metoda özgü\" geri " +"dönüş türüne sahiptir. Bu türler genellikle Rust belgelerindeki aramalarda " "görünür. Öğrencilere bu türün belgelerini ve `keys` metoduna geri dönen " "yardımcı bağlantıyı gösterin." @@ -7875,7 +7876,7 @@ msgstr "/// Verilen değerin bir tekrarını say.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Return the number of times the given value has been seen.\n" -msgstr "/// Verilen değerin kaç kez görüldüğünü döndür.\n" +msgstr "/// Verilen değerin kaç kez görüldüğünü geri döndür.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"saw {} values equal to {}\"" From 8590b9ec5605090fea819e6b3800270870903c86 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Sun, 13 Jul 2025 20:56:57 +0300 Subject: [PATCH 23/26] edited traslation of casting --- po/tr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/tr.po b/po/tr.po index f5081fc1443a..cf259a739469 100644 --- a/po/tr.po +++ b/po/tr.po @@ -456,7 +456,7 @@ msgstr "`From` ve `Into`" #: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md msgid "Casting" -msgstr "Tür Dönüştürmesi (Casting)" +msgstr "Tür Dönüştürme (Casting)" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" From debbe69dd9f840f4bd515dcf4f05103723948428 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Tue, 15 Jul 2025 14:22:06 +0300 Subject: [PATCH 24/26] =?UTF-8?q?changed=20jenerik=20->=20genelle=C5=9Ftir?= =?UTF-8?q?me,=20for=20day=202=20afternoon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- po/tr.po | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/po/tr.po b/po/tr.po index cf259a739469..a200299c4d9d 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7424,9 +7424,9 @@ msgid "" "where `T` is used in the `Ok` variant and `E` appears in the `Err` variant." msgstr "" "`Result`, `Option`'a benzer, ancak her biri farklı bir enum varyantına sahip " -"bir işlemin başarısını veya başarısızlığını belirtir. Jeneriktir: `Result`; burada `T`, `Ok` varyantında kullanılır ve `E`, `Err` varyantında " -"görünür." +"bir işlemin başarısını veya başarısızlığını belirtir. Genelleştirilmiştir " +"(generic): `Result`; burada `T`, `Ok` varyantında kullanılır ve `E`, " +"`Err` varyantında görünür." #: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" @@ -7691,9 +7691,9 @@ msgid "" "explicitly. As always with Rust type inference, the `T` was established " "during the first `push` call." msgstr "" -"`Vec`'nin de jenerik (generic) bir tür olduğuna, ancak `T`'yi açıkça " -"belirtmek zorunda olmadığınıza dikkat edin. Rust tür çıkarımında (type " -"inference) her zaman olduğu gibi, `T` ilk `push` çağrısı sırasında " +"`Vec`'nin de genelleştirilmiş (generic) bir tür olduğuna, ancak `T`'yi " +"açıkça belirtmek zorunda olmadığınıza dikkat edin. Rust tür çıkarımında " +"(type inference) her zaman olduğu gibi, `T` ilk `push` çağrısı sırasında " "belirlenmiştir." #: src/std-types/vec.md @@ -7835,8 +7835,8 @@ msgid "" "stable/std/collections/struct.HashMap.html) to keep track of which values " "have been seen and how many times each one has appeared." msgstr "" -"Bu alıştırmada çok basit bir veri yapısı alıp onu jenerik (generic) hale " -"getireceksiniz. Hangi değerlerin görüldüğünü ve her birinin kaç kez " +"Bu alıştırmada çok basit bir veri yapısı alıp onu genelleştirilmiş (generic) " +"hale getireceksiniz. Hangi değerlerin görüldüğünü ve her birinin kaç kez " "göründüğünü takip etmek için bir [`std::collections::HashMap`](https://doc." "rust-lang.org/stable/std/collections/struct.HashMap.html) kullanır." @@ -7847,8 +7847,9 @@ msgid "" "tracked, that way `Counter` can track any type of value." msgstr "" "`Counter`'ın ilk sürümü sadece `u32` değerleri için çalışacak şekilde sabit " -"kodlanmıştır. Yapıyı ve metotlarını, izlenen değerin türü üzerinde jenerik " -"(generic) yapın, bu şekilde `Counter` her tür değeri izleyebilir." +"kodlanmıştır. Yapıyı ve metotlarını, izlenen değerin türü üzerinde " +"genelleştirme (generic) yapın, bu şekilde `Counter` her tür değeri " +"izleyebilir." #: src/std-types/exercise.md msgid "" @@ -8184,8 +8185,8 @@ msgid "" "uses a closure to filter log messages, sending those which pass the " "filtering predicate to an inner logger." msgstr "" -"Bu sabahki jenerik (generic) kaydediciden (logger) yola çıkarak, kayıt " -"mesajlarını filtrelemek için bir çevreleyici (closure) kullanan bir `Filter` " +"Bu sabahki genel kaydediciden (logger) yola çıkarak, kayıt mesajlarını " +"filtrelemek için bir çevreleyici (closure) kullanan bir `Filter` " "gerçekleştirin (implement), filtreleme koşulunu geçenleri bir iç kaydediciye " "(logger) gönderin." From 272196e87f324e8aa20baaf5e8d063577f83d600 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Thu, 17 Jul 2025 11:51:44 +0300 Subject: [PATCH 25/26] some improvement for day 2 afternoon --- po/tr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/tr.po b/po/tr.po index a200299c4d9d..22b34eba859c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7712,7 +7712,7 @@ msgid "" msgstr "" "Vektörün elemanlarına erişmek için `[` `]` kullanırsınız, ancak sınırlar " "dışındaysa paniğe (panic) neden olurlar. Alternatif olarak, `get` kullanmak " -"bir `Option` geri döndürür. `pop` fonksiyonu son elemanı kaldırır." +"bir `Option` geri döndürür. `pop` fonksiyonu son elemanı siler." #: src/std-types/vec.md msgid "" @@ -8613,8 +8613,8 @@ msgstr "" #: src/std-traits/default.md msgid "The partial struct initialization works nicely with default." msgstr "" -"Kısmi yapı ilklendirmesi (partial struct initialization), default ile güzel " -"çalışır." +"Kısmi yapı ilklendirmesi (partial struct initialization), default özelliği " +"ile güzel çalışır." #: src/std-traits/default.md msgid "" From f1b257081e6d60493c880b9c363351c7ca1f4053 Mon Sep 17 00:00:00 2001 From: enes1313 Date: Fri, 18 Jul 2025 10:52:17 +0300 Subject: [PATCH 26/26] Fix typo in HashMap translation --- po/tr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/tr.po b/po/tr.po index 22b34eba859c..eb9831e386f7 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7806,7 +7806,7 @@ msgstr "" "lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,+V);" "+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) özelliğini (trait) " "gerçekleştirir (implement), bu da bir özet haritasını (hash map) bir " -"değişmez (literal) diziden kolayca ilklendirmemize (initialize)olanak tanır:" +"değişmez (literal) diziden kolayca ilklendirmemize (initialize) olanak tanır:" #: src/std-types/hashmap.md msgid ""